GET /audit or the Audit UI. Audit writes are best-effort: a logging failure is reported
in server logs but does not fail the original request.
Endpoint
admin role. Authenticate with a session cookie or Authorization: Bearer lsk_....
Query parameters
integer
Maximum entries to return. Defaults to
100, capped at 1000.Response
array
Audit rows in reverse chronological order. Each entry records the caller, the action, and an action-specific detail object.
What is recorded
- Authentication: successful sign-in, sign-out, and password changes.
- Queries: caller identity, query type, filter, and timestamp.
- Configuration: schema, optimization, role, user, attribute, and key changes.
Retention
Retention is controlled byLIGHTSHIP_AUDIT_RETENTION_DAYS (default 90). LightShip removes older
rows at startup and every six hours while it is running.
Example
The audit log lives in Postgres alongside the access model, not in ClickHouse. Backing up Postgres backs up the audit trail.