Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
badges earned

Your Points Tracker
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

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

How do I get the build number used for a deployment release using REST API?

I am trying to use the Bamboo REST API to get the build number used for a specific deployment release. Using "/deploy/projectVersioning/{deploymentProjectId}/variables" returns the variables defined for the project but not the runtime variables for a specific version such as the build number. I thought using "/deploy/version/{deploymentVersionId}/status" would return the build number but it did not. Is there another API (or sequence of API calls) that can provide this information?

1 answer

1 accepted

0 votes
Answer accepted
Omar Herrera Community Leader Jan 04, 2019

Hi @Shaun Chung, you can try  {bamboo instance}/rest/api/latest/deploy/project/{deploymentProjectID}/versions

The result is a list of releases for the deployment proyect and each release is related to a build plankey.


Omar H.

Thanks for the suggestion but when I try that, all that is returned is an array of version information that does not contain anything about the build plan (other than the branch name). I would like to get the build result number the release is related to. Here is what I get back for each version:

"id": 28344360,
"name": "1.0.121",
"creationDate": 1543871749566,
"items": [],
"operations": {
"canView": false,
"canEdit": false,
"canDelete": false,
"allowedToExecute": false,
"canExecute": false,
"allowedToCreateVersion": false,
"allowedToSetVersionStatus": false
"planBranchName": "release/Sprint15",
"ageZeroPoint": 1543871749847

Should I be seeing something in the items array? I am running Bamboo 6.5.1 if that makes a difference. Ultimately I am looking to programmatically  get the same commit and issue information that is displayed on the release screen.

Omar Herrera Community Leader Jan 04, 2019

@Shaun Chung I understood your question, I had the same needs and I implemented a workaround, on the build pland I created an artifact (.txt file) with general build information and with this item (artifact) the rest end point above, show the items array in this array I get build result key that I needed.

I hope that can help you




Thanks for the workaround. I'll try using it. We use Artifactory to store our artifacts so nothing is shared between the builds and deploys that is why I never saw anything in items. It seems strange that the data would only be in the artifact info and not part of the release/version information.

Like talleym likes this

Suggest an answer

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

Bamboo 101 Video

G’day Community! As we gear up to introduce Bamboo Data Center to the world, we wanted to make sure that we shared a bit more about Bamboo, the product. Our team has put together an overview video ...

223 views 4 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