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.
URI
GET /v2/{project_id}/dcs/tags
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID. |
Request Parameters
None
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
tags |
Array of Tag objects |
Tag list. |
Parameter |
Type |
Description |
---|---|---|
key |
String |
Tag key, which can contain a maximum of 36 Unicode characters. |
values |
Array of strings |
Tag value. |
Status code: 400
Parameter |
Type |
Description |
---|---|---|
error_msg |
String |
Error message. Maximum: 1024 |
error_code |
String |
Error code. Maximum: 9 |
error_ext_msg |
String |
Extended error information. This parameter is not used currently and is set to null. Maximum: 1024 |
Status code: 500
Parameter |
Type |
Description |
---|---|---|
error_msg |
String |
Error message. Maximum: 1024 |
error_code |
String |
Error code. Maximum: 9 |
error_ext_msg |
String |
Extended error information. This parameter is not used currently and is set to null. Maximum: 1024 |
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.