Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

telemetry filter option that shows branches of all plans

Joris Voermans April 17, 2020

The only way to show branches is using something like the following link (not actual working link): "https://bamboo.testserver/telemetry.action?filter=showPlanAndBranches&planKey=TEST-KEY"

This only shows the branches of a single plan. What I need is a way to show the branches of all plans. I would figure the link would be something like "https://bamboo.testserver/telemetry.action?filter=showBranches". Unfortunately that does not seems to be a thing.

Is there a way to get all branches of all plans into the telemetry?

What I need to solve is that I have the need of a single overview of all currently faling plans and branches.

1 answer

0 votes
Gerhard Forster
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 24, 2020

Hey Joris,

Thanks for your question. I'd have an idea for you which involves 2 Bamboo REST endpoint calls and a loop, so some coding or scripting. But that's fun, isn't it.

Please find the Bamboo REST API document for your reference and utilize it for details related to both REST APIs that I'll print out below.

So here we go, these are the steps required.

  1. Query so to get a list of plans of your Bamboo Server instance that a user is allowed to see, thus has READ permission on.
  2. Loop over all of these plans.
  3. Within the loop, find all branches per existing Bamboo plan.

By the above steps 1 - 3 you should get to know all plans your instance possesses, all branches per plan and, implicitly, summing up all these branches, the total amount of branches that you have, per name.

Now for point (1) the REST endpoint used with the GET method is as simple as this:

/plan

Per use of additional parameters in this call, you'd be able to get further plan details, if wished.

For step (3) from above the REST endpoint, again being used per GET, is this one:

/plan/{projectKey}-{buildKey}/branch

You can e.g. use the "enabledOnly" parameter to filter out disabled branches.

Hope that help you Joris or whoever else wants to collect that piece of Bamboo information.

Thanks and cheers, Gerhard

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events