Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you get all Bamboo plans for a specific project using the Bamboo REST API

Tags:

rest

bamboo

I'm working on writing an automated install tool using C# that will allow a user to:

  • First select a Bamboo Project
  • After selecting a Bamboo Project, then the Bamboo Plans under that project will appear.

I have tried this - http://bamboo_host:8085/rest/api/latest/project/TC621/plans

<project expand="plans" key="TC621" name="TruCare 6.2.1">
    <link href="http://bamboo_host.com:8085/rest/api/latest/project/TC621" rel="self"/>
<plans start-index="0" max-result="12" size="12"/>
</project>

But it's not giving me the information I need. The closest I can get is to use this - http://bamboo_host.com:8085/rest/api/latest/project?expand=projects.project.plans.plan

This gives me all project and then all plans. Is there a way to pass the project name in the URI to only list the plans for this project?

Thanks Eric

like image 586
Eric27710 Avatar asked Sep 07 '25 23:09

Eric27710


1 Answers

According to Bamboo REST API documentation you should use expand parameter. For example

http://localhost:9087/bamboo/rest/api/1.0/project/TC621?expand=plans
http://localhost:9087/bamboo/rest/api/1.0/project/TC621?expand=plans.plan
like image 105
Oleksiy Chystoprudov Avatar answered Sep 11 '25 14:09

Oleksiy Chystoprudov