Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
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

How can I close an issue using V3 rest api?

Edited

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
Mohammed Amine Community Leader Nov 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

I tried the same payload but it is not working.

"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?

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
Community showcase
Published in Jira Service Management

JSM Jira Automation: How to Send SLA Breached Notifications

Hi Everyone, In   this tutorial,  we will show you how you can monitor an SLA, and send notifications before or after the SLA has been breached.   SLA Threshold Trigger The SLA t...

778 views 5 13
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