This API operation is used to roll back, retry, cancel, or skip a task.
Call description
Limitations
OceanBase Shell (OBShell) can roll back, retry, or skip a task in the
FAILEDstate.OBShell can cancel an unfinished task.
The OBShell server verifies the security of requests to this API operation. For more information, see Hybrid encryption for API operations.
Request path
POST /api/v1/task/dag/{id}
Request parameters
| Parameter | Type | Required? | Example value | Description |
|---|---|---|---|---|
| operator | String | Yes | ROLLBACK | The operation to be performed on the specified task. Valid values:
|
Response parameters
| Parameter | Type | Description |
|---|---|---|
| successful | Boolean | Indicates whether the request is successful. |
| timestamp | time.Time | 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. |
| error | ApiError | The error caused by the request, which contains the following information:
|
Examples
Sample request
POST xxx.xxx.x.x:2886/api/v1/task/22130706433028869
{
"operator": "ROLLBACK"
}
22130706433028869 is the general ID of a failed Initialize cluster task.
Sample response
The sample response displays a successful result of the request. To view the operation result, query the task information.
{
"successful": true,
"timestamp": "2024-01-10T14:44:28.366402356+08:00",
"duration": 1,
"status": 200,
"traceId": "7e77b2ba9ee2fa66"
}