Help Center/ Host Security Service/ API Reference/ API Description/ Asset Management/ Querying the List of Servers with a Specified Kernel Module
Updated on 2026-04-03 GMT+08:00

Querying the List of Servers with a Specified Kernel Module

Function

This API is used to query the list of servers with a specified kernel module.

Authorization Information

Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions.

  • If you are using role/policy-based authorization, see Permissions Policies and Supported Actions for details on the required permissions.
  • If you are using identity policy-based authorization, no identity policy-based permission required for calling this API.

URI

GET /v5/{project_id}/asset/host/kernel-module

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.

offset

No

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

The default value is 0.

limit

No

Integer

Definition

Number of records displayed on each page.

Constraints

N/A

Range

Value range: 10-200

Default Value

10

name

Yes

String

Definition

Kernel module name.

Constraints

N/A

Range

Length: 1 to 256 characters

Default Value

N/A

host_name

No

String

Definition

Server name.

Constraints

N/A

Range

It can contain 0 to 64 characters.

Default Value

N/A

host_ip

No

String

Definition

Server IP address.

Constraints

N/A

Range

It can contain 0 to 64 characters.

Default Value

N/A

part_match

No

Boolean

Definition

Whether fuzzy match is used. The default value is false.

Constraints

N/A

Range

  • true: fuzzy match

  • false: exact match

Default Value

false

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

Minimum value: 0; maximum value: 10000

data_list

Array of KernelModuleHostInfo objects

Definition

Server list.

Range

Minimum value: 0; maximum value: 10,000

Table 5 KernelModuleHostInfo

Parameter

Type

Description

agent_id

String

Definition

agent id

Range

The value can contain 1 to 64 characters.

host_id

String

Definition

Host ID.

Range

Length: 1 to 64 characters

host_name

String

Definition

Server name.

Range

The value can contain 1 to 64 characters.

host_ip

String

Definition

Server IP address.

Range

The value can contain 1 to 64 characters.

kernel_module_info

KernelModuleInfo object

Definition

Kernel module information

Table 6 KernelModuleInfo

Parameter

Type

Description

name

String

Definition

Kernel module name.

Range

Length: 0 to 256 characters

file_name

String

Definition

File name.

Range

Length: 0 to 256 characters

version

String

Definition

Kernel module version

Range

Length: 0 to 64 characters

srcversion

String

Definition

Source Code Version

Range

Length: 0 to 64 characters

path

String

Definition

File path

Range

Length: 0 to 1024 characters

size

Integer

Definition

File size

Range

Minimum value: 0; maximum value: 2147483647

mode

String

Definition

File permissions

Range

Length: 0 to 32 characters

uid

Integer

Definition

File UID

Range

Minimum value: 0; maximum value: 2147483647

ctime

Long

Definition

File creation time.

Range

Minimum value: 0; maximum value: 2^63-1

mtime

Long

Definition

Last Modified At

Range

Minimum value: 0; maximum value: 2^63-1

hash

String

Definition

File hash.

Range

Length: 0 to 64 characters

desc

String

Definition

Description of the kernel module

Range

Length: 0 to 256 characters

record_time

Long

Definition

Scanned On

Range

Minimum value: 0; maximum value: 2^63-1

Example Requests

None

Example Responses

Status code: 200

Request succeeded.

{
  "total_num" : 38,
  "data_list" : [ {
    "agent_id" : "0468ae863af2d520b4e426c725b1c2f32ec7aefda934135e66a8e1e4a6fec6d9",
    "host_id" : "44b23fe0-ac3d-4afc-a730-b4cece1602bd",
    "host_name" : "ecs-5203460302",
    "host_ip" : "192.168.0.120",
    "kernel_module_info" : {
      "name" : "virtio_net",
      "version" : "",
      "srcversion" : "59C4CA8527D365091B08EE1",
      "path" : "/lib/modules/5.10.0-60.18.0.50.r865_35.hce2.x86_64/kernel/drivers/net/virtio_net.ko.xz",
      "size" : 35740,
      "mode" : "-rw-r--r--",
      "uid" : 0,
      "ctime" : 1686050078,
      "mtime" : 1679856808,
      "hash" : "f14edaaae23e7741d923199326d67b99d536a2679f6221685697d4f8f0e2944d",
      "desc" : "Virtio network driver",
      "file_name" : "virtio_net.ko.xz",
      "record_time" : 1743408098179
    }
  } ]
}

Status Codes

Status Code

Description

200

Request succeeded.

Error Codes

See Error Codes.