Rest API to find queued builds in a particular pool

Answered

Hi, 

It's not completely clear to me how to get the builds queued to a particular pool using the REST API. The UI has the following page: https://my-teamcity-server/queue.html?pool=main - but how can I get this information using the API?

Many thanks

A

0
1 comment

Hi, this is a tricky one. There isn't an agentPool property to use as a locator, but we can search for builds that are currently queued and belong to a particular agent pool like this:

<teamcity url>/app/rest/builds?locator=state:queued,compatibleAgent:(pool:(name:<agent pool>))

Hopefully, this gets you started. Let me know if it works for your purpose or if you still need additional help.

0

Please sign in to leave a comment.