Description
You can call this operation to delete an OceanBase cluster.
Call description
Prerequisites
You have the permission to delete the OceanBase cluster.
For more information about the permissions, see Users and Permissions Overview.
You have passed the authentication for the OCP application service.
Request path
DELETE /api/v2/ob/clusters/{id}
Path parameters
| Parameter | Type | Required | Example value | Description |
|---|---|---|---|---|
| id | Long | Yes | 1 | The ID of the OceanBase cluster to be deleted. |
Response parameters
Basic data structure
| Parameter | Type | Description |
|---|---|---|
| data | Object | The information about the asynchronous task. For more information, see Task information. |
| successful | Boolean | Indicates whether the request was successful. |
| timestamp | Datetime | The timestamp when the server completed the request. |
| duration | Integer | The time taken by the server to process the request, in milliseconds. |
| status | Integer | An HTTP status code. |
| traceId | String | The trace ID of the request. This trace ID is used for troubleshooting. |
| server | String | The address of the application server that responded to the request. |
Examples
Sample request
DELETE /api/v2/ob/clusters/1
Sample response
{
"data": {
"cluster": {
"id": 19,
"name": "terran",
"obClusterId": 25
},
"context": "Context(parallelIdx=-1, stringMap={cluster_name=terran, cluster_id=19, service_type=OB_CLUSTER, former_cluster_status=RUNNING, service_name=terran:25, service_version=2.2.52, ob_cluster_id=25}, listMap={host_ids=[1]})",
"creator": {
"id": 100,
"name": "admin"
},
"id": 107280,
"name": "Delete primary OB cluster",
"startTime": "2021-03-02T10:27:16.449+08:00",
"status": "RUNNING",
"tasks": [
{
"description": "Prepare delete cluster",
"downstreams": [
128767
],
"id": 128764,
"name": "Prepare delete cluster",
"operation": "EXECUTE",
"status": "RUNNING",
"upstreams": [
]
},
{
"description": "Clean observer host",
"downstreams": [
128766
],
"id": 128765,
"name": "Clean observer host",
"operation": "EXECUTE",
"status": "PENDING",
"upstreams": [
128768
]
},
{
"description": "Delete cluster info",
"downstreams": [
128769
],
"id": 128766,
"name": "Delete cluster info",
"operation": "EXECUTE",
"status": "PENDING",
"upstreams": [
128765
]
},
{
"description": "Stop ocp agent service",
"downstreams": [
128768
],
"id": 128767,
"name": "Stop ocp agent service",
"operation": "EXECUTE",
"status": "PENDING",
"upstreams": [
128764
]
},
{
"description": "Wait node",
"downstreams": [
128765
],
"id": 128768,
"name": "Wait node",
"operation": "EXECUTE",
"status": "PENDING",
"upstreams": [
128767
]
},
{
"description": "Unreserve host",
"downstreams": [
],
"id": 128769,
"name": "Unreserve host",
"operation": "EXECUTE",
"status": "PENDING",
"upstreams": [
128766
]
}
]
},
"duration": 83,
"server": "a83ad33525",
"status": 200,
"successful": true,
"timestamp": "2021-03-02T10:27:16.488+08:00",
"traceId": "9b4cf006c83f4b2c"
}