Overview
You can call this API to delete the specified OceanBase cluster instance. This operation will delete all data in the instance and cannot be recovered. 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
| Name | Type | Required | Description | Example value |
|---|---|---|---|---|
| requestId | String | Yes | The request ID, used for request tracking. | dc302d76-66b5-48d8-ab53-a035******** |
Body
| Name | Type | Required | Description | Example value |
|---|---|---|---|---|
| requestId | String | Yes | The request ID, used for request tracking. | dc302d76-66b5-48d8-ab53-a035******** |
| instanceId | String | Yes | The ID of the instance to be deleted. | ob677efwh8******** |
| dryRun | Boolean | No | Specifies whether the request is a dry run. If set to true, the request will only validate the parameters without actually deleting the instance. |
true |
Response parameters
| Parameter | Type | Description | Example value |
|---|---|---|---|
| success | boolean | Indicates whether the request was successful. | true/false |
| requestId | String | trace | dc302d76-66b5-48d8-ab53-a035******** (64-bit) |
Examples
Request example
curl --request DELETE \
-u '<your ak:sk>' \
-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
Here is a successful response example:
{
"data": {},
"success": true,
"requestId": "dc302d76-66b5-48d8-ab53-a035********"
}
Here is a failed response example:
{
"errorCode": "Params.InstanceName.Invalid",
"errorMessage": "The cluster name is invalid.",
"requestId": "cb32942e-bdf2-4d85-a26f-6bf8********",
"success": false
}
