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

Next challenges

Recent achievements


  • Give kudos
  • My kudos


  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Create a simple plan with Bamboo Specs fails on local bamboo instance Edited

Hello. I followed tutorial Trying to test locally on my server. I use Test license for plugin developers.

How to create a bamboo plan from java code with bamboo specs.

private Plan createPlan() {
    return new Plan(
            "Plan Name", "PLANKEY")
            .description("Plan created from (enter repository url of your plan)")
                    new Stage("Stage 1")
                            .jobs(new Job("Build & run", "RUN")
                                            new ScriptTask().inlineBody("echo Hello world!"))));
Plan plan = new PlanSpec().createPlan();



After executing project I observed error:

Caused by: com.atlassian.bamboo.specs.exceptions.BambooSpecsRestRequestException: null for uri: http://local:6990/bamboo/rest/api/latest/import/plan


2018-01-09 16:30:38,583 DEBUG [FileUserPasswordCredentials] Looking for credentials file: /testingPlatformIntergrationTest/bamboo-specs/.credentials

2018-01-09 16:30:38,587 DEBUG [FileUserPasswordCredentials] Credentials file found: testingPlatformIntergrationTest/bamboo-specs/.credentials

2018-01-09 16:30:38,629 INFO [BambooServer] Publishing plan PRJ-PLANKEY

2018-01-09 16:30:39,227 INFO [BambooServer] An error occurred while publishing plan PRJ-PLANKEY: null for uri: http://local:6990/bamboo/rest/api/latest/import/plan

2018-01-09 16:30:39,227 DEBUG [BambooServer] {"message":"null for uri: http://local:6990/bamboo/rest/api/latest/import/plan","status-code":404}

It looks like method "import" not available in REST API.

Expected results: from that tutorial new created plan in bamboo


Please, can somebody check it? Thanks in advance.

Best regards,


1 answer

0 votes
robhit Atlassian Team Jan 10, 2018

Hi Eugene,

The HTTP status 404 which is "not found" could you please check if the Bamboo URL which you are using is correct:


Should this be "localhost" instead of "local"? Just pointing in case of typo.

Apart from this, I couldn't see the similar code in your description:

BambooServer bambooServer = new BambooServer("http://localhost:8125/623");

Which actually contains the Bamboo URL to push the changes.


I am sharing my code as a sample to refer:




import com.atlassian.bamboo.specs.api.BambooSpec;




import com.atlassian.bamboo.specs.util.BambooServer;













* Plan configuration for Bamboo.

* Learn more on: <a href=""></a>

* Test Comment by Robhit



public class PlanSpec {



     * Run main to publish plan on Bamboo


    public static void main(final String[] args) throws Exception {

        //By default credentials are read from the '.credentials' file.

        BambooServer bambooServer = new BambooServer("http://localhost:8125/623");


        Plan plan = new PlanSpec().createPlan();




        PlanPermissions planPermission = new PlanSpec().createPlanPermission(plan.getIdentifier());





    PlanPermissions createPlanPermission(PlanIdentifier planIdentifier) {

        Permissions permission = new Permissions()

                .userPermissions("robhit", PermissionType.ADMIN, PermissionType.CLONE, PermissionType.EDIT)

                .groupPermissions("bamboo-admin", PermissionType.ADMIN)



        return new PlanPermissions(planIdentifier.getProjectKey(), planIdentifier.getPlanKey()).permissions(permission);



    Project project() {

        return new Project()

                .name("Project Name")




    Plan createPlan() {

        return new Plan(


                "Plan Name", "PLANKEY")

                .description("Plan created from (enter repository url of your plan)")





                        new Stage("Stage 1").jobs(

                                new Job("Job Name", "JOBKEY")










    VcsRepository gitRepository() {

        return new GitRepository()






    VcsCheckoutTask gitRepositoryCheckoutTask() {

        return new VcsCheckoutTask()




    ScriptTask scriptTask() {

        return new ScriptTask()

                .inlineBody("mkdir target; echo 'hello world' > target/console.out")




    Artifact artifact() {

        return new Artifact("Build results")






Hope this will help.


Hey Robhit Saxena. Thanks for the reply. During reviewing you code I found that I used old version of bamboo instance.


After upgrading to the latest bamboo version, import of new plan works. Seems that in my version that functionality was not there. I mean REST API was different.


Thanks again for the hint.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Bamboo

Bamboo 7.1 is here and is packed with value!

I'm happy to announce that Bamboo 7.1 has been released and it’s overflowing with awesome new features. Top-voted issues First and foremost, a bunch of JAC top voted issues has been delivered - y...

684 views 1 6
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you