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.
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/risk-configs
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 |
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. |
check_name | No | String | Definition Configuration check baseline name, for example, SSH, CentOS 7, or Windows. Constraints N/A Range The value can contain 0 to 256 characters. Default Value N/A |
group_id | No | String | Definition Policy group ID. Constraints N/A Range The value can contain 0 to 128 characters. Default Value N/A |
severity | No | String | Definition Risk level. Constraints N/A Range Default Value N/A |
standard | No | String | Definition Standard type. Constraints N/A Range Default Value N/A |
host_id | No | String | Definition Server ID. Constraints N/A Range The value can contain 0 to 128 characters. Default Value N/A |
limit | No | Integer | Definition Number of records displayed on each page. Constraints N/A Range Value range: 10-200 Default Value 10 |
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. |
Request 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
Parameter | Type | Description |
|---|---|---|
total_num | Long | Definition Total number of records. Range N/A |
data_list | Array of SecurityCheckInfoResponseInfo objects | Definition Server configuration check result list. Range N/A |
Parameter | Type | Description |
|---|---|---|
severity | String | Definition Risk level. Range |
check_name | String | Definition Configuration check baseline name, for example, SSH, CentOS 7, or Windows. Range N/A |
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. |
key | String | Definition Unique value of the configuration check (baseline), for example, SSH, CentOS 7, or Windows. Range The value can contain 0 to 256 characters. |
check_type | String | Definition 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. Range N/A |
standard | String | Definition Standard type. Range |
executable_file_path | String | Definition Path information of the configuration check (baseline). Range N/A |
check_rule_num | Integer | Definition 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, HSS provides 17 check items, but only five check items of the SSH baseline are checked on all servers. Therefore, the value of check_rule_num is 5. If all the check items are checked on a server, the value of check_rule_num is 17. Range N/A |
failed_rule_num | Integer | Definition 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. Range N/A |
host_num | Integer | Definition Number of affected servers, that is, the number of servers where the current baseline check is performed. Range N/A |
scan_time | Long | Definition Latest check time (ms). Range N/A |
check_type_desc | String | Definition Description of the configuration check (baseline) type, including the standards for the check items contained in the current baseline and the items that can be audited. Range N/A |
Example Requests
This API is used to query the server baseline configuration check result 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
Request succeeded.
{
"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 | Request succeeded. |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot
