Getting a list of entities
Use this request to get a list of entities that meet specific criteria.
POST
https://api.tracker.yandex.net/v3/entities/<entity_type>/_search?fields=entityStatus
Query format
Before making a request, get permission to access the API.
To get a list of entities, use an HTTP POST
request. In the request body, specify the parameters in JSON format.
POST /v3/entities/<entity_type>/_search?fields=entityStatus
Host: api.tracker.yandex.net
Authorization: OAuth <OAuth_token>
X-Org-ID or X-Cloud-Org-ID: <organization_ID>
{
"filter":
{
"author": "<username>"
}
}
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
orX-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 Administration → Organizations and copy the value from the ID field.
-
Resource
Parameter | Description | Data type |
---|---|---|
<entity_type> | Entity type:
|
String |
Request parameters
Additional parameters
Parameter | Description | Data type |
---|---|---|
fields | Additional fields to include in the response | String |
perPage | Number of issues per response page. The default value is 50. | Number |
page | Page with search results. The default value is 1. | Number |
Request body parameters
The request body contains information required to search for entities:
Additional parameters
Parameter | Description | Data type |
---|---|---|
input | Substring in the entity name | String |
filter | Issue filtering parameters. The parameter can specify any field key and value for filtering. | Map item |
orderBy | Issue sorting parameters. The parameter can specify any field key for sorting. | String |
orderAsc | Sorting direction | Boolean |
rootOnly | Output only entities that are not nested. | Boolean |
Entity field keys and value keys, e.g., statuses, sometimes differ from similar issue keys.
Example 1: Getting a list of entities using a filter with an extended list of fields in search results
- An HTTP POST method is used.
- The response should only contain projects in progress with a non-empty list of followers.
- The
Status
,Reporter
, andFollowers
field values are displayed in the response.
POST /v3/entities/project/_search?fields=entityStatus,author,followers HTTP/1.1 Host: api.tracker.yandex.net Authorization: OAuth <OAuth_token> X-Org-ID or X-Cloud-Org-ID: <organization_ID> { "filter": { "followers": "notEmpty()", "entityStatus": "in_progress" }, }
Example 2: Getting a sorted list of all entities
- An HTTP POST method is used.
- The response should contain all portfolios sorted by status.
- The results are sorted in descending order.
- The
Status
andReporter
field values are displayed in the response.
POST /v3/entities/project/_search?fields=entityStatus,author HTTP/1.1 Host: api.tracker.yandex.net Authorization: OAuth <OAuth_token> X-Org-ID or X-Cloud-Org-ID: <organization_ID> { "orderBy": "entityStatus", "orderAsc":true }
Response format
If the request is successful, the API returns a response with code 200 OK
.
The response body contains the results in JSON format.
{
"hits": 8,
"pages": 1,
"values": [
{
"self": "https://api.tracker.yandex.net/v3/entities/project/655f8ce5d6a39833********",
"id": "655f8ce5d6a39833********",
"version": 7,
"shortId": 8,
"entityType": "project",
"createdBy": { "self": "https://api.tracker.yandex.net/v3/users/11********", "id": "11********", "display": "Full name", "cloudUid": "ajevuhegoggf********", "passportUid": 11******** },
"createdAt": "2023-11-23T17:33:25.427+0000",
"updatedAt": "2023-11-24T12:21:43.838+0000",
"fields": {
"entityStatus": "in_progress",
"followers": [{ "self": "https://api.tracker.yandex.net/v3/users/22********", "id": "22********", "display": "Follower name", "cloudUid": "ajeprm0fjnql********", "passportUid": 22******** }]
}
},
{
"self": "https://api.tracker.yandex.net/v3/entities/project/655f3815a834c763********",
"id": "655f3815a834c763********",
"version": 4,
"shortId": 3,
"entityType": "project",
"createdBy": { "self": "https://api.tracker.yandex.net/v3/users/11********", "id": "11********", "display": "Full name", "cloudUid": "ajevuhegoggf********", "passportUid": 11******** },
"createdAt": "2023-11-23T11:31:33.874+0000",
"updatedAt": "2023-11-23T21:52:10.863+0000",
"fields": {
"entityStatus": "draft",
"followers": [{ "self": "https://api.tracker.yandex.net/v3/users/22********", "id": "22********", "display": "Follower name", "cloudUid": "ajeprm0fjnql********", "passportUid": 22******** }]
}
}
],
"orderBy": "entityStatus"
}
Response parameters
Parameter | Description | Data type |
---|---|---|
hits | Number of search results | Number |
pages | Number of pages with search results | Number |
values | Results Entity objects | Array of objects |
Entity object fields
Parameter | Description | Data type |
---|---|---|
self | Address of the API resource with information about the entity | String |
id | Entity ID | String |
version | Entity version. Each change of the parameters increases the version number. Entity edits will be disabled if the version number reaches the threshold value of 10100 (for robots) or 11100 (for users) |
Number |
shortId | Goal, project, or portfolio ID in Yandex Tracker | String |
entityType | Entity type | String |
createdBy | Block with information about the entity creator | Map object |
createdAt | Entity creation date in YYYY-MM-DDThh:mm:ss.sss±hhmm format |
String |
updatedAt | Date when the entity was last updated, in YYYY-MM-DDThh:mm:ss.sss±hhmm format |
String |
fields | Block with additional entity fields | Map object |
createdBy
object fields
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 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.