How can I create projects in Bamboo using the REST API?

Hi,

I am looking for bamboo REST API solutions. I want to create project in Bamboo using REST API. But i am not able to see the request URL anywhere. I can only see the “deploy/projects”.

Please let me know if we have any options to create bamboo project from REST API or using Packages(Node JS, Python , JAVA and .NET etc)

Hi @mahendran.m,

As you’ve already concluded: there is no REST API endpoint for creating projects in Bamboo.

You might want to take a look at the Bamboo Java API to see how you can add new projects automatically: https://docs.atlassian.com/atlassian-bamboo/5.14.1/?_ga=2.171811424.1162193822.1522052023-1207228509.1515149309

To create projects, you could develop a simple bamboo addon in java and make use of com.atlassian.bamboo.project.ProjectManager.createProject(@NotNull String var1, @NotNull String var2) the component should be available for injection.
Then you can decide to open a new Rest point if you need to access your service outside of bamboo or handle it through a user interface for example.

Also BobSwift develops the Bamboo CLI addon that already does the job for you if you prefer not to develop a custom addon : https://bobswift.atlassian.net/wiki/spaces/BCLI/pages/266258616/Actions#Actions-createProject.

1 Like

Thanks for your help.

Atlassian Bamboo 5.14.1 API - where can i download this packages(com.atlassian.bamboo) for java?

You can find the download link here: https://developer.atlassian.com/server/bamboo/building-a-bamboo-war-distribution-from-source/

But you do need to have a Commercial License.

Thank you so much for giving this solution too.

I am not having licence. I am running trial

Hi,

I have configured bamboo CLI. I am getting error “This function requires a non-blank value for parameter server.” When i create project using below command

bamboo.bat --action createProject --project “firstpro” --name “firstprojkey” --description “Project description”

You probably shouldn’t rely on this method, but at least with Bamboo 6.5.1, we can create it this way:

POST /project/saveNewProject.action

Headers:
Content-Type: application/x-www-form-urlencoded
X-Atlassian-Token: no-check (may not be necessary)

Form fields:
projectName:
projectKey:
projectDescription:
save: Save