- API Reference
- APIs V2 (Recommended)
- Tag Management
- Querying Tags of a DCS Instance
Querying Tags of a DCS Instance¶
Function¶
This API is used to query the tags of an instance by its instance ID.
URI¶
GET /v2/{project_id}/instances/{instance_id}/tags
Parameter | Mandatory | Type | Description |
---|---|---|---|
project_id | Yes | String | Project ID. For details, see Obtaining a Project ID. |
instance_id | Yes | String | Instance ID. |
Request Parameters¶
None
Response Parameters¶
Status code: 200
Parameter | Type | Description |
---|---|---|
tags | Array of QueryResourceTag objects | Tag list. |
Parameter | Type | Description |
---|---|---|
key | String | Tag key. |
value | String | Tag value. |
Example Requests¶
GET https://{dcs_endpoint}/v2/{project_id}/instances/{instance_id}/tags
Example Responses¶
Status code: 200
Instance tags queried successfully.
{
"tags" : [ {
"value" : "a",
"key" : "1"
}, {
"value" : "b",
"key" : "2"
} ]
}
Status Codes¶
Status Code | Description |
---|---|
200 | Instance tags queried successfully. |
Error Codes¶
See Error Codes.
last updated: 2025-04-08 09:43 UTC - commit: fae5958312e61e4a03bd86d847c435c382519ec0
Page Contents