• Elastic Cloud Server

ecs
  1. Help Center
  2. Elastic Cloud Server
  3. API Reference
  4. OpenStack Nova APIs
  5. Metadata Management
  6. Querying Metadata of an ECS Key

Querying Metadata of an ECS Key

Function Description

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

URI

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

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

Table 1 describes the parameters in the URI.
Table 1 Parameter description

Parameter

Mandatory

Description

project_id

Yes

Specifies the project ID.

server_id

Yes

Specifies the ECS ID.

key

Yes

Specifies the metadata of the ECS key.

Request

N/A

Response

Response parameters

Table 2 describes the response parameters.

Table 2 Response parameters

Parameter

Type

Description

User-defined

String

Specifies the metadata key-value pair.

Examples

  • Example request
    GET /v2/9c53a566cb3443ab910cf0daebca90c4/servers/998af54b-5762-4041-abc1-f98a2c27b3a2/metadata/key1
    GET /v2.1/9c53a566cb3443ab910cf0daebca90c4/servers/998af54b-5762-4041-abc1-f98a2c27b3a2/metadata/key1
  • Example response
    {
    "meta": {
                "key1": "value1"
        }
    }

Returned Values

See General Request Returned Values.