Creating a queue version
Use this request to create a queue version.
Request format
Before making a request, get permission to access the API.
To create a queue version, use an HTTP POST
request. Request parameters are passed in the request body in JSON format.
POST /v2/versions/
Host: https://api.tracker.yandex.net
Authorization: OAuth <OAuth_token>
X-Org-ID: <organization ID>
{
"queue": "<queue_key>",
"name": "version_name>
}
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
Request body parameters
The request body contains the information required to create a new queue version:
Required parameters
Parameter | Description | Data type |
---|---|---|
queue | Queue key | String |
name | Version name | String |
Additional parameters
Parameter | Description | Data type |
---|---|---|
description | Version description | String |
startDate | Version start date in YYYY-MM-DD format |
String |
dueDate | Version end date in YYYY-MM-DD format |
String |
Example: Creating a queue version named
Test Queue
.
- An HTTP
POST
method is used.- Create a queue version with the
TESTQUEUE
key.- Set the version name:
version 0.1
.- Set the version description:
Test version 1
.- Set the version start date:
2023.10.03
.- Set the version end date:
2024.06.03
.POST /v2/queues/TEST/versions HTTP/1.1 Host: https://api.tracker.yandex.net Authorization: OAuth <OAuth token> X-Org-ID: <organization ID> { "queue": "TESTQUEUE", "name": "version 0.1", "description": "Test version 1", "startDate": "2023-10-03", "dueDate": "2024-06-03" }
Response format
If the request is successful, the API returns a response with code 200 OK
.
[
{
"self": "https://https://api.tracker.yandex.net/v2/versions/1",
"id": 1,
"version": 1,
"queue": {
"self": "https://https://api.tracker.yandex.net/v2/queues/TESTQUEUE",
"id": "6",
"key": "TESTQUEUE",
"display": "Test Queue"
},
"name": "version 0.1",
"description": "Test version 1",
"startDate": "2023-10-03",
"dueDate": "2024-06-03",
"released": false,
"archived": false
}
]
Response parameters
Parameter | Description | Data type |
---|---|---|
self | Link to the version object | String |
id | Version ID | Number |
version | Version number | Number |
queue | Object with information about the queue | Object |
name | Version name | String |
description | Text description of the version | String |
startDate | Version start date | String |
dueDate | Version end date | String |
released | Flag of the released version | Logical |
archived | Flag of the archived version | Logical |
queue
object fields
Parameter | Description | Data type |
---|---|---|
self | Address of the API resource with information about the queue. | String |
id | Queue ID. | String |
key | Queue key. | String |
display | Queue name displayed. | String |
If the request is processed incorrectly, the API returns a response with an error code:
- 404
- The requested object was not found. You may have specified an invalid object ID or key.