Handling Alarm Events¶
Function¶
This API is used to handle alarm events.
URI¶
POST /v5/{project_id}/event/operate
Parameter | Mandatory | Type | Description |
---|---|---|---|
project_id | Yes | String | Project ID Minimum: 20 Maximum: 64 |
Parameter | Mandatory | Type | Description |
---|---|---|---|
enterprise_project_id | No | String | Enterprise project ID. The value 0 indicates the default enterprise project. To query all enterprise projects, set this parameter to all_granted_eps. Minimum: 0 Maximum: 64 |
Request Parameters¶
Parameter | Mandatory | Type | Description |
---|---|---|---|
X-Auth-Token | Yes | String | User token. Minimum: 1 Maximum: 32768 |
Parameter | Mandatory | Type | Description |
---|---|---|---|
operate_type | Yes | String | Handling method. Its value can be:
|
handler | No | String | Remarks. This API is available only for handled alarms. |
operate_event_list | Yes | Array of OperateEventRequestInfo objects | Operated event list Array Length: 0 - 100 |
Parameter | Mandatory | Type | Description |
---|---|---|---|
event_class_id | Yes | String | Event category. Its value can be:
|
event_id | Yes | String | Event ID |
event_type | Yes | Integer | Intrusion type. Its value can be:
|
occur_time | Yes | Integer | Occurrence time, accurate to milliseconds. |
operate_detail_list | Yes | Array of EventDetailRequestInfo objects | Operation details list. If operate_type is set to add_to_alarm_whitelist or remove_from_alarm_whitelist, keyword and hash are mandatory. If operate_type is set to add_to_login_whitelist or remove_from_login_whitelist, the login_ip, private_ip, and login_user_name parameters are mandatory. If operate_type is set to isolate_and_kill or do_not_isolate_or_kill, the agent_id, file_hash, file_path, and process_pid parameters are mandatory. In other cases, the parameters are optional. Array Length: 0 - 100 |
Parameter | Mandatory | Type | Description |
---|---|---|---|
agent_id | No | String | Agent ID |
process_pid | No | Integer | Process ID |
file_hash | No | String | File hash |
file_path | No | String | File path |
file_attr | No | String | File attribute |
keyword | No | String | Alarm event keyword, which is used only for the alarm whitelist. |
hash | No | String | Alarm event hash, which is used only for the alarm whitelist. |
private_ip | No | String | Server private IP address |
login_ip | No | String | Login source IP address |
login_user_name | No | String | Login username |
Response Parameters¶
None
Example Requests¶
POST https://{endpoint}/v5/{project_id}/event/operate?enterprise_project_id=xxx
{
"operate_type" : "mark_as_handled",
"handler" : "test",
"operate_event_list" : [ {
"event_class_id" : "rootkit_0001",
"event_id" : "2a71e1e2-60f4-4d56-b314-2038fdc39de6",
"occur_time" : 1672046760353,
"event_type" : 1010,
"operate_detail_list" : [ {
"agent_id" : "c9bed5397db449ebdfba15e85fcfc36accee125c68954daf5cab0528bab59bd8",
"file_hash" : "e8b50f0b91e3dce0885ccc5902846b139d28108a0a7976c9b8d43154c5dbc44d",
"file_path" : "/usr/test",
"process_pid" : 3123,
"file_attr" : 33261,
"keyword" : "file_path=/usr/test",
"hash" : "e8b50f0b91e3dce0885ccc5902846b139d28108a0a7976c9b8d43154c5dbc44d",
"login_ip" : "127.0.0.1",
"private_ip" : "127.0.0.2",
"login_user_name" : "root"
} ]
} ],
"x-request-examples-description-1" : "Manually handle the intrusion alarms whose alarm event type is Rootkit and alarm event ID is 2a71e1e2-60f4-4d56-b314-2038fdc39de6."
}
Example Responses¶
None
Status Codes¶
Status Code | Description |
---|---|
200 | success |
400 | Invalid parameter. |
401 | Authentication failed. |
403 | Insufficient permission. |
404 | Resource not found. |
500 | System error. |
Error Codes¶
See Error Codes.