Querying Tags
Function
This API is used to query image tags using search criteria and display them in a list.
URI
GET /v1/cloudimages/tags{?__isregistered,__imagetype,__whole_image,__system__cmkid,protected,visibility,owner,id,status,name,container_format,disk_format,min_ram,min_disk,__os_bit,__platform,marker,limit,sort_key,sort_dir,__os_type,tag,member_status,__support_kvm,__support_xen,__support_largememory,__support_diskintensive,__support_highperformance,__support_xen_gpu_type,__support_kvm_gpu_type,__support_xen_hana,__support_kvm_infiniband,virtual_env_type,created_at,updated_at}
You can type a question mark (?) and an ampersand (&) at the end of the URI to define multiple search criteria. For details, see the example request.
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
__isregistered |
No |
String |
Specifies whether the image is available. The value can be true. The value is true for all extension APIs by default. Common users can query only the images for which the value of this parameter is true. |
__imagetype |
No |
String |
Specifies the image type. The following types are supported:
NOTE:
The __imagetype of images you share with other tenants or those other tenants share with you and you have accepted is shared. You can use field owner to distinguish the two types of shared images. You can use member_status to filter out shared images you have accepted. |
__whole_image |
No |
Boolean |
Specifies whether the image is a full-ECS image. The value can be true or false. |
__system__cmkid |
No |
String |
Specifies the ID of the key used to encrypt the image. You can obtain the ID from the IMS console or by calling the Querying Image Details (Native OpenStack API) API. |
protected |
No |
Boolean |
Specifies whether the image is protected. The value can be true or false. Set it to true when you query public images. This parameter is optional when you query private images. |
visibility |
No |
String |
Specifies whether the image is available to other tenants. Available values include:
|
owner |
No |
String |
Specifies the tenant to which the image belongs. |
id |
No |
String |
Specifies the image ID. |
status |
No |
String |
Specifies the image status. The value can be:
|
name |
No |
String |
Specifies the image name. Exact matching is used. For detailed description, see Image Attributes. |
container_format |
No |
String |
Specifies the container type. The value is bare. |
disk_format |
No |
String |
Specifies the image format. The value can be zvhd2, vhd, zvhd, raw, iso, or qcow2. The default value is zvhd2 for a non-ISO image. |
min_ram |
No |
Integer |
Specifies the minimum memory size (MB) required for running the image. The parameter value depends on the ECS specifications. Generally, the value is 0. |
min_disk |
No |
Integer |
Specifies the minimum disk space (GB) required for running the image. The value ranges from 1 GB to 1,024 GB. |
__os_bit |
No |
String |
Specifies the OS architecture, 32 bit or 64 bit. |
__platform |
No |
String |
Specifies the image platform type. The value can be Windows, Ubuntu, Red Hat, SUSE, CentOS, Debian, OpenSUSE, Oracle Linux, Fedora, Other, CoreOS, or EulerOS. |
marker |
No |
String |
Specifies the start number from which images are queried. The value is the image ID. |
limit |
No |
Integer |
Specifies the number of images to be queried. The value is an integer and is 500 by default. |
sort_key |
No |
String |
Specifies the field for sorting the query results. The value can be an attribute of the image: name, container_format, disk_format, status, id, size, or created_at. The default value is created_at. |
sort_dir |
No |
String |
Specifies whether the query results are sorted in ascending or descending order. Its value can be desc (default) or asc. This parameter is used together with parameter sort_key. The default value is desc. |
__os_type |
No |
String |
Specifies the image OS type. Available values include:
|
tag |
No |
String |
Specifies a tag added to an image. Tags can be used as a filter to query images. |
member_status |
No |
String |
Specifies the member status. The value can be accepted, rejected, or pending. accepted: indicates that the shared image is accepted. rejected indicates that the image shared by others is rejected. pending indicates that the image shared by others needs to be confirmed. To use this parameter, set visibility to shared during the query. |
__support_kvm |
No |
String |
Specifies whether the image supports KVM. If yes, the value is true. Otherwise, this parameter is not required. |
__support_xen |
No |
String |
Specifies whether the image supports Xen. If yes, the value is true. Otherwise, this parameter is not required. |
__support_largememory |
No |
String |
Specifies whether the image supports large-memory ECSs. If the image supports large-memory ECSs, the value is true. Otherwise, this parameter is not required. For the supported OSs, see Table 4. |
__support_diskintensive |
No |
String |
Specifies whether the image supports disk-intensive ECSs. If the image supports disk-intensive ECSs, the value is true. Otherwise, this parameter is not required. |
__support_highperformance |
No |
String |
Specifies whether the image supports high-performance ECSs. If the image supports high-performance ECSs, the value is true. Otherwise, this parameter is not required. |
__support_xen_gpu_type |
No |
String |
Specifies whether the image supports GPU-accelerated ECSs on the Xen platform. See Table 2 for its value. If the image does not support GPU-accelerated ECSs on the Xen platform, this parameter is not required. This parameter cannot co-exist with __support_xen and __support_kvm. |
__support_kvm_gpu_type |
No |
String |
Specifies whether the image supports GPU-accelerated ECSs on the KVM platform. See Table 3 for its value. If the image does not support GPU-accelerated ECSs on the KVM platform, this parameter is not required. This parameter cannot co-exist with __support_xen and __support_kvm. |
__support_xen_hana |
No |
String |
Specifies whether the image supports HANA ECSs on the Xen platform. If yes, the value is true. Otherwise, this parameter is not required. This parameter cannot co-exist with __support_xen and __support_kvm. |
__support_kvm_infiniband |
No |
String |
Specifies whether the image supports ECSs with InfiniBand NICs on the KVM platform. If yes, the value is true. Otherwise, this parameter is not required. This parameter cannot co-exist with __support_xen. |
virtual_env_type |
No |
String |
Specifies the environment where the image is used. The value can be FusionCompute, Ironic, DataImage, or IsoImage.
|
created_at |
No |
String |
Specifies the time when the image was created. Images can be queried by time. The value is in the format of Operator:UTC time. The following operators are supported:
The time format is yyyy-MM-ddThh:mm:ssZ or yyyy-MM-dd hh:mm:ss. For example, to query images created before Oct 28, 2018 10:00:00, set the value of created_at as follows: created_at=lt:2018-10-28T10:00:00Z |
updated_at |
No |
String |
Specifies the time when the image was modified. Images can be queried by time. The value is in the format of Operator:UTC time. The following operators are supported:
The time format is yyyy-MM-ddThh:mm:ssZ or yyyy-MM-dd hh:mm:ss. For example, to query images updated before Oct 28, 2018 10:00:00, set the value of updated_at as follows: updated_at=lt:2018-10-28T10:00:00Z |
Request
Request parameters
None
Example Request
Querying image tags
GET https://{Endpoint}/v1/cloudimages/tags?limit=5&page=1
Response
- Response parameters
Parameter
Type
Description
tags
Array of strings
Lists the tags.
- Example response
STATUS CODE 200
1 2 3 4 5 6 7 8 9
{ "tags": [ "jjjj.11111", "uuuu.22222", "234.4", "test", "image" ] }
In the new specification, equal signs are used as separators.
Returned Values
- Normal
- Abnormal
Returned Value
Description
400 Bad Request
Request error. For details about the returned error code, see Error Codes.
401 Unauthorized
Authentication failed.
403 Forbidden
You do not have the rights to perform the operation.
404 Not Found
The requested resource was not found.
500 Internal Server Error
Internal service error.
503 Service Unavailable
The service is unavailable.
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