Overview
You can call this API to delete the specified OceanBase Cloud database instance. This operation permanently deletes all data in the instance. Proceed with caution.
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
DELETE /api/v2/instances
Request parameters
Query
Parameter |
Type |
Required |
Description |
Example value |
|---|---|---|---|---|
| requestId | String | Yes | Request ID used for tracking. | d04eabba**** |
Body
The request body is required.
Parameter |
Type |
Required |
Description |
Example value |
|---|---|---|---|---|
| requestId | String | No | Request ID used for tracking. | dc302d76-66b5-48d8-ab53-a035******** |
| instanceId | String | No | OceanBase cluster ID. | obcluster-***** |
| dryRun | Boolean | No | Whether the request is a dry run. | false |
Response parameters
Field |
Type |
Description |
Example value |
|---|---|---|---|
| success | Boolean | Whether the request was successful. | true |
| errorCode | String | Error code. | INVALID_PARAMETER |
| errorMessage | String | Error message. | Invalid parameter |
| data | Object | Business data as an object. | None |
| cost | Number | Time taken. | 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 number of records. | 100.0 |
| extra | Object | Additional information. | {} |
data object fields
Field |
Type |
Description |
Example value |
|---|---|---|---|
| requestId | String | Request ID. | d04eabba**** |
| jobKey | String | Asynchronous task key. | env |
| instanceId | String | OceanBase cluster ID. | obcluster-***** |
| dryRun | Boolean | Whether the request is a dry run. | false |
| dryRunResult | Boolean | Dry run result. | true |
| errorCode | String | Error code. | INVALID_PARAMETER |
| errorMessage | String | Error message. | Invalid parameter |
Examples
Request example
curl --request DELETE \
-u '<Your AccessKey ID:AccessKey Secret>' \
-H 'Content-Type: application/json' \
-H 'X-Ob-Project-Id: {projectId}' \
--data '{"requestId": "{requestId}", "instanceId": "{instanceId}", "dryRun": false}' \
'https://api-cloud.oceanbase.com/api/v2/instances?requestId={requestId}'
Note
- A project ID uniquely identifies a project. For information about how to obtain the project ID of an instance, see Manage projects.
- Make sure that the project ID corresponding to the specified instanceId is consistent with the specified project ID.
Response example
JSON format:
{
"success": true,
"errorCode": null,
"errorMessage": null,
"data": {
"requestId": "d04eabba****",
"jobKey": "env",
"instanceId": "obcluster-*****",
"dryRun": false,
"dryRunResult": true,
"errorCode": "INVALID_PARAMETER",
"errorMessage": "Invalid parameter"
},
"cost": 1.0,
"server": "10.0.0.10",
"requestId": "d04eabba****",
"totalCount": 100.0,
"extra": {}
}
