Record history settings

Read how long your tenant keeps its record history and its trash, and whether those values are the platform defaults or set for your tenant.

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

Request
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

200 OK
{
  "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.

FieldTypeMeaning
retention_daysintegerHow many days the record history is kept.
trash_retention_daysintegerHow many days a row stays in the trash before the purge deletes it for good.
defaultsbooleantrue while no values are set for the tenant, so the platform defaults apply.
tenant_idstringThe tenant these settings belong to.
updated_atdate-time or nullWhen they were last changed. null while the defaults apply.
updated_bystring or nullWho 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

StatusWhen
400The request is invalid.
401The credential is missing or invalid.
403The caller is authenticated but not permitted.
429The per-tenant rate limit is exceeded.
502An upstream service (app, proxy or core service) failed.

For the error envelope, see Errors.

Was this page helpful?