Tasks
Cancel Task
Cancel and delete a specific task by its ID.
DELETE
/
tasks
/
{task_id}
The Delete Task
endpoint allows you to cancel and delete a task that is currently in progress or queued. This is useful for managing resources and stopping unnecessary or mistakenly initiated tasks.
Request
task_id
string
requiredThe unique identifier of the task to be deleted
Response
message
string
A message indicating the result of the delete operation
When to Use Delete Task
The Delete Task endpoint is particularly useful in scenarios such as:
- Cancelling long-running tasks that are no longer needed
- Stopping tasks that were initiated by mistake
- Managing system resources by terminating unnecessary processes
- Handling user-requested cancellations of ongoing operations
Important Considerations
- Deleting a task that has already completed may not have any effect
- Ensure proper authorization checks are in place to prevent unauthorized task deletions
- Consider implementing confirmation steps in your application before deleting important tasks
- Be aware that deleting a task may not immediately free up all associated resources
By providing the ability to delete tasks, you give users more control over their operations and help maintain efficient use of system resources.
Was this page helpful?