Ricky Keane
Ricky Keane

Reputation: 1700

Azure Dev Ops Build Agent's builds and releases used

In Azure DevOps is it possible to see all of the builds and releases that are configured to use a particular agent pool? I can see the last 30 builds that have been associated with the agent but would like to see all the builds associated with the pool rather than have to check all of the agent configurations for the build stages. The agent is a self hosted agent as well, if that makes a difference. I don't mind if it is through the UI or the REST api I get this data.

Upvotes: 0

Views: 58

Answers (1)

Hugh Lin
Hugh Lin

Reputation: 19471

To achieve this,you can use this rest api.

GET https://dev.azure.com/{organization}/{project}/_apis/build/builds?queues={queues}&api-version=5.0

You can first use this rest api:GET https://dev.azure.com/{organization}/{project}/_apis/build/builds? to see the queue id of the build running with the private agent. enter image description here

Write the queue id to the rest api filter provided above, and you will get all the builds running on the private agent pool.

enter image description here

But, this is not for all builds, because the build retention policy is set, so the builds that were deleted after the retention period cannot be got. enter image description here

Hope this helps.

Upvotes: 1

Related Questions