Help Center/ Host Security Service/ API Reference/ API Description/ Security Operations/ Querying the List of Historical Alarm Records
Updated on 2025-09-08 GMT+08:00

Querying the List of Historical Alarm Records

Function

This API is used to query the list of historical alarm records

Calling Method

For details, see Calling APIs.

URI

GET /v5/{project_id}/event/handle-history

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Definition

Project ID, which is used to specify the project that an asset belongs to. After the project ID is configured, you can query assets in the project using the project ID. For details about how to obtain it, see Obtaining a Project ID.

Constraints

N/A

Range

The value can contain 1 to 256 characters.

Default Value

N/A

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

enterprise_project_id

No

String

Definition

Enterprise project ID, which is used to filter assets in different enterprise projects. For details, see Obtaining an Enterprise Project ID.

To query assets in all enterprise projects, set this parameter to all_granted_eps.

Constraints

You need to set this parameter only after the enterprise project function is enabled.

Range

The value can contain 1 to 256 characters.

Default Value

0: default enterprise project.

severity

No

String

Threat level. The options are as follows:

  • Security

  • Low

  • Medium

  • High

  • Critical

attack_tag

No

String

Indicates the attack flag. The options are as follows:

  • attack_success: attack success

  • attack_attempt: attack attempt

  • attack_blocked: blocked attack

  • abnormal_behavior: abnormal behavior

  • collapsible_host: compromised host

  • system_vulnerability: system vulnerability

asset_value

No

String

Asset importance. The options are as follows:

  • important

  • common

  • test

event_class_ids

No

Array of strings

Event ID. Its value can be:

  • container_1001: container namespace

  • container_1002: container open port

  • container_1003: container security option

  • container_1004: container mount directory

  • containerescape_0001: high-risk system call

  • containerescape_0002: shocker attack

  • containerescape_0003: Dirty Cow attack

  • containerescape_0004: container file escape

  • dockerfile_001: modification of user-defined protected container file

  • dockerfile_002: modification of executable files in the container file system

  • dockerproc_001: abnormal container process

  • fileprotect_0001: file privilege escalation

  • fileprotect_0002: critical file change

  • fileprotect_0003: critical file path change

  • fileprotect_0004: file/directory change

  • av_1002: virus

  • av_1003: worm

  • av_1004: Trojan

  • av_1005: botnet

  • av_1006: backdoor

  • av_1007: spyware

  • av_1008: adware

  • av_1009: phishing

  • av_1010: rootkit

  • av_1011: ransomware

  • av_1012: hacker tool

  • av_1013: grayware

  • av_1015: web shell

  • av_1016: mining software

  • login_0001: brute-force attack attempt

  • login_0002: successful brute-force attack

  • login_1001: successful login

  • login_1002: remote login

  • login_1003: weak password

  • malware_0001: shell change event

  • malware_0002: reverse shell event

  • malware_1001: malicious program

  • procdet_0001: abnormal process behavior

  • procdet_0002: process privilege escalation

  • crontab_0001: crontab script privilege escalation

  • crontab_0002: malicious path privilege escalation

  • procreport_0001: risky command

  • user_1001: account change

  • user_1002: risky account

  • vmescape_0001: VM sensitive command execution

  • vmescape_0002: access from virtualization process to sensitive file

  • vmescape_0003: abnormal VM port access

  • webshell_0001: web shell

  • network_1001: mining

  • network_1002: servers exploited to launch DDoS attacks

  • network_1003: malicious scan

  • network_1004: attack in sensitive areas

  • ransomware_0001: ransomware attack

  • ransomware_0002: ransomware attack

  • ransomware_0003: ransomware attack

  • fileless_0001: process injection

  • fileless_0002: dynamic library injection

  • fileless_0003: critical configuration change

  • fileless_0004: environment variable change

  • fileless_0005: memory file process

  • fileless_0006: VDSO hijacking

  • crontab_1001: suspicious crontab task

  • vul_exploit_0001: Redis vulnerability exploit

  • vul_exploit_0002: Hadoop vulnerability exploit

  • vul_exploit_0003: MySQL vulnerability exploit

  • rootkit_0001: suspicious rootkit file

  • rootkit_0002: suspicious kernel module

  • RASP_0004: web shell upload

  • RASP_0018: fileless web shell

  • blockexec_001: known ransomware attack

  • hips_0001: Windows Defender disabled

  • hips_0002: suspicious hacker tool

  • hips_0003: suspicious ransomware encryption behavior

  • hips_0004: hidden account creation

  • hips_0005: user password and credential reading

  • hips_0006: suspicious SAM file export

  • hips_0007: suspicious shadow copy deletion

  • hips_0008: backup file deletion

  • hips_0009: registry operation probably performed by ransomware

  • hips_0010: suspicious abnormal process

  • hips_0011: suspicious scan

  • hips_0012: suspicious ransomware script execution

  • hips_0013: suspicious mining command execution

  • hips_0014: suspicious Windows security center disabling

  • hips_0015: suspicious firewall disabling

  • hips_0016: suspicious disabling of system automatic recovery

  • hips_0017: executable file creation in Office

  • hips_0018: abnormal file creation with macros in Office

  • hips_0019: suspicious registry operation

  • hips_0020: Confluence remote code execution

  • hips_0021: MSDT remote code execution

  • portscan_0001: common port scan

  • portscan_0002: secret port scan

  • k8s_1001: Kubernetes event deletion

  • k8s_1002: privileged pod creation

  • k8s_1003: interactive shell used in pod

  • k8s_1004: pod created with sensitive directory

  • k8s_1005: pod created with server network

  • k8s_1006: pod created with host PID space

  • k8s_1007: authentication failure when common pods access API server

  • k8s_1008: API server access from common pod using cURL

  • k8s_1009: exec in system management space

  • k8s_1010: pod created in management space

  • k8s_1011: static pod creation

  • k8s_1012: DaemonSet creation

  • k8s_1013: scheduled cluster task creation

  • k8s_1014: operation on secrets

  • k8s_1015: allowed operation enumeration

  • k8s_1016: high privilege RoleBinding or ClusterRoleBinding

  • k8s_1017: ServiceAccount creation

  • k8s_1018: Cronjob creation

  • k8s_1019: interactive shell used for exec in pods

  • k8s_1020: unauthorized access to API server

  • k8s_1021: access to API server with curl

  • k8s_1022: Ingress vulnerability

  • k8s_1023: man-in-the-middle (MITM) attack

  • k8s_1024: worm, mining, or Trojan

  • k8s_1025: K8s event deletion

  • k8s_1026: SelfSubjectRulesReview

  • imgblock_0001: image blocking based on whitelist

  • imgblock_0002: image blocking based on blacklist

  • imgblock_0003: image tag blocking based on whitelist

  • imgblock_0004: image tag blocking based on blacklist

  • imgblock_0005: container creation blocked based on whitelist

  • imgblock_0006: container creation blocked based on blacklist

  • imgblock_0007: container mount proc

  • imgblock_0008: container seccomp unconfined

  • imgblock_0009: container privilege blocking

  • imgblock_0010: container capabilities blocking

event_name

No

String

Alarm name

event_type

No

Integer

Definition

Event type.

Range

  • 1001: common malware

  • 1002: virus

  • 1003: worm

  • 1004: Trojan

  • 1005: botnet

  • 1006: backdoor

  • 1010: rootkit

  • 1011: ransomware

  • 1012: hacker tool

  • 1015: web shell

  • 1016: mining

  • 1017: reverse shell

  • 2001: common vulnerability exploit

  • 2012: remote code execution

  • 2047: Redis vulnerability exploit

  • 2048: Hadoop vulnerability exploit

  • 2049: MySQL vulnerability exploit

  • 3002: file privilege escalation

  • 3003: process privilege escalation

  • 3004: critical file change

  • 3005: file/directory change

  • 3007: abnormal process behavior

  • 3015: high-risk command execution

  • 3018: abnormal shell

  • 3027: suspicious crontab task

  • 3029: system protection disabled

  • 3030: backup deletion

  • 3031: suspicious registry operations

  • 3036: container image blocking

  • 4002: brute-force attack

  • 4004: abnormal login

  • 4006: invalid accounts

  • 4014: account added

  • 4020: password theft

  • 6002: port scan

  • 6003: server scan

  • 13001: Kubernetes event deletion

  • 13002: abnormal pod behavior

  • 13003: user information enumeration

  • 13004: cluster role binding

host_name

No

String

Definition

Server name.

Constraints

N/A

Range

The value contains 1 to 256 characters.

Default Value

N/A

handle_status

No

String

Handling status. It can be:

  • unhandled

  • handled

host_ip

No

String

Definition

Server IP address.

Constraints

N/A

Range

The value contains 1 to 256 characters.

Default Value

N/A

limit

Yes

Integer

Definition

Number of records displayed on each page.

Constraints

N/A

Range

Value range: 10 to 200

Default Value

10

offset

Yes

Integer

Definition

Offset, which specifies the start position of the record to be returned.

Constraints

N/A

Range

The value range is 0 to 2,000,000.

Default Value

N/A

public_ip

No

String

Server public IP address

private_ip

No

String

Definition

Server private IP address.

Constraints

N/A

Range

The value can contain 1 to 128 characters.

Default Value

N/A

sort_dir

No

String

Sorting order. If sort_key is set, the returned results are sorted in ascending the order specified by sort_key. The default order is descending. The options are as follows:

  • asc: ascending order

  • desc: descending order

sort_key

No

String

Sorting fields. The options are as follows:

  • handle_time: handling time

Request Parameters

Table 3 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

Definition

User token, which contains user identity and permissions. The token can be used for identity authentication when an API is called. For details about how to obtain the token, see Obtaining a User Token.

Constraints

N/A

Range

The value can contain 1 to 32,768 characters.

Default Value

N/A

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

total_num

Integer

Definition

Total number.

Range

The value range is 0 to 2,147,483,647.

data_list

Array of EventHandleHistory objects

Historical handling records of alarm events

Table 5 EventHandleHistory

Parameter

Type

Description

event_type

Integer

Event type

host_name

String

Server name

event_abstract

String

Event summary

attack_tag

String

Attack tag. The options are as follows:

  • attack_success: successful attack

  • attack_attempt: attack attempt

  • attack_blocked: attack blocked

  • abnormal_behavior: abnormal behavior

  • collapsible_host: server compromised

  • system_vulnerability: system vulnerability

private_ip

String

Definition

Server private IP address.

Range

The value can contain 1 to 128 characters.

public_ip

String

Definition

EIP.

Range

The value can contain 1 to 256 characters.

asset_value

String

Asset importance. The options are as follows:

  • important

  • common

  • test

occur_time

Integer

Definition

Occurrence time, accurate to milliseconds

Range

The value range is 0 to 9,223,372,036,854,775,807.

handle_status

String

Definition

Handling status.

Range

  • unhandled

  • handled

notes

String

Remarks

event_class_id

String

Definition

Event type.

Range

  • container_1001: container namespace

  • container_1002: container open port

  • container_1003: container security option

  • container_1004: container mount directory

  • containerescape_0001: high-risk system call

  • containerescape_0002: shocker attack

  • containerescape_0003: Dirty Cow attack

  • containerescape_0004: container file escape

  • dockerfile_001: modification of user-defined protected container file

  • dockerfile_002: modification of executable files in the container file system

  • dockerproc_001: abnormal container process

  • fileprotect_0001: file privilege escalation

  • fileprotect_0002: critical file change

  • fileprotect_0003: critical file path change

  • fileprotect_0004: file/directory change

  • av_1002: virus

  • av_1003: worm

  • av_1004: Trojan

  • av_1005: botnet

  • av_1006: backdoor

  • av_1007: spyware

  • av_1008: adware

  • av_1009: phishing

  • av_1010: rootkit

  • av_1011: ransomware

  • av_1012: hacker tool

  • av_1013: grayware

  • av_1015: web shell

  • av_1016: mining software

  • login_0001: brute-force attack attempt

  • login_0002: successful brute-force attack

  • login_1001: successful login

  • login_1002: remote login

  • login_1003: weak password

  • malware_0001: shell change event

  • malware_0002: reverse shell event

  • malware_1001: malicious program

  • procdet_0001: abnormal process behavior

  • procdet_0002: process privilege escalation

  • procreport_0001: risky command

  • user_1001: account change

  • user_1002: risky account

  • vmescape_0001: VM sensitive command execution

  • vmescape_0002: access from virtualization process to sensitive file

  • vmescape_0003: abnormal VM port access

  • webshell_0001: web shell

  • network_1001: mining

  • network_1002: servers exploited to launch DDoS attacks

  • network_1003: malicious scan

  • network_1004: attack in sensitive areas

  • ransomware_0001: ransomware attack

  • ransomware_0002: ransomware attack

  • ransomware_0003: ransomware attack

  • fileless_0001: process injection

  • fileless_0002: dynamic library injection

  • fileless_0003: critical configuration change

  • fileless_0004: environment variable change

  • fileless_0005: memory file process

  • fileless_0006: VDSO hijacking

  • crontab_1001: suspicious crontab task

  • vul_exploit_0001: Redis vulnerability exploit

  • vul_exploit_0002: Hadoop vulnerability exploit

  • vul_exploit_0003: MySQL vulnerability exploit

  • rootkit_0001: suspicious rootkit file

  • rootkit_0002: suspicious kernel module

  • RASP_0004: web shell upload

  • RASP_0018: fileless web shell

  • blockexec_001: known ransomware attack

  • hips_0001: Windows Defender disabled

  • hips_0002: suspicious hacker tool

  • hips_0003: suspicious ransomware encryption behavior

  • hips_0004: hidden account creation

  • hips_0005: user password and credential reading

  • hips_0006: suspicious SAM file export

  • hips_0007: suspicious shadow copy deletion

  • hips_0008: backup file deletion

  • hips_0009: registry operation probably performed by ransomware

  • hips_0010: suspicious abnormal process

  • hips_0011: suspicious scan

  • hips_0012: suspicious ransomware script execution

  • hips_0013: suspicious mining command execution

  • hips_0014: suspicious Windows security center disabling

  • hips_0015: suspicious firewall disabling

  • hips_0016: suspicious disabling of system automatic recovery

  • hips_0017: executable file creation in Office

  • hips_0018: abnormal file creation with macros in Office

  • hips_0019: suspicious registry operation

  • hips_0020: Confluence remote code execution

  • hips_0021: MSDT remote code execution

  • portscan_0001: common port scan

  • portscan_0002: secret port scan

  • k8s_1001: Kubernetes event deletion

  • k8s_1002: privileged pod creation

  • k8s_1003: interactive shell used in pod

  • k8s_1004: pod created with sensitive directory

  • k8s_1005: pod created with server network

  • k8s_1006: pod created with host PID space

  • k8s_1007: authentication failure when common pods access API server

  • k8s_1008: API server access from common pod using cURL

  • k8s_1009: exec in system management space

  • k8s_1010: pod created in management space

  • k8s_1011: static pod creation

  • k8s_1012: DaemonSet creation

  • k8s_1013: scheduled cluster task creation

  • k8s_1014: operation on secrets

  • k8s_1015: allowed operation enumeration

  • k8s_1016: high privilege RoleBinding or ClusterRoleBinding

  • k8s_1017: ServiceAccount creation

  • k8s_1018: Cronjob creation

  • k8s_1019: interactive shell used for exec in pods

  • k8s_1020: unauthorized access to API server

  • k8s_1021: access to API server with curl

  • k8s_1022: Ingress vulnerability

  • k8s_1023: man-in-the-middle (MITM) attack

  • k8s_1024: worm, mining, or Trojan

  • k8s_1025: K8s event deletion

  • k8s_1026: SelfSubjectRulesReview

  • imgblock_0001: image blocking based on whitelist

  • imgblock_0002: image blocking based on blacklist

  • imgblock_0003: image tag blocking based on whitelist

  • imgblock_0004: image tag blocking based on blacklist

  • imgblock_0005: container creation blocked based on whitelist

  • imgblock_0006: container creation blocked based on blacklist

  • imgblock_0007: container mount proc

  • imgblock_0008: container seccomp unconfined

  • imgblock_0009: container privilege blocking

  • imgblock_0010: container capabilities blocking

