Querying the Result List of Server Security Configuration Check

Function

This API is used to query the result list of a user's server security configuration check.

URI

GET /v5/{project_id}/baseline/risk-configs

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID

Minimum: 1

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: 256

check_name

No

String

Baseline name, for example, SSH, CentOS 7, and Windows.

Minimum: 0

Maximum: 256

severity

No

String

Risk level. Its value can be:

  • Security

  • Low

  • Medium

  • High

standard

No

String

hw_standard: Cloud security practice standard

host_id

No

String

Host ID

Minimum: 0

Maximum: 128

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.

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: 1

Maximum: 32768

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

total_num

Long

Total number of records

Minimum: 0

Maximum: 2147483647

data_list

Array of SecurityCheckInfoResponseInfo objects

Server configuration check result list

Array Length: 0 - 2147483647

Table 5 SecurityCheckInfoResponseInfo

Parameter

Type

Description

severity

String

Risk level. Its value can be:

  • Low

  • Medium

  • High

check_name

String

Baseline name, for example, SSH, CentOS 7, and Windows.

Minimum: 0

Maximum: 256

check_type

String

Baseline type. The values for check_type and check_name are the same for Linux servers. For example, they can both be set to SSH or CentOS 7. For Windows servers, the values for check_type and check_name are different. For example, check_type can be set to Windows Server 2019 R2 or Windows Server 2016 R2.

Minimum: 0

Maximum: 256

standard

String

hw_standard: Cloud security practice standard

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: 2097152

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: 2097152

host_num

Integer

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

Minimum: 0

Maximum: 2097152

scan_time

Long

Latest detection time (ms)

Minimum: 0

Maximum: 2097152

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

Example Requests

This API is used to query the server baseline configuration check list whose enterprise project ID is xxx. Data on the first page (the first 10 records) is returned by default.

GET https://{endpoint}/v5/{project_id}/baseline/risk-configs?enterprise_project_id=xxx

Example Responses

Status code: 200

server security configuration check result

{
  "total_num" : 1,
  "data_list" : [ {
    "check_name" : "Docker",
    "check_rule_num" : 25,
    "check_type" : "Docker",
    "check_type_desc" : "Configuring security audit of Docker's host configurations and container-running-related contents based on Docker Container Security Specifications V1_0.",
    "failed_rule_num" : 20,
    "host_num" : 0,
    "scan_time" : 1661716860935,
    "severity" : "High",
    "standard" : "hw_standard"
  } ]
}

Status Codes

Status Code

Description

200

server security configuration check result

Error Codes

See Error Codes.