• Native OpenStack API

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

Obtaining Image Metadata

Function Description

This interface is used to obtain the metadata of the specified image.

URI

  • URI format

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

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

  • 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

Table 1 Response parameter

Parameter

Type

Mandatory

Description

User customization

String

Yes

Specifies the key pair of the metadata.

Request Example

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

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

Response Example

{
    "metadata": {
        "__os_version": "Suse Linux Enterprise 12.2 64bit",
        "__image_source_type": "uds",
        "__imagetype": "gold",
        "__os_bit": "64",
        "__os_type": "Suse",
        "__isregistered": "true",
        "__image_location": "192.168.80.11:5080:pcsimsbeta:suse12.2-addx710-05-11",
        "virtual_env_type": "Ironic",
        "__platform": "Suse",
        "__support_o3s": "true"
    }
}

Returned Values

See General Request Returned Values.