I try to invoke rest API to azure via postman first, I invoke get pipelines API to get the pipeline id and the result is: 2 the response :
{
"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": "\\"
}
]
}
ok assuming the id is 2 as i have only 1 pipeline there i try to invoke the runs API to start this pipeline and I'm getting this :
{
"$id": "1",
"innerException": null,
"message": "Value cannot be null.\r\nParameter name: runParameters",
"typeName": "System.ArgumentNullException, mscorlib",
"typeKey": "ArgumentNullException",
"errorCode": 0,
"eventId": 0
}
UPDATE
also if i try to add to the body :
as described in :
Azure REST API for running builds or pipelines
like this :
{
"resources": {
"repositories:" {
"self": {
"refName": "xxx/ios_build_on_azure"
}
}
}
}
I'm getting :
{
"$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
}
You may try the following content in the body:
{
"resources": {
"repositories": {
"self": {
"refName": "refs/heads/branchname"
}
}
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With