Updated on 2025-06-30 GMT+08:00

Querying Resource Tags

Function

This API is used to query resource tags.

API Calling

For details, see Calling APIs.

URI

GET /v3/{project_id}/{resource_type}/{resource_id}/tags

Table 1 Path parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID.

resource_type

Yes

String

Resource type. The value is cts-tracker.

resource_id

Yes

String

Resource ID.

Request Parameters

None.

Response Parameters

Status code: 200

Table 2 Response body parameter

Parameter

Type

Description

tags

Array of ResourceTag objects

Tag list.

Table 3 ResourceTag

Parameter

Type

Description

key

String

Tag key, which can contain a maximum of 128 Unicode characters. A tag value can contain letters, digits, spaces, and special characters (_.:/=+-@). It cannot start or end with a space, or start with _sys_.

value

String

Tag value, which can contain a maximum of 255 Unicode characters. If value is specified, tags are deleted by key and value. If value is not specified, tags are deleted by key. A tag value can contain letters, digits, spaces, and special characters (_.:/=+-@) but cannot start or end with a space.

Example Request

https://{endpoint}/v3/{project_id}/{resource_type}/{resource_id}/tags

Example Response

Status code: 200

The request is successful.

{
  "tags" : [ {
    "key" : "key1",
    "value" : "value1"
  }, {
    "key" : "key2",
    "value" : "value2"
  }, {
    "key" : "_sys_enterprise_project_id",
    "value" : "0"
  } ]
}

Status Codes

Status Code

Description

200

The request is successful.

Error Codes

For details, see Error Codes.