I have a web app deployment dashboard done in php/mysql that is currently using a table containing App names that relate to Projects and Plans in Bamboo, but is not integrated there. Thus, am getting bad data entered by folks manually when updating that dashboard with deployment information. I would like to either eliminate the need for the App list table by populating that page in my dashboard directly from Bamboo or keeping that table up-to-date with a similar call to Bamboo. I have successfully gotten 'some' data using the following, but it is not what I'm looking for exactly and is incomplete. Can anyone provide a more accurate REST API call that will provide me a list of Plans by Project from Bamboo?
Here's what I've tried with 'some' success so far...
# my $cmd = "curl -H \"Content-Type: application/json\" -u $username:$pass http://wagwiki.walgreens.com/jira/rest/api/latest/project?expand=projects.project.plans";
# my $KEY="ERX";
# my $cmd = "curl -H \"Content-Type: application/json\" -u $username:$pass http://wagwiki.walgreens.com/jira/rest/api/latest/project/$KEY?expand=plans";
# above returns data but not exactly what I need.
# my $PROJECTNAME="eRx_Automation";
# my $cmd = "curl -H \"Content-Type: application/json\" -u $username:$pass http://wagwiki.walgreens.com/jira/rest/api/1.0/search/plans?searchTerm=$PROJECTNAME";
# above returns 404
Thank you for your question.
Could you please make sure you are running the REST API call against Bamboo, as it seems you are running it against JIRA based on the URL (http://wagwiki.walgreens.com/jira) mentioned.
Please, notice you can loop through the projects and plans by using its iterator as per following:
# BAMBOO-BASE-URL, i.e.: http://wagwiki.walgreens.com/bamboo # A, <projects expand="project" start-index="0" max-result="3" size="3"> where you can go from 0 to 2 # B, <plans expand="plan" start-index="0" max-result="17" size="17"> where you can go from 0 to 16 http://[BAMBOO-BASE-URL]/rest/api/latest/project?expand=projects[A].project.plans[B]
Please, refer to Bamboo REST API for further information.
If you find this answer useful, I would kindly ask you to accept it so the same will be visible to others who might be facing the same issue you have inquired.
Thank you for your understanding.
Rafael P. Sperafico
Thanks! I'll give that a try - I did realize before your answer that I should have been specifying bamboo not jira and that returned 'some' data - for instance, I've been able to get 500 of 629 plans, but can't seen to access those that would appear after clicking the show more plans button in bamboo. Hopefully, your suggestion will solve that problem for me. Thanks again.
my $cmd = "curl -H \"Content-Type: application/json\" -u $username:$pass http://wagwiki.walgreens.com/bamboo/rest/api/latest/project?expand=projects.project.plans"; system $cmd; curl: (3) [globbing] error: bad range specification after pos 77 what am I doing wrong - it gives that error no matter what values I put in brackets
Hey Community mates! Claire here from the Software Product Marketing team. We all know software development changes rapidly, and it's often tough to keep up. But from our research, we've found the h...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs