Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can you use the team city rest api to fetch plan branch names?

Tags:

teamcity-8.0

I'm trying to build a command line app to fetch artifacts from teamcity. This is fine if I know the branch I want to get but I want to show a list of all the available branches first.

This is what I have to fetch the latest build when I know the branch

http://<TC>/guestAuth/app/rest/builds/buildType:<BUILD-TYPE>,branch:<BRANCH>

But if I take the ,branch:<BRANCH> off it only shows one build which is the latest on the default branch I think.

What I can't find is a URL to get the branches on a particular plan. I can go back to the VCS to get the branches that way but this should be available.

I'll also want this information to delete branches which have been merged later too.

like image 488
KeepCalmAndCarryOn Avatar asked Mar 17 '23 03:03

KeepCalmAndCarryOn


1 Answers

That was painful to find

http://<TC>/guestAuth/app/rest/buildTypes/id:<BUILD_TYPE>/branches
like image 108
KeepCalmAndCarryOn Avatar answered Mar 18 '23 15:03

KeepCalmAndCarryOn