Querying the Check Item List of a Specified Security Configuration Item of an Image
Function
This API is used to query the check item list of a specified security configuration item of an image.
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}/image/baseline/risk-configs/{check_name}/rules
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
project_id |
Yes |
String |
Project ID. |
|
check_name |
Yes |
String |
Baseline name |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
enterprise_project_id |
No |
String |
ID of the enterprise project that a server belongs. An enterprise project can be configured only after the enterprise project function is enabled. Enterprise project ID. The value 0 indicates the default enterprise project. To query servers in all enterprise projects, set this parameter to all_granted_eps. If you have only the permission on an enterprise project, you need to transfer the enterprise project ID to query the server in the enterprise project. Otherwise, an error is reported due to insufficient permission. |
|
image_type |
Yes |
String |
Image type. The options are as follows: |
|
offset |
No |
Integer |
Offset, which specifies the start position of the record to be returned. |
|
limit |
No |
Integer |
Number of records on each page |
|
namespace |
No |
String |
Specifies the organization name. If no image information is available, all images are queried. |
|
image_name |
No |
String |
Image name |
|
image_version |
No |
String |
Image tag name |
|
image_id |
No |
String |
Image ID |
|
standard |
Yes |
String |
Standard type. Its value can be: |
|
result_type |
No |
String |
Result type. Its value can be: |
|
check_rule_name |
No |
String |
Check item name. Fuzzy match is supported. |
|
severity |
No |
String |
Risk level. Its value can be: |
|
instance_id |
No |
String |
Enterprise repository instance ID. This API is not required for SWR shared edition. |
Request 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. |
|
region |
No |
String |
Region ID |
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
total_num |
Integer |
Total risks |
|
data_list |
Array of ImageRiskConfigsCheckRulesResponseInfo objects |
Data list |
|
Parameter |
Type |
Description |
|---|---|---|
|
severity |
String |
Risk level. Its value can be: |
|
check_name |
String |
Baseline name |
|
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. Constraints N/A Range The value of check_type can be obtained from the data returned by the API /v5/{project_id}/baseline/risk-configs. Default Value N/A |
|
standard |
String |
Standard type. Its value can be: |
|
check_rule_name |
String |
Check items |
|
check_rule_id |
String |
Check item ID |
|
scan_result |
String |
Check result. The options are as follows: |
Example Requests
Query the check items of a specified security configuration item whose organization is aaa, image name is centos7, image version is common, and standard type is Huawei standard.
GET https://{endpoint}/v5/{project_id}/image/baseline/risk-configs/{check_name}/rules?offset=0&limit=200&image_type=private_image&namespace=aaa&image_name=centos7/test&image_version=common&standard=hw_standard&enterprise_project_id=all_granted_eps
Example Responses
Status code: 200
Request succeeded.
{
"total_num" : 1,
"data_list" : [ {
"check_rule_id" : "1.1",
"check_rule_name" : "Rule: Password locking policy.",
"check_name" : "CentOS 7",
"check_type" : "CentOS 7",
"standard" : "hw_standard",
"scan_result" : "failed",
"severity" : "High"
} ]
}
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