Help Center/ Global Accelerator/ API Reference/ API/ Tag/ Querying the Tag List
Updated on 2024-03-28 GMT+08:00

Querying the Tag List

Function

This API is used to query the tag list.

Calling Method

For details, see Calling APIs.

URI

GET /v1/{resource_type}/tags

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

resource_type

Yes

Object

Specifies the resource type.

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

limit

No

Integer

Specifies the number of results on each page.

Minimum: 1

Maximum: 1000

Default: 1000

offset

No

Integer

Specifies the number of bytes to skip before starting to read data.

Minimum: 0

Default: 0

Request Parameters

Table 3 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

Specifies the user token. The token can be obtained by calling the IAM API. The value of X-Subject-Token in the response header is the user token.

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

tags

Array of Tag objects

Specifies the tag list.

total_count

Integer

Specifies the total number of resources.

request_id

String

Specifies the request ID.

Table 5 Tag

Parameter

Type

Description

key

String

Specifies tag key.

Minimum: 1

Maximum: 128

values

Array of strings

Specifies the values of the tag.

Minimum: 0

Maximum: 255

Array Length: 0 - 10

Example Requests

Querying the Tag List

GET https://{ga_endpoint}/v1/{resource_type}/tags

Example Responses

Status code: 200

Operation successful.

{
  "tags" : [ {
    "key" : "tagKey",
    "values" : [ "tagValue" ]
  } ],
  "total_count" : 1,
  "request_id" : "ac1bf54f-6a23-4074-af77-800648d25bc9"
}

Status Codes

Status Code

Description

200

Operation successful.

Error Codes

See Error Codes.