How to check the build queue using cURL

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Summary

Before Bamboo is backed up, the build queue has to be empty so that it doesn't cause any data inconsistency. 

Solution

Use the cURL command to check the build queue endpoint before performing any backup:

1 curl -u <ADMIN_USERNAME>:<PASSWORD> <BAMBOO_URL>/build/admin/ajax/getDashboardSummary.action

Sample outputs:

1 {"status":"OK","builds":[],"agentSummary":" 1 online agent "}
1 {"status":"OK","builds":[{"status":"QUEUED","messageType":"ERROR","messageText":"No agent can build this job.","hasReadPermission":true,"hasBuildPermission":true,"itemType":"BUILD","resultKey":"BSP49354-TES-JOB1-2","buildResultKey":"BSP49354-TES-JOB1-2","planResultKey":"BSP49354-TES-2","planKey":"BSP49354-TES","jobKey":"BSP49354-TES-JOB1","projectName":"BSP-49354","chainName":"testasufh","jobName":"Default Job","planName":"BSP-49354 - testasufh","buildNumber":2,"isBranch":false,"triggerReason":"Manual run by admin","queueIndex":1}],"agentSummary":"No agents online"}
Updated on February 25, 2025

Still need help?

The Atlassian Community is here for you.