Help Center/ Data Ingestion Service/ API Reference/ API Description/ Tag Management/ Querying All Tags of a Specified Region
Updated on 2024-10-21 GMT+08:00

Querying All Tags of a Specified Region

Function

This API is used to query all tags of a specified region.

Calling Method

For details, see Calling APIs.

URI

GET /v2/{project_id}/stream/tags

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

User token.

It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token.

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

tags

Array of Tags objects

Tags

Table 4 Tags

Parameter

Type

Description

key

String

Tag key.

  • It cannot be left blank.

  • It must be unique for each resource.

  • It can contain uppercase and lowercase letters, digits, hyphens (-), underscores (_), and Unicode characters (\u4E00-\u9FFF).

Maximum: 36

values

Array of strings

Tag values.

If the value list is empty, this parameter indicates any_value. The values are in the OR relationship.

Example Requests

Querying All Tags of a Specified Region

GET https://{Endpoint}/v2/{project_id}/stream/tags

Example Responses

Status code: 200

Response body of the tag set

{
  "tags" : [ {
    "key" : "key1",
    "values" : [ "value1", "value2" ]
  }, {
    "key" : "key2",
    "values" : [ "value1", "value2" ]
  } ]
}

Status Codes

Status Code

Description

200

Response body of the tag set

Error Codes

See Error Codes.