Record history settings
Every tenant has two retention settings: how many days the record history is kept, and how many days a deleted row stays in the trash before it is purged for good. GET /v1/audit/settings returns both, so an app can read them instead of hard-coding them.
The endpoint is read-only. revenexx sets these values for your tenant; to change them, ask your revenexx contact. A change can take up to 15 minutes to show here.
Read the settings
curl https://api.revenexx.com/v1/audit/settings \
-H "X-Revenexx-Api-Key: $REVENEXX_API_KEY" \
-H "X-Revenexx-Tenant: acme"
The operation requires one of the two credentials the gateway accepts: an API key in X-Revenexx-Api-Key, or a Bearer token. Send X-Revenexx-Tenant as on every call. See Authentication for how to send each credential.
The response
{
"retention_days": 730,
"trash_retention_days": 90,
"defaults": true,
"tenant_id": "acme",
"updated_at": null,
"updated_by": null
}
Your tenant's values can differ from this example.
| Field | Type | Meaning |
|---|---|---|
retention_days | integer | How many days the record history is kept. |
trash_retention_days | integer | How many days a row stays in the trash before the purge deletes it for good. |
defaults | boolean | true while no values are set for the tenant, so the platform defaults apply. |
tenant_id | string | The tenant these settings belong to. |
updated_at | date-time or null | When they were last changed. null while the defaults apply. |
updated_by | string or null | Who changed them last. null while the defaults apply. |
retention_days, trash_retention_days and defaults are always present.
Defaults
Until values are set for your tenant, defaults is true and the platform applies two years of history and 90 days of trash.
Trash purge
An app's trash purge reads trash_retention_days from this endpoint.
This endpoint returns the retention settings, not the history entries.
Errors
| Status | When |
|---|---|
400 | The request is invalid. |
401 | The credential is missing or invalid. |
403 | The caller is authenticated but not permitted. |
429 | The per-tenant rate limit is exceeded. |
502 | An upstream service (app, proxy or core service) failed. |
For the error envelope, see Errors.