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

unable to delete plan through REST API

SunadhRaj_Malaka June 7, 2023

1. i want to delete plan through REST API as per Atlassian documentation  reference  

  i have got this REST API

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/chain/admin/deleteChain!doDelete.action'

2. when i trying to implement this i am facing authentication some error .

3.i have give permission in UI , and i am the admin of that plan, and project as well.

 

Can anyone with suggestions.

 

ex.PNG

 

1 answer

1 accepted

1 vote
Answer accepted
Eduardo Alvarenga
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 7, 2023

Hello @SunadhRaj_Malaka

I can see two issues here:

1 - You are enclosing your username with {} characters. This is used as a delimiter and should not be used on the request. Try using simply sumalaka and not {sumalaka} as the username. There is a clear error message stating that user is not authorised.

2 - This is not a Bamboo REST API call. That's actually an HTML form submission that may change between releases. If you are looking to use the REST API please try this:

Best regards,

Eduardo Alvarenga
Atlassian Support APAC

 

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

SunadhRaj_Malaka June 7, 2023

Thankyou useful 

Like Eduardo Alvarenga likes this
Eduardo Alvarenga
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 7, 2023

Thank you! Make sure to Accept the Answer if it helped you.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events