Querying Tag Keys

Function

You can use this API to query any tag key in a specified region.

URI

GET /v1.0/tag-keys

Table 1 Query parameters

Parameter

Mandatory

Type

Description

region_id

No

String

Region ID

limit

No

Integer

The maximum queries supported. The value range is 1 to 200. If this parameter is not specified, the default value 200 is used by default.

Minimum value: 1

Maximum value: 200

Default value: 200

marker

No

String

Paging location identifier (index). The query starts from the next piece of data indexed by this parameter. When querying the data on the first page, you do not need to specify this parameter. When querying the data on subsequent pages, set this parameter to the value in the response body returned by querying data of the previous page. When the returned next_marker is empty, the last page has been queried.

Request

Table 2 Header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

User token. TMS is a global service. So you need to set scope to domain when calling an IAM API to obtain a user token. The value of X-Subject-Token in the response header is the user token.

Response

Status code: 200

Table 3 Body parameters

Parameter

Type

Description

keys

Array of strings

Tag keys.

page_info

PageInfoTagKeys object

Pagination information

Table 4 PageInfoTagKeys

Parameter

Type

Description

next_marker

String

Paging location marker (index position)

current_count

Integer

Specifies the number of tag keys on the current page.

Example Request

Query tag keys

GET https://{Endpoint}/v1.0/tag-keys?limit=10&marker=9

Example Response

Status code: 200

Successful operation

{
  "keys" : [ "ENV1", "ENV2" ],
  "page_info" : [ {
    "next_marker" : "9",
    "current_count" : 10
  } ]
}

Status Codes

See Status Codes.

Error Codes

See Error Codes.