Home/Atlassian REST API reference
Jira and Confluence Cloud REST API
Jira transitions: list and perform status changes
GET lists the transitions available on a work item; POST performs one by transition id and answers 204. The id belongs to the transition, not to the target status, so read the list first. Editing the status field directly does not change workflow state.
Endpoints
| Method | Path | What it does |
|---|---|---|
GET | /rest/api/3/issue/{issueIdOrKey}/transitions | Lists the transitions the user can perform on the work item. |
POST | /rest/api/3/issue/{issueIdOrKey}/transitions | Performs a transition and optionally sets transition screen fields. |
Examples
GET /rest/api/3/issue/{issueIdOrKey}/transitions
List the transitions. Each entry has an id, a name and a to object with the target status.
curl
curl \
-u "you@example.com:$ATLASSIAN_API_TOKEN" \
-H 'Accept: application/json' \
'https://your-domain.atlassian.net/rest/api/3/issue/{issueIdOrKey}/transitions'Python (requests)
import os
import requests
EMAIL = "you@example.com"
r = requests.get(
'https://your-domain.atlassian.net/rest/api/3/issue/{issueIdOrKey}/transitions',
auth=(EMAIL, os.environ["ATLASSIAN_API_TOKEN"]),
headers={'Accept': 'application/json'},
)
print(r.status_code, r.text)Response: HTTP 200
{
"expand": "transitions",
"transitions": [
{
"id": "11",
"name": "To Do",
"to": {
"id": "10073",
"name": "To Do"
},
"isGlobal": true,
"isAvailable": true
},
{
"id": "21",
"name": "In Progress",
"to": {
"id": "10074",
"name": "In Progress"
},
"isGlobal": true,
"isAvailable": true
},
{
"id": "31",
"name": "In Review",
"to": {
"id": "10075",
"name": "In Review"
},
"isGlobal": true,
"isAvailable": true
},
{
"id": "41",
"name": "Done",
"to": {
"id": "10072",
"name": "Done"
},
"isGlobal": true,
"isAvailable": true
}
]
}Response headers
X-Ratelimit-Limit: 350
X-Ratelimit-Remaining: 348Sent to Atlassian Cloud on .
POST /rest/api/3/issue/{issueIdOrKey}/transitions
Perform one with its id in the body. The answer is 204 and has no body.
curl
curl -X POST \
-u "you@example.com:$ATLASSIAN_API_TOKEN" \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
--data '{
"transition": {
"id": "{transitionId}"
}
}' \
'https://your-domain.atlassian.net/rest/api/3/issue/{issueIdOrKey}/transitions'Python (requests)
import os
import requests
EMAIL = "you@example.com"
r = requests.post(
'https://your-domain.atlassian.net/rest/api/3/issue/{issueIdOrKey}/transitions',
auth=(EMAIL, os.environ["ATLASSIAN_API_TOKEN"]),
headers={'Accept': 'application/json'},
json={'transition': {'id': '{transitionId}'}},
)
print(r.status_code, r.text)Response: HTTP 204
No response body.
Sent to Atlassian Cloud on .
POST /rest/api/3/issue/{issueIdOrKey}/transitions
An id that is not a valid transition for the work item is refused.
curl
curl -X POST \
-u "you@example.com:$ATLASSIAN_API_TOKEN" \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
--data '{
"transition": {
"id": "99999"
}
}' \
'https://your-domain.atlassian.net/rest/api/3/issue/{issueIdOrKey}/transitions'Python (requests)
import os
import requests
EMAIL = "you@example.com"
r = requests.post(
'https://your-domain.atlassian.net/rest/api/3/issue/{issueIdOrKey}/transitions',
auth=(EMAIL, os.environ["ATLASSIAN_API_TOKEN"]),
headers={'Accept': 'application/json'},
json={'transition': {'id': '99999'}},
)
print(r.status_code, r.text)Response: HTTP 400
{
"errorMessages": [
"Transition id '99999' is not valid for this issue."
],
"errors": {}
}Sent to Atlassian Cloud on .
GET /rest/api/3/issue/{issueIdOrKey}
A later read shows the new status and its category.
curl
curl -G \
-u "you@example.com:$ATLASSIAN_API_TOKEN" \
-H 'Accept: application/json' \
--data-urlencode 'fields=summary,status,labels,assignee' \
'https://your-domain.atlassian.net/rest/api/3/issue/{issueIdOrKey}'Python (requests)
import os
import requests
EMAIL = "you@example.com"
r = requests.get(
'https://your-domain.atlassian.net/rest/api/3/issue/{issueIdOrKey}',
auth=(EMAIL, os.environ["ATLASSIAN_API_TOKEN"]),
headers={'Accept': 'application/json'},
params={'fields': 'summary,status,labels,assignee'},
)
print(r.status_code, r.text)Response: HTTP 200
{
"key": "WEB-55",
"fields": {
"status": {
"name": "In Progress",
"statusCategory": {
"key": "indeterminate",
"name": "In Progress"
}
}
}
}Sent to Atlassian Cloud on .
How it behaves
- The list had four transitions (ids 11, 21, 31, 41) named To Do, In Progress, In Review and Done, each with isGlobal true.
- Transition ids are not status ids: transition 21 leads to status 10074.
- A successful POST answers 204 with no body.
- An id that does not apply gives 400 with the message "Transition id '99999' is not valid for this issue."
Pitfalls
- Read the list before posting, because ids differ between workflows and the available set depends on the current status.
- Many workflows have transition screens. Then fields or update belong in the same POST; expand=transitions.fields on the GET shows which.
- Do not try to change status through PUT on the work item. The edit call ignores transitions.
- An empty transitions list can mean the user lacks the Transition issues permission, not that the workflow has no steps.
Questions and answers
How do I find the id of a status change?
Call GET on the transitions endpoint and match name or to.name to the status you want.
What does a successful transition return?
204 with no body. Read the work item again to see the new status.
Related
- Edit a work item
- Get a work item
- Changelog
- Assign a work item
- Project statuses, components and versions
- HTTP status codes