Get a list of queue triggers
The request allows you to get a list of all triggers created in the queue, with pagination support.
GET
https://api.tracker.yandex.net/v3/queues//triggers
Request format
Before making the request, get access to the API.
To get a list of queue triggers, use an HTTP request with the GET method.
GET /v3/queues/<queue_id>/triggers
Host: api.tracker.yandex.net
Authorization: OAuth <OAuth-token>
X-Org-ID or X-Cloud-Org-ID: ORGANIZATION_ID
Headers
-
Host: address of the node that provides the API. -
Authorization: Authorization token about these formats:-
OAuth OAUTH_TOKEN: For authorization using the OAuth 2.0 protocol. Learn more -
Bearer IAM_TOKEN: For authorization using an IAMÂ token, if a Yandex Identity Hub organization is linked to Tracker. Learn more
-
-
ID types
X-Org-IDorX-Cloud-Org-ID: Organization ID.-
Use the
X-Org-IDheader if a Tracker organization is linked to Yandex 360 for Business. -
Use the
X-Cloud-Org-IDheader if a Tracker organization is linked to Yandex Identity Hub.
Finding the ID
To get the organization ID, go to Administration → Organizations and copy the value from the ID field.
-
Resource
| Parameter | Description | Data type |
|---|---|---|
| <queue_id> | Queue ID or key. The queue key is case-sensitive. | String or number |
Request parameters
Additional parameters
| Parameter | Description | Data type |
|---|---|---|
| perPage | Number of triggers per page. | Integer |
| id | ID of the last trigger from the previous page. Used to get the next page. | Number |
Pagination mechanism
The request uses relative pagination:
- Results are sorted by trigger ID in ascending order.
- To get the next page, use the ID of the last trigger from the previous page in the
idparameter.
Example of sequential requests
-
First request:
GET /v3/queues/DESIGN/triggers?perPage=20 -
Next request:
GET /v3/queues/DESIGN/triggers?perPage=20&id=<id_of_last_trigger>
Response format
If the request is successful, the API returns a response with code 200 OK.
The response body contains information about the triggers in JSON format.
[
{
"id": 16,
"self": "https://api.tracker.yandex.net/v3/queues/DESIGN/triggers/16",
"queue": {
"self": "https://api.tracker.yandex.net/v3/queues/DESIGN",
"id": "26",
"key": "DESIGN",
"display": "Design"
},
"name": "trigger_name",
"order": "0.0002",
"actions": [
{
"type": "Transition",
"id": 1,
"status": {
"self": "https://api.tracker.yandex.net/v3/statuses/2",
"id": "2",
"key": "needInfo",
"display": "Need Info"
}
}
],
"conditions": [
{
"type": "Or",
"conditions": [
{
"type": "Event.comment-create"
}
]
}
],
"version": 1,
"active": true
}
]
Response parameters
| Parameter | Description | Data type |
|---|---|---|
| id | Trigger ID. | Number |
| self | Link to the trigger. | String |
| queue | Queue where the trigger is created. | Can be specified as an object, as a string (if the queue key is passed), or as a number (if the queue ID is passed). |
| name | Trigger name. | String |
| order | Trigger weight. The parameter affects the display order of the trigger in the interface. | String |
| actions | Array with trigger actions. | Array of objects |
| conditions | Array with trigger conditions. | Array of objects |
| version | Trigger version. Each trigger change increments the version number. | Number |
| active | Trigger status. Possible values:
|
Boolean |
Fields of the queue object
| 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 |
Fields of the actions array objects
| Parameter | Description | Data type |
|---|---|---|
| type | Action type. Possible values:
|
String |
| id | Action ID. | String |
| status | Issue status. | String |
Fields of the conditions array objects
| Parameter | Description | Data type |
|---|---|---|
| type | Condition type. Possible values:
|
String |
| conditions | Array with trigger conditions. A condition has the type parameter — the condition type. Possible values:
|
Array of objects |
Fields of the status array objects
| 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 |
If the request wasn't processed successfully, the response message contains information about the errors that occurred:
- 400
- One or more request parameters have an invalid value.
- 403
- You are not authorized 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.
- 422
- JSON validation error, the request is rejected.
- 500
- Internal service error. Try again later.
- 503
- The API service is temporarily unavailable.
A queue key is a unique code for a queue consisting of Latin characters, for example TEST. The key is contained in the link to the queue and its issues, and you need to specify it in API requests and auto action settings. You can't change the key after creating the queue.