Description
You can call this operation to restart 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}/restart
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 to be restarted. |
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 | Specifies whether to forcibly restart the OBServer node. |
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/restart
Sample response
{
"data": {
"clusterId": 1000014,
"creator": "admin",
"executor": "xxx.xxx.xxx.xxx",
"hostId": 1000004,
"id": 4010269,
"name": "Restart OB server",
"operation": "EXECUTE",
"prohibitRollback": false,
"startTime": "2025-03-20T11:14:18.86+08:00",
"status": "RUNNING",
"subtasks": [{
"description": "Start observer service",
"downstreams": [4013293],
"id": 4013297,
"name": "Start observer service",
"nodeType": "JAVA_TASK",
"operation": "EXECUTE",
"parallelIdx": -1,
"prohibitRollback": false,
"prohibitSkip": false,
"runTime": 1,
"seriesId": 0,
"status": "PENDING",
"taskId": 4010269,
"timeout": 300,
"upstreams": [4013289]
},
{
"description": "Set observer process oom_score_adj",
"downstreams": [4013290],
"id": 4013293,
"name": "Set observer process oom_score_adj",
"nodeType": "JAVA_TASK",
"operation": "EXECUTE",
"parallelIdx": -1,
"prohibitRollback": false,
"prohibitSkip": false,
"runTime": 1,
"seriesId": 1,
"status": "PENDING",
"taskId": 4010269,
"timeout": 300,
"upstreams": [4013297]
},
{
"description": "Update OB cluster status",
"downstreams": [],
"id": 4013298,
"name": "Update OB cluster status",
"nodeType": "JAVA_TASK",
"operation": "EXECUTE",
"parallelIdx": -1,
"prohibitRollback": false,
"prohibitSkip": false,
"runTime": 1,
"seriesId": 3,
"status": "PENDING",
"taskId": 4010269,
"timeout": 30,
"upstreams": [4013300]
},
{
"description": "Stop observer service",
"downstreams": [4013294],
"id": 4013296,
"name": "Stop observer service",
"nodeType": "JAVA_TASK",
"operation": "EXECUTE",
"parallelIdx": -1,
"prohibitRollback": false,
"prohibitSkip": false,
"runTime": 1,
"seriesId": 8,
"status": "PENDING",
"taskId": 4010269,
"timeout": 300,
"upstreams": [4013292]
},
{
"description": "Wait observer active",
"downstreams": [4013289],
"id": 4013299,
"name": "Wait observer active",
"nodeType": "JAVA_TASK",
"operation": "EXECUTE",
"parallelIdx": -1,
"prohibitRollback": false,
"prohibitSkip": false,
"runTime": 1,
"seriesId": 6,
"status": "PENDING",
"taskId": 4010269,
"timeout": 1800,
"upstreams": [4013295]
},
{
"description": "Prepare restart observer",
"downstreams": [4013296],
"id": 4013292,
"name": "Prepare restart observer",
"nodeType": "JAVA_TASK",
"operation": "EXECUTE",
"parallelIdx": -1,
"prohibitRollback": false,
"prohibitSkip": false,
"runTime": 1,
"seriesId": 10,
"status": "READY",
"taskId": 4010269,
"timeout": 300,
"upstreams": []
},
{
"description": "Inactive agent modules",
"downstreams": [4013291],
"id": 4013294,
"name": "Inactive agent modules",
"nodeType": "JAVA_TASK",
"operation": "EXECUTE",
"parallelIdx": -1,
"prohibitRollback": false,
"prohibitSkip": false,
"runTime": 1,
"seriesId": 2,
"status": "PENDING",
"taskId": 4010269,
"timeout": 3600,
"upstreams": [4013296]
},
{
"description": "Update observer status",
"downstreams": [4013301],
"id": 4013290,
"name": "Update observer status",
"nodeType": "JAVA_TASK",
"operation": "EXECUTE",
"parallelIdx": -1,
"prohibitRollback": false,
"prohibitSkip": false,
"runTime": 1,
"seriesId": 4,
"status": "PENDING",
"taskId": 4010269,
"timeout": 300,
"upstreams": [4013293]
},
{
"description": "Active agent modules",
"downstreams": [4013297],
"id": 4013289,
"name": "Active agent modules",
"nodeType": "JAVA_TASK",
"operation": "EXECUTE",
"parallelIdx": -1,
"prohibitRollback": false,
"prohibitSkip": false,
"runTime": 1,
"seriesId": 7,
"status": "PENDING",
"taskId": 4010269,
"timeout": 1800,
"upstreams": [4013299]
},
{
"description": "Update zone status",
"downstreams": [4013300],
"id": 4013301,
"name": "Update zone status",
"nodeType": "JAVA_TASK",
"operation": "EXECUTE",
"parallelIdx": -1,
"prohibitRollback": false,
"prohibitSkip": false,
"runTime": 1,
"seriesId": 12,
"status": "PENDING",
"taskId": 4010269,
"timeout": 1800,
"upstreams": [4013290]
},
{
"description": "Stop observer process",
"downstreams": [4013295],
"id": 4013291,
"name": "Stop observer process",
"nodeType": "JAVA_TASK",
"operation": "EXECUTE",
"parallelIdx": -1,
"prohibitRollback": false,
"prohibitSkip": false,
"runTime": 1,
"seriesId": 9,
"status": "PENDING",
"taskId": 4010269,
"timeout": 1200,
"upstreams": [4013294]
},
{
"description": "Start observer process",
"downstreams": [4013299],
"id": 4013295,
"name": "Start observer process",
"nodeType": "JAVA_TASK",
"operation": "EXECUTE",
"parallelIdx": -1,
"prohibitRollback": false,
"prohibitSkip": false,
"runTime": 1,
"seriesId": 5,
"status": "PENDING",
"taskId": 4010269,
"timeout": 1200,
"upstreams": [4013291]
},
{
"description": "Sync cluster info",
"downstreams": [4013298],
"id": 4013300,
"name": "Sync cluster info",
"nodeType": "JAVA_TASK",
"operation": "EXECUTE",
"parallelIdx": -1,
"prohibitRollback": false,
"prohibitSkip": false,
"runTime": 1,
"seriesId": 11,
"status": "PENDING",
"taskId": 4010269,
"timeout": 60,
"upstreams": [4013301]
}],
"taskDefinitionId": -1,
"type": "MANUAL"
},
"duration": 100,
"server": "5e11a5f435",
"status": 200,
"successful": true,
"timestamp": "2025-03-20T11:14:18.895+08:00",
"traceId": "93d8a7a593588d93"
}