Help Center/Host Security Service/API Reference/API Description/Baseline Management/Querying Lists of Servers Affected by Configuration Check Items
Updated on 2026-04-03 GMT+08:00

Querying Lists of Servers Affected by Configuration Check Items

Function

This API is used to query the server list affected by a configuration check item.

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}/baseline/check-rule/hosts

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

check_rule_id

Yes

String

Definition

ID of a specific baseline check item.

Constraints

N/A

Range

  • The value can be obtained by calling the API /v5/{project_id}/baseline/risk-config/{check_name}/check-rules.

Default Value

N/A

check_name

No

String

Definition

Name of the configuration (baseline) check, such as SSH, CentOS 7, and Windows. Compared with check_type, check_name contains more process information, such as PID. In a query in the baseline dimension, check_name is required.

Constraints

N/A

Range

N/A

Default Value

N/A

check_type

No

String

Definition

Type of the configuration (baseline) check, such as SSH, CentOS 7, and Windows. In a query in the check item dimension, check_type is required.

Constraints

N/A

Range

N/A

Default Value

N/A

standard

Yes

String

Definition

Baseline Type

Constraints

N/A

Range

  • cn_standard: DJCP MLPS compliance standard

  • hw_standard: Cloud security practice standard

cis_standard: general security standard

Default Value

N/A

result_type

No

String

Definition

Check result type.

Constraints

N/A

Range

  • safe: The item passed the check.

  • unhandled

  • ignored

  • fixing: fixing

  • fix-failed: The fix failed.

  • verifying

  • add_to_whitelist: The item has been added to the whitelist.

Default Value

N/A

cluster_id

No

String

Definition

Cluster ID.

Constraints

N/A

Range

The value can contain 0 to 64 characters.

Default Value

N/A

host_name

No

String

Definition

Server name or IP address.

Constraints

N/A

Range

N/A

Default Value

N/A

host_type

No

String

Definition

Server type. (Deprecated)

Constraints

N/A

Range

  • cce

Default Value

N/A

check_cce

No

Boolean

Definition

Whether to filter only CCE servers. (Deprecated)

Constraints

N/A

Range

  • true: yes

  • false: no

Default Value

false

policy_group_id

No

String

Definition

Policy group ID. (Deprecated)

Constraints

N/A

Range

The value can contain 0 to 128 characters.

Default Value

N/A

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

Long

Definition

Total number of servers affected by a single baseline check item.

Range

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

data_list

Array of SecurityCheckRuleHostResponseInfo objects

Definition

List of servers affected by a single baseline check item.

Range

0 to 2,147,483,647 items

Table 5 SecurityCheckRuleHostResponseInfo

Parameter

Type

Description

host_id

String

Definition

Unique ID of a server (host).

Range

The value can contain 1 to 64 characters.

host_name

String

Definition

Server name.

Range

The value can contain 1 to 256 characters.

check_name

String

Definition

Configuration check baseline name, for example, SSH, CentOS 7, or Windows.

Range

The value can contain 0 to 256 characters.

baseline_name

String

Definition

Name of a baseline, for example, SSH application baseline check, CentOS 7 system baseline check, and Windows system baseline check.

Range

The value can contain 0 to 256 characters.

host_public_ip

String

Definition

Server EIP.

Range

The value can contain 0 to 128 characters.

host_private_ip

String

Definition

Server private IP address.

Range

The value can contain 0 to 256 characters.

scan_time

Long

Definition

Scan time (ms).

Range

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

failed_num

Integer

Definition

Number of risk items.

Range

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

passed_num

Integer

Definition

Number of passed items.

Range

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

diff_description

String

Definition

Differentiated display of messages.

Range

The value can contain 0 to 512 characters.

description

String

Definition

Remarks for ignoring or whitelisting an item.

Range

The value contains 0 to 1,024 characters.

host_type

String

Definition

Server type. If the server type is cce, the return value is cce.

Range

  • cce

enable_fix

Integer

Definition

Whether one-click fix is supported.

Range

  • 1: One-click fix is supported.

  • 0: not supported

enable_verify

Boolean

Definition

Whether the check item can be verified. Linux must be used, and the agent version must be 3.2.24 or later.

Range

  • true: verifiable

  • false: unverifiable

enable_click

Boolean

Definition

Whether the Fix, Ignore, and Verify buttons of the check item are enabled.

Range

  • true: The buttons are enabled.

  • false: The buttons are disabled.

cancel_ignore_enable_click

Boolean

Definition

Whether an ignored check item can be clicked.

Range

  • true: The buttons are enabled.

  • false: The buttons are disabled.

result_type

String

Definition

Check result type.

Range

  • safe: The item passed the check.

  • unhandled

  • ignored

  • fixing: fixing

  • fix-failed: The fix failed.

  • verifying

  • *add_to_whitelist: Whitelisted (An item failed to pass the check but it has been added to the whitelist.)

fix_failed_reason

String

Definition

Cause of fix failure.

Range

The value can contain 0 to 256 characters.

cluster_id

String

Definition

Cluster ID.

Range

The value can contain 0 to 64 characters.

Example Requests

None

Example Responses

Status code: 200

Request succeeded.

{
  "data_list" : [ {
    "host_id" : "852d2054-ae2e-11f0-a086-fa163e358d0a",
    "host_name" : "name",
    "check_name" : "SSH",
    "host_private_ip" : "192.168.0.108",
    "result_type" : "unhandled",
    "scan_time" : 1760988017640
  } ],
  "total_num" : 1
}

Status Codes

Status Code

Description

200

Request succeeded.

Error Codes

See Error Codes.