Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Disable a build stage/job using bamboo api

vikeshk November 16, 2023

Hi, Is it possible to disable a build plan job using bamboo api?

Gone through below page but didnt find a relevant api.
https://developer.atlassian.com/server/bamboo/rest/api-group-api

1 answer

1 vote
Eduardo Alvarenga
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 16, 2023

Hey @vikeshk

Welcome to Atlassian Community!

If you want to disable a Job, send an HTTP DELETE request to

  • /rest/api/latest/plan/PROJ-PLAN-JOB/enable

E.g.

  • curl -L -X DELETE -u admin:admin 'https://bamboo.mydomain.net/rest/api/latest/plan/PROJ-PLAN-JOB/enable'

If you want to enable it again, please send an HTTP POST to the same endpoint.

Sincerely,

Eduardo Alvarenga
Atlassian Support APAC

--please don't forget to Accept the answer if the reply is helpful-- 

vikeshk November 16, 2023

Thank you @Eduardo Alvarenga for the quick response

Actually, I am trying to disable the build job for specific build number. 

if a build plan has job1 and job2, In job 1, I have a script to check if job 2 needs to run or not and would like to make an api call to disable job2 of the specific plan instance(using build number).

other approach i tried, is to use dynamic Deactivation task(in job2) but its unable to read injected variable created in job1 and condition returning evaluated as null. 


please let me know if there is any approach to achieve this. Thank you!

Like Steffen Opel _Utoolity_ likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events