Getting issue comments
Use this request to get a list of comments on an issue.
GET
https://api.tracker.yandex.net/v3/issues/<issue_ID>/comments
By default, the request returns only the first page showing 50 comments. If there are more than 50 comments, use paginated output.
Query format
Before making a request, get permission to access the API.
To get a list of comments, use an HTTP GET
request:
GET /v3/issues/<issue_ID>/comments
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-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 |
---|---|---|
<issue_key_or_ID> | ID or key of the current issue. | String |
Request parameters
Additional parameters
Parameter | Description | Data type |
---|---|---|
expand | Additional fields to include in the response:
|
String |
Request for comments on a single issue:
An HTTP GET method is used.
GET https://api.tracker.yandex.net/v3/issues/<issue_key>/comments?expand=all
Response format
If the request is successful, the API returns a response with code 200 OK
.
The response body contains a JSON array with information about comments:
[
{
"self": "https://api.tracker.yandex.net/v3/issues/JUNE-2/comments/98******",
"id": 98******,
"longId" : "5fa15a24ac894475********",
"text": "Comment **number one.**",
"textHtml": "<p>Comment <strong>number one.</strong></p>\n",
"attachments": [{ "self": "https://api.tracker.yandex.net/v3/issues/JUNE-3/attachments/1", "id": "1", "display": "Untitled.png" }],
"createdBy": {
"self": "https://api.tracker.yandex.net/v3/users/11********",
"id": "11********",
"display": "Ivan Ivanov"
},
"updatedBy": {
"self": "https://api.tracker.yandex.net/v3/users/11********",
"id": "11********",
"display": "Ivan Ivanov"
},
"createdAt": "2017-06-11T05:11:12.347+0000",
"updatedAt": "2017-06-11T05:11:12.347+0000",
"version": 1,
"type" : "standard",
"transport" : "internal"
},
...
]
Response parameters
Parameter | Description | Data type |
---|---|---|
self | Link to the comment object | String |
id | Comment ID | Number |
longId | ID of the comment in string format | 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 |
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 |
If the request is processed incorrectly, the API returns a response with an error code:
- 404
- The requested object was not found. You may have specified an invalid object ID or key.
Pagination of comments
For paginated results, use additional parameters in the request string:
GET https://api.tracker.yandex.net/v3/issues/<issue_ID>/comments?perPage=<number_of_comments>&id=<comment_ID>
where:
-
perPage
: Number of comments per page. -
id
: Comment'sid
parameter value after which the requested page will begin.
The links to the first and next pages are specified in the Link response header.
To learn about paginated results, see also Common request format.