React to a comment

Use this request to react to an issue comment.

POST

https://api.tracker.yandex.net/v3/issues/<issue_id>/comments/<comment_id>/reactions/<reaction_name>

Request format

Before you make a request, get access to the API.

To react to a comment, use an HTTP POST request:

POST /v3/issues/<issue_id>/comments/<comment_id>/reactions/<reaction_name>
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 or X-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 AdministrationOrganizations and copy the value from the ID field.

Resource
Parameter Description Data type
<issue_id> Issue ID or key. String
<comment_id> Unique identifier of the comment as a number (id) or a string (longId). String or number
<reaction_name> Reaction name. Available values:
  • LIKE — like;
  • DISLIKE — dislike;
  • LAUGH — laugh;
  • HOORAY — hooray;
  • CONFUSED — confused;
  • HEART — heart;
  • ROCKET — rocket;
  • EYES — eyes;
  • FIRE — fire;
  • OK — OK;
  • FACEPALM — facepalm;
  • CHECK — check.
String

Example: Add a like reaction to a comment

Uses an HTTP POST method.

POST https://api.tracker.yandex.net/v3/issues/TREK-123/comments/12345/reactions/LIKE
Host: api.tracker.yandex.net
Authorization: OAuth <OAuth_token>
X-Org-ID or X-Cloud-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 comment with an updated list of reactions in JSON format.

{
  "self": "https://api.tracker.yandex.net/v3/issues/TREK-123/comments/626",
  "id": 626,
  "longId": "5fa15a24ac894475********",
  "text": "Comment text",
  "createdBy": {
    "self": "https://api.tracker.yandex.net/v3/users/11********",
    "id": "11********",
    "display": "User Name",
    "cloudUid": "ajeppa7dgp53********",
    "passportUid": 11********
  },
  "updatedBy": {
    "self": "https://api.tracker.yandex.net/v3/users/11********",
    "id": "11********",
    "display": "User Name",
    "cloudUid": "ajeppa7dgp53********",
    "passportUid": 11********
  },
  "createdAt": "2020-11-03T13:24:52.575+0000",
  "updatedAt": "2020-11-03T13:24:52.575+0000",
  "reactionsCount": {
    "like": 1
  },
  "ownReactions": [
    "like"
  ],
  "version": 1,
  "type": "standard",
  "transport": "internal"
}
Response parameters
Parameter Description Data type
self Link to the comment. String
id Comment ID. Number
longId Comment ID as a string. String
text Comment text. String
createdBy Information about the user who created the comment. Object
updatedBy Information about the user who last updated the comment. Object
createdAt Date and time when the comment was created. String
updatedAt Date and time when the comment was last updated. String
reactionsCount Object with the number of reactions per type. Key — reaction name in lowercase, value — number. Object
ownReactions Array of reactions left by the current user on this comment. Reaction names are in lowercase. Array of strings
version Comment version. Every comment change increments the version number. Number
type Comment type:
  • standard — sent via the Tracker interface;
  • incoming — created from an incoming email;
  • outcoming — created from an outgoing email.
String
transport Method for adding a comment:
  • internal — via the Tracker interface;
  • email — via email.
String

Object fields createdBy

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

Object fields updatedBy

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 a request fails, 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.