Is there a way in Teamcity REST API to get the agent name of the last successful build. I am using Teamcity 8.0.6. I tried this
http://<TeamcityServer>/httpAuth/app/rest/buildTypes/id:BuildId/builds?status=SUCCESS
But the result returned doesn't contain Agent name.
The following will give you the last successful build details for a given build type (where BUILDTYPE is the btxxx id):
http://<TeamcityServer>/httpAuth/app/rest/builds/buildType:(id:BUILDTYPE),status:SUCCESS
The response contains the agent details in the /build/agent
element.