It seems that the examples are missing when i click on the links to show JSON request example it doesnt work.
I need to kick off a build with a JSON payload.
I'm pretty sure you can actually submit a HTTP POST request with an empty body - the information required to queue the build is embedded in the URL pattern.
If you need to specify additional information, such as overriding custom variable values, you can do that by either appending them as query parameters, or sending them as a form-encoded request body. Here's an example:
curl -vvv -X POST -u admin:admin 'http://localhost:6990/bamboo/rest/api/1.0/queue/PROJECT-PLAN?bamboo.variable.MyCustomerVariable=true' * Hostname was NOT found in DNS cache * Trying ::1... * Connected to localhost (::1) port 6990 (#0) * Server auth using Basic with user 'admin' > POST /bamboo/rest/api/1.0/queue/PROJECT-PLAN?bamboo.variable.MyCustomerVariable=true HTTP/1.1 > Authorization: Basic YWRtaW46YWRtaW4= > User-Agent: curl/7.37.1 > Host: localhost:6990 > Accept: */* > < HTTP/1.1 200 OK * Server Apache-Coyote/1.1 is not blacklisted < Server: Apache-Coyote/1.1 < Set-Cookie: JSESSIONID=79C73D864B26AB65E4CB4DB8D27CD0CA; Path=/ < X-Seraph-LoginReason: OK < X-Content-Type-Options: nosniff < cache-control: private, max-age=0, no-cache < Content-Type: application/xml < Content-Length: 287 < Date: Mon, 04 May 2015 15:04:34 GMT < * Connection #0 to host localhost left intact <?xml version="1.0" encoding="UTF-8" standalone="yes"?><restQueuedBuild buildResultKey="PROJECT-PLAN-4" buildNumber="4" planKey="PROJECT-PLAN"><triggerReason>Manual build</triggerReason><link rel="self" href="http://localhost:6990/bamboo/rest/api/1.0/result/PROJECT-PLAN-4"/></restQueuedBuild>
@Douglas Macqueen - oh, do you mean you want to specify some custom variables when triggering the build? In that case, you can specify them as query parameters or as a form-encoded request body (the documentation appears to be inconsistent on whether or not JSON is accepted). I've edited my answer to include an example.
I'm John Allspaw, co-founder of Adaptive Capacity Labs, where we help teams use their incidents to learn and improve. We bring research-driven methods and approaches to drive effective inciden...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs