Description
The interface for restarting an OBProxy server.
Call instructions
Interface constraints
The caller must be the OBPROXY_MANAGER role.
The caller must be authenticated by using OCP application services.
Request path
POST /api/v2/obproxy/clusters/{id}/servers/restart
Request parameters
path:
Parameter |
Type |
Required |
Example value |
Description |
|---|---|---|---|---|
| id | Long | Yes | 13153189 | The ID of the OBProxy cluster. |
body:
Parameter |
Type |
Required |
Example value |
Description |
|---|---|---|---|---|
| obproxyServerIds | Long | Yes | 1,2,3 | The ID of the OBProxy server to be restarted. |
| hotRestart | Boolean | Yes | false | Specifies whether to perform hot restart. Hot restart is supported only when the OBProxy version is V3.2.1 or later. |
Return result
Basic data structure
Parameter |
Type |
Description |
|---|---|---|
| data | Object | The asynchronous task information. For more information, see Task information. |
| successful | Boolean | Specifies whether the request is successful. |
| timestamp | Datetime | The timestamp indicating the time when the server finishes processing the request. |
| duration | Integer | The time taken by the server to process the request, in milliseconds. |
| status | Integer | The HTTP status code that conforms to the HTTP standard. |
| traceId | String | The Trace ID of the request, which is used for troubleshooting. |
| server | String | The address of the application service that responds to the request. |
Examples
Request example
POST /api/v2/obproxy/clusters/13153189/servers/restart
{
"obproxyServerIds": [
1,
2,
3
],
"hotRestart": false
}
Return example
{
"data": {
"creator": "admin",
"executor": "xxx.xxx.xxx.xxx",
"id": 13153189,
"name": "Restart obproxy",
"operation": "EXECUTE",
"prohibitRollback": false,
"startTime": "2025-01-16T11:59:19.187+08:00",
"status": "RUNNING",
"subtasks": [
{
"description": "Wait node",
"downstreams": [
13175749
],
"id": 13175752,
"name": "Wait node",
"nodeType": "JAVA_TASK",
"operation": "EXECUTE",
"parallelIdx": -1,
"prohibitRollback": false,
"prohibitSkip": false,
"runTime": 1,
"seriesId": 1,
"status": "PENDING",
"taskId": 13153189,
"timeout": 30,
"upstreams": [
13175751
]
},
{
"description": "Restore obproxy weight",
"downstreams": [
13175751
],
"id": 13175757,
"name": "Restore obproxy weight",
"nodeType": "JAVA_TASK",
"operation": "EXECUTE",
"parallelIdx": -1,
"prohibitRollback": false,
"prohibitSkip": false,
"runTime": 1,
"seriesId": 4,
"status": "PENDING",
"taskId": 13153189,
"timeout": 300,
"upstreams": [
13175754
]
},
{
"description": "Prevent obproxy from accepting new request",
"downstreams": [
13175758
],
"id": 13175760,
"name": "Prevent obproxy from accepting new request",
"nodeType": "JAVA_TASK",
"operation": "EXECUTE",
"parallelIdx": -1,
"prohibitRollback": false,
"prohibitSkip": false,
"runTime": 1,
"seriesId": 2,
"status": "PENDING",
"taskId": 13153189,
"timeout": 300,
"upstreams": [
13175755
]
},
{
"description": "Start node",
"downstreams": [
13175753
],
"id": 13175750,
"name": "Start node",
"nodeType": "JAVA_TASK",
"operation": "EXECUTE",
"parallelIdx": -1,
"prohibitRollback": false,
"prohibitSkip": false,
"runTime": 1,
"seriesId": 0,
"status": "READY",
"taskId": 13153189,
"timeout": 30,
"upstreams": []
},
{
"description": "Prepare restart obproxy",
"downstreams": [
13175755
],
"id": 13175753,
"name": "Prepare restart obproxy",
"nodeType": "JAVA_TASK",
"operation": "EXECUTE",
"parallelIdx": 0,
"prohibitRollback": false,
"prohibitSkip": false,
"runTime": 1,
"seriesId": 7,
"status": "PENDING",
"taskId": 13153189,
"timeout": 1800,
"upstreams": [
13175750
]
},
{
"description": "Restart obproxy process",
"downstreams": [
13175754
],
"id": 13175748,
"name": "Restart obproxy process",
"nodeType": "JAVA_TASK",
"operation": "EXECUTE",
"parallelIdx": 0,
"prohibitRollback": false,
"prohibitSkip": false,
"runTime": 1,
"seriesId": 12,
"status": "PENDING",
"taskId": 13153189,
"timeout": 600,
"upstreams": [
13175758
]
},
{
"description": "Update obproxy status",
"downstreams": [
13175756
],
"id": 13175749,
"name": "Update obproxy status",
"nodeType": "JAVA_TASK",
"operation": "EXECUTE",
"parallelIdx": 0,
"prohibitRollback": false,
"prohibitSkip": false,
"runTime": 1,
"seriesId": 8,
"status": "PENDING",
"taskId": 13153189,
"timeout": 300,
"upstreams": [
13175752
]
},
{
"description": "Wait node",
"downstreams": [
13175759
],
"id": 13175756,
"name": "Wait node",
"nodeType": "JAVA_TASK",
"operation": "EXECUTE",
"parallelIdx": -1,
"prohibitRollback": false,
"prohibitSkip": false,
"runTime": 1,
"seriesId": 11,
"status": "PENDING",
"taskId": 13153189,
"timeout": 30,
"upstreams": [
13175749
]
},
{
"description": "Prepare operate obproxy task",
"downstreams": [
13175748
],
"id": 13175758,
"name": "Prepare operate obproxy task",
"nodeType": "JAVA_TASK",
"operation": "EXECUTE",
"parallelIdx": -1,
"prohibitRollback": false,
"prohibitSkip": false,
"runTime": 1,
"seriesId": 3,
"status": "PENDING",
"taskId": 13153189,
"timeout": 60,
"upstreams": [
13175760
]
},
{
"description": "Update obproxy cluster lock status",
"downstreams": [],
"id": 13175759,
"name": "Update obproxy cluster lock status",
"nodeType": "JAVA_TASK",
"operation": "EXECUTE",
"parallelIdx": -1,
"prohibitRollback": false,
"prohibitSkip": false,
"runTime": 1,
"seriesId": 5,
"status": "PENDING",
"taskId": 13153189,
"timeout": 60,
"upstreams": [
13175756
]
},
{
"description": "Active agent modules",
"downstreams": [
13175752
],
"id": 13175751,
"name": "Active agent modules",
"nodeType": "JAVA_TASK",
"operation": "EXECUTE",
"parallelIdx": 0,
"prohibitRollback": false,
"prohibitSkip": false,
"runTime": 1,
"seriesId": 10,
"status": "PENDING",
"taskId": 13153189,
"timeout": 1800,
"upstreams": [
13175757
]
},
{
"description": "Wait node",
"downstreams": [
13175760
],
"id": 13175755,
"name": "Wait node",
"nodeType": "JAVA_TASK",
"operation": "EXECUTE",
"parallelIdx": -1,
"prohibitRollback": false,
"prohibitSkip": false,
"runTime": 1,
"seriesId": 9,
"status": "PENDING",
"taskId": 13153189,
"timeout": 30,
"upstreams": [
13175753
]
},
{
"description": "Wait node",
"downstreams": [
13175757
],
"id": 13175754,
"name": "Wait node",
"nodeType": "JAVA_TASK",
"operation": "EXECUTE",
"parallelIdx": -1,
"prohibitRollback": false,
"prohibitSkip": false,
"runTime": 1,
"seriesId": 6,
"status": "PENDING",
"taskId": 13153189,
"timeout": 30,
"upstreams": [
13175748
]
}
],
"taskDefinitionId": -1,
"type": "MANUAL"
},
"duration": 104,
"server": "74f95ea2f4",
"status": 200,
"successful": true,
"timestamp": "2025-01-16T11:59:19.245+08:00",
"traceId": "8dc777f3fd6624b2"
}
