【发布时间】:2018-05-24 05:55:45
【问题描述】:
我正在尝试注册 webhook 订阅,以便在编辑工作项时通知我的应用程序。我想我会先添加一个workitem.created webhook。但是 - 无论我尝试注册什么订阅,包括文档中的示例,我都会收到相同的错误响应。这是我的例子:
发布:
https://{my-app}.visualstudio.com/DefaultCollection/_apis/hooks/subscriptions/?api-version=1.0
标题:
Authorization:Bearer my-auth-token
Content-Type: application/json
主体:
{
"publisherId": "tfs",
"eventType": "build.complete",
"resourceVersion": "1.0-preview.1",
"consumerId": "webHooks",
"consumerActionId": "httpRequest",
"publisherInputs": {
"buildStatus": "Failed",
"definitionName": "MyWebSite CI",
"projectId": "my-project-id"
},
"consumerInputs": {
"url": "https://requestb.in/14xw4741"
}
}
我得到的错误响应:
{
"$id": "1",
"innerException": null,
"message": "TF400898: An Internal Error Occurred. Activity Id: ecb81b36-4a77-4ae8-9d13-1a5dbb473c8a.",
"typeName": "System.Exception, mscorlib",
"typeKey": "Exception",
"errorCode": 0,
"eventId": 0
}
我尝试了多个 API 版本:
api-version=4.1-preview
api-version=1.0
api-version=2.0
api-version=3.0
我也试过多个resourceVersions。
我有以下身份验证令牌范围:vso.dashboards、vso.identity、vso.notification_manage、vso.work_full、vso.workitemsearch
【问题讨论】:
标签: visual-studio tfs azure-devops azure-devops-rest-api