Editing a local queue field
Use this request to edit a local issue field linked to a given queue.
Request format
Before making the request, get permission to access the API.
To edit a local field, use an HTTP PATCH
request. Request parameters are provided in the request body in JSON format:
PATCH /v2/queues/<queue_id_or_key>/localFields/<field_key>
Host: https://api.tracker.yandex.net
Authorization: OAuth <OAuth_token>
X-Org-ID: <organization ID>
{
"name":
{
"en": "Field name in English",
"ru": "Field name in Russian"
},
"category": "0000000000000002********",
"order": 102,
"description": "Field description",
"readonly": true,
"visible": false,
"hidden": false
}
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 |
---|---|---|
<queue_ID_or_key> | Queue ID or key. The queue key is case-sensitive. | String |
<field_key> | Local field key. To get the key, use this HTTP request: GET /v2/queues/<queue_id_or_key>/localFields |
String |
Request body parameters
Additional parameters
Parameter | Description | Data type |
---|---|---|
name | Local field name:
|
String |
category | Object with information about the field category. To get a list of all categories, use the HTTP request: GET /v2/fields/categories |
String |
order | Sequence number in the list of organization fields: https://tracker.yandex.com/admin/fields |
Number |
description | Local field description | String |
optionsProvider | Object with information about the list items | Object |
readonly | Shows if the field value is editable:
|
Logical |
visible | Indicates if the field is visible in the interface:
|
Logical |
hidden | Indicates if the field should be hidden in the interface:
|
Logical |
optionsProvider
object fields
Parameter | Description | Data type |
---|---|---|
type | Type of drop-down list:
|
String |
values | Drop-down list values | Array of strings |
Example: Edit a fixed set of string values for the local field of the Drop-down list type.
- An HTTP PATCH method is used.
- Field type:
FixedListOptionsProvider
.- Drop-down list values: list item 1, list item 2, list item 3.
PATCH /v2/queues/<queue_id_ir_key>/localFields/<field_key> Host: https://api.tracker.yandex.net Authorization: OAuth <OAuth_token> X-Org-ID: <organization ID> { "optionsProvider": { "type": "FixedListOptionsProvider", "values": [ "List item 1", "List item 2", "List item 3" ] } }
Response format
If the request is successful, the API returns a response with code 200 OK
.
The response body contains information about the local queue field in JSON format.
{
"type": "local",
"self": "https://https://api.tracker.yandex.net/v2/queues/ORG/localFields/loc_field_key",
"id": "6054ae3a2b6b2c7f********--loc_field_key",
"name": "Field name in Russian",
"description": "Field description",
"key": "loc_field_key",
"version": 2,
"schema": {
"type": "string",
"required": false
},
"readonly": true,
"options": true,
"suggest": false,
"optionsProvider": {
"type": "FixedListOptionsProvider",
"needValidation": true,
"values": [
"List item 1",
"List item 2",
"List item 3"
]
},
"queryProvider": {
"type": "StringOptionalQueryProvider"
},
"order": 102,
"category": {
"self": "https://https://api.tracker.yandex.net/v2/fields/categories/0000000000000002********",
"id": "0000000000000002********",
"display": "category_name"
},
"queue": {
"self": "https://https://api.tracker.yandex.net/v2/queues/ORG",
"id": "1",
"key": "ORG",
"display": "Organization"
}
}
Response parameters
Parameter | Description | Data type |
---|---|---|
type | Field type | String |
self | Address of the API resource with information about the field | String |
id | Unique field ID | String |
name | Field name | String |
description | Field description | String |
key | Field key | String |
version | Field version; each change to the field increases the version number | Number |
schema | Object with information about the field value's data type | Object |
readonly | Shows if the field value is editable:
|
Logical |
options | Shows if the list of values is restricted:
|
Logical |
suggest | Enables/disables search suggestions when entering field values:
|
Logical |
optionsProvider | Object with information about allowed field values. | Object |
queryProvider | Object with information about the query language class. You cannot change the class using the API. |
Object |
order | Sequence number in the list of organization fields: https://tracker.yandex.com/admin/fields |
Number |
category | Object with information about the field category. To get a list of all categories, use the HTTP request: GET /v2/fields/categories |
Object |
queue | Object with information about the issue queue. | Object |
schema
object fields
Parameter | Description | Data type |
---|---|---|
type | Field value type Possible data types:
|
String |
items | Value type; available for fields with multiple values | String |
required | Shows if the field is required:
|
Logical |
optionsProvider
object fields
Parameter | Description | Data type |
---|---|---|
type | Type of drop-down list | String |
needValidation | Indicates if a list value requires validation:
|
Logical |
values | Drop-down list values | Array of strings |
queryProvider
object fields
Parameter | Description | Data type |
---|---|---|
type | Query language type | String |
category
object fields
Parameter | Description | Data type |
---|---|---|
self | Address of the API resource with information about the field category | String |
id | Field category ID | String |
display | Category name displayed | String |
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:
- 400
- One or more request parameters have an invalid value.
- 401
- The user isn't authorized. Make sure to perform the actions described in API access.
- 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.
- 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.