I am using the API calls described in the above answer to get vcsBranches and the following error appears when i run it.
can anyone please let me know how to rectify this, i want to get the vcsbranches for the plan before running it.
COMMAND:
curl -u [USERNAME] -p -H "Content-Type: application/json" -X GET [BAMBOO-BASE-URL]/rest/api/latest/plan/[PROJECT-KEY]-[PLAN-KEY]/vcsBranches
ERROR:
{"message":"VcsBranch detection not available for Plan Branch","status-code":400}
You see this error because [PROJECT-KEY]-[PLAN-KEY] used in request points to plan branch, but should point to "master" plan
thanks for your response.
i see branches if i just query the master plan.
but i need to see the Repository branch for a specify Branch plan not the master plan.
here is the snap of what i am looking for
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'm afraid there's no REST endpoint to get this information for plan branch.
But you can try to get this info from plan branch build result, it's at metadata values
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.