Updated on 2022-08-06 GMT+08:00

Querying All Tags of a Tenant

Function

This API is used to query the tags of all resources owned by a tenant in a specified project.

URI

GET /v2/{project_id}/dcs/tags

Table 1 URI parameter

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID.

Request

None

Response

Example response with status code 200:

Table 2 Response body parameter

Parameter

Type

Description

tags

Array of Tag Objects

List of tags.

Table 3 Tag

Parameter

Type

Description

key

String

Tag key, which can contain a maximum of 36 Unicode characters.

values

Array of strings

Tag value.

Example Request

POST https://{dcs_endpoint}/v2/{project_id}/dcs/tags

Example Response

Example response with status code 200:

Successfully queried all tags of a tenant.

{
  "tags" : [ {
    "value" : [ "value1", "value2" ],
    "key" : 1
  }, {
    "value" : [ "value1", "value2" ],
    "key" : 2
  } ]
}

Status Code

Status Code

Description

200

Successfully queried all tags of a tenant.

400

The request is invalid.

500

Internal service error.

Error Code

See Error Codes.