Finding out the number of issues
Use this request to find out the number of issues that meet the conditions of your request.
Request format
Before making the request, get permission to access the API.
To get the number of issues that meet certain criteria, use an HTTP POST
request. The search criteria are passed in the request body in JSON format:
POST /v2/issues/_count
Host: https://api.tracker.yandex.net
Authorization: OAuth <OAuth_token>
X-Org-ID: <organization ID>
{
"filter": {
"<field_name>": "<field_value>"
},
"query": "<query_language_filter>"
}
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
Request body parameters
Additional parameters
Parameter | Description | Format |
---|---|---|
filter | Issue filtering parameters. The parameter can specify any field and value to filter by. | Object |
query | Filter using the query language | String |
Request for the number of issues with additional filtering options:
- An HTTP POST method is used.
- The response should only contain the number of issues from the
JUNE
queue that do not have an assignee.POST /v2/issues/_count HTTP/1.1 Host: https://api.tracker.yandex.net Authorization: OAuth <OAuth token> X-Org-ID: <organization ID> { "filter": { "queue": "JUNE", "assignee": "empty()" } }
Response format
If the request is successful, the API returns a response with code 200 OK
.
The response contains the number of issues that meet the conditions of your request.
5221186
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.