Get data retention status.
curl --request GET \ --url https://auth.example.com/api/admin/data-retention/status \ --header 'Authorization: Bearer <token>'Returns every retention category with record counts, the records past retention, and the categories whose data is not being removed as its retention says (a disabled or failed retention task, a failed or unsupported run for this tenant, logs kept only in an archive Authrim does not delete, or a lookup policy not yet projected).
Authorizations
Section titled “Authorizations ”Responses
Section titled “ Responses ”Data retention status response.
object
object
object
What decides the retention. setting (with category, key and level), session_settings (with keys), audit (with from: delivery_plan, audit_profile or pii_config), lookup_policy, or default (each record may have its own, set when it is made).
object
Where an admin changes it: settings (Settings API category, key and level), session_settings, audit_pii_config, audit_profile, audit_routing_rules, lookup_directory (this API), or none.
object
What removes the data: a scheduled_task (with its state and this tenant’s last run), expiry where it is kept, not_stored, or not_deleted (nothing removes it yet: the lookup directory, whose policy is projected to Control without a purge acting on it, and expired refresh token families, kept until rotated or revoked).
object
When the task last ran for this tenant. A run covers only some tenants (and, for diagnostic logs, one page of objects each; a tenant is recorded once all its objects were scanned), so the task’s own last run says nothing about this one.
object
A limit below the setting that applies instead (the tenant profile’s token lifetime).
object
object
For sessions: an active session can be extended by per_refresh_seconds at a time; absolute_limit_seconds null means nothing bounds how long it may last in all.
object
object
A lifetime fixed in code for this sign-in path (key names the path).
Audit logs only: a copy also goes to an archive (R2). The deletion covers the primary store only; Authrim deletes nothing from the archive (an R2 lifecycle rule set outside Authrim may).
object
object
object
Example
{ "categories": [ { "id": "audit_events", "retention": { "unit": "days" }, "source": { "kind": "setting", "level": "tenant", "from": "delivery_plan" }, "edit": { "kind": "settings", "level": "tenant" }, "deletion": { "kind": "scheduled_task", "reason": "lookup_purge_not_available", "tenant_last_run": { "outcome": "cleaned" }, "projection": "current" }, "varies": "by_route", "cap": { "kind": "tenant_profile" }, "archive": { "deletion": "not_deleted" } } ], "summary": { "attention": [ { "category": "audit_events", "reason": "task_disabled" } ] }}Error response.
object
Example generated
{ "error": "example", "message": "example", "error_description": "example"}Error response.
object
Example generated
{ "error": "example", "message": "example", "error_description": "example"}What decides a retention cannot be read, so the values in effect are unknown.