Get only latest build

Answered

Hello,

I want to make a rest call to get the latest build from each type

A Get request to http://adress.com/app/rest/builds gives me all the builds of each type

0
1 comment
Avatar
Permanently deleted user

Hello Rob,

You can list build configurations and filter their builds by "lookupLimit" or "count" build locator dimension, see examples:

https://confluence.jetbrains.com/display/TCD10/REST+API#RESTAPI-BuildRequests

https://confluence.jetbrains.com/display/TCD10/REST+API#RESTAPI-BuildLocator

e.g. for your case REST request may look like:

http://adress.com/app/rest/buildTypes?locator=affectedProject:(id:YourProjectId)&fields=buildType(id,name,builds($locator(lookupLimit:1),build(number,status)))
0

Please sign in to leave a comment.