Accessing Chain Builds through the rest api

When choosing a branch and using the snapshot dependency the build does not exist in the api.
However if I choose the execat dependency and leave the branch as default the the build will exist in the rest api

Rest Api Url http://teamcity.dev/guestAuth/app/rest/buildTypes/id:buildsystest/builds/


My only assumption is that teamcity doesn't show builds in the rest api that are not the default branch


1) Doesn't Exist in rest api build

chain1.png

chain2.png

2) Exists in Api
chain4.png
chain3.png

4 comments
Comment actions Permalink

It is not showing by default, you need to add branchName explicitly, i.e. /httpAuth/app/rest/builds/?locator=buildType:One_Git,branch:myFeature

0
Comment actions Permalink

Unfotunity I do not know the branch the developers are creating as it could be anything.

The only thing I know is the buildId.

Context.
I'm trying to show which version of the code has been deployed to which environment using the restapi

0
Comment actions Permalink

You can specify that you need all branches by adding this locator: branch:default:any. The whole path will look like: /httpAuth/app/rest/builds/?locator=buildType:One_Git,branch:default:any

0
Comment actions Permalink

Thank you for replying that solved my issue .

0

Please sign in to leave a comment.