gpt4 book ai didi

rest - Azure rest API (6.0-preview.1) Run Pipeline 返回 : "Value cannot be null.\r\nParameter name: runParameters" via postman

转载 作者:行者123 更新时间:2023-12-04 00:54:27 26 4
gpt4 key购买 nike

我尝试首先通过 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 来启动这个管道,我得到了这个:
enter image description here
{
"$id": "1",
"innerException": null,
"message": "Value cannot be null.\r\nParameter name: runParameters",
"typeName": "System.ArgumentNullException, mscorlib",
"typeKey": "ArgumentNullException",
"errorCode": 0,
"eventId": 0
}
更新
如果我尝试添加到正文中:
如中所述:
Azure REST API for running builds or pipelines
像这样 :
{
"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"
}
}
}
}
enter image description here

关于rest - Azure rest API (6.0-preview.1) Run Pipeline 返回 : "Value cannot be null.\r\nParameter name: runParameters" via postman,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63720492/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com