Querying Basic Image Information
Function
This API is used to query the basic image information. For a CI/CD image, its image type and image ID should be specified to uniquely identify the image. For a repository image, its image type, organization name, image name, and image tag should be specified to uniquely identify the 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/{image_id}/basic-image
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| project_id | Yes | String | Project ID. |
| image_id | Yes | String | Image ID. |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| enterprise_project_id | No | String | ID of the enterprise project that the server belongs to. An enterprise project can be configured only after the enterprise project function is enabled. The default value of an enterprise project ID is 0, indicating the default enterprise project. To query servers in all enterprise projects, set this parameter to all_granted_eps. If you only have the permissions for a specific enterprise project, to query a server in the project, specify the enterprise project ID. Otherwise, an error will be reported due to insufficient permission. |
| limit | No | Integer | Number of records displayed on each page. |
| offset | No | Integer | Offset, which specifies the start position of the record to be returned. |
| image_type | Yes | String | Image type. Its value can be: |
| namespace | No | String | Organization name. |
| image_name | No | String | Image name. |
| image_version | No | String | Image tag name |
| os_name | No | String | OS name |
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 |
Response Parameters
Status code: 200
| Parameter | Type | Description |
|---|---|---|
| total_num | Integer | Total |
| data_list | Array of ImageBasicImageInfo objects | Basic image information |
Example Requests
-
Query the basic image information of a private image.
GET https://{endpoint}/v5/{project_id}/image/{image_id}/basic-image?offset=0&limit=200&image_type=private_image&namespace=scc_hss_container&image_name=proxy-agent&image_version=24.5.0-x86_64&enterprise_project_id=all_granted_eps -
Query the basic image information of the CI/CD image whose ID is 111.
GET https://{endpoint}/v5/{project_id}/image/111/basic-image?offset=0&limit=200&image_type=cicd&enterprise_project_id=all_granted_eps
Example Responses
Status code: 200
Request succeeded.
{
"total_num" : 1,
"data_list" : [ {
"os_name" : "Debian",
"os_version" : "9",
"layer_digest" : "sha256:27833a3ba0a545deda33bb01eaf95a14d05d43bf30bce9267d92d17f069fe897"
} ]
} 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