---
title: "增加 OBServer 节点 | OceanBase 文档中心"
description: 增加 OBServer 节点 功能说明 该接口用于为目标 OceanBase 集群增加 OBServer 节点。 调用说明 接口约束 调用者需具备对目标 OceanBase 集群的管理权限。 关于调用者的权限，详情可参见 安全概述 。 调用者需要通过 OCP 应用服务鉴权。 请求路径 POST /api/v2/ob/…
---
切换语言

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

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

# 增加 OBServer 节点

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

## 功能说明

该接口用于为目标 OceanBase 集群增加 OBServer 节点。

## 调用说明

### 接口约束

- 调用者需具备对目标 OceanBase 集群的管理权限。

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

### 请求路径

`POST /api/v2/ob/clusters/{id}/servers`

**path：**

| 参数 | 类型 | 必选 | 示例值 | 描述 |
| --- | --- | --- | --- | --- |
| id | Integer | 是 | 1 | 目标 OceanBase 集群的 ID。 |

### 请求参数

| 参数 | 类型 | 必选 | 示例值 | 描述 |
| --- | --- | --- | --- | --- |
| zoneName | String | 是 | foo | Zone 名。 |
| servers | Array | 是 | [1,2] | 主机 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 | 响应请求的应用服务的地址。 |

## 示例

### 请求示例

`POST /api/v2/ob/clusters/1/servers`

body:

```unknow
{
  "zoneName": "zone2",
  "servers": [
    1
  ]
}

```

### 返回示例

```unknow
{
  "data": {
    "cluster": {
      "id": 21,
      "name": "ob_upgrade",
      "obClusterId": 22
    },
    "context": "Context(parallelIdx=-1, stringMap={cluster_name=ob_upgrade, cluster_id=21, service_type=OB_CLUSTER, rpm_name=oceanbase-2.2.75-20210108170301.el7.x86_64.rpm, service_name=ob_upgrade:22, service_version=2.2.75, host.1.zone=zone1, ob_cluster_id=22}, listMap={root_server_ips=[xxx.xxx.xxx.xxx], server_ids=[7], host_ids=[1], zone_names=[zone1]})",
    "creator": {
      "id": 100,
      "name": "admin"
    },
    "id": 107720,
    "name": "Add OB server",
    "startTime": "2021-03-02T11:06:34.345+08:00",
    "status": "RUNNING",
    "tasks": [
      {
        "description": "Wait node",
        "downstreams": [
          129369
        ],
        "id": 129356,
        "name": "Wait node",
        "operation": "EXECUTE",
        "status": "PENDING",
        "upstreams": [
          129365
        ]
      },
      {
        "description": "Start observer process with param",
        "downstreams": [
          129370
        ],
        "id": 129357,
        "name": "Start observer process with param",
        "operation": "EXECUTE",
        "status": "PENDING",
        "upstreams": [
          129367
        ]
      },
      {
        "description": "Wait node",
        "downstreams": [
          129364
        ],
        "id": 129358,
        "name": "Wait node",
        "operation": "EXECUTE",
        "status": "PENDING",
        "upstreams": [
          129374
        ]
      },
      {
        "description": "Update OB cluster status",
        "downstreams": [

        ],
        "id": 129359,
        "name": "Update OB cluster status",
        "operation": "EXECUTE",
        "status": "PENDING",
        "upstreams": [
          129368
        ]
      },
      {
        "description": "Restart observer process",
        "downstreams": [
          129363
        ],
        "id": 129360,
        "name": "Restart observer process",
        "operation": "EXECUTE",
        "status": "PENDING",
        "upstreams": [
          129361
        ]
      },
      {
        "description": "Wait observer active",
        "downstreams": [
          129360
        ],
        "id": 129361,
        "name": "Wait observer active",
        "operation": "EXECUTE",
        "status": "PENDING",
        "upstreams": [
          129373
        ]
      },
      {
        "description": "Update zone status",
        "downstreams": [
          129368
        ],
        "id": 129362,
        "name": "Update zone status",
        "operation": "EXECUTE",
        "status": "PENDING",
        "upstreams": [
          129366
        ]
      },
      {
        "description": "Wait observer active",
        "downstreams": [
          129374
        ],
        "id": 129363,
        "name": "Wait observer active",
        "operation": "EXECUTE",
        "status": "PENDING",
        "upstreams": [
          129360
        ]
      },
      {
        "description": "Update observer status",
        "downstreams": [
          129366
        ],
        "id": 129364,
        "name": "Update observer status",
        "operation": "EXECUTE",
        "status": "PENDING",
        "upstreams": [
          129358
        ]
      },
      {
        "description": "Pre check for install OB",
        "downstreams": [
          129356
        ],
        "id": 129365,
        "name": "Pre check for install OB",
        "operation": "EXECUTE",
        "status": "PENDING",
        "upstreams": [
          129376
        ]
      },
      {
        "description": "Wait node",
        "downstreams": [
          129362
        ],
        "id": 129366,
        "name": "Wait node",
        "operation": "EXECUTE",
        "status": "PENDING",
        "upstreams": [
          129364
        ]
      },
      {
        "description": "Wait node",
        "downstreams": [
          129357
        ],
        "id": 129367,
        "name": "Wait node",
        "operation": "EXECUTE",
        "status": "PENDING",
        "upstreams": [
          129371
        ]
      },
      {
        "description": "Sync cluster info",
        "downstreams": [
          129359
        ],
        "id": 129368,
        "name": "Sync cluster info",
        "operation": "EXECUTE",
        "status": "PENDING",
        "upstreams": [
          129362
        ]
      },
      {
        "description": "Install rpm",
        "downstreams": [
          129375
        ],
        "id": 129369,
        "name": "Install rpm",
        "operation": "EXECUTE",
        "status": "PENDING",
        "upstreams": [
          129356
        ]
      },
      {
        "description": "Wait node",
        "downstreams": [
          129373
        ],
        "id": 129370,
        "name": "Wait node",
        "operation": "EXECUTE",
        "status": "PENDING",
        "upstreams": [
          129357
        ]
      },
      {
        "description": "Make dir for ob",
        "downstreams": [
          129367
        ],
        "id": 129371,
        "name": "Make dir for ob",
        "operation": "EXECUTE",
        "status": "PENDING",
        "upstreams": [
          129375
        ]
      },
      {
        "description": "Prepare add observer",
        "downstreams": [
          129376
        ],
        "id": 129372,
        "name": "Prepare add observer",
        "operation": "EXECUTE",
        "status": "RUNNING",
        "upstreams": [

        ]
      },
      {
        "description": "Add observer",
        "downstreams": [
          129361
        ],
        "id": 129373,
        "name": "Add observer",
        "operation": "EXECUTE",
        "status": "PENDING",
        "upstreams": [
          129370
        ]
      },
      {
        "description": "Start ocp agent service",
        "downstreams": [
          129358
        ],
        "id": 129374,
        "name": "Start ocp agent service",
        "operation": "EXECUTE",
        "status": "PENDING",
        "upstreams": [
          129363
        ]
      },
      {
        "description": "Wait node",
        "downstreams": [
          129371
        ],
        "id": 129375,
        "name": "Wait node",
        "operation": "EXECUTE",
        "status": "PENDING",
        "upstreams": [
          129369
        ]
      },
      {
        "description": "Reserve host",
        "downstreams": [
          129365
        ],
        "id": 129376,
        "name": "Reserve host",
        "operation": "EXECUTE",
        "status": "PENDING",
        "upstreams": [
          129372
        ]
      }
    ]
  },
  "duration": 209,
  "server": "a83ad33525",
  "status": 200,
  "successful": true,
  "timestamp": "2021-03-02T11:06:34.429+08:00",
  "traceId": "24d6311f6909408f"
}

```

 上一篇 下一篇 ![有帮助](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) 咨询热线
