1
0
forked from docs/doc-exports
doc-exports/docs/ecs/api-ref/en-us_topic_0065817713.html
Artem Goncharov 3196b64bfc
move doc sources to other location (#3)
move doc sources to other location

Reviewed-by: OpenTelekomCloud Bot <None>
2022-04-27 16:24:25 +00:00

7.2 KiB

Querying ECS Metadata

Function

This API is used to query ECS metadata.

URI

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

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

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.

Pagination query is not supported.

Request

None

Response

Table 2 describes the response parameters.

Table 2 Response parameters

Parameter

Mandatory

Type

Description

metadata

Yes

Object

Specifies the user-defined metadata key-value pair.

Example Request

GET https://{endpoint}/v2/9c53a566cb3443ab910cf0daebca90c4/servers/998af54b-5762-4041-abc1-f98a2c27b3a2/metadata
GET https://{endpoint}/v2.1/9c53a566cb3443ab910cf0daebca90c4/servers/998af54b-5762-4041-abc1-f98a2c27b3a2/metadata

Example Response

{
    "metadata": {
        "wj": "True"
    }
}