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

2) Exists in Api

Please sign in to leave a comment.
It is not showing by default, you need to add branchName explicitly, i.e. /httpAuth/app/rest/builds/?locator=buildType:One_Git,branch:myFeature
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
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
Thank you for replying that solved my issue .