Query Tag Values

Function

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

URI

GET /v1.0/tag-values

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: 10

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.

key

Yes

String

Tag key.

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

values

Array of strings

Tag values queried.

page_info

PageInfoTagValues object

Pagination information

Table 4 PageInfoTagValues

Parameter

Type

Description

next_marker

String

Paging location marker (index position)

current_count

Integer

The number of tag values on the current page.

Example Request

Querying tag values

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

Example Response

Status code: 200

Successful operation

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

Status Codes

See Status Codes.

Error Codes

See Error Codes.