Getting trigger parameters
Use this request to get information about a queue trigger.
GET
https://api.tracker.yandex.net/v3/queues/{queue_ID}/triggers/{trigger_ID}
Query format
Before making a request, get permission to access the API.
To get trigger parameters, use an HTTP GET request:
GET /v3/queues/{queue_ID}/triggers/{trigger_ID}
Host: api.tracker.yandex.net
Authorization: OAuth API_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 or key. The queue key is case-sensitive. |
String or number |
|
|
Trigger ID. |
Number |
Response format
If the request is successful, the API returns a response with code 200 OK.
The response body contains information about the trigger 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 where the trigger was created. |
Can be set as an object, a string if the queue key is provided, or a number if the queue ID is provided. |
|
|
name |
Trigger name. |
String |
|
order |
Trigger weight. This parameter affects the order of triggers in the interface. |
String |
|
Array of trigger actions. |
Array of objects |
|
|
Array of trigger conditions. |
Array of objects |
|
|
version |
Trigger version. Each trigger update increases the version number. |
Number |
|
active |
Trigger status. Acceptable 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 objects in the actions array
The set of parameters depends on the action type. For examples of action parameters, see Trigger action objects.
|
Parameter |
Description |
Data type |
|
type |
Action type. Acceptable values:
|
String |
|
id |
Action ID. |
Number |
|
Status to transition the issue to. Returned for the |
Object |
|
|
text |
Comment text for the |
String |
Fields of objects in the conditions array
Each object in the conditions array defines a check determined by its type field. The check can concern an event, such as issue creation, or issue and comment data. Objects with type Or or And combine checks into logical groups. Nested conditions are returned in the group’s own conditions array.
|
Parameter |
Description |
Data type |
|
Condition type. See acceptable values of the |
String |
|
|
Nested conditions. Returned for |
Array of objects |
The set of other fields depends on the type value. For examples of condition parameters, see Trigger condition objects.
Acceptable values of the condition object’s type field
|
Condition group |
|
|
Logical groups |
|
|
Events |
Examples of condition definitions |
|
Checklist |
Examples of condition definitions |
|
Comment text |
Examples of condition definitions |
|
Comment author |
Examples of condition definitions |
|
Comment type |
Examples of condition definitions |
|
Link action |
Examples of condition definitions |
|
Field value |
Examples of condition definitions |
|
Field state |
Examples of condition definitions |
|
Date |
Examples of condition definitions |
|
User groups |
Examples of condition definitions |
|
Number of items |
Examples of condition definitions |
|
Numeric values |
Examples of condition definitions |
|
String values |
Examples of condition definitions |
Fields of the status object
| 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 fails, the response contains error details:
- 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.