【发布时间】:2017-02-15 12:35:14
【问题描述】:
本地 TFS 2015 u2。我想为发布创建事件创建一个 HTTP 服务挂钩订阅。按照 here 和 here 的指示,我正在向
发送 POST 请求http://tfs.mycompany.com:8080/tfs/MyCollection/_apis/hooks/subscriptions?api-version=1.0
使用以下 JSON:
{
"publisherId": "rm",
"eventType": "ms.vss-release.release-created-event",
"resourceVersion": "1.0-preview.1",
"consumerId": "webHooks",
"consumerActionId": "httpRequest",
"publisherInputs":
{
"projectId": "aaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"
},
"consumerInputs":
{
"url": "http://someserver/somefolder/"
}
}
我收到以下错误消息:
{
"innerException": null,
"message": "No publisher could be found with id \"rm\".",
"typeName": "Microsoft.VisualStudio.Services.ServiceHooks.WebApi.PublisherNotFoundException, Microsoft.VisualStudio.Services.ServiceHooks.WebApi, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a",
"typeKey": "PublisherNotFoundException",
"errorCode": 0,
"eventId": 4501
}
确实,如果您请求发布者列表,则只有一个,ID 为“tfs”。那里没有“rm”出版商。从“tfs”发布者请求相同的订阅会产生“未知事件”错误。
我是否必须以某种方式启用该发布者?本地 TFS 是否支持它?如果有,是从哪个版本开始的?
像其他 API 文档一样,使用支持的版本注释他们的 TFS REST API 文档会伤害微软吗?
【问题讨论】:
标签: tfs tfs-2015 tfs-sdk ms-release-management