Getting entity event history
The request allows you to get an entity event history with a paginated display.
Request format
Before making a request, get permission to access the API.
To get the event history with paginated display, use an HTTP GET
request.
GET /v2/entities/<entity_type>/<entity_ID>/events/_relative
Host: https://api.tracker.yandex.net
Authorization: OAuth <OAuth_token>
X-Org-ID: <organization ID>
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
Resource
Parameter | Description | Data type |
---|---|---|
<entity_type> | Entity type:
|
String |
<entity_ID> | Entity ID. To get the ID, see the entity list. | String |
<project_or_portfolio_ID> | Project or portfolio ID (the shortId value). You can use it instead of the entity ID in the request. |
String |
Warning
Entity ID is not the same as project or portfolio ID.
Request parameters
If no parameters are specified, the full list of events is displayed.
Additional parameters
Parameter |
Description |
Data type |
perPage |
Sets the maximum number of events in the response. The default value is 50. |
Number |
from |
ID of the event after which the list starts to be generated. The event itself is not included in the list. Not used with the |
String |
selected |
ID of the event around which the list is generated. Not specified together with the
|
String |
newEventsOnTop |
Reverses the order of events in the list. The default value is |
Logical |
direction |
Sets the order of events in the list:
|
String |
Example: Getting a list of events
- An HTTP GET method is used.
- The response displays information about three events.
- The list starts with the event following
<event_1_ID>
.GET /v2/entities/project/<project_ID>/events/_relative?perPage=3&from=<event_1_ID> Host: https://api.tracker.yandex.net Authorization: OAuth <OAuth_token> X-Org-ID: <organization ID>
Response format
If the request is successful, the API returns a response with code 200 OK
.
The response body contains information about the entity events in JSON format.
{
"events": [
{
"id": "65a26b254dbe6212********",
"author": {
"self": "https://api.tracker.yandex.net/v2/users/19********",
"id": "19********",
"display": "Full Name",
"cloudUid": "ajeppa7dgp71********",
"passportUid": "16********"
},
"date": "2024-01-13T10:51:17.821+0000",
"transport": "v2",
"display": "Issue updated",
"changes": [
{
"diff": "<added>Full_Name</added>",
"field": {
"id": "teamUsers",
"display": "Members"
}
}
]
},
{
"id": "65a26b264dbe6215********",
"author": {
"self": "https://api.tracker.yandex.net/v2/users/19********",
"id": "19********",
"display": "Full Name",
"cloudUid": "ajeppa7dgp71********",
"passportUid": "16********"
},
"date": "2024-01-13T10:51:17.954+0000",
"transport": "v2",
"display": "Comment added",
"changes": [
{
"diff": "<added>First comment added</added>",
"field": {
"id": "comment.text",
"display": "Comment text",
"addedSummonees": [
{
"self": "https://api.tracker.yandex.net/v2/users/19********",
"id": "19********",
"display": "Full Name",
"cloudUid": "ajeppa7dgp71********",
"passportUid": "16********"
}
],
"email": None
},
"commentUrl": ""
}
]
},
{
"id": "65a26b384dbe6216********",
"author": {
"self": "https://api.tracker.yandex.net/v2/users/19********",
"id": "19********",
"display": "Full Name",
"cloudUid": "ajeppa7dgp71********",
"passportUid": "16********"
},
"date": "2024-01-13T10:51:36.807+0000",
"transport": "v2",
"display": "File added",
"changes": [
{
"diff": "<added>Adding file to comments.</added>",
"field": {
"id": "comment.text",
"display": "Comment text",
"email": None
},
"commentUrl": ""
},
{
"diff": "<added>image.jpg</added>",
"field": {
"id": "issue.attachments",
"display": "Attachments"
}
}
]
}
],
"hasNext": True,
"hasPrev": True
}
Response parameters
Parameter | Description | Data type |
---|---|---|
events | Array of objects with information about the events. | Array of objects |
hasNext | Indicates the presence of subsequent entries in the list. | Logical |
hasPrev | Indicates the presence of previous entries in the list. | Logical |
events
array object fields
Parameter | Description | Data type |
---|---|---|
id | Event ID. | String |
author | Object with the event author information. | Object |
date | Event creation date and time in the format:YYYY-MM-DDThh:mm:ss.sss±hhmm . |
String |
transport | Service parameter | String |
display | Displayed event name. | String |
changes | Array of objects with information about the changes. Composition and contents of object fields depend on the parameter you change. | Array of objects |
Parameter | Description | Data type |
---|---|---|
self | Address of the API resource with information about the user. | String |
id | User ID. | Number |
display | Displayed user name. | String |
cloudUid | User unique ID in Yandex Cloud Organization. | String |
passportUid | Unique ID of the user account in the Yandex 360 for Business organization and Yandex ID. | 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.
- 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.