---
title: "删除 OceanBase 集群 | OceanBase 文档中心"
description: "删除 OceanBase 集群 功能说明 该接口用于删除 OceanBase 集群。 调用说明 接口约束 调用者需具备删除 OceanBase 集群的权限。 关于调用者的权限，详情可参见 安全概述 。 调用者需要通过 OCP 应用服务鉴权。 请求路径 DELETE /api/v2/ob/clusters/{id} p…"
---
切换语言

- 中文站 - 简体中文
- International - English
- 日本站 - 日本語

文档反馈![](https://mdn.alipayobjects.com/huamei_22khvb/afts/img/A*lJTmRZ61jSUAAAAAAAAAAAAADiGDAQ/original) 云平台 OCPV 4.0.3 企业版

# 删除 OceanBase 集群

更新时间：2023-08-16 15:51:32

## 功能说明

该接口用于删除 OceanBase 集群。

## 调用说明

### 接口约束

- 调用者需具备删除 OceanBase 集群的权限。

  关于调用者的权限，详情可参见 [安全概述](https://www.oceanbase.com/docs/enterprise-oceanbase-ocp-cn-10000000001538756)。
 - 调用者需要通过 OCP 应用服务鉴权。

### 请求路径

`DELETE /api/v2/ob/clusters/{id}`

**path：**

| 参数 | 类型 | 必选 | 示例值 | 描述 |
| --- | --- | --- | --- | --- |
| id | Long | 是 | 1 | 需删除的 OceanBase 集群 的 ID。 |

### 返回结果

基础数据结构

| 参数 | 类型 | 说明 |
| --- | --- | --- |
| data | Object | 异步任务信息，详情参见 [任务信息](https://www.oceanbase.com/docs/enterprise-oceanbase-ocp-cn-10000000001540216)。 |
| successful | Boolean | 请求是否成功。 |
| timestamp | Datetime | 服务端完成请求的时间戳。 |
| duration | Integer | 服务端处理请求的时间（毫秒）。 |
| status | Integer | 符合 HTTP Status 规范的编码。 |
| traceId | String | 请求的 Trace ID，用于排查问题。 |
| server | String | 响应请求的应用服务的地址。 |

## 示例

### 请求示例

`DELETE /api/v2/ob/clusters/1`

### 返回示例

```unknow
{
  "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"
}

```

 上一篇 下一篇 ![有帮助](https://gw.alipayobjects.com/mdn/ob_asset/afts/img/A*y6ocSqN8cqsAAAAAAAAAAAAAARQnAQ)![无帮助](https://gw.alipayobjects.com/mdn/ob_asset/afts/img/A*BG9IQJyLHF8AAAAAAAAAAAAAARQnAQ)![反馈](https://gw.alipayobjects.com/mdn/ob_asset/afts/img/A*eTWdQKCRKHwAAAAAAAAAAAAAARQnAQ)[AI](https://www.oceanbase.com/obi) 咨询热线
