Question
How can I add a build to the top of the queue using the TeamCity REST API?
Answer
According to the addBuildToQueue documentation, the request body should contain a Build object.
Within the Build object, the triggeringOptions field is supported as documented here.
Therefore, please use the following request body:
POST https://<your_teamcity_url>:<port>/app/rest/buildQueue
{
"buildType": {
"id": "<buildTypeId>"
},
"branchName": "main",
"triggeringOptions": {
"queueAtTop": true
}
}
Replace with your actual build configuration ID.
Comments
0 comments
Please sign in to leave a comment.