Exporting Vulnerabilities of Local Images in Batches (Full Export Supported)
Function
This API is used to batch export vulnerabilities from local images. (Full export is supported.)
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
POST /v5/{project_id}/image/local-vulnerability/export
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
project_id |
Yes |
String |
Project ID |
|
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. |
|
export_size |
Yes |
Integer |
Number of exported data records. |
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 the user token. |
|
region |
Yes |
String |
Region ID |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
image_id_list |
No |
Array of strings |
Specifies the list of images to be exported. If operate_all is set to false, you need to enter the batch query criteria. image_id specifies the image ID, which is the unique image ID. For private images and shared images, the value is the image ID returned in the image list. |
|
operate_all |
No |
Boolean |
If the value is true, you can query all data based on the filter criteria. |
|
vul_type |
No |
String |
Vulnerability type. The options are as follows: -linux_vul: Linux vulnerability -app_vul: application vulnerability |
|
handle_status |
No |
String |
Vulnerability handling status. The options are as follows: |
|
scan_status |
No |
String |
Definition Scan status Constraints N/A Range Default Value N/A |
|
image_name |
No |
String |
Image name |
|
image_version |
No |
String |
Image version |
|
image_size |
No |
Long |
Image size |
|
start_latest_update_time |
No |
Long |
Creation start date, in ms. |
|
end_latest_update_time |
No |
Long |
Creation end date, in ms. |
|
start_latest_scan_time |
No |
Long |
The start time of latest scan completion, in ms. |
|
end_latest_scan_time |
No |
Long |
End date of the latest scan completion time, in ms. |
|
has_container |
No |
Boolean |
Definition Whether there are containers. Constraints N/A Range Default Value N/A |
|
vul_id_list |
No |
Array of strings |
Vulnerability ID list for the image vulnerability export. |
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
record_total_num |
Long |
Definition Total number of exported records. Range The value range is 0 to 2,147,483,647. |
|
task_id |
String |
Definition Export task ID Range The value can contain 1 to 256 characters. |
Example Requests
{
"operate_all" : true
}
Example Responses
Status code: 200
Request succeeded.
{
"record_total_num" : 1,
"task_id" : "asdwwqdtut01"
}
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