• Native OpenStack API

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

List Image

Function Description

This interface is used to obtain an image list.

Interface Format

Method

URI

Description

GET

/v2/images

Obtains images.

Restrictions

N/A

Expanded Interface

N/A

Request Parameter

Parameter

Type

Mandatory

Description

visibility

String

No

Specifies whether the image can be viewed by other tenants.

The value can be public or private.

name

String

No

Specifies the image name, a string of up to 256 characters.

protected

Bool

No

Specifies whether the image is protected.

container_format

String

No

Specifies the container format. The value can be ami, ari, aki, bare, or ovf.

disk_format

String

No

Specifies the disk format.

tag

String

No

Specifies the image tag, a string of up to 256 characters.

min_ram

Int

No

Specifies the minimum size of the memory (MB) that the running image belongs to.

min_disk

Int

No

Specifies the minimum size of the disk (GB) that the running image belongs to.

status

String

No

Specifies the image status.

id

String

No

Specifies the image ID.

size

Int

No

Specifies the image size.

checksum

String

No

Specifies the image checksum.

limit

Int

No

Specifies the limit of the number of records that can be displayed on each page.

marker

String

No

Specifies the ID of the last image on the previous page.

Response Parameter

Table 1 Response parameters

Parameter

Type

Mandatory

Description

images

List(Image)

Yes

Specifies the image format.

Request Example

GET /v2/images

Response Example

{
    "images": [
        {
            "status": "queued",
            "name": "test",
            "tags": [
                "test",
                "image"
            ],
            "container_format": "bare",
            "created_at": "2014-12-16T01:22:05Z",
            "size": null,
            "disk_format": "qcow2",
            "updated_at": "2014-12-16T01:22:05Z",
            "visibility": "private",
            "self": "/v2/images/4ca46bf1-5c61-48ff-b4f3-0ad4e5e3ba90",
            "min_disk": 1,
            "protected": false,
            "id": "4ca46bf1-5c61-48ff-b4f3-0ad4e5e3ba90",
            "file": "/v2/images/4ca46bf1-5c61-48ff-b4f3-0ad4e5e3ba90/file",
            "checksum": null,

            "owner": "aed2c611711548a4a9c16fb8fe166af4",
            "min_ram": 1024,
            "schema": "/v2/schemas/image",
            "virtual_size": null

        },
        {
            "status": "active",
            "name": "cirros",
            "tags": [
                "new"
            ],
            "container_format": "bare",
            "created_at": "2014-12-11T03:53:43Z",
            "size": 13147648,
            "disk_format": "qcow2",
            "updated_at": "2014-12-15T20:02:12Z",
            "visibility": "private",
            "self": "/v2/images/5155a22a-834e-4ffe-a95d-ed9665a8ed76",
            "min_disk": 0,
            "protected": false,
            "id": "5155a22a-834e-4ffe-a95d-ed9665a8ed76",
            "file": "/v2/images/5155a22a-834e-4ffe-a95d-ed9665a8ed76/file",
            "checksum": "d972013792949d0d3ba628fbe8685bce",
            "owner": "aed2c611711548a4a9c16fb8fe166af4",
            "direct_url": "file:///var/lib/glance/images/5155a22a-834e-4ffe-a95d-ed9665a8ed76",
            "min_ram": 0,
            "schema": "/v2/schemas/image",
            "virtual_size": null
        }
    ],
    "schema": "/v2/schemas/images",
    "first": "/v2/images"
}

Error Code

N/A