VSTS use API to set build parameters at queue time

Using the Chrome Developer tools to capture the payload of a Queue action in the web UI, I’d hazard a guess the format you’re looking for is:

POST https://dev.azure.com/jessehouwing/6484ebc3-af16-4af9-aa66-6b3398db7214/_apis/build/builds
{
"queue": {
    "id": 27
},
"definition": {
    "id": 53
},
"project": {
    "id": "6484ebc3-af16-4af9-aa66-6b3398db7214"
},
"sourceBranch": "refs/heads/master",
"reason": 1,
"demands": [],
"parameters": "{\"system.debug\":\"true\",\"DefinedVariable\":\"Override Value\"}"

}

Leave a Comment