event_name

String

Event name

handle_time

Integer

Definition

Handling time, in milliseconds. This parameter is available only for handled alarms.

Range

The value range is 0 to 9,223,372,036,854,775,807.

operate_type

String

Definition

Handling method.

Range

  • mark_as_handled: Mark as handled

  • ignore: Ignore

  • add_to_alarm_whitelist: Add to alarm whitelist

  • add_to_login_whitelist: Add to login whitelist

  • isolate_and_kill: Isolate and kill

  • unhandle: Cancel manual handling

  • do_not_ignore: Unignore

  • remove_from_alarm_whitelist: Remove from the alarm whitelist

  • remove_from_login_whitelist: Remove from the login whitelist

  • do_not_isolate_or_kill: Cancel isolation and killing

severity

String

Definition

Risk level.

Range

  • Security

  • Low

  • Medium

  • High

  • Critical

user_name

String

Username

Example Requests

None

Example Responses

Status code: 200

Request succeeded.

{
  "total_num" : 23081,
  "data_list" : [ {
    "event_class_id" : "graph_0001",
    "event_name" : "Suspicious sample execution detected",
    "user_name" : "scc_hss_g0***0938_01",
    "operate_type" : "do_not_ignore",
    "host_name" : "ecs-00****74-windows",
    "attack_tag" : "collapsible_host",
    "private_ip" : "192.168.0.180",
    "public_ip" : "100.93.15.94",
    "asset_value" : "common",
    "severity" : "Critical",
    "occur_time" : 1737511632000,
    "handle_status" : "unhandled",
    "notes" : "One alarm has been handled.",
    "handle_time" : 1737532947313
  } ]
}

SDK Sample Code

The SDK sample code is as follows.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
package com.huaweicloud.sdk.test;

import com.huaweicloud.sdk.core.auth.ICredential;
import com.huaweicloud.sdk.core.auth.BasicCredentials;
import com.huaweicloud.sdk.core.exception.ConnectionException;
import com.huaweicloud.sdk.core.exception.RequestTimeoutException;
import com.huaweicloud.sdk.core.exception.ServiceResponseException;
import com.huaweicloud.sdk.hss.v5.region.HssRegion;
import com.huaweicloud.sdk.hss.v5.*;
import com.huaweicloud.sdk.hss.v5.model.*;


public class ListEventHandleHistorySolution {

