Jira Cloud REST API create issue directly in CLOSED status

Hi there
We have a process for staff onboarding where some users automatically have access to some systems. For those systems, we would like to keep track of the access via an Access Service Desk. We create an issue (https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-issues/#api-rest-api-2-issue-post) in that SD via the API but need to transition it to the end of the workflow directly … I test this by creating an issue and then run 4 transition issue API calls (https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-issues/#api-rest-api-2-issue-issueidorkey-transitions-post) to “push” it to the desired end status. Can we enforce the create issue call to directly set the status to the last status in the transtion?
If so, how would we go about doing so?
Thank you
Yatish

No, you can’t. Jir doesn’t allow setting the status directly.
Your approach is the correct one - except you could create a hidden transition from “any status” to the Closed status and trigger that transition instead, instead of going through 4 transitions.
David

1 Like