• Native OpenStack API

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

Querying Metadata

Function Description

This interface is used to query the metadata of an ECS key.

URI

  • URI format

    GET /v2/{tenant_id}/servers/{server_id}/metadata/{key}

    GET /v2.1/{tenant_id}/servers/{server_id}/metadata/{key}

  • Parameter description

    Parameter

    Mandatory

    Description

    tenant_id

    Yes

    Specifies the tenant or project ID.

    server_id

    Yes

    Specifies the ECS ID.

    key

    Yes

    Specifies the metadata of the ECS key.

Restrictions

N/A

Extension Description

N/A

Request

N/A

Response

Parameter

Type

Mandatory

Description

User-defined

String

Yes

Specifies the metadata key-value pair.

Request Example

GET /v2/9c53a566cb3443ab910cf0daebca90c4/servers/998af54b-5762-4041-abc1-f98a2c27b3a2/metadata/key1

GET /v2.1/9c53a566cb3443ab910cf0daebca90c4/servers/998af54b-5762-4041-abc1-f98a2c27b3a2/metadata/key1

Response Example

{
"meta": {
            "key1": "value1"
    }
}

Returned Values

See General Request Returned Values.