Security Deck Alerts API, REST: Comment.Create
Create a comment for a specified alert.
HTTP request
POST https://alert-sink.api.yandexcloud.kz/securitydeck/alerts/v1/alerts/{alertId}/comments
Path parameters
|
Field |
Description |
|
alertId |
string Required field. ID of the alert to create a comment for. The maximum string length in characters is 50. |
Body parameters
{
"text": "string"
}
|
Field |
Description |
|
text |
string Required field. Comment contents. Yandex Flavored Markdown. The maximum string length in characters is 4096. |
Response
HTTP Code: 200 - OK
{
"id": "string",
"description": "string",
"createdAt": "string",
"createdBy": "string",
"modifiedAt": "string",
"done": "boolean",
"metadata": {
"commentId": "string"
},
// Includes only one of the fields `error`, `response`
"error": {
"code": "integer",
"message": "string",
"details": [
"object"
]
},
"response": {
"id": "string",
"alertId": "string",
"createdBy": {
// Includes only one of the fields `subject`, `sensor`
"subject": {
"id": "string"
},
"sensor": {
"id": "string"
}
// end of the list of possible fields
},
"createTime": "string",
"updatedBy": {
// Includes only one of the fields `subject`, `sensor`
"subject": {
"id": "string"
},
"sensor": {
"id": "string"
}
// end of the list of possible fields
},
"updateTime": "string",
"text": "string"
}
// end of the list of possible fields
}
An Operation resource. For more information, see Operation.
|
Field |
Description |
|
id |
string ID of the operation. |
|
description |
string Description of the operation. 0-256 characters long. |
|
createdAt |
string (date-time) Creation timestamp. String in RFC3339 To work with values in this field, use the APIs described in the |
|
createdBy |
string ID of the user or service account who initiated the operation. |
|
modifiedAt |
string (date-time) The time when the Operation resource was last modified. String in RFC3339 To work with values in this field, use the APIs described in the |
|
done |
boolean If the value is |
|
metadata |
Service-specific metadata associated with the operation. |
|
error |
The error result of the operation in case of failure or cancellation. Includes only one of the fields The operation result. |
|
response |
The normal response of the operation in case of success. Includes only one of the fields The operation result. |
CreateCommentMetadata
|
Field |
Description |
|
commentId |
string ID of the comment that is being created. |
Status
The error result of the operation in case of failure or cancellation.
|
Field |
Description |
|
code |
integer (int32) Error code. An enum value of google.rpc.Code |
|
message |
string An error message. |
|
details[] |
object A list of messages that carry the error details. |
Comment
A comment.
|
Field |
Description |
|
id |
string Comment ID. |
|
alertId |
string ID of the alert the comment is for. |
|
createdBy |
Who created the comment. |
|
createTime |
string (date-time) Comment creation date. String in RFC3339 To work with values in this field, use the APIs described in the |
|
updatedBy |
Who modified the comment last. |
|
updateTime |
string (date-time) When was the comment last modified. String in RFC3339 To work with values in this field, use the APIs described in the |
|
text |
string The comment contents. Yandex Flavored Markdown. |
Actor
Information about an entity that performed an action (created an alert, added a comment, etc.).
|
Field |
Description |
|
subject |
Action was performed by a specific Cloud subject. Includes only one of the fields |
|
sensor |
Action was performed by (or on behalf of) an alert provider system (aka sensor) Includes only one of the fields |
Subject
Cloud subject.
|
Field |
Description |
|
id |
string Subject ID. |
Sensor
Alert provider system (aka sensor).
|
Field |
Description |
|
id |
string Sensor ID. |