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.

URI

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

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID

Minimum: 20

Maximum: 64

check_name

Yes

String

Name of the configuration check (baseline), for example, SSH, CentOS 7, and Windows.

Minimum: 0

Maximum: 256

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

enterprise_project_id

No

String

Enterprise project ID. The value 0 indicates the default enterprise project. To query all enterprise projects, set this parameter to all_granted_eps.

Default: 0

Minimum: 0

Maximum: 64

standard

Yes

String

hw_standard: Cloud security practice standard

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 displayed on each page.

Minimum: 0

Maximum: 200

Default: 10

offset

No

Integer

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

Minimum: 0

Maximum: 2000000

Default: 0

Request Parameters

Table 3 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

User 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

check_type

String

Configuration check (baseline) type, for example, SSH, CentOS 7, Windows Server 2019 R2, Windows Server 2016 R2 and MySQL5-Windows.

Minimum: 0

Maximum: 256

check_type_desc

String

Description of the baseline type, including the standards for the check items and the issues that can be audited.

Minimum: 0

Maximum: 65534

check_rule_num

Integer

Indicates the total number of check items of the current configuration check (baseline) type. For example, if the standard type of the SSH baseline is hw_standard, server security provides 17 check items, but only five check items of the SSH baseline are detected on all servers. Therefore, the value of check_rule_num is 5. All check items are checked on a server. The value of check_rule_num is 17.

Minimum: 0

Maximum: 2147483647

failed_rule_num

Integer

Number of failed check items. If a server fails to pass a check item in check_rule_num, the item is counted in failed_rule_num.

Minimum: 0

Maximum: 2147483647

passed_rule_num

Integer

Number of passed check items. If a server passes a check item in check_rule_num, the check item is counted in passed_rule_num.

Minimum: 0

Maximum: 2147483647

ignored_rule_num

Integer

Number of ignored check items. If a server ignores a check item in check_rule_num, the check item is counted in ignored_rule_num.

Minimum: 0

Maximum: 2147483647

host_num

Long

The number of servers on which the current baseline detection is performed.

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.