Skip to main content
POST
/
tasks
/
{task_id}
/
cancel
Cancel Task
curl --request POST \
  --url https://api.example.com/tasks/{task_id}/cancel

POST /tasks//cancel

Request cancellation of an in-progress async task. Use this to abort energy model runs, shading computations, or other queued work that is no longer needed.

Notes

  • Only tasks with status pending, queued, or running can be cancelled.
  • Attempting to cancel a task that is already completed, failed, or cancelled returns a 409 Conflict error.
  • Returns 404 if the task does not exist in the current workspace.
  • Requires a write session (workspace write access).
  • The response contains the updated task record with status set to cancelled.
  • Poll GET /tasks/ to confirm cancellation if the task was mid-execution.
Cancellation is best-effort for tasks already in running state. The worker may complete before the cancellation is processed.