Delete Task
Permanently delete a specific task from a squid
https://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
AuthorizationstringheaderrequiredYour API authentication token. Value: Token YOUR_API_KEY
Path Parameters
task_hashstringpathrequiredThe unique identifier (hash) of the task to delete. Example: c5e29d2aba8b77cdc56391e7405302de
Response Field Explanations
idstringThe deleted task's identifier. Example: "c5e29d2aba8b77cdc56391e7405302de"
objectstringAlways "task". Example: "task"
deletedbooleanConfirmation 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
{ "id": "c5e29d2aba8b77cdc56391e7405302de", "object": "task", "deleted": true }
{ "errors": { "message": "The specified task does not exist.", "type": "HTTPNotFound", "code": 404 } }