Я пытаюсь создать подписку на веб-перехватчик VSTS для publisherId = tfs и eventType = tfvc.checkin. Вот образец запроса на публикацию:
URL: https://testvstsaccount.visualstudio.com/_apis/hooks/subscriptions?api-version=1.0
Тело запроса:
{
"publisherId": "tfs",
"eventType": "tfvc.checkin",
"resourceVersion": "1.0-preview.1",
"consumerId": "webHooks",
"consumerActionId": "httpRequest",
"publisherInputs": {
"path": "$/"
},
"consumerInputs": {
"url": "https://myservice/myhookeventreceiver"
}
}
В ответ я получаю 400 неверных запросов.
Тело ответа:
{
"$id": "1",
"innerException": null,
"message": "Subscription input 'path' is not supported at scope 'collection'.",
"typeName": "Microsoft.VisualStudio.Services.ServiceHooks.WebApi.SubscriptionInputException, Microsoft.VisualStudio.Services.ServiceHooks.WebApi, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a",
"typeKey": "SubscriptionInputException",
"errorCode": 0,
"eventId": 4501
}
Может ли кто-нибудь помочь мне понять правильный способ создания этого веб-перехватчика.