Azure rest API (6.0-preview.1) 运行 管道 returns : "Value cannot be null.\r\nParameter name: runParameters" 通过邮递员
Azure rest API (6.0-preview.1) Run Pipeline returns : "Value cannot be null.\r\nParameter name: runParameters" via postman
我尝试首先通过邮递员将 rest API 调用到 azure,我调用 get pipelines API 来获取管道 id
结果是:2
响应:
{
"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 个管道,我尝试调用运行 API 来启动这个管道,我得到了这个:
{
"$id": "1",
"innerException": null,
"message": "Value cannot be null.\r\nParameter name: runParameters",
"typeName": "System.ArgumentNullException, mscorlib",
"typeKey": "ArgumentNullException",
"errorCode": 0,
"eventId": 0
}
更新
另外,如果我尝试添加到 body :
如中所述:
像这样:
{
"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"
}
}
}
}
我尝试首先通过邮递员将 rest API 调用到 azure,我调用 get pipelines API 来获取管道 id 结果是:2 响应:
{
"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 个管道,我尝试调用运行 API 来启动这个管道,我得到了这个:
{
"$id": "1",
"innerException": null,
"message": "Value cannot be null.\r\nParameter name: runParameters",
"typeName": "System.ArgumentNullException, mscorlib",
"typeKey": "ArgumentNullException",
"errorCode": 0,
"eventId": 0
}
更新
另外,如果我尝试添加到 body :
如中所述:
像这样:
{
"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"
}
}
}
}