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: Atlassian Bamboo 5.14.1 API
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: 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
just to complete, Shane’s way is the one to go:
curl -D- -u myuser -p https://bamboo.server.com/project/saveNewProject.action -X POST -H “Content-Type: multipart/form-data” -H “X-Atlassian-Token: no-check” -F “projectName=cc” -F “projectKey=CC” -F “projectDescription=mydescription” -F “save=Save” -F “checkBoxFields=projectAccessPublic”