Documentation Index
Fetch the complete documentation index at: https://docs.lobstr.io/llms.txt
Use this file to discover all available pages before exploring further.
This endpoint removes all tasks and their associated results from a specified squid, returning the number of deleted items while keeping the squid’s configuration intact.
What Gets Deleted
Depending on the type parameter:
- url: Removes all URL-based tasks and their results
- params: Removes all parameter-based tasks and their results
The squid itself remains with all its settings (name, parameters, integrations, schedule) preserved. This is useful when you want to:
- Clear old tasks before adding new ones
- Reset a squid without losing its configuration
- Remove tasks that are no longer needed
Your API authentication token. Value: Token YOUR_API_KEY
Must be application/json. Value: application/json
Query Parameters
The unique identifier (hash) of the squid to empty. Example: 388d6d5e98134294ac612ec9f99dc5b1
Request Body
Type of tasks to remove: ‘url’ for URL-based tasks or ‘params’ for parameter-based tasks. Example: "url"
Response Field Explanations
Squid identifier. Example: "388d6d5e98134294ac612ec9f99dc5b1"
Always “squid”. Example: "squid"
Boolean indicating success. Example: true
Number of tasks deleted. Example: 150
This action is irreversible. All tasks and results of the specified type will be permanently deleted.
Use this before re-importing tasks to avoid duplicates. Empty the squid, then add fresh tasks.
The squid’s configuration (parameters, integrations, schedule) is preserved. Only tasks and results are removed.
Check the ‘deleted_count’ in the response to verify how many tasks were removed.
If a run is currently active, stop it before emptying the squid to avoid conflicts.
Code Examples
curl -X POST "https://api.lobstr.io/v1/squids/388d6d5e98134294ac612ec9f99dc5b1/empty" \
-H "Authorization: Token YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"type": "url"
}'
Response
{
"id": "388d6d5e98134294ac612ec9f99dc5b1",
"object": "squid",
"emptied": true,
"deleted_count": 1
}