Bamboo REST API to create projects and plans

Hi,

We are using Bamboo for CI and need to be able to create projects and plans via the REST API.

I've looked in the network inspector at what the UI does when you add a project etc, but this doesn't really look like APIs we could consume from our application code like we do with the other REST APIs? (e.g. Project permissions).

It is important for us to be able to create at the very least projects from the REST API, which will then enable us to put the relevant permissions in place afterwards. The same would then apply for creating an empty plan, so we can set permissions afterwards too.

If this is a feature gap, please can you let me know how we can get this added?

Thanks,
Mike.

1 answer

0 vote

How about using the Bamboo Specs - https://confluence.atlassian.com/bamboo/bamboo-specs-reference-documentation-894743916.html

You can create projects:

Project project = new Project()
    .key("PROA")
    .name("Project A")
    .description("My Project A with all A-plans");

Plans:

Plan plan = new Plan(project, "My Plan One", "PLAN1")
    .description("This is an example of a plan")
    .enabled(true)
    .stages(stage1)
    .triggers(scheduledTrigger)
    .planBranchManagement(planBranchManagement)
    .dependencies(planDependencies)
    .linkedRepositories(myGitRepo)
    .planRepositories(myBitbucketRepo)
    .variables(var1, var2);

and much more - 

https://docs.atlassian.com/bamboo-specs-docs/latest/?_ga=2.202545809.1097554965.1509347688-344968178.1499334213&_gac=1.219536747.1506322208.Cj0KCQjwr53OBRCDARIsAL0vKrMsZdNdwU89ZnxFQaUurupEgB96hH2PiJWJQc99pNOZvFh2x4DMCqUaAkfsEALw_wcB#introduction

Suggest an answer

Log in or Join to answer
Community showcase
Renan Battaglin
Published May 18, 2017 in Bamboo

FAQ: How to Upgrade Bamboo Server

Bamboo 5.9 will no longer be supported after June 12, 2017. What does this mean? As part of our End of Life policy, Atlassian supports major versions for two years after the first major iteratio...

1,096 views 0 5
Read article

Atlassian User Groups

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!

Find my local user group

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

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot