Esta página aún no está disponible en su idioma local. Estamos trabajando arduamente para agregar más versiones de idiomas. Gracias por tu apoyo.
Handling Alarm Events
Function
This API is used to handle alarm events.
Calling Method
For details, see Calling APIs.
URI
POST /v5/{project_id}/event/operate
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
User project ID Minimum: 20 Maximum: 64 |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
enterprise_project_id |
No |
String |
Enterprise project ID. To query all enterprise projects, set this parameter to all_granted_eps. Minimum: 0 Maximum: 64 |
container_name |
No |
String |
Container instance name |
container_id |
No |
String |
Container ID |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
x-auth-token |
Yes |
String |
User token. It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is a token. Minimum: 1 Maximum: 32768 |
region |
Yes |
String |
region id Minimum: 0 Maximum: 128 |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
operate_type |
Yes |
String |
Handling method. Its value can be:
|
handler |
No |
String |
Remarks |
operate_event_list |
Yes |
Array of OperateEventRequestInfo objects |
Operated event list Array Length: 0 - 100 |
event_white_rule_list |
No |
Array of EventWhiteRuleListRequestInfo objects |
User-defined alarm whitelist 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 |
Event 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 |
container_id |
No |
String |
Container ID Minimum: 64 Maximum: 64 |
container_name |
No |
String |
Container name Minimum: 1 Maximum: 128 |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
event_type |
Yes |
Integer |
Event type. Its value can be:
|
field_key |
Yes |
String |
Whitelist fields. The options are as follows:
Minimum: 1 Maximum: 20 |
field_value |
Yes |
String |
Whitelist field value Minimum: 1 Maximum: 128 |
judge_type |
Yes |
String |
Wildcard. The options are as follows:
Minimum: 1 Maximum: 10 |
Response Parameters
None
Example Requests
Manually handle the intrusion alarms whose alarm event type is Rootkit and alarm event ID is 2a71e1e2-60f4-4d56-b314-2038fdc39de6.
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", "container_id" : "containerid", "container_name" : "/test" } ] } ] }
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.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.