Description
Queries the character sets and their collations available when creating a tenant in an OceanBase Cloud instance. Returns character set information for the specified tenant mode, such as MySQL or Oracle, to help configure the tenant.
Call description
Prerequisites
You need an access key to call the multi-cloud API. For information about how to obtain an AccessKey ID and AccessKey Secret, see Manage access keys.
Request path
GET /api/v2/instances/tenants/charset
Request parameters
Query
Parameter |
Type |
Required |
Description |
Example value |
|---|---|---|---|---|
| requestId | String | Yes | The ID of the request. | d04eabba**** |
| tenantMode | String | Yes | Tenant mode, for example, MySQL or Oracle. | MYSQL |
Response parameters
Field |
Type |
Description |
Example value |
|---|---|---|---|
| success | Boolean | Whether the request succeeded. | true |
| errorCode | String | Error code. | INVALID_PARAMETER |
| errorMessage | String | Error message. | Invalid parameter |
| data | Array | Response data. | N/A |
| data[].id | Integer | Unique resource identifier. | 244 |
| data[].tenantMode | String | Tenant mode, for example, MySQL or Oracle. | MYSQL |
| data[].charset | String | Character set. | utf8mb4 |
| data[].collations | Array | List of collations. | N/A |
| data[].collations[] | String | Collation. | N/A |
| cost | Number | Request duration. | 1.0 |
| server | String | Server address, typically the IP address of an OBServer node. | 10.0.0.10 |
| requestId | String | Request ID. | d04eabba**** |
| totalCount | Number | Total record count. | 100.0 |
| extra | Object | Additional information. | {} |
Examples
Request example
curl --digest -u '<AccessKey ID>:<AccessKey Secret>' -X GET \
'https://api-cloud.oceanbase.com/api/v2/instances/tenants/charset?requestId=d04eabba****&tenantMode=MYSQL'
Response example
JSON format
{
"success": true,
"errorCode": null,
"errorMessage": null,
"data": [
{
"id": 244,
"tenantMode": "MYSQL",
"charset": "utf8mb4",
"collations": []
}
],
"cost": 1.0,
"server": "xxx.xxx.x.xxx:xxx",
"requestId": "d04eabba****",
"totalCount": 100.0,
"extra": {}
}