问题
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.
回答1:
That was painful to find
http://<TC>/guestAuth/app/rest/buildTypes/id:<BUILD_TYPE>/branches
来源:https://stackoverflow.com/questions/30116480/can-you-use-the-team-city-rest-api-to-fetch-plan-branch-names