Description
You can call this operation to stop an OBServer node in the specified OceanBase cluster.
Call description
Prerequisites
You have the permissions to manage 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
POST /api/v2/ob/clusters/{id}/servers/{serverId}/stop
Path parameters
| Parameter | Type | Required | Example value | Description |
|---|---|---|---|---|
| id | Integer | Yes | 1 | The ID of the target cluster. |
| serverId | Integer | Yes | 1 | The ID of the OBServer node. |
Request parameters
| Parameter | Type | Required | Example value | Description |
|---|---|---|---|---|
| freezeServer | Boolean | Yes | false | Specifies whether to perform a minor compaction before stopping the OBServer node. |
| force | Boolean | No | false | This parameter is deprecated and will be removed from later versions. |
| type | Enum | No | STOP_SERVICE | The type of the stop operation. Valid values: |
Response parameters
Basic data structure
| Parameter | Type | Description |
|---|---|---|
| data | Object | The information about the asynchronous task. For more information, see Task return structure. |
| 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. |
Examples
Sample request
POST /api/v2/ob/clusters/1/servers/2/stop
Sample response
{
"data": {
"clusterId": 1000014,
"creator": "admin",
"executor": "xxx.xxx.xxx.xxx",
"hostId": 1000004,
"id": 4010265,
"name": "Stop OB server",
"operation": "EXECUTE",
"prohibitRollback": false,
"startTime": "2025-03-20T11:06:43.384+08:00",
"status": "RUNNING",
"subtasks": [{
"description": "Update OB cluster status",
"downstreams": [],
"id": 4013280,
"name": "Update OB cluster status",
"nodeType": "JAVA_TASK",
"operation": "EXECUTE",
"parallelIdx": -1,
"prohibitRollback": false,
"prohibitSkip": false,
"runTime": 1,
"seriesId": 3,
"status": "PENDING",
"taskId": 4010265,
"timeout": 30,
"upstreams": [4013284]
},
{
"description": "Update observer status",
"downstreams": [4013281],
"id": 4013285,
"name": "Update observer status",
"nodeType": "JAVA_TASK",
"operation": "EXECUTE",
"parallelIdx": -1,
"prohibitRollback": false,
"prohibitSkip": false,
"runTime": 1,
"seriesId": 5,
"status": "PENDING",
"taskId": 4010265,
"timeout": 300,
"upstreams": [4013282]
},
{
"description": "Stop observer service",
"downstreams": [4013285],
"id": 4013282,
"name": "Stop observer service",
"nodeType": "JAVA_TASK",
"operation": "EXECUTE",
"parallelIdx": -1,
"prohibitRollback": false,
"prohibitSkip": false,
"runTime": 1,
"seriesId": 0,
"status": "PENDING",
"taskId": 4010265,
"timeout": 300,
"upstreams": [4013283]
},
{
"description": "Sync cluster info",
"downstreams": [4013280],
"id": 4013284,
"name": "Sync cluster info",
"nodeType": "JAVA_TASK",
"operation": "EXECUTE",
"parallelIdx": -1,
"prohibitRollback": false,
"prohibitSkip": false,
"runTime": 1,
"seriesId": 1,
"status": "PENDING",
"taskId": 4010265,
"timeout": 60,
"upstreams": [4013281]
},
{
"description": "Prepare stop observer service",
"downstreams": [4013282],
"id": 4013283,
"name": "Prepare stop observer service",
"nodeType": "JAVA_TASK",
"operation": "EXECUTE",
"parallelIdx": -1,
"prohibitRollback": false,
"prohibitSkip": false,
"runTime": 1,
"seriesId": 2,
"status": "READY",
"taskId": 4010265,
"timeout": 300,
"upstreams": []
},
{
"description": "Update zone status",
"downstreams": [4013284],
"id": 4013281,
"name": "Update zone status",
"nodeType": "JAVA_TASK",
"operation": "EXECUTE",
"parallelIdx": -1,
"prohibitRollback": false,
"prohibitSkip": false,
"runTime": 1,
"seriesId": 4,
"status": "PENDING",
"taskId": 4010265,
"timeout": 1800,
"upstreams": [4013285]
}],
"taskDefinitionId": -1,
"type": "MANUAL"
},
"duration": 86,
"server": "5e11a5f435",
"status": 200,
"successful": true,
"timestamp": "2025-03-20T11:06:43.418+08:00",
"traceId": "15174be226387762"
}