Querying Image Details (Native OpenStack API)

Function

This API is used to query details about a public or private image.

URI

GET /v2/images/{image_id}

Table 1 lists the parameters in the URI.

Table 1 Parameter description

Parameter

Mandatory

Type

Description

image_id

Yes

String

Specifies the image ID.

Request

Request parameters

None

Example Request

Querying details of an image

GET https://{Endpoint}/v2/images/33ad552d-1149-471c-8190-ff6776174a00

Response

  • Response parameters

    Parameter

    Type

    Description

    file

    String

    Specifies the URL for uploading and downloading the image file.

    owner

    String

    Specifies the tenant to which the image belongs.

    id

    String

    Specifies the image ID.

    size

    Long

    This parameter is unavailable currently.

    self

    String

    Specifies the image URL.

    schema

    String

    Specifies the image schema.

    status

    String

    Specifies the image status. The value can be one of the following:

    • queued: indicates that the image metadata has already been created, and it is ready for the image file to upload.

    • saving: indicates that the image file is being uploaded to the backend storage.

    • deleted: indicates that the image has been deleted.

    • killed: indicates that an error occurs on the image uploading.

    • active: indicates that the image is available for use.

    tags

    Array of strings

    Specifies tags of the image, through which you can manage private images in your own way. You can use the image tag API to add different tags to each image and filter images by tag.

    visibility

    String

    Specifies whether the image is available to other tenants. Available values include:

    • private: private image

    • public: public image

    • shared: shared image

    name

    String

    Specifies the image name. For detailed description, see Image Attributes.

    checksum

    String

    This parameter is unavailable currently.

    protected

    Boolean

    Specifies whether the image is protected. A protected image cannot be deleted. The value can be true or false.

    container_format

    String

    Specifies the container type.

    min_ram

    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.

    max_ram

    String

    Specifies the maximum memory (MB) of the image. You can set this parameter based on the ECS specifications. Generally, you do not need to set this parameter.

    updated_at

    String

    Specifies the time when the image was updated. The value is in UTC format.

    __os_bit

    String

    Specifies the OS architecture, 32 bit or 64 bit.

    __os_version

    String

    Specifies the OS version.

    __description

    String

    Specifies the image description. For detailed description, see Image Attributes.

    disk_format

    String

    Specifies the image format. The value can be zvhd2, vhd, zvhd, raw, or qcow2. The default value is zvhd2.

    __isregistered

    String

    Specifies whether the image has been registered. The value can be true or false.

    __platform

    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.

    __os_type

    String

    Specifies the OS type. The value can be Linux, Windows, or Other.

    __system__cmkid

    String

    Specifies the ID of the key used to encrypt the image.

    min_disk

    Integer

    Specifies the minimum disk space (GB) required for running the image. The value ranges from 1 GB to 1,024 GB.

    virtual_env_type

    String

    Specifies the environment where the image is used. The value can be FusionCompute, Ironic, DataImage, or IsoImage.

    • For an ECS image (system disk image), the value is FusionCompute.

    • For a data disk image, the value is DataImage.

    • For a BMS image, the value is Ironic.

    • For an ISO image, the value is IsoImage.

    __image_source_type

    String

    Specifies the backend storage of the image. Only UDS is supported currently.

    __imagetype

    String

    Specifies the image type. The following types are supported:

    • Public image: The value is gold.

    • Private image: The value is private.

    • Shared image: The value is shared.

    created_at

    String

    Specifies the time when the image was created. The value is in UTC format.

    virtual_size

    Integer

    This parameter is unavailable currently.

    __originalimagename

    String

    Specifies the parent image ID.

    If the image is a public image or created from an image file, this value is left empty.

    __backup_id

    String

    Specifies the backup ID. To create an image using a backup, set the value to the backup ID. Otherwise, this value is left empty.

    __image_size

    String

    Specifies the size (bytes) of the image file. The value is greater than 0.

    __data_origin

    String

    Specifies the image source.

    If the image is a public image, this parameter is left empty.

    __root_origin

    String

    Specifies that the image is created from an external image file. Value: file

    __lazyloading

    String

    Specifies whether the image supports lazy loading. The value can be true, false, True, or False.

    active_at

    String

    Specifies the time when the image status became active.

    __os_feature_list

    String

    Specifies additional attributes of the image. The value is a list (in JSON format) of advanced features supported by the image.

    __sequence_num

    String

    This parameter is unavailable currently.

    __support_kvm

    String

    Specifies whether the image supports KVM. If yes, the value is true. Otherwise, this parameter is not required.

    __support_xen

    String

    Specifies whether the image supports Xen. If yes, the value is true. Otherwise, this parameter is not required.

    __support_largememory

    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

    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

    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

    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

    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 attribute cannot co-exist with __support_xen and __support_kvm.

    __support_xen_hana

    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 attribute cannot co-exist with __support_xen and __support_kvm.

    __support_kvm_infiniband

    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 attribute cannot co-exist with __support_xen.

    __support_fc_inject

    String

    Specifies whether the image supports password/private key injection using Cloud-Init. The parameter value can be true or false.

    If the value is set to true, password/private key injection using Cloud-Init is not supported.

    Note

    This parameter is valid only for ECS system disk images.

    enterprise_project_id

    String

    Specifies the enterprise project that the image belongs to.

    • If the value is 0 or left blank, the image belongs to the default enterprise project.

    • If the value is a UUID, the image belongs to the enterprise project corresponding to the UUID.

      For more information about enterprise projects and how to obtain enterprise project IDs, see Enterprise Management User Guide.

    hw_firmware_type

    String

    Specifies the ECS boot mode. Available values include:

    • bios indicates the BIOS boot mode.

    • uefi indicates the UEFI boot mode.

    hw_vif_multiqueue_enabled

    String

    Specifies whether the image supports NIC multi-queue. The value can be true or false.

    __image_location

    String

    Specifies the location where the image is stored.

    __is_config_init

    String

    Specifies whether initial configuration is complete. The value can be true or false.

    __support_amd

    String

    Specifies whether the image uses AMD's x86 architecture. The value can be true or false.

  • Example response

    STATUS CODE 200
    
    {
          "schema": "/v2/schemas/image",
          "min_disk": 100,
          "created_at": "2018-09-06T14:03:27Z",
          "__image_source_type": "uds",
          "container_format": "bare",
          "file": "/v2/images/bc6bed6e-ba3a-4447-afcc-449174a3eb52/file",
          "updated_at": "2018-09-06T15:17:33Z",
          "protected": true,
          "checksum": "d41d8cd98f00b204e9800998ecf8427e",
          "id": "bc6bed6e-ba3a-4447-afcc-449174a3eb52",
          "__isregistered": "true",
          "min_ram": 2048,
          "__lazyloading": "true",
          "owner": "1bed856811654c1cb661a6ca845ebc77",
          "__os_type": "Linux",
          "__imagetype": "gold",
          "visibility": "public",
          "virtual_env_type": "FusionCompute",
          "tags": [],
          "__platform": "CentOS",
          "size": 0,
          "__os_bit": "64",
          "__os_version": "CentOS 7.3 64bit",
          "name": "CentOS 7.3 64bit vivado",
          "self": "/v2/images/bc6bed6e-ba3a-4447-afcc-449174a3eb52",
          "disk_format": "zvhd2",
          "virtual_size": null,
          "status": "active"
    }
    

Returned Values

  • Normal

    200

  • Abnormal

    Returned Value

    Description

    400 Bad Request

    Request error.

    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.