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

落花浮王杯 提交于 2019-12-22 08:07:06

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!