Editing a comment
Use this request to edit comments.
PATCH
https://api.tracker.yandex.net/v3/issues/<issue_ID>/comments/<comment_ID>
Query format
Before making a request, get permission to access the API.
To edit a comment previously added to an issue, use an HTTP PATCH
request. Provide the request parameter in the request body in JSON format:
PATCH /v3/issues/<issue_ID>/comments/<comment_ID>
Host: api.tracker.yandex.net
Authorization: OAuth <OAuth_token>
X-Org-ID or X-Cloud-Org-ID: <organization_ID>
{
"text": "<new_comment_text>"
}
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_ID> | ID or key of the current issue. | String |
<comment_ID> | Unique ID of the comment in numeric (id) or string format (longId). | String or number |
Request body parameters
Required parameters
Parameter | Value | Data type |
---|---|---|
text | Edited issue comment. | String |
Additional parameters
Parameter | Value | Data type |
---|---|---|
attachmentIds | IDs of temporary files that will be added as attachments. | Array of strings |
markupType | Type of text markup. If you use the YFM markup in comments, specify the md value. |
String |
Response format
If the request is successful, the API returns a response with code 200 OK
.
The response body contains information about the added comment in JSON format.
[
{
"self": "https://api.tracker.yandex.net/v3/issues/TREK-1/comments/684",
"id" : "684",
"longId" : "5fc4bc634e121b12********",
"text" : "Comment text",
"createBody" : {
"self": "https://api.tracker.yandex.net/v3/users/11********",
"id" : "11********",
"display" : "Ivan Ivanov"
},
"updateBody" : {
"self": "https://api.tracker.yandex.net/v3/users/11********",
"id" : "11********",
"display" : "Ivan Ivanov"
},
"createdAt" : "2020-11-30T09:33:23.638+0000",
"updatedAt" : "2020-11-30T09:39:07.631+0000",
"summonees" : [
{
"self": "https://api.tracker.yandex.net/v3/users/11********",
"id" : "11********",
"display" : "Ivan Ivanov"
}
],
"maillistSummonees" : [
{
"self": "https://api.tracker.yandex.net/v3/maillists/usertest@test.ru",
"id" : "usertest@test.ru",
"display" : "Ivan's mailing list"
}
],
"version" : 2,
"type" : "standard",
"transport" : "internal"
}
]
Response parameters
Parameter | Description | Data type |
---|---|---|
self | Link to the comment. | String |
id | Comment ID. | String |
longId | ID of the comment in string format. | String |
text | Comment on the issue. | String |
createdBy | Block with information about the user who added the comment. | Map item |
updatedBy | Block with information about the user who edited the comment last. | Map item |
createdAt | Comment creation date and time. | String |
updatedAt | Comment update date and time. | String |
summonees | Block with information about users who are invited in comments. | Map item |
maillistsummonees | Block with information about mailing lists mentioned in comments. | Map item |
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 |
summonees
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 |
maillistsummonees
object fields
Parameter | Description | Data type |
---|---|---|
self | Link to the mailing list. | String |
id | Mailing list address. | String |
display | Mailing list name displayed. | 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.