POST
/api/admin/client-errors/purge-expiredAdminApply the client error retention period (administrators)
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. Lets a platform administrator run the job by hand; the scheduled job calls GET with the cron secret instead.
operationId
post_api_admin_client_errors_purge_expiredAdministrationAuthentication & permissionsAdmin
Platform administrators only
- Accepted credentials
- Auth server session (refresh token cookie)
cookie "refresh_token_<auth_server_app_id>" - Access token (cookie)
cookie "access_token_<auth_server_app_id>" - Access token (Bearer)
Authorization: Bearer <JWT>
- Auth server session (refresh token cookie)
- Who may call
- Platform administrators only
- Notes
- Only platform administrators may run the job by hand; the cron secret is not accepted here (it is GET's credential).
Responses
application/json
ClientErrorRetentionPurgeResult
| 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 |
JSONExample
"success"true
"message""string"
"data"
"deleted"1
"retention_days"1
"cutoff"1
Example request
bashcurl
curl -X POST 'https://auth.schemavaults.com/api/admin/client-errors/purge-expired' \
-b 'refresh_token_<auth_server_app_id>=<value>'