Comments
APIs for managing report comments
Adds a new comment to an MTH/MDR report from a child tenant.
Validation rules:
xsoar_source_idis required and must be a non-empty string.comment_textis required, must be a string, and is limited to 4096 characters by the API (the underlying column isVARCHAR(4096)).comment_created_byis required and must be a non-empty string. It is not validated against tenant users.path_to_fileis optional. When supplied it must be a key already present in the public API GCS bucket and must begin with one of the allowed prefixes:send_report/,update_report/,add_comment/,update_comment/,comment/. Keys containing..or starting with/are rejected.extract_zip_fileis optional and must be a string. Only the values"true"(case-insensitive) and"1"enable extraction; every other value, including the JSON booleantrue, is treated asfalse.
Notes:
If
xsoar_source_iddoes not match an existing report, a generic error response is returned.The comment is always recorded with
comment_author_type = CUSTOMER(is_hunteris forced tofalseon this endpoint).comment_usernameis taken from the authenticated API key's user, not fromcomment_created_by.
Required licenses: MDR, MTH, Managed XSIAM Pro, Managed XSIAM Premium.
Permissions: Users with Instance Administrator privileges only can access these endpoints.
API Key for authentication
API Key ID for authentication
{api_key}
YOUR_API_KEY_HERE{api_key_id}
241The unique identifier of the report to comment on
The text content of the comment (maximum 4096 characters).
Email or username of the comment author. Free text; not validated against tenant users.
Optional storage key of an attachment already uploaded to the public API GCS bucket. Must start with one of: send_report/, update_report/, add_comment/, update_comment/, comment/.
Optional flag indicating the attachment is a zip archive to be extracted. Must be a string; only "true" (case-insensitive) or "1" enable extraction. A JSON boolean is rejected by type validation.
Successful Response
true when the comment was added successfully. Failures are returned as an error response, not as false.
Bad Request - Invalid parameters or missing required fields
Unauthorized - Invalid or missing API key
Forbidden - Tenant not authorized for this endpoint, or the caller lacks Instance Administrator privileges
Internal Server Error.
Note: most business-logic and input-validation failures on these endpoints are also returned with HTTP 500 and reply.err_code 500, with the specific reason in reply.err_extra. Do not rely on a 400 status to detect a bad request; inspect reply.err_extra.
POST /public_api/v1/mth/child/add_comment HTTP/1.1
Host: api-yourfqdn
Authorization: YOUR_API_KEY_HERE
x-xdr-auth-id: 241
Content-Type: application/json
Accept: */*
Content-Length: 142
{
"xsoar_source_id": "777771",
"comment_text": "Investigation completed. No malicious activity found.",
"comment_created_by": "analyst@company.com"
}{
"reply": true
}Retrieves comments for a specific report or for all comments within a specified time range.
Validation rules:
Supply either
xsoar_source_id, or bothstart_timeandend_time.xsoar_source_idtakes precedence: if it is present,start_time/end_timeare ignored.start_timeandend_timemust both be integers; supplying only one of them is equivalent to supplying neither.start_timemust be less than or equal toend_time.If no usable criteria are supplied, the request fails.
Response notes:
comment_attachmentsis an array of pre-signed download URLs (strings), not a JSON-encoded object. It is[]when the comment has no attachments.comment_author_typeis the raw numeric column value:0= hunter-authored,1= customer-authored. It is not returned as the string"HUNTER"/"CUSTOMER".Timestamps are integers in epoch milliseconds.
comment_update_timeisnullwhen the comment was never edited.
Required licenses: MDR, MTH, Managed XSIAM Pro, Managed XSIAM Premium.
Permissions: Users with Instance Administrator privileges only can access these endpoints.
API Key for authentication
API Key ID for authentication
{api_key}
YOUR_API_KEY_HERE{api_key_id}
241Supply either xsoar_source_id, or both start_time and end_time. If xsoar_source_id is present the time range is ignored.
The unique identifier of the report
Start timestamp in epoch milliseconds. Must be supplied together with end_time and must not be greater than it.
End timestamp in epoch milliseconds. Must be supplied together with start_time.
Successful Response
Bad Request - Invalid parameters or missing required fields
Unauthorized - Invalid or missing API key
Forbidden - Tenant not authorized for this endpoint, or the caller lacks Instance Administrator privileges
Internal Server Error.
Note: most business-logic and input-validation failures on these endpoints are also returned with HTTP 500 and reply.err_code 500, with the specific reason in reply.err_extra. Do not rely on a 400 status to detect a bad request; inspect reply.err_extra.
POST /public_api/v1/mth/child/get_comments HTTP/1.1
Host: api-yourfqdn
Authorization: YOUR_API_KEY_HERE
x-xdr-auth-id: 241
Content-Type: application/json
Accept: */*
Content-Length: 28
{
"xsoar_source_id": "777772"
}{
"reply": {
"status": true,
"data": [
{
"comment_id": 7,
"comment_created_by": "stam_updated_user",
"comment_author_type": 1,
"comment_insert_time": 1763468552000,
"comment_update_time": 1763468849000,
"comment_text": "Update comment stam",
"comment_attachments": [],
"xsoar_source_id": "777771",
"comment_username": "customer.user@company.com"
},
{
"comment_id": 21,
"comment_created_by": "Unit42 Threat Hunting",
"comment_author_type": 0,
"comment_insert_time": 1763468843000,
"comment_update_time": null,
"comment_text": "Hunter follow-up",
"comment_attachments": [],
"xsoar_source_id": "777771",
"comment_username": "analyst@company.com"
},
{
"comment_id": 34,
"comment_created_by": "iavron iavron",
"comment_author_type": 1,
"comment_insert_time": 1764235743000,
"comment_update_time": null,
"comment_text": "Attachment test",
"comment_attachments": [
"https://test-bucket.storage.googleapis.com/comment/Screenshot.png-1764235743000?Expires=1765122615&GoogleAccessId=api-pod%40example.iam.gserviceaccount.com&Signature=REDACTED"
],
"xsoar_source_id": "484485",
"comment_username": "iavron@example.com"
}
]
}
}Last updated
Was this helpful?
