Sessions
End a session and purge its context
Marks the session released and deletes its stored cookies and storage in the same transaction. The browser worker's own copy of the session state in object storage is deleted too. The session row stays readable via GET /v1/sessions/{id}; the context does not. This is not "release the lease, keep the state": the state is destroyed. A later /v1/scrape with this session_id is refused with 410 ERR::SESSION::RELEASED at 0 credits.
Pitfalls:
- Idempotent: releasing an already-released session returns 200 with the same body.
- Releasing an expired session succeeds and marks it released.
- While a render holds the lease, returns 409 ERR::SESSION::BUSY with Retry-After. Wait, or repeat with force=true to end the session and fail the running task.
- Takes no body.
post/v1/sessions/{sessionID}/release
Request
- Base URL: https://api.spicrawl.com
- URL: https://api.spicrawl.com/v1/sessions/{sessionID}/release
- Auth: HTTP bearer
Query parameters
forceboolean
Set true to end the session even while a render holds its lease; the running task fails. Parsed as a Go boolean (true, false, 1, 0, t, f, any case); other values are refused with 400.
Response
The session, now released, with context null.
Example response
{
"id": "01J9ZQ4M7R3T8VX2K5N6P0B1CD"
}Changes
No recorded changes to this operation across all 1 revision of this API.