Reputation: 5171
Right now to get a list of the last build for each build type I have to:
/guestAuth/app/rest/buildTypes/
buildType
: /guestAuth/app/rest/buildTypes/id:BUILD_TYPE_ID/builds/?locator=lookupLimit:1
This is very inefficient as I have to make as many requests as there are buildTypes
.
The REST API does not allow to specify more than one BUILD_TYPE_ID
per request to the endpoint.
Is there a way to aggregate this requests? Is it possible to get the last build metadata for each buildType
in one go?
I am using TeamCity 8.1.
Upvotes: 4
Views: 2006
Reputation: 493
Try this:
http://teamcity.jetbrains.com/app/rest/buildTypes?locator=affectedProject:(id:TeamCityPluginsByJetBrains)&fields=buildType(id,name,builds($locator(running:false,canceled:false,count:1),build(number,status,statusText)))
Check comments on this JetBrains' ticket for further details.
Upvotes: 1