• Native OpenStack API

noa
  1. Help Center
  2. Native OpenStack API
  3. API Reference
  4. Nova
  5. Images
  6. Querying Image Details

Querying Image Details

Function Description

This interface is used to query the details about the specified image.

URI

  • URI format

    GET /v2/{tenant_id}/images/{image_id}

    GET /v2.1/{tenant_id}/images/{image_id}

  • Parameter description

    Parameter

    Mandatory

    Description

    tenant_id

    Yes

    Specifies the tenant or project ID.

    image_id

    Yes

    Specifies the image ID.

Restrictions

This interface will become invalid from micro version 2.36. Since this version, the system will return error 404 when you invoke this interface. Using the corresponding image service interface is recommended.

Extension Description

N/A

Request

N/A

Response

Parameter

Type

Mandatory

Description

id

String

Yes

Specifies the image ID in UUID format.

links

List(Dict)

Yes

Specifies the shortcut link of the image.

name

String

Yes

Specifies the image name.

metadata

Dict

Yes

Specifies the key pair of the metadata.

OS-EXT-IMG-SIZE:size

Int

Yes

Specifies the image size. The value must be greater than zero.

minDisk

Int

Yes

Specifies the minimum disk size in GB required by the image. The value must be greater than zero.

minRam

Int

Yes

Specifies the minimum memory size in GB required by the image. The value must be greater than zero.

progress

Int

Yes

Specifies the image upload progress. The value must be greater than zero.

status

String

Yes

Specifies the image status.

created

String

Yes

Specifies the image creation time. The value is in ISO8601 format, such as 2013-06-09T06:42:18Z.

updated

String

Yes

Specifies the image update time. The value is in ISO8601 format, such as 2013-06-09T06:42:18Z.

Table 1 links parameter description

Parameter

Type

Mandatory

Description

href

String

Yes

Specifies the link of the corresponding resource.

rel

String

Yes

The value can be:

  • self: A self link contains a versioned link to the resource. Use these links when the link is followed immediately.
  • bookmark: A bookmark link provides a permanent link to a resource, which is suitable for long term storage.
  • alternate: An alternate link can contain an alternate representation of the resource. For example, an OpenStack Compute image may have an alternate representation in the OpenStack image service.

type

String

No

The type attribute provides a hint as to the type of representation to expect when following the link.

Request Example

GET /v2/9c53a566cb3443ab910cf0daebca90c4/images/17a1890b-0fa4-485e-8505-14e294017988

GET /v2.1/9c53a566cb3443ab910cf0daebca90c4/images/17a1890b-0fa4-485e-8505-14e294017988

Response Example

{
    "image": {
        "status": "ACTIVE", 
        "updated": "2015-12-27T02:52:25Z", 
        "name": "cirror", 
        "links": [
            {
                "href": "https://compute.localdomain.com:8001/v2/719e9483f42d4784a089862ac4c3e8d0/images/17a1890b-0fa4-485e-8505-14e294017988", 
                "rel": "self"
            }, 
            {
                "href": "https://compute.localdomain.com:8001/719e9483f42d4784a089862ac4c3e8d0/images/17a1890b-0fa4-485e-8505-14e294017988", 
                "rel": "bookmark"
            }, 
            {
                "href": "https://https://image.az2.dc1.domainname.com:443/719e9483f42d4784a089862ac4c3e8d0/images/17a1890b-0fa4-485e-8505-14e294017988", 
                "type": "application/vnd.openstack.image", 
                "rel": "alternate"
            }
        ], 
        "created": "2015-12-27T02:52:24Z", 
        "minDisk": 0, 
        "progress": 100, 
        "minRam": 0, 
        "metadata": {
            "__os_version": "CentOS 4.4 32bit", 
            "file_format": "img", 
            "file_name": "**.img", 
            "describe": "", 
            "__os_type": "Linux", 
            "virtual_env_type": "KVM", 
            "hw_disk_bus": "scsi"
        }, 
        "id": "17a1890b-0fa4-485e-8505-14e294017988", 
        "OS-EXT-IMG-SIZE:size": 13167616
    }
}

Returned Values

See General Request Returned Values.