Making a status transition
Use this request to switch an issue to a new status.
Request format
Before making the request, get permission to access the API.
To change an issue's status, use an HTTP POST
request. If the transition settings let you change the issue parameters, specify them in the request body in JSON format:
POST /v2/issues/<issue_ID_or_key>/transitions/<transition_ID>/_execute
Host: https://api.tracker.yandex.net
Authorization: OAuth <OAuth_token>
X-Org-ID: <organization ID>
{
"<key_1>":"<value_1>",
"<key_2>":"<value_2>",
...
"comment":"<comment_text>"
}
Headers
-
Host
Address of the node that provides the API:
https://api.tracker.yandex.net
-
Authorization
OAuth token in
OAuth <OAuth_token>
format, e.g.:OAuth 0c4181a7c2cf4521964a72ff********
-
X-Org-ID or X-Cloud-Org-ID
Organization ID. You can find it out on the Tracker organizations page
.- If a Yandex 360 for Business organization is the only one linked to Tracker, the
X-Org-ID
header is used. - If a Yandex Cloud Organization organization is the only one linked to Tracker, the
X-Cloud-Org-ID
header is used. - If both Yandex 360 for Business and Yandex Cloud Organization organizations are linked to Tracker at the same time, the
X-Org-ID
header and the Yandex 360 for Business organization ID are used.
- If a Yandex 360 for Business organization is the only one linked to Tracker, the
Resource
Parameter | Description | Data type |
---|---|---|
<issue_key_or_ID> | ID or key of the current issue. | String |
<transition_ID> | Transition ID. | String |
Request body parameters
Required parameters
Parameter | Value | Data type |
---|---|---|
<key> | Issue field that can be edited during the transition. List of keys: https://tracker.yandex.com/admin/fields |
Depends on the parameter type. |
comment | Comment on the issue. | String |
Response format
If the request is successful, the API returns a response with code 200 OK
.
The response body contains a JSON array with a list of transitions available for the issue in the new status.
[
{
"self" : "https://https://api.tracker.yandex.net/v2/issues/DESIGN-1/transitions/close",
"id" : "close",
"to" : {
"self" : "https://https://api.tracker.yandex.net/v2/statuses/3",
"id" : "3",
"key" : "closed",
"display" : "Closed"
},
"screen" : {
"self" : "https://https://api.tracker.yandex.net/v2/screens/50c85b17e4b04b38********",
"id" : "50c85b17e4b04b38********"
}
},
...
]
Response parameters
Parameter | Description | Data type |
---|---|---|
self | Address of the API resource with information about the transition. | String |
id | Transition ID. | String |
to | Block with information about the status that the issue can transition to. | Object |
screen | Block with information about the transition screen. | Object |
to
object fields
Parameter | Description | Data type |
---|---|---|
self | Address of the API resource with information about the status. | String |
id | Status ID. | String |
key | Status key. | String |
display | Status name displayed. | String |
screen
object fields
Parameter | Description | Data type |
---|---|---|
self | Address of the API resource with information about the transition screen. | String |
id | Transition screen ID. | String |
If the request is processed incorrectly, the API returns a response with an error code:
- 400
- One or more request parameters have an invalid value.
- 403
- Insufficient rights to perform this action. You can check what rights you have in the Tracker interface. The same rights are required to perform an action via the API and interface.
- 404
- The requested object was not found. You may have specified an invalid object ID or key.
- 409
- There was a conflict when editing the object. The error may be due to an invalid update version.
- 422
- JSON validation error, the request is rejected.
- 500
- Internal service error. Try resending your request in a few minutes.
- 503
- The API service is temporarily unavailable.