0
在下面的URL中給出,我可以用它來訂閱onprimise TFS事件嗎?在TFS 2015或TFS 2016中?我可以使用TFS Rest API來訂閱TFS事件嗎?
https://www.visualstudio.com/en-us/docs/integrate/get-started/service-hooks/events
在下面的URL中給出,我可以用它來訂閱onprimise TFS事件嗎?在TFS 2015或TFS 2016中?我可以使用TFS Rest API來訂閱TFS事件嗎?
https://www.visualstudio.com/en-us/docs/integrate/get-started/service-hooks/events
是的。我剛剛測試了使用下面的REST API在TFS 2015.3上創建訂閱,並獲得了成功的結果:
POST http://tfsserver:8080/tfs/DefaultCollection/_apis/hooks/subscriptions?api-version=1.0
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": "xxxxxxxxxxxxxxx"
},
"consumerInputs": {
"url": "https://myservice/myhookeventreceiver"
}
}