Hi,
I'm writing here because I'm having some difficulties with the Xcode Cloud API.
I'm trying to start a build on Xcode Cloud through API on a specific branch.
I have tried to structure the body of the requests using the sourceBranchOrTag
relationship, but I keep running into 409/422
HTML codes.
Currently this is my body:
{
"data": {
"type": "ciBuildRuns",
"attributes": {},
"relationships": {
"workflow": {
"data": {
"type": "ciWorkflows",
"id": WORKFLOW_ID
}
},
"sourceBranchOrTag": {
"data": {
"type": "CiGitRefKind",
"id": "develop",
"attributes": {
"kind": "branch"
}
}
}
}
}
}
I have tried different combinations, but to no avail.
Looking at the documentation there is no clear way on how to structure the scmGitReferences
object required in the body, does anyone have an example of a body like this one?
Extra: Also the documentation is really bad at explaining how query parameters works. Some more practical examples would help a ton. (e.g. filtering the list of builds of a workflow by executionProgress=RUNNING
seems impossible?)
Thanks for your time and have a great day,
Davide