Querying the Local Image List
Function
This API is used to query the local image list.
URI
GET /v5/{project_id}/image/local-repositories
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
project_id |
Yes |
String |
Project ID. |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
enterprise_project_id |
No |
String |
Enterprise project ID. To query all enterprise projects, set this parameter to all_granted_eps. |
|
image_name |
No |
String |
Image name |
|
image_version |
No |
String |
Image version |
|
offset |
No |
Integer |
Offset, which specifies the start position of the record to be returned. |
|
limit |
No |
Integer |
Number of records on each page |
|
scan_status |
No |
String |
Scan status. Its value can be:
|
|
local_image_type |
No |
String |
Image type. Its value can be:
|
|
image_size |
No |
Long |
Image size, in bytes |
|
start_latest_update_time |
No |
Long |
Start date of the search range of the latest update time, in milliseconds |
|
end_latest_update_time |
No |
Long |
End date of the search range of the latest update time, in milliseconds |
|
start_latest_scan_time |
No |
Long |
Start date of the search range of the latest scan completion time, in milliseconds |
|
end_latest_scan_time |
No |
Long |
End date of the search range of the latest scan completion time, in milliseconds |
|
has_vul |
No |
Boolean |
Whether there are software vulnerabilities |
|
host_name |
No |
String |
Name of the server associated with the local image |
|
host_id |
No |
String |
ID of the server associated with the local image |
|
host_ip |
No |
String |
IP address (public or private network) of the server associated with the local image |
|
container_id |
No |
String |
ID of the container associated with the local image |
|
container_name |
No |
String |
Name of the container associated with the local image |
|
pod_id |
No |
String |
ID of the pod associated with the local image |
|
pod_name |
No |
String |
Name of the pod associated with the local image |
|
app_name |
No |
String |
Name of the software associated with the local image |
Request Parameters
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
x-auth-token |
Yes |
String |
User token. |
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
total_num |
Integer |
Total number of local images |
|
data_list |
Array of ImageLocalInfo objects |
Local image data list |
|
Parameter |
Type |
Description |
|---|---|---|
|
image_name |
String |
Image name |
|
image_id |
String |
Image ID |
|
image_digest |
String |
Image digest |
|
image_version |
String |
Image version |
|
local_image_type |
String |
Local image type |
|
scan_status |
String |
Scan status. Its value can be:
|
|
image_size |
Long |
Image size, in bytes |
|
latest_update_time |
Long |
Last update time of the image version, in milliseconds |
|
latest_scan_time |
Long |
Latest scan time, in milliseconds |
|
vul_num |
Long |
Number of vulnerabilities |
|
unsafe_setting_num |
Long |
Number of settings that failed the baseline check |
|
malicious_file_num |
Long |
Number of malicious files |
|
host_num |
Long |
Number of associated servers |
|
container_num |
Long |
Number of associated containers |
|
component_num |
Long |
Number of associated components |
|
scan_failed_desc |
String |
Cause of the scanning failure. The options are as follows:
|
|
severity_level |
String |
Risk level of an image. It is displayed after an image scan is complete. Its value can be:
|
|
host_name |
String |
Host name |
|
host_id |
String |
Host ID |
|
agent_id |
String |
Agent ID |
Example Requests
Query the first 10 records in the local image list.
GET https://{endpoint}/v5/{project_id}/image/local-repositories?offset=0&limit=10
Example Responses
Status code: 200
Request succeeded.
{
"data_list" : [ {
"image_id" : "f757deea-781e-45ec-90ec-f199249890df",
"image_name" : "webshell-ljx",
"image_version" : "v1",
"image_digest" : "sha256:ce0b5d91b072730d0bc9518f11efd07eb7fdb9f43251e11a96cab5b1918b7044",
"local_image_type" : "swr_image",
"scan_status" : "success",
"image_size" : 215304488,
"latest_update_time" : 1697509433000,
"latest_scan_time" : 1709973506292,
"host_num" : 0,
"container_num" : 5,
"component_num" : 146,
"vul_num" : 77,
"host_name" : "myhost",
"host_id" : "9ad79426-992c-4be4-a2d1-dfd3a75b7c14",
"agent_id" : "1c1d073c5fc403eb0d9c3088bc49da4e015586fd4864513a2fd81afedce282d4",
"severity_level" : "High"
} ],
"total_num" : 1
}
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