2016-09-30 87 views

回答

0

是的。我剛剛測試了使用下面的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" 
    } 
} 
相關問題