Help Center> Host Security Service (New)> API Reference> API Description> Baseline Management> Querying the Check Result of a Security Configuration Item
Updated on 2024-01-31 GMT+08:00

Querying the Check Result of a Security Configuration Item

Function

This API is used to query the check result of a specified security configuration item.

Calling Method

For details, see Calling APIs.

URI

GET /v5/{project_id}/baseline/risk-config/{check_name}/detail

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

User project ID

Minimum: 20

Maximum: 64

check_name

Yes

String

Baseline name

Minimum: 0

Maximum: 256

Table 2 Query Parameters

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

standard

Yes

String

Standard type. Its value can be:

  • cn_standard: DJCP MLPS compliance standard

  • hw_standard: Huawei standard

  • qt_standard: Qingteng standard

Minimum: 0

Maximum: 32

host_id

No

String

Server ID. If this parameter is not specified, all the servers of the user are queried.

Minimum: 0

Maximum: 64

limit

No

Integer

Number of records on each page.

Minimum: 0

Maximum: 200

Default: 10

offset

No

Integer

Offset, which specifies the start position of the record to be returned. The value must be a number no less than 0. The default value is 0.

Minimum: 0

Maximum: 2000000

Default: 0

Request Parameters

Table 3 Request header 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: 32

Maximum: 2097152

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

severity

String

Risk level. Its value can be:

  • Low

  • Medium

  • High

Minimum: 0

Maximum: 65534

check_type

String

Baseline type

Minimum: 0

Maximum: 256

check_type_desc

String

Baseline description

Minimum: 0

Maximum: 65534

check_rule_num

Integer

Total number of check items

Minimum: 0

Maximum: 2147483647

failed_rule_num

Integer

Number of failed check items

Minimum: 0

Maximum: 2147483647

passed_rule_num

Integer

Number of passed check items

Minimum: 0

Maximum: 2147483647

ignored_rule_num

Integer

Number of ignored check items

Minimum: 0

Maximum: 2147483647

host_num

Long

Number of affected servers

Minimum: 0

Maximum: 2147483647

Example Requests

This API is used to query the configuration check list whose baseline name is SSH, check standard is cloud security practice standard, and enterprise project ID is xxx.

GET https://{endpoint}/v5/{project_id}/baseline/risk-config/SSH/detail?standard=hw_standard&enterprise_project_id=xxx

Example Responses

Status code: 200

Security configuration item check result

{
  "check_rule_num" : 17,
  "check_type_desc" : "This policy checks the basic security configuration items of the SSH service to improve the security of the SSH service.",
  "failed_rule_num" : 15,
  "host_num" : 2,
  "ignored_rule_num" : 1,
  "passed_rule_num" : 14,
  "severity" : "Medium"
}

Status Codes

Status Code

Description

200

Security configuration item check result

Error Codes

See Error Codes.