Trying to get the branch name/number from the REST API. I am calling https://myInstalledBamboo/rest/api/latest/plan/{Projec-Key}-{Build-Key}/vcsBranches.
It is returning:
<branches size="2" max-result="2" start-index="0"> <branch name="--hooks--"/> <branch name="master"/> </branches>
Community moderators have prevented the ability to post new answers.
Hi Ted
From your description it looks like you're using something like this as your URL:
https://myInstalledBamboo/rest/api/latest/plan/BAM-BOO-355114/vcsBranches
this is not correct and you should use
https://myInstalledBamboo/rest/api/latest/plan/BAM-BOO/vcsBranches
which should return the same result.
First let me explain some terminology we use. For a given Plan with key BAM-BOO, the BAM part is the {Project-Key}and the BOO is {Build-Key}. Some of the REST endpoints also make use of numerical value which is usually referred to as {Build-Number}.
The REST enpoint you're using, lists names of all branches detected in the VCS configured for your plan (not only these configured in Bamboo). If you believe that this list is incorrect then please double check Source Repositories configuration for your Bamboo Plan to verify if correct repository is configured.
In case you still see a difference between the data that Bamboo provides and what you can see in your repository please create an issue on https://jira.atlassian.com/browse/BAM where you specify Bamboo version you're using and attach screenshot of your Plan's Source Repositories configuration and a dump/screenshot from a tool that presents a list of branches in your repository.
Cheers,
Krystian Brazulewicz
Atlassian Bamboo Development
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.