Create a filter

The request allows you to create a new issue filter.

POST

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

Request format

Before making a request, get access to the API.

To create a filter, use an HTTP request with the POST method. Specify the parameters in JSON format in the request body:

POST /v3/filters/
Host: api.tracker.yandex.net
Authorization: OAuth y0__xAbc******
Content-Type: application/json
X-Org-ID or X-Cloud-Org-ID: <organization_ID>

{
    "name": "<filter_name>",
    "filter": {
        "status": "open"
    }
}
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

The request body contains the information required to create a new filter:

Required parameters

Parameter Description Data type
name Filter name. String

Additional parameters

Parameter

Description

Data type

filter

Object with filtering parameters that defines issue selection conditions — which issues will be included in the filter results. The object keys are issue field names, and the values are filtering conditions for these fields.

You can find the full list of supported parameters on the https://tracker.yandex.com/admin/fields page.

Example values for different field types:

  • Text fields and users: "assignee": "me()", "assignee": "userlogin", "createdBy": "username"
  • Statuses and enumerations: "status": "open" or an array "status": ["open", "inProgress"]
  • Dates: "created": "2024-01-01..2024-12-31" (date range)

Object

query

Filter conditions in the query language format.

String

fields

List of issue fields to display in the Tracker UI. For example: ["key", "summary", "status", "assignee", "priority", "created", "updated"].

The fields parameter only affects the display in the Tracker UI and does not affect the results of API requests. When using a filter via the API (the /v2/issues/_search method), issue fields are returned based on the parameters passed when calling the _search method.

Array of strings

sorts

Array of objects for sorting results.

Array of objects

groupBy

Field for grouping results.

String or object

folder

Folder where the filter will be saved.

String or object

Note

You can use either the query parameter or the filter parameter. Using both parameters simultaneously is not supported.

Fields of the sorts object

Parameter Description Data type
field Key of the issue field to sort by. String
isAscending Sort direction: true — ascending, false — descending. Boolean

Example 1: Create a filter with multiple conditions

  • The HTTP POST method is used.
  • A filter named "My Open Issues" is created.
  • The filter object: selects issues based on two conditions simultaneously (logical AND):
    • Status — open issues (open)
    • Assignee — the current user (me())
POST /v3/filters/ HTTP/1.1
Host: api.tracker.yandex.net
Authorization: OAuth y0__xAbc******
Content-Type: application/json
X-Org-ID or X-Cloud-Org-ID: <organization_ID>

{
    "name": "My Open Issues",
    "filter": {
        "status": "open",
        "assignee": "me()"
    }
}

Example 2: Create a filter with a condition, sorting, and field selection

  • The HTTP POST method is used.
  • A filter named "Open Issues" is created.
  • The filter object: selects only issues with the open status.
  • The sorts parameter: results are sorted by creation date (newest first).
  • The fields parameter: only three fields — key, summary, and status — will be displayed in the UI. Other issue fields will be hidden in the interface.
POST /v3/filters/ HTTP/1.1
Host: api.tracker.yandex.net
Authorization: OAuth y0__xAbc******
Content-Type: application/json
X-Org-ID or X-Cloud-Org-ID: <organization_ID>

{
    "name": "Open Issues",
    "filter": {
        "status": "open"
    },
    "sorts": [
        {
            "field": "created",
            "isAscending": false
        }
    ],
    "fields": ["key", "summary", "status"]
}

Response format

If the request is successful, the API returns a response with code 201 Created.

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

{
    "id": 12345,
    "self": "https://api.tracker.yandex.net/v3/filters/12345",
    "name": "My Open Issues",
    "filter": {
        "assignee": "me()",
        "status": "open"
    },
    "favorite": false,
    "permissions": {
        "READ": {
            "users": [],
            "groups": [
                {
                    "self": "https://api.tracker.yandex.net/v3/groups/5",
                    "id": "5",
                    "display": "All employees"
                }
            ],
            "roles": []
        },
        "WRITE": {
            "users": [
                {
                    "self": "https://api.tracker.yandex.net/v3/users/1234567890",
                    "id": "1234567890",
                    "display": "User Name",
                    "cloudUid": "ajevuhegoiuhfasjhiu",
                    "passportUid": 1234567890
                }
            ],
            "groups": [],
            "roles": []
        }
    },
    "owner": {
        "self": "https://api.tracker.yandex.net/v3/users/1234567890",
        "id": "1234567890",
        "display": "User Name",
        "cloudUid": "ajevuhegoiuhfasjhiu",
        "passportUid": 1234567890
    }
}
Response parameters
Parameter Description Data type
id Filter ID. Number
self Address of the API resource that contains information about the filter. String
name Filter name. String
filter Object with filtering conditions. Object
query String with filtering conditions written in the query language. String
favorite Favorite filter flag: true — the filter is added to favorites, false — not added. Boolean
permissions Object with information about access rights to the filter. Object
owner Object with information about the filter owner. Object

Fields of the permissions object

Parameter Description Data type
READ Object with information about read permissions for the filter. Object
WRITE Object with information about edit permissions for the filter. Object

Fields of the READ and WRITE objects

Parameter Description Data type
users Array of users who have the corresponding permissions. Array of objects
groups Array of groups that have the corresponding permissions. Array of objects
roles Array of roles that have the corresponding permissions. Array of objects

Fields of the owner object

Parameter Description Data type
self Address of the API resource with information about the user String
id User ID. String
display Displayed user name String
passportUid Unique ID of the user account in the Yandex 360 for Business organization and Yandex ID. Number
cloudUid Unique user ID in Yandex Cloud Organization String

If the request was not processed successfully, 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.