Forums

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

Need help to update issue related rest API and request payload to update status and priority

Nageswara Rao Koppisetti
Contributor
May 15, 2018

Hi All,

I have requirement to update an issue using rest api.I am using below rest api.

As per the documentation  /rest/api/2/issue/{issueIdOrKey}/editmeta.

operation using "PUT".

I have two questions here.

1.Should I place "/editmeta" .Is it mandatory.

2.Can you please send me to update status or priority related request payload.

 

Regards,

Nageswara K.

 

 

3 answers

0 votes
Nageswara Rao Koppisetti
Contributor
May 16, 2018

Could you please send me for request payload for status and correspond URI.

That should be great.

 

Regards,

Nageswara K.

Nageswara Rao Koppisetti
Contributor
May 16, 2018

Hi Alexey,

what is transition and transition id.how can i identify this transition id.Could you please help me on this.

0 votes
Nageswara Rao Koppisetti
Contributor
May 16, 2018

419 unsupported media type.but i am sending json format 

Nageswara Rao Koppisetti
Contributor
May 16, 2018

Hi Alexey,

Values got updating..Thank you very much your support..

 

Regards,

Nageswara .

0 votes
Alexey Matveev
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 Leaders.
May 15, 2018

To update priority you should use PUT rest/api/2/issue/{issueIdOrKey}.

https://docs.atlassian.com/software/jira/docs/api/REST/7.6.1/?_ga=2.226925854.2030217466.1525875113-593458345.1525875113#api/2/issue-editIssue

Example of JSON would be like this:

{"update":{"priority":[{"set":{"name" : "Trivial"}}]}}

To update a status you should perform a transaction, leading to the status. You should use POST /rest/api/2/issue/{issueIdOrKey}/transitions

https://docs.atlassian.com/software/jira/docs/api/REST/7.6.1/#api/2/issue-doTransition

Nageswara Rao Koppisetti
Contributor
May 16, 2018

Hi Alexey..

Thank you so very much for your reply..

I am new to rest services.

I am sending json like this.

 

URI:rest/api/2/issue/10206

Operation:PUT.

Request Payload is:

{
"update":{
"priority":[
{
"set":
{
"name" : "Low"
}
}]
}
}

I am not able to getting any response.not getting update in jira.Could you please guide me on this 

Regards,

Nageswara K

Alexey Matveev
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 Leaders.
May 16, 2018

I am not sure how you send your request. But there is always a response. I usually use SOAP UI to play with REST calls.

Nageswara Rao Koppisetti
Contributor
May 16, 2018

Hi Alexey,

I am using post man.

I have provided authentication.

put response not getting 

Alexey Matveev
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 Leaders.
May 16, 2018

What is the response code?

Alexey Matveev
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 Leaders.
May 16, 2018

What is you content-type header? It must be application/json

Alexey Matveev
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 Leaders.
May 16, 2018
Alexey Matveev
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 Leaders.
May 16, 2018

When you create a workflow, you add statuses and then connect statuses by transitions. When you go from the To Do status to the In Progress status, you push a button. This button performs a transition. You can find the transition id, if you open your workflow in edit mode. In the picture the id of the In Progress transition is 11

workflow.png

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events