Features
Delete a task. Unstarted tasks can be deleted; started tasks can only be deleted when they are in the COMPLETED or FAILED state. Deletion will also cascade and clean up the execution instance, step execution records, and step-associated task records.
API details
Constraints
You must have the SOP_TASK:UPDATE permission for this task.
Request path
DELETE /api/v2/sop/tasks/{id}
Request parameters
Parameter |
Location |
Type |
Required |
Description |
|---|---|---|---|---|
| id | Path | Long | Yes | Task ID. |
Response parameters
Parameter |
Type |
Description |
|---|---|---|
| successful | Boolean | Returns 0 on success.true. |
| data | null | No data is returned for a delete operation, and the response is fixed asnull. |
| timestamp | Datetime | The time taken by the server to create the response. |
| duration | Long | The time consumed by the server for processing, in milliseconds. |
| status | Integer | HTTP status code. In case of success, it is200. |
| traceId | String | Request link ID, used for log troubleshooting. |
Error codes
HTTP |
Error Code |
Description |
|---|---|---|
| 404 | SOP10008 |
The task does not exist. |
| 409 | SOP10010 (SOP_TASK_DELETE_FORBIDDEN) |
Execution Status:WAITING_CONFIRMorRUNNING, which cannot be deleted. |
