Skip to content
Task

Delete Task

Permanently delete a specific task from a squid

The v1 API, for batchesSquids, tasks and runs: many calls on a schedule, delivered where you work. For one call that answers in seconds, use the API v2.
DELETEhttps://api.lobstr.io/v1/tasks/{task_hash}

This endpoint deletes a task from its squid using its hash ID, so later runs no longer process it. The results it brought in earlier runs stay downloadable, by run and by squid.

Headers

Authorizationstringheaderrequired

Your API authentication token. Value: Token YOUR_API_KEY

Path Parameters

task_hashstringpathrequired

The unique identifier (hash) of the task to delete. Example: c5e29d2aba8b77cdc56391e7405302de

Response Field Explanations

idstring

The deleted task's identifier. Example: "c5e29d2aba8b77cdc56391e7405302de"

objectstring

Always "task". Example: "task"

deletedboolean

Confirmation of deletion (true on success). Example: true

A deleted task cannot be restored. Its results from earlier runs are kept. Deleting is refused while a run of the squid is in progress (RunInProgress).

Use Get Task first to verify you're deleting the correct task.

A run processes every task of the squid. To run only new inputs, delete the done tasks first: their results stay downloadable.

To remove all tasks from a squid, use the Empty Squid endpoint instead of deleting tasks one by one.

Code Examples

curl -X DELETE "https://api.lobstr.io/v1/tasks/c5e29d2aba8b77cdc56391e7405302de" \
  -H "Authorization: Token YOUR_API_KEY"

Response

200
{
  "id": "c5e29d2aba8b77cdc56391e7405302de",
  "object": "task",
  "deleted": true
}
404
{
  "errors": {
    "message": "The specified task does not exist.",
    "type": "HTTPNotFound",
    "code": 404
  }
}