Description
Sets or updates the description of a database in a tenant of an OceanBase Cloud instance to help identify and manage the database.
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
PUT /api/v2/instances/{instanceId}/tenants/{tenantId}/databases/{databaseName}/databaseDescription
Request parameters
Path
Parameter |
Type |
Required |
Description |
Example value |
|---|---|---|---|---|
| instanceId | String | Yes | OceanBase cluster ID. | obcluster-***** |
| tenantId | String | Yes | Tenant ID. | t4louaeei**** |
| databaseName | String | Yes | Database name. | test_db |
Query
Parameter |
Type |
Required |
Description |
Example value |
|---|---|---|---|---|
| requestId | String | Yes | The ID of the request. | d04eabba**** |
Body
The request body is required and must use application/json. This API overwrites the description: even an empty object {} clears the existing description.
Parameter |
Type |
Required |
Description |
Example value |
|---|---|---|---|---|
| description | String | No | Database description, up to 256 characters. A nonempty string replaces the existing description; an empty string clears it. Omitting this field or passing null also clears the description (sets it to NULL), rather than retaining the existing value. | Business transaction database |
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 | Object | Response data. | N/A |
| data.requestId | String | The ID of the request. | d04eabba**** |
| data.description | String | Database description. | Business transaction database |
| 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 PUT 'https://api-cloud.oceanbase.com/api/v2/instances/{instanceId}/tenants/{tenantId}/databases/{databaseName}/databaseDescription?requestId=d04eabba****' \
-H 'Content-Type: application/json' \
-d '{
"description": "Business transaction database"
}'
To clear the database description, use the following request body:
{
"description": ""
}
Response example
JSON format
{
"success": true,
"errorCode": null,
"errorMessage": null,
"data": {
"requestId": "d04eabba****",
"description": "Business transaction database"
},
"cost": 1.0,
"server": "xxx.xxx.x.xxx:xxx",
"requestId": "d04eabba****",
"totalCount": 100.0,
"extra": {}
}