Queries product images
Function
Queries the product images supported by Huawei Cloud Workspace.
Debugging
You can debug this API through automatic authentication in API Explorer or use the SDK sample code generated by API Explorer.
URI
GET /v2/{project_id}/images
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
os_type |
No |
String |
OS of a product image, for example, Windows. |
image_type |
No |
String |
Image type. -gold: a public image -private: a private image |
platform |
No |
String |
Image OS, for example, Windows. |
architecture |
No |
String |
Image architecture: x86. |
package_type |
No |
String |
Package series. |
image_id |
No |
String |
Image ID. |
limit |
No |
Integer |
Number of records on each page. The value ranges from 0 to 100 and defaults to 100. |
offset |
No |
Integer |
Offset. The default value is 0. |
sort_field |
No |
String |
Field used for sorting the query results. The value can be name or created_at of the image. The default value is name. |
sort_type |
No |
String |
Whether the query results are sorted in ascending or descending order. Its value can be desc or asc. This parameter is used together with sort_field and defaults to asc. |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
No |
String |
User token. It can be obtained by calling the IAM API that is used to obtain a user token. The value of X-Subject-Token in the response header is the user token. |
Content-Type |
Yes |
String |
MIME type of the request body, for example, application/json. |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
images |
Array of ImageInfo objects |
Product images supported by Huawei Cloud Workspace. |
total_count |
Integer |
Number of objects. |
Parameter |
Type |
Description |
---|---|---|
id |
String |
Image ID. |
image_type |
String |
Image type. The value can be gold (public image) or private (private image). |
os_type |
String |
OS type: Linux, Windows, or Other. |
architecture |
String |
OS architecture. The value can be arm or x86. |
os_version |
String |
OS version. |
disk_format |
String |
Image format: vhd, raw, qcow2, or zvhd2. |
name |
String |
Image name. |
min_ram |
Integer |
Minimum memory size (MB) required for running the image. The parameter value depends on the ECS flavor. The value is generally set to 0. |
min_disk |
Integer |
Minimum disk space (GB) required for running the image. The value ranges from 40 to 1024. |
product_code |
String |
Product code of the image. |
created_at |
String |
Creation time. The value is in UTC format. |
Status code: 400
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error message. |
encoded_authorization_message |
String |
Encrypted detailed reason for rejection. You can call the API decode-authorization-message of STS to decrypt the reason. |
Status code: 401
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error message. |
encoded_authorization_message |
String |
Encrypted detailed reason for rejection. You can call the API decode-authorization-message of STS to decrypt the reason. |
Status code: 403
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error message. |
encoded_authorization_message |
String |
Encrypted detailed reason for rejection. You can call the API decode-authorization-message of STS to decrypt the reason. |
Status code: 404
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error message. |
encoded_authorization_message |
String |
Encrypted detailed reason for rejection. You can call the API decode-authorization-message of STS to decrypt the reason. |
Status code: 405
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error message. |
encoded_authorization_message |
String |
Encrypted detailed reason for rejection. You can call the API decode-authorization-message of STS to decrypt the reason. |
Status code: 500
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error message. |
encoded_authorization_message |
String |
Encrypted detailed reason for rejection. You can call the API decode-authorization-message of STS to decrypt the reason. |
Status code: 503
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error message. |
encoded_authorization_message |
String |
Encrypted detailed reason for rejection. You can call the API decode-authorization-message of STS to decrypt the reason. |
Example Requests
-
GET /v2/29dfe82ada564ac2b927e1ff036d9a9b/images?image_type=gold&os_type=Linux
-
/v2/0e69423d4400f4a82f67c0059a1e4cc8/images?architecture=x86&image_type=private
Example Responses
Status code: 200
Response to the request for querying images in the OpenStack environment.
{ "total_count" : 1, "images" : [ { "id" : "d6b368bc-a24d-4fb5-a8fb-727356a53f33", "image_type" : "gold", "os_type" : "Linux", "os_version" : "EulerOS 2.2 64bit", "disk_format" : "qcow2", "name" : "Euler_Online_Tenant_vAG", "min_ram" : 0, "min_disk" : 50 }, { "id" : "bef99a44-2b6a-4ef9-b1a2-204a4910e374", "image_type" : "gold", "os_type" : "Linux", "os_version" : "EulerOS 2.5 64bit", "disk_format" : "qcow2", "name" : "FA-LZ-x86vAG-801temp", "min_ram" : 0, "min_disk" : 60 } ] }
Status Codes
Status Code |
Description |
---|---|
200 |
Response to the request for querying images in the OpenStack environment. |
400 |
The request cannot be understood by the server due to malformed syntax. |
401 |
Authentication failed. |
403 |
You do not have required permissions. |
404 |
No resource found. |
405 |
The request method is not allowed. |
500 |
An internal service error occurred. For details about the error code, see the error code description. |
503 |
The service is unavailable. |
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