Undo a soft collection delete
Restores a collection that is still inside its grace window (status=deletion_pending) back to active, cancelling the… (POST /v1/collections/{id}/restore)
/v1/collections/{id}/restore- Auth
- Bearer API key
- Billing
- free (0 credits).
Restores a collection that is still inside its grace window
(status=deletion_pending) back to active, cancelling the scheduled
purge. The collection keeps the same incarnation, and any batch work that
was paused by the delete resumes. Free and idempotent.
Returns 409 once the purge has actually started (status=deleting) —
vectors are being erased at that point, so a restore could not honestly
return the collection intact. Also 409 for a compliance-class erasure,
which is deliberately not restorable.
Example request
curl -X POST "https://api.sightradar.com/v1/collections/$ID/restore" \
-H "Authorization: Bearer $SR_API_KEY"Put each id in the path percent-encoded, as a single path segment. An id with /, ?, #, % or a space otherwise addresses a different URL. In code, use your HTTP library's path encoding (for example encodeURIComponent in JavaScript or urllib.parse.quote(id, safe="") in Python).
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id required | path | string | Collection id. |
Response body
| Field | Type | Description |
|---|---|---|
status | string | |
message | string |
Status codes
| Status | Meaning |
|---|---|
200 | Collection restored. |
401 | Missing or invalid API key. |
403 | Account is read-only. |
404 | Resource not found. |
409 | Not restorable — the purge has already started, or this was a compliance-class erasure. |
Delete a collection (soft by default, restorable)
Schedules a durable cascade delete — all faces and selfies are removed asynchronously. (DELETE /v1/collections/{id})
Recreate a purged collection
Brings back a collection whose deletion has fully completed (status=deleted) as a new, empty collection under the… (POST /v1/collections/{id}/recreate)