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

How can I close an issue using V3 rest api?

Joseph November 26, 2021

How can I close an issue using V3 rest api? I need to update status(Resolved), resolution code and comments. Please help me with complete payload structure.

1 answer

2 votes
M Amine
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 26, 2021

by "close" you mean trigger a transition which name is "close"? 

If yes, you need to trigger a transition. Here is how: https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issues/#api-rest-api-3-issue-issueidorkey-transitions-post

Joseph November 26, 2021

I tried the same payload but it is not working.

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 26, 2021

"It's not working" tells us nothing of any use in debugging it.  What are the error messages coming back from it?  How did you amend "the same payload" to suit your workflow?  What did you actually do?

Joseph December 6, 2021

After doing some R&D it is working.

one more question:

when I need to close an issue/ticket. two things we need to do..

1) change the status to "Resolve" using below transitions api.

 https://team-xxxxxxx.atlassian.net/rest/api/3/issue/IS-49/transitions

2) need to update Resolution Code & Add Worknotes/Comments.

for this I need to use generic update API.

Is is the process? that I need to call two different APIs? or is there any possibility to do both transactions with single API?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events