• Native OpenStack API

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

Querying Image List Information

Function Description

This interface is used to query detailed information about an image list.

URI

  • URI format

    GET /v2/{tenant_id}/images/detail

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

  • Parameter description

    Parameter

    Mandatory

    Description

    tenant_id

    Yes

    Specifies the tenant or project 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

Fields in the following table can be used as URI parameters to filter the query results. An example of setting the parameters as URI parameters is as follows: /v2/{tenant_id}/images/detail? name ={name}&status={status}

Parameter

Type

Mandatory

Description

name

String

No

Specifies the image name.

status

String

No

Specifies the image status.

You cannot query images when the value is set to deleted. The value depends on the status in Glance. Table 1 shows the mapping relationship of image status in Nova and Glance.

changes-since

String

No

Specifies the images modified after the changes-since time point. The value is in ISO8601 format, such as 2013-06-09T06:42:18Z.

minRam

Int

No

Specifies the minimum memory size in MB required by the image.

minDisk

Int

No

Specifies the minimum disk size in GB required by the image.

Table 1 Mapping relationship of image status in Nova and Glance

Image Status in Glance

Image Status in Nova

queued

saving

saving

saving

active

active

deleted

deleted

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 2 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/detail

GET /v2.1/9c53a566cb3443ab910cf0daebca90c4/images/detail

Response Example

{
    "image": {
        "OS-EXT-IMG-SIZE:size": 20578304,
        "created": "2014-02-10T17:05:01Z",
        "id": "ee10f19c-503c-44af-af2f-73d5e42f7a17",
        "links": [
            {
                "href": "http://172.25.150.84:8774/v2/d9ebe43510414ef590a4aa158605329e/images/ee10f19c-503c-44af-af2f-73d5e42f7a17",
                "rel": "self"
            },
            {
                "href": "http://172.25.150.84:8774/d9ebe43510414ef590a4aa158605329e/images/ee10f19c-503c-44af-af2f-73d5e42f7a17",
                "rel": "bookmark"
            },
            {
                "href": "http://172.25.150.84:9292/d9ebe43510414ef590a4aa158605329e/images/ee10f19c-503c-44af-af2f-73d5e42f7a17",
                "rel": "alternate",
                "type": "application/vnd.openstack.image"
            }
        ],
        "metadata": {
            "clean_attempts": "3",
            "image_location": "snapshot",
            "image_state": "available",
            "image_type": "snapshot",
            "instance_type_ephemeral_gb": "0",
            "instance_type_flavorid": "6",
            "instance_type_id": "7",
            "instance_type_memory_mb": "256",
            "instance_type_name": "wj.ssd",
            "instance_type_root_gb": "2",
            "instance_type_rxtx_factor": "1.0",
            "instance_type_swap": "0",
            "instance_type_vcpus": "1",
            "instance_uuid": "b600b5b1-ed8c-4814-aefa-8b903c894c20",
            "os_type": "None",
            "owner_id": "d9ebe43510414ef590a4aa158605329e",
            "user_id": "74fe4ff0674b434b8a274077d8106c5b"
        },
        "minDisk": 2,
        "minRam": 0,
        "name": "image1",
        "progress": 100,
        "server": {
            "id": "b600b5b1-ed8c-4814-aefa-8b903c894c20",
            "links": [
                {
                    "href": "http://172.25.150.84:8774/v2/d9ebe43510414ef590a4aa158605329e/servers/b600b5b1-ed8c-4814-aefa-8b903c894c20",
                    "rel": "self"
                },
                {
                    "href": "http://172.25.150.84:8774/d9ebe43510414ef590a4aa158605329e/servers/b600b5b1-ed8c-4814-aefa-8b903c894c20",
                    "rel": "bookmark"
                }
            ]
        },
        "status": "ACTIVE",
        "updated": "2014-02-10T17:05:07Z"
    }
}

Returned Values

See General Request Returned Values.