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 to get deploymentResultId using REST API?

How can I get deploymentResultId for specific deployment?

1 answer

1 accepted

1 vote
Answer accepted

Hello @Dmitrij Kultasev

I hope you are doing great!

Let me share a couple of steps you can use to get this information knowing just the plan associated with a given deployment.

  1. Get the <PLAN_KEY> and run the following request:
     curl -u <USER>:<PASSWORD> \
    -X GET -p <BAMBOO_URL>/rest/api/latest/deploy/project/forPlan?planKey=<PLAN-KEY> \
    | jq -r '.[] | "Name: " + .name + "\tdeploymentId: " + (.id|tostring)'
    It should give you a result like:
     Name: <DEPLOYMENT_NAME>       deploymentId: <DEPLOYMENT_ID>
  2. Get the <DEPLOYMENT_ID> and run:
    curl -u <USER>:<PASSWORD> \
    -X GET -p '<BAMBOO_URL>/rest/api/latest/deploy/project/<DEPLOYMENT_ID>' \
    | jq -r '.environments[] | "Name: " + .name + "\tenvironmentId: " + (.id|tostring)'
     As a result, you should get:
     Name: <ENVIRONMENT_NAME>      environmentId: <ENVIRONMENT_ID>
  3. Following the same idea, get the <ENVIRONMENT_ID> and run:
    curl -u <USER>:<PASSWORD> \
    -X GET -p '<BAMBOO_URL>/rest/api/latest/deploy/environment/<ENVIRONMENT_ID>/results' \
    | jq -r '.results[] | "Version" + .deploymentVersionName + "\tdeploymentResultId:" + (.id|tostring)'
    This one should give you the deploymentResultId you need:
     Version: release-XX deploymentResultId: <ENVIRONMENT_RESULT_ID> 

    ⚠️Please notice that the above request use both jq (command-line JSON processor) to simplify filtering the results.


I hope that helps.

@Daniel Santos  that's not what I needed. That's the ID I'm looking for to be used in  /deploy/result/{deploymentResultId} .

I might go wrong direction, but I want to find last successful deployment for specific plan.


Hi @Dmitrij Kultasev

Please give the steps above a chance. They will give you exactly a list of deploymentResultIds for a given environment.

This is the relationship between the plan and a  given deploymentResultId:

  • Build plan >> Deployment Project Id >> Deployment Environment Id >> deploymentResultId

I just tested these steps again. They should give you exactly what you want.
Please let me know if you face any issues to follow them.

yes, that works. Sorry.

No worries, sorry for not being clear in my first message.
I see you in the next thread!

Suggest an answer

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

Bamboo Data Center - Early Access Program

G’day Bamboo customers, The wait is almost over! We are in the final stages of work on the first release of Bamboo Data Center, our self-managed enterprise offering of Bamboo. This Data Center offe...

1,010 views 0 16
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