Teamcity API - get list of failed builds since last success (distinct if possible)

Hi all,


I can get a list of failed builds like so

http://teamcity/app/rest/builds/?locator=status:failure

I want to get a list of builds with a current status of failure as I am not concerned if a build has failed and in now successful.
This is what someone has recommened but does not appear to work.

http://teamcity.exactbid.net/guestAuth/app/rest/builds/?locator=status:failure,sinceBuild:(status:success)

Is it possible to obtain this information through the API?

refs:
http://stackoverflow.com/questions/11089462/teamcity-how-do-you-get-a-list-of-the-last-finished-build-of-each-project-thro
https://stackoverflow.com/questions/20714608/teamcity-rest-api-to-get-list-currently-broken-projects/21697285#21697285
http://stackoverflow.com/questions/15254299/teamcity-how-to-get-a-list-of-last-builds-for-each-build-configuration-that-are

1 comment
Comment actions Permalink

Hi Owain,

We have an exparimental feature implemented in 8.1:

http://localhost:8111/app/rest/buildTypes?fields=buildType(id,name,builds($locator(status:failure,count:1),build(number,status,statusText)))

See comment in the related issue, please watch/vote for this issue.

0

Please sign in to leave a comment.