Listing All Tags of a Tenant
Function
This API is used to query the tags of all resources owned by a tenant in a specific project.
Calling Method
For details, see Calling APIs.
URI
GET /v2/{project_id}/dcs/tags
Parameter | Mandatory | Type | Description |
|---|---|---|---|
project_id | Yes | String | Parameter description: Project ID. For details, see Obtaining a Project ID. Constraints: N/A. Value range: N/A. Default value: N/A. |
Request Parameters
None
Response Parameters
Status code: 200
Parameter | Type | Description |
|---|---|---|
tags | Array of Tag objects | Parameter description: Tag list. Value range: N/A. |
Parameter | Type | Description |
|---|---|---|
key | String | Parameter description: Tag key. The key contains a maximum of 128 characters. Value range: N/A. |
values | Array of strings | Parameter description: Tag value. Value range: N/A. |
Status code: 400
Parameter | Type | Description |
|---|---|---|
error_msg | String | Parameter description: Error message. Value range: N/A. |
error_code | String | Parameter description: Error code. Value range: For details, see Error Codes. |
error_ext_msg | String | Parameter description: Extended error information. This parameter is not used currently and is set to null. Value range: N/A. |
Status code: 500
Parameter | Type | Description |
|---|---|---|
error_msg | String | Parameter description: Error message. Value range: N/A. |
error_code | String | Parameter description: Error code. Value range: For details, see Error Codes. |
error_ext_msg | String | Parameter description: Extended error information. This parameter is not used currently and is set to null. Value range: N/A. |
Example Requests
POST https://{dcs_endpoint}/v2/{project_id}/dcs/tags Example Responses
Status code: 200
Successfully queried all tags of the tenant.
{
"tags" : [ {
"values" : [ "value1", "value2" ],
"key" : "1"
}, {
"values" : [ "value1", "value2" ],
"key" : "2"
} ]
} Status Codes
Status Code | Description |
|---|---|
200 | Successfully queried all tags of the tenant. |
400 | Invalid request. |
500 | Internal service error. |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.