    public static void main(String[] args) {
        // The AK and SK used for authentication are hard-coded or stored in plaintext, which has great security risks. It is recommended that the AK and SK be stored in ciphertext in configuration files or environment variables and decrypted during use to ensure security.
        // In this example, AK and SK are stored in environment variables for authentication. Before running this example, set environment variables CLOUD_SDK_AK and CLOUD_SDK_SK in the local environment
        String ak = System.getenv("CLOUD_SDK_AK");
        String sk = System.getenv("CLOUD_SDK_SK");
        String projectId = "{project_id}";

        ICredential auth = new BasicCredentials()
                .withProjectId(projectId)
                .withAk(ak)
                .withSk(sk);

        HssClient client = HssClient.newBuilder()
                .withCredential(auth)
                .withRegion(HssRegion.valueOf("<YOUR REGION>"))
                .build();
        ListEventHandleHistoryRequest request = new ListEventHandleHistoryRequest();
        try {
            ListEventHandleHistoryResponse response = client.listEventHandleHistory(request);
            System.out.println(response.toString());
        } catch (ConnectionException e) {
            e.printStackTrace();
        } catch (RequestTimeoutException e) {
            e.printStackTrace();
        } catch (ServiceResponseException e) {
            e.printStackTrace();
            System.out.println(e.getHttpStatusCode());
            System.out.println(e.getRequestId());
            System.out.println(e.getErrorCode());
            System.out.println(e.getErrorMsg());
        }
    }
}
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# coding: utf-8

import os
from huaweicloudsdkcore.auth.credentials import BasicCredentials
from huaweicloudsdkhss.v5.region.hss_region import HssRegion
from huaweicloudsdkcore.exceptions import exceptions
from huaweicloudsdkhss.v5 import *

if __name__ == "__main__":
    # The AK and SK used for authentication are hard-coded or stored in plaintext, which has great security risks. It is recommended that the AK and SK be stored in ciphertext in configuration files or environment variables and decrypted during use to ensure security.
    # In this example, AK and SK are stored in environment variables for authentication. Before running this example, set environment variables CLOUD_SDK_AK and CLOUD_SDK_SK in the local environment
    ak = os.environ["CLOUD_SDK_AK"]
    sk = os.environ["CLOUD_SDK_SK"]
    projectId = "{project_id}"

    credentials = BasicCredentials(ak, sk, projectId)

    client = HssClient.new_builder() \
        .with_credentials(credentials) \
        .with_region(HssRegion.value_of("<YOUR REGION>")) \
        .build()

    try:
        request = ListEventHandleHistoryRequest()
        response = client.list_event_handle_history(request)
        print(response)
    except exceptions.ClientRequestException as e:
        print(e.status_code)
        print(e.request_id)
        print(e.error_code)
        print(e.error_msg)
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
package main

import (
	"fmt"
	"github.com/huaweicloud/huaweicloud-sdk-go-v3/core/auth/basic"
    hss "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/hss/v5"
	"github.com/huaweicloud/huaweicloud-sdk-go-v3/services/hss/v5/model"
    region "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/hss/v5/region"
)

func main() {
    // The AK and SK used for authentication are hard-coded or stored in plaintext, which has great security risks. It is recommended that the AK and SK be stored in ciphertext in configuration files or environment variables and decrypted during use to ensure security.
    // In this example, AK and SK are stored in environment variables for authentication. Before running this example, set environment variables CLOUD_SDK_AK and CLOUD_SDK_SK in the local environment
    ak := os.Getenv("CLOUD_SDK_AK")
    sk := os.Getenv("CLOUD_SDK_SK")
    projectId := "{project_id}"

    auth := basic.NewCredentialsBuilder().
        WithAk(ak).
        WithSk(sk).
        WithProjectId(projectId).
        Build()

    client := hss.NewHssClient(
        hss.HssClientBuilder().
            WithRegion(region.ValueOf("<YOUR REGION>")).
            WithCredential(auth).
            Build())

    request := &model.ListEventHandleHistoryRequest{}
	response, err := client.ListEventHandleHistory(request)
	if err == nil {
        fmt.Printf("%+v\n", response)
    } else {
        fmt.Println(err)
    }
}

For SDK sample code of more programming languages, see the Sample Code tab in API Explorer. SDK sample code can be automatically generated.

Status Codes

Status Code

Description

200

Request succeeded.

Error Codes

See Error Codes.