Azure rest API(6.0-preview.1)运行管道返回;值不能为空。\r\n参数名称:runParameters";通过邮递员
我首先尝试通过postman将RESTAPI调用到azure,然后调用GetPipelines API来获取管道id 结果是:2 答复如下:Azure rest API(6.0-preview.1)运行管道返回;值不能为空。\r\n参数名称:runParameters";通过邮递员,rest,azure-devops,postman,azure-pipelines,azure-devops-rest-api,Rest,Azure Devops,Postman,Azure Pipelines,Azure Devops Rest Api,我首先尝试通过postman将RESTAPI调用到azure,然后调用GetPipelines API来获取管道id 结果是:2 答复如下: { "count": 1, "value": [ { "_links": { "self": { "href": "ht
{
"count": 1,
"value": [
{
"_links": {
"self": {
"href": "https://dev.azure.com/xxx/5fcd81ac-534e-xxx/_apis/pipelines/2?revision=3"
},
"web": {
"href": "https://dev.azure.com/xxx/5fcd81ac-534e-xxx/_build/definition?definitionId=2"
}
},
"url": "https://dev.azure.com/xxx/5fcd81ac-534e-xxx/_apis/pipelines/2?revision=3",
"id": 2,
"revision": 3,
"name": "xxx.ios_build_on_azure",
"folder": "\\"
}
]
}
好的,假设id为2,因为我只有1条管道,我尝试调用runs API来启动这个管道,我得到以下结果:
更新此外,如果我尝试向身体添加: 如中所述: 像这样:
{
"resources": {
"repositories:" {
"self": {
"refName": "xxx/ios_build_on_azure"
}
}
}
}
我得到:
{
"$id": "1",
"innerException": null,
"message": "TF400898: An Internal Error Occurred. Activity Id: xxxxx-6ff6-4786-bb2e-f12dxxxx.",
"typeName": "Newtonsoft.Json.JsonReaderException, Newtonsoft.Json",
"typeKey": "JsonReaderException",
"errorCode": 0,
"eventId": 0
}
您可以在正文中尝试以下内容:
{
"resources": {
"repositories": {
"self": {
"refName": "refs/heads/branchname"
}
}
}
}
这是否回答了您的问题?我不想将参数传递到我的管道,我以前看到过,查询字符串不够吗?谢谢,这很有效!文件对此不清楚
{
"resources": {
"repositories": {
"self": {
"refName": "refs/heads/branchname"
}
}
}
}