Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

TeamCity - REST API - Last successful build

I'm trying to get the latest successful build.

This request returns all of the successful builds for a specified buildType (as BUILDTYPE below).

/httpAuth/app/rest/builds/?locator=buildType:BUILDTYPE,status:SUCCESS

Is there a way to further filter out to get the single latest successful build of the corresponding buildType?

TeamCity Version: Professional 9.1.3 (build 37176)

like image 223
HEADLESS_0NE Avatar asked Mar 28 '16 20:03

HEADLESS_0NE


1 Answers

Adding a count of 1 should work:

/httpAuth/app/rest/builds/?locator=buildType:BUILDTYPE,status:success,count:1
like image 199
Willcodeforfun Avatar answered Sep 19 '22 14:09

Willcodeforfun