1

I am sending the below PUT request to JIRA and unable to update the ticket. I am receiving 200 Http Status code with the ticket details JSON in response. However, this doesn't include the updated labels.

curl --location --request PUT 'https://jiraserverurl/rest/api/2/issue/APP-1' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer XXXX' \ --data-raw '{ "update": { "labels": [ { "add" : "newlabel" } ] } }' 

I referred to this article Failure in updating Atlassian Jira label using REST API and did everything in a same way. However, it still doesn't update.

Unfortunately, I am receiving 200 Success response. Therefore, no clue of why it is not working!!

1 Answer 1

1

You are almost there; just change --data-raw to --data (or -d) and try body in same line:

curl --location --request PUT 'https://jiraserverurl/rest/api/2/issue/APP-1' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer XXXX' \ --data '{ "update": { "labels": [{ "add" : "newlabel"}]}}' 
Sign up to request clarification or add additional context in comments.

1 Comment

I am using Postman. I got it as --data-raw in Postman cURL. Is there any other way to make it work in Postman?

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.