I am following the guides posted on the Bamboo documentation, but hitting these endpoints do not work in Postman. Here is the guide I am using:
https://developer.atlassian.com/server/bamboo/rest-api-deployment-triggers-for-bamboo/
I get a response code of 415 - Unsupported Media Type, even though I am setting the content-type as application/json in the headers.
The API documentation below specifies an additional parameter for creating a version or release, but this does not change the outcome:
https://docs.atlassian.com/atlassian-bamboo/REST/5.12.2/#d2e2023
Here're steps worked for me:
Create release
'<a href="http://localhost:9087/bamboo/rest/api/latest/deploy/project/7405569/version'" target="_blank" rel="nofollow noopener noreferrer">http://localhost:9087/bamboo/rest/api/latest/deploy/project/7405569/version'</a> -u admin:admin -H<span> </span>"Accepts: application/json" -H<span> </span>"Content-Type: application/json" -d<span> </span>'{"planResultKey" : "ACC-TST-9", "name" : "release-3"}' | jq<span> </span>'.'curl -X POST<span> </span>
'<a href="http://localhost:9087/bamboo/rest/api/latest/deploy/project/7405569/version'" target="_blank" rel="nofollow noopener noreferrer">http://localhost:9087/bamboo/rest/api/latest/deploy/project/7405569/version'</a>
-u admin:admin -H<span> </span>
"Accepts: application/json"
-H<span> </span>
"Content-Type: application/json"
-d<span> </span>
'{"planResultKey" : "ACC-TST-9", "name" : "release-3"}'
| jq<span> </span>
'.'
The name field accepts plan variables in the following format:
${bamboo.variable.name}
Example
{
"planResultKey"
:<span> </span>
"ACC-TST-9"
,<span> </span>
"name"
"release-${bamboo.variable.name}"
}'
Deploy release
curl -X POST<span> </span>'<a href="http://localhost:9087/bamboo/rest/api/latest/queue/deployment/?environmentId=7536641&versionId=28803073%27" target="_blank" rel="nofollow noopener noreferrer">http://localhost:9087/bamboo/rest/api/latest/queue/deployment/?environmentId=7536641&versionId=28803073'</a><span> </span>-u admin:admin -H<span> </span>"Accepts: application/json"<span> </span>| jq<span> </span>'.'
@Alexey Chystoprudov,
I am running into issues when I am trying Deploy a release using Bamboo REST API.
Command
curl -X POST 'https://myhost/rest/api/latest/queue/deployment/?environmentId=12345&versionId=ABC_XYZ-1.0.0-123' -u user:password
Error:
<html><head><title>Page not found</title></head><body><h1>Page not found</h1><p>Sorry, the page you were trying to reach does not exist. Try going back to the dashboard and browse the site to find the page you were looking for. </p><h4>Go to...</h4><ul><li><a href="/">Site homepage</a></li></ul></body>
It looks like you're new here. Sign in or register to get started.