The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

how to use bamboo api to retrieve the current status of a deployment project?

IanYifanChan
July 12, 2017

I need to use bamboo API to retrieve the current status of a deployment project, it should be able to return something like:

isBuilding/isDeploying: true/false

I don't need the latest result of a deployment.

2 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Answer accepted
Steffen Opel _Utoolity_
Community Champion
July 13, 2017

You can retrieve the current status of a deployment environment from the Bamboo REST API via a GET to /deploy/environment/{environmentId}/results:

The response contains related properties such as 'deploymentState', 'lifeCycleState', 'queuedDate' etc. - in particular, 'lifeCycleState' should offer what you are looking for, with values such as 'IN_PROGRESS' and 'FINISHED'.

0 votes
IanYifanChan
July 13, 2017

WOW!

 

That is exactly I want! Amazing! Thank you for your prompt, valuable and accurate answer, Steffen!

Steffen Opel _Utoolity_
Community Champion
July 13, 2017

Glad it helps @IanYifanChan - please also 'accept' my answer as solution via the checkmark on the left side so that it doesn't show up as unanswered anymore, thereby keeping others and myself focused on and motivated to assist with new questions :)

Victor Sz
July 26, 2017

@IanYifanChan FYI , we required some similiar functionality recently , and we ended up scripting all the REST Calls.   I posted a Gradle example at https://gist.github.com/vicsz/b04c31f27a91b0d32b55b1bf718ab705  

Devendar Gangapuram
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
April 1, 2021

@IanYifanChan , could you please how di you implement this " /deploy/environment/{environmentId}/results:" API call. Thank you

TAGS
AUG Leaders

Atlassian Community Events