Equivalent REST API behavior (or equivalent) for "Show canceled and failed to start builds"
Hi all,
I'm trying to make a REST API call to list all builds of the last element of a build chain, but have it "Show canceled and failed to start builds", just like it does in the UI (e.g. at /viewType.html?buildTypeId=myBuildType&tab=buildTypeHistoryList). However I can't figure out how. If I do
/httpAuth/app/rest/buildTypes/id:myBuildType/builds/
I only get successful builds (or ones that failed in the last build chain element, which it never does)
Is there a way to get the equivalent bevaior of the UI via the REST API in this regard?
Thanks
Mike
Please sign in to leave a comment.
Hi Mike,
To get the list of cancelled builds please use the following REST API request:
/httpAuth/app/rest/buildTypes/id: id:myBuildType/builds/?locator=canceled:trueHi Alina,
Thanks for the reply, but that doesn't help me in this particular situation. I'm actually looking to capture to the equivalent entries pointed to in the attached image. I believe your suggestion reports manually canceled builds.
Mike
Attachment(s):
TeamCity.png
Please try to use locator: canceled:any
That did it - Thanks!
Hi,
A long time has passed since this post, but we have the same question, only builds returned either success or failed, but no failed to start information.
Used the following URL:
https://teamcity.xxx.yy/app/rest/2018.1/buildTypes/id:SE_TestProjects_ConditionReporter/builds/?locator=canceled:any
Any hint on how to get "Failed to start" information is welcome, since we just discovered that a project was hanging for more then two months without being noticed in TC because the last time it did run it succeeded...