Creating an issue field

Use this request to create an issue global field of issue.

POST

https://api.tracker.yandex.net/v3/fields

Query format

Before making a request, get permission to access the API.

To create a field, use an HTTP POST request. In the request body, specify the parameters in JSON format:

POST /v3/fields
Host: api.tracker.yandex.net
Authorization: OAuth <OAuth token>
X-Org-ID or X-Cloud-Org-ID: <organization_ID>

{
    "name":
    {
        "en": "Name in English",
        "ru": "Name in Russian"
    },
    "id": "global_field_key",
    "category": "0000000000000001********",
    "type": "ru.yandex.startrek.core.fields.StringFieldType"
}
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 Cloud Organization organization is linked to Tracker. Learn more

  • X-Org-ID or X-Cloud-Org-ID: Organization ID.

    • Use the X-Org-ID header if a Tracker organization is linked to Yandex 360 for Business.

    • Use the X-Cloud-Org-ID header if a Tracker organization is linked to Yandex Cloud Organization.

    To get the organization ID, go to AdministrationOrganizations and copy the value from the ID field.

Request body parameters

Required parameters

Parameter Description Data type
name Field name:
  • en: In English.
  • ru: In Russian
String
id Field ID String
category Object with information about the field category.
To get a list of all categories, use the HTTP request:
GET /v3/fields/categories
String
type Field type:
  • ru.yandex.startrek.core.fields.DateFieldType: Date
  • ru.yandex.startrek.core.fields.DateTimeFieldType: Date/time
  • ru.yandex.startrek.core.fields.StringFieldType: One-line text field
  • ru.yandex.startrek.core.fields.TextFieldType: Multi-line text field
  • ru.yandex.startrek.core.fields.FloatFieldType: Fractional number
  • ru.yandex.startrek.core.fields.IntegerFieldType: Integer
  • ru.yandex.startrek.core.fields.UserFieldType: User's name
  • ru.yandex.startrek.core.fields.UriFieldType: Link
String

Additional parameters

Parameter Description Data type
optionsProvider Object with information about the list items Map item
order Sequence number in the list of organization fields: https://tracker.yandex.com/admin/fields Number
description Field description String
readonly Shows if the field value is editable:
  • true: Non-editable
  • false: Editable
Boolean
visible Indicates if the field is visible in the interface:
  • true: Always visible
  • false: Not visible
Boolean
hidden Indicates if the field should be hidden in the interface:
  • true: Hide the field even if it is not empty
  • false: Do not hide the field
Boolean
container Indicates if you can specify multiple values in the field (like in the Tags field):
  • true: You can specify multiple values in the field.
  • false: You can only specify one value in the field.
This parameter can be used for the following types of fields:
  • ru.yandex.startrek.core.fields.StringFieldType: One-line text field
  • ru.yandex.startrek.core.fields.UserFieldType: User's name
  • Drop-down list (see the optionsProvider description)
Boolean

optionsProvider object fields

Parameter Description Data type
type Drop-down list type:
  • FixedListOptionsProvider: List of strings or numbers (for the ru.yandex.startrek.core.fields.StringFieldType or ru.yandex.startrek.core.fields.IntegerFieldType field types)
  • FixedUserListOptionsProvider: List of users (for the ru.yandex.startrek.core.fields.UserFieldType field type)
String
values Drop-down list values Array of strings

Example: Create a local field of the Drop-down list type with a fixed set of string values.

  • An HTTP POST method is used.
  • Field type: FixedListOptionsProvider.
  • Drop-down list values: list item 1, list item 2, list item 3.
POST /v3/fields
Host: api.tracker.yandex.net
Authorization: OAuth <OAuth_token>
X-Org-Id: <organization_ID>

{
   "name":
   {
       "en": "Name in English",
       "ru": "Name in Russian"
   },
   "id": "myglobalfield",
   "category": "0000000000000003********",
   "type": "ru.yandex.startrek.core.fields.StringFieldType",
   "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 201 Created.

The response body contains information about the created issue field in JSON format.

 {
  "self": "https://api.tracker.yandex.net/v3/fields/global_field_key",
  "id": "global_field_key",
  "name": "Field name in Russian",
  "description": "Field description",
  "key": "global_field_key",
  "version": 1,
  "schema": {
      "type": "array",
      "items": "string",
      "required": false
  },
  "readonly": false,
  "options": true,
  "suggest": false,
  "optionsProvider": {
      "type": "FixedListOptionsProvider",
      "needValidation": true,
      "values": [
          "List item 1",
          "List item 2",
          "List item 3"
      ]
  },
  "queryProvider": {
      "type": "StringOptionalQueryProvider"
  },
  "order": 5,
  "category": {
      "self": "https://api.tracker.yandex.net/v3/fields/categories/0000000000000001********",
      "id": "0000000000000001********",
      "display": "System"
  },
  "type": "standard"
}
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 Map item
readonly Shows if the field value is editable:
  • true: Non-editable
  • false: Editable
Boolean
options Shows if the list of values is restricted:
  • true: The list of values is not restricted, you can set any value.
  • false: The list of values is restricted by the organization's settings.
Boolean
suggest Enables/disables search suggestions when entering field values:
  • true: Enabled
  • false: Disabled
Boolean
optionsProvider Object with information about the drop-down list items Map item
queryProvider Object with information about the query language class.
You cannot change the class using the API.
Map item
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 /v3/fields/categories
Map item

schema object fields

Parameter Description Data type
type Field value type Possible data types:
  • string: String; available for fields with a single value
  • array: Array; available for fields with multiple values
String
items Value type; available for fields with multiple values String
required Shows if the field is required:
  • true: Required
  • false: Optional
Boolean

optionsProvider object fields

Parameter Description Data type
type Drop-down list type String
needValidation Indicates if a list value requires validation:
  • true: Yes
  • false: Do not validate the field value
Boolean
values List items 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

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 is not authorized. Make sure that actions described in the API access section are performed.
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.