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
required

The 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:

  1. Cancelling long-running tasks that are no longer needed
  2. Stopping tasks that were initiated by mistake
  3. Managing system resources by terminating unnecessary processes
  4. 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.