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

Your Points Tracker
Challenges
Leaderboard
  • 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
Recognition
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?
Kudos
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

Bamboo REST API to delete plans

Is there bamboo REST apis available to delete plan/project ?

1 answer

1 vote
rsperafico Atlassian Team Sep 25, 2018

Hi @EndeJoli,

Please, find below the requested:

#
# Marks project for deletion. Project will be deleted by a batch job.
#
# replace {username} to authenticate and perform deletion
# replace http://localhost:8085 with URL to access Bamboo
# replace {projectKey}, e.g PROJ

curl -k -u {username} \
-X DELETE http://localhost:8085/rest/api/latest/project/{projectKey}

#
# However, to delete the project you MUST delete the plans first,
# otherwise Bamboo will throw an error:

{"message":"Project can''t be deleted, as it still contains plans.","status-code":400}
#
# Marks plan for deletion. Plan will be deleted by batch job.
#
# replace {username}
# replace {planKey}, e.g PROJ-PLAN
# replace http://localhost:8085 with URL to access Bamboo

curl -k -u {username} \
     -H 'X-Atlassian-Token: no-check' \
     -H 'Accept: application/json' \
     -H 'Content-Type: application/x-www-form-urlencoded' \
     -d 'buildKey={planKey}' \
     -X POST 'http://localhost:8085/ajax/deleteChain.action'

Kind regards,

Rafael

@rsperafico 

When you say: 

Marks plan for deletion. Plan will be deleted by batch job.

 

What do you mean? I am in need to delete some projects as well which contain plans, but when I run the curl command with the ajax/deleteChain.action, it doesn't do anything, do you have more info on how to delete the plans programmatically? 

 

What i mean is, this batch job, is that something I need to configure to run? or how does it work?

Suggest an answer

Log in or Sign up to answer
TAGS
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...

945 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