Description
You can call this operation to query all OBServer nodes in the specified OceanBase cluster.
Call description
Prerequisites
You have the read-only permission on the specified OceanBase cluster.
For more information about the permissions, see Overview.
You have passed the authentication for the OceanBase Cloud Platform (OCP) application service.
Request path
GET /api/v2/ob/clusters/{clusterId}/servers
Request parameters
| Parameter | Type | Required | Example value | Description |
|---|---|---|---|---|
| clusterId | Integer | Yes | 1 | The ID of the target cluster. |
| regionName | String | No | Beijing | The region in which you want to query OBServer nodes. |
| idcName | String | No | AZ1 | The IDC in which you want to query OBServer nodes. |
Response parameters
Basic data structure
| Parameter | Type | Description |
|---|---|---|
| data | Object | The requested business data. |
| ├─ contents | Array | For more information, see Data structure of OBServer node information. |
| successful | Boolean | Indicates whether the request was successful. |
| timestamp | Datetime | The timestamp when the server completed the request. |
| duration | Integer | The amount of time taken by the server to process the request, in milliseconds. |
| status | Integer | The 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. |
Data structure of OBServer node information
| Parameter | Type | Description |
|---|---|---|
| id | Integer | The ID of the OBServer node. |
| ip | String | The IP address of the OBServer node. |
| port | Integer | The remote procedure call (RPC) port number of the OBServer node. |
| sqlPort | Integer | The SQL port number of the OBServer node. |
| runUser | String | The OS user. |
| runPath | String | The run path. |
| installPath | String | The installation path. |
| version | String | The OceanBase Database version of the OBServer node. |
| withRootserver | Boolean | Indicates whether RootService is deployed on the OBServer node. |
| status | String | The status of the OBServer node. Valid values: |
| updateTime | Datetime | The time when the OBServer node was last updated. |
| innerStatus | Enum | The inner status of the OBServer node in OceanBase Database. Valid values: |
| clusterId | Integer | The ID of the cluster to which the OBServer node belongs. |
| zoneName | String | The name of the zone to which the OBServer node belongs. |
| regionName | String | The name of the region to which the OBServer node belongs. |
| idcName | String | The name of the IDC to which the OBServer node belongs. |
| hostId | Integer | The host ID of the OBServer node. |
| hostTypeName | String | The host type of the OBServer node. |
| hostStatus | Enum | The status of the host. Valid values: |
| startTime | Datetime | The start time of the OBServer node. |
| stopTime | Datetime | The stop time of the OBServer node. |
| availableOperations | StringArray | The operations that can be performed on the OBServer node. |
| arbitrationStatus | Enum | The connection status of the arbitration service. This parameter is supported in only OceanBase Database V4.2.0.0 and later. Valid values: |
| onlineCpuCoreRange | String | The CPU binding range of the OBServer node. |
Examples
Sample request
Query all OBServer nodes in the cluster whose ID is 1.
GET /api/v2/ob/clusters/1/servers
Sample response
{
"data": {
"contents": [{
"arbitrationStatus": "ACTIVE",
"clusterId": 1,
"hostId": 4000027,
"hostStatus": "ONLINE",
"hostTypeName": "test",
"id": 1,
"idcName": "BJ",
"innerStatus": "ACTIVE",
"installPath": "/home/admin/oceanbase",
"ip": "xxx.xxx.xxx.xxx",
"onlineCpuCoreRange": "0-21",
"port": 2882,
"regionName": "OCP_META_REGION",
"runPath": "/home/admin/oceanbase",
"runUser": "admin",
"sqlPort": 2881,
"startTime": "2025-03-20T12:09:13+08:00",
"status": "RUNNING",
"stopTime": "1970-01-01T08:00:00+08:00",
"updateTime": "2025-03-20T12:09:54+08:00",
"version": "3.2.3.3_109020032023081510-45587812d6f25799555b6c39ea153e52bc15a2d9(Aug 15 2023 10:15:54)",
"withRootserver": true,
"zoneName": "zone1"
}]
},
"duration": 40,
"server": "74f95ea2f4",
"status": 200,
"successful": true,
"timestamp": "2025-03-20T15:11:26.294+08:00",
"traceId": "0723d0fe728a4a6b"
}