Get history of builds executed in an agent using RESTAPI

Is there any way to do this with a REST call. Thanks.

 

0
2 comments

You can use the locator feature in your request like this:

http://<teamcity:8111>/app/rest/builds?locator=agent(name:<agent_name>)

It is also possible to include the fields feature to further customize your request like this:

http://<teamcity:8111>/app/rest/builds?locator=agent(name:<agent_name>)&fields=count,build(number,status,statusText,finishDate)

We do have some additional information available to help get you started in our documentation here:

https://www.jetbrains.com/help/teamcity/rest-api.html#RESTAPI-BuildRequests

0

Looks like the locator doesn't work if the agent is in cloud. I get a 404 (not found) when I use cloud AMI image name in place of agent name. 

0

Please sign in to leave a comment.