Getting an entity comment
The request allows you to get an entity comment.
GET
https://api.tracker.yandex.net/v3/entities/<entity_type>/<entity_ID>/comments/<comment_ID>
Query format
Before making a request, get permission to access the API.
To get a comment, use an HTTP GET request.
GET /v3/entities/<entity_type>/<entity_ID>/comments/<comment_ID>
Host: api.tracker.yandex.net
Authorization: OAuth <OAuth_token>
X-Org-ID or X-Cloud-Org-ID: <organization_ID>
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-IDorX-Cloud-Org-ID: Organization ID.-
Use the
X-Org-IDheader if a Tracker organization is linked to Yandex 360 for Business. -
Use the
X-Cloud-Org-IDheader 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 |
| <entity_ID> | Entity ID. To get the ID, see the entity list. | String |
| <comment_ID> | Comment's unique ID. | String or number |
Request parameters
Additional parameters
| Parameter | Description | Data type |
|---|---|---|
| expand | Additional information to include in the response:
|
String |
Example: Getting a comment
- An HTTP GET method is used.
- The response displays information about the comment.
GET https://api.tracker.yandex.net/v3/entities/project/<project_ID>/comments/15?expand=all
Response format
If the request is successful, the API returns a response with code 200 OK.
The response body contains information about the entity comment in JSON format.
{
"self": "https://api.tracker.yandex.net/v3/entities/project/6586d6fee2b9ef74********/comments/15",
"id": 15,
"longId": "65a156a29d5d2000********",
"text": "Comment **number one.**",
"textHtml": "<p>Comment <strong>number one.</strong></p>\n",
"attachments": [
{
"self": "https://api.tracker.yandex.net/v3/entities/project/6586d6fee2b9ef74********/attachments/25",
"id": "25",
"display": "image.jpg"
}
],
"createdBy": {
"self": "https://api.tracker.yandex.net/v3/users/19********",
"id": "19********",
"display": "Full name",
"cloudUid": "ajeppa7dgp53********",
"passportUid": "15********"
},
"updatedBy": {
"self": "https://api.tracker.yandex.net/v3/users/19********",
"id": "19********",
"display": "Full name",
"cloudUid": "ajeppa7dgp53********",
"passportUid": "15********"
},
"createdAt": "2024-01-12T15:11:30.278+0000",
"updatedAt": "2024-01-12T16:33:35.988+0000",
"usersReacted": {
"like": [
{
"self": "https://api.tracker.yandex.net/v3/users/19********",
"id": "19********",
"display": "Full name",
"cloudUid": "ajeppa7dgp71********",
"passportUid": "16********"
}
]
},
"ownReactions": ["like"],
"summonees": [
{
"self": "https://api.tracker.yandex.net/v3/users/19********",
"id": "19********",
"display": "Full name",
"cloudUid": "ajeppa7dgp32********",
"passportUid": "12********"
}
],
"version": 3,
"type": "standard",
"transport": "internal"
}
Response parameters
| Parameter | Description | Data type |
|---|---|---|
| self | Link to the comment object. | String |
| id | Comment ID. | Number |
| longId | Comment ID as a string. | String |
| text | Text of the comment. | String |
| textHtml | Comment HTML markup | String |
| attachments | Attached files | String |
| createdBy | Object with information about the author of the comment | Map item |
| updatedBy | Object with information about the last user to have updated the comment | Map item |
| createdAt | Comment creation date and time in the format:YYYY-MM-DDThh:mm:ss.sss±hhmm |
String |
| updatedAt | Comment update date and time in the format:YYYY-MM-DDThh:mm:ss.sss±hhmm . |
String |
| usersReacted | User reactions (present in the response if the expand parameter in the request is set to all or reactions):
|
Object with a list of reactions and responders |
| reactionsCount | Number of reactions (present in the response if the expand parameter in the request is not set to all or reactions). |
Object with a list and number of reactions |
| ownReactions | Reactions of the comment author:
|
List of strings |
| summonees | List of users summoned in comments. | List of objects |
| version | Comment version. Each update increases the comment's version number. | Number |
| type | Comment type:
|
String |
| transport | Method of adding a comment:
|
String |
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 |
updatedBy 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 |
usersReacted 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.
- 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.