/api/admin/client-errors/purge-expiredAuthenticatedApply the client error retention period (scheduled job)
Deletes the client error reports received more than client_error_reports_retention_days days ago (nothing when the setting is 0) and reports how many were deleted. The intake and the /admin/client-errors dashboard also apply the retention period, at most hourly, while they are used; this job guarantees it when they are not. This is the scheduled job's entry point (a daily Vercel cron, or a host crontab entry for the deploy/ stack): it only accepts the deployment's cron secret, never a session. Administrators run it by hand with POST.
get_api_admin_client_errors_purge_expiredAdministrationAuthentication & permissionsAuthenticated
Any authenticated user
- Accepted credentials
- Cron secret (Bearer)
Authorization: Bearer <token>
- Cron secret (Bearer)
- Who may call
- Any authenticated user
- Notes
- Only the deployment's cron secret (
Authorization: Bearer <CRON_SECRET>) is accepted; administrator sessions and access tokens are refused (use POST). Always refused whileCRON_SECRETis unset.
Responses
| Property | Type | Description |
|---|---|---|
| success* | true | |
| message* | string | |
| data* | object | |
| deleted* | integer | Reports deleted by this run minimum: 0 |
| retention_days* | integer | The minimum: 0 |
| cutoff* | integer | null | null | Reports received before this instant (Unix epoch milliseconds) were deleted; null when retention is off minimum: 0 |
Example request
curl -X GET 'https://auth.schemavaults.com/api/admin/client-errors/purge-expired' \
-H 'Authorization: Bearer <access_token>'