GET/api/admin/client-errors/purge-expiredAuthenticated

Apply 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.

operationId get_api_admin_client_errors_purge_expiredAdministration

Authentication & permissionsAuthenticated

Any authenticated user

Accepted credentials
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 while CRON_SECRET is unset.

Responses

application/json
ClientErrorRetentionPurgeResult
PropertyTypeDescription
success*true
message*string
data*object
deleted*integer

Reports deleted by this run

minimum: 0

retention_days*integer

The client_error_reports_retention_days server setting (0: retention is off and nothing is deleted)

minimum: 0

cutoff*integer | null | null

Reports received before this instant (Unix epoch milliseconds) were deleted; null when retention is off

minimum: 0

JSONExample
"success"true
"message""string"
"data"
"deleted"1
"retention_days"1
"cutoff"1

Example request

bashcurl
curl -X GET 'https://auth.schemavaults.com/api/admin/client-errors/purge-expired' \
  -H 'Authorization: Bearer <access_token>'