Create an issue field category
Written by
Use this request to create a category for an issue field.
Request format
Before making the request, get permission to access the API.
To create an issue field category, use an HTTP POST
request. Request parameters are passed in the request body in JSON format:
POST /v2/fields/categories
Host: https://api.tracker.yandex.net
Authorization: OAuth <OAuth token>
X-Org-ID: <organization ID>
{
"name": {
"en": "Name in English",
"ru": "Name in Russian"
},
"description": "Text description",
"order": 400
}
Headers
-
Host
Address of the node that provides the API:
https://api.tracker.yandex.net
-
Authorization
OAuth token in
OAuth <token value>
format. For example:OAuth 0c4181a7c2cf4521964a72ff57a34a07
-
X-Org-ID
Organization ID.
Request body parameters
Required parameters
Parameter | Description | Data type |
---|---|---|
name | Category name:
|
String |
order | Weight of the field when displayed in the interface. Fields with a lower weight are displayed above fields with a higher weight. | Number |
Additional parameters
Parameter | Description | Data type |
---|---|---|
description | Category description. | String |
Response format
Successful execution of the request
The request failed
If the request is successful, the API returns a response with code 201 Created
.
The response body contains information about the updated project in JSON format.
{
"id" : "604f9920d23cd5e1697ee3",
"name" : "category_name",
"self" : "https://api.tracker.yandex.net/v2/fields/categories/604f9920d23cd5e1697ee3",
"version" : 1
}
Response parameters
Parameter | Description | Data type |
---|---|---|
id | Unique ID of the category. | String |
name | Category name in Russian. | String |
self | Address of the API resource with information about the category. | String |
version | Category version. Each change to the field increases the version number. | Number |
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 again later.
- 503
- The API service is temporarily unavailable.