Overview
You can call this API to query the list of tags of the current organization. The API returns the tag key and the corresponding tag value.
API details
Constraints
The caller must have an AccessKey for accessing the multi-cloud API. For information about how to obtain the AccessKey ID and AccessKey secret, see Manage AccessKeys.
Request path
GET /api/v2/tags
Request parameters
Query
| Parameter | Type | Required | Description | Example value |
|---|---|---|---|---|
| Action | String | Yes | The action. Fixed value: DescribeIamTags | DescribeIamTags |
| orgId | String | Yes | The ID of the organization. | ukp31txz9tmk6yqckhoxl356 |
Response parameters
| Parameter | Type | Description | Example value |
|---|---|---|---|
| requestId | String | The ID of the request. | - |
| data | Array | The list of tags. | - |
| data[].id | Integer | The ID of the tag key (outer layer). | 217 |
| data[].tagKey | String | The value of the tag key. | bxtest-key |
| data[].tagValueList | Array | The list of values corresponding to the tag key. | - |
| data[].tagValueList[].id | Integer | The ID of the tag value (inner layer). | 244 |
| data[].tagValueList[].tagKey | String | The tag key. | bxtest-key |
| data[].tagValueList[].tagValue | String | The tag value. | bxtest-value |
| success | Boolean | Indicates whether the request was successful. | true |
Examples
Request example
curl --digest -u 'ak:sk' \
-X GET \
'https://dev-api-cloud-cn.oceanbase.com/api/v2/tags?Action=DescribeIamTags&orgId=ukp31txz9tmk6yqckhoxl356'
Response example
JSON format
{
"data": [
{
"id": 217,
"tagKey": "bxtest-key",
"tagValueList": [
{
"id": 244,
"tagKey": "bxtest-key",
"tagValue": "bxtest-value"
}
]
}
],
"requestId": "",
"success": true
}