Tag List
Updated at:2025-10-20
Description
- This interface retrieves a list of all matching tag key-value pairs.
- Tag keys and tag values can serve as filter conditions.
- This interface provides all matching results without pagination.
Request
Request structure
Plain Text
1GET /v{version}/tag?tagKey={tagkey}&tagValue={tagValue} HTTP/1.1
2Host: tag.baidubce.com
3Authorization: authorization string
Request headers
There are no special headers required beyond the common headers.
Request parameters
| Parameter name | Types | Whether required | Parameter location | Description |
|---|---|---|---|---|
| version | String | Yes | URL parameter | API version number |
| tagKey | String | No | Query | The tag key to be queried. If this item is absent or empty, all tag keys shall be queried. |
| tagValue | String | No | Query | The tag value to be queried. If this item is absent, all tag values shall be queried. If it is empty, tag values with an empty string shall be queried. |
Response
Response headers
No special headers are required beyond the standard ones.
Response parameters
| Parameter name | Types | Description |
|---|---|---|
| tags | List<[Tag](BCC/Tag Service API Reference/Appendix 1.md#Tag)> | List of matching tag key-value pairs. Return empty array in case of no matching tags. |
Error code
No special error codes are returned
Example
Request example
Plain Text
1GET /v1/tag?tagKey=key1 HTTP/1.1
2Host: tag.baidubce.com
3Authorization: bce-auth-v1/5004fa6158924aa3a752f6897782af8d/2018-04-09T00:00:00Z/1800/host/807f9b9a5bc5c0f38fd184582f1b4028a736687864df86440c443282ddb4ca9e
Response example
Plain Text
1cache-control: no-cache
2content-length: 0
3content-type: text/plain; charset=utf-8
4date: Mon, 09 Apr 2018 00:00:00 GMT
5server: BWS
6x-bce-request-id: ec40cddb-b5d0-45ae-9325-2822ece684cf
7
8{
9 "tags": [
10 {
11 "tagKey": "key1",
12 "tagValue": "value1"
13 }
14 ]
15}
