Audit (REST)
Inspect audit logs and activity. Auth required.
Audit entries are written automatically: by default, model mutations (create/update/delete via GraphQL) are recorded with its operation, entity, JSON details, and the acting user (
user_id, from the JWT). A background listener on the model-event stream performs the writes.
Access control:
GET /audit/logs,GET /audit/entity/..., andGET /audit/statisticsrequire theAdminorManagerrole.GET /audit/user/{id}/activityis viewable by the user themselves, or by Admin/Manager for any user.
Endpoints
GET /audit/logs— filters:entity_type,entity_id,user_id,operation,start_date,end_date,limit,offsetGET /audit/user/{user_id}/activity— optionalstart_date,end_date, pagingGET /audit/entity/{entity_type}/{entity_id}/audit— entity audit trailGET /audit/statistics— aggregate stats
Example:
GET /audit/logs?entity_type=Contact&limit=50
Authorization: Bearer <jwt>Operations: create | update | delete | read.
Payload and retention policy
ATOMO_AUDIT_CONFIG independently selects full (default), metadata or off, globally and per entity type. Metadata mode removes operation payload, IP and user agent while keeping operation/entity/actor/time identifiers. Off omits new entries; it does not delete existing rows. Explicit age/byte limits opt into bounded background deletion. Audit runs after model commit, so it is not a transactional replacement for the model event log or a guaranteed delivery ledger.
Existing read endpoints may therefore show partial, metadata-only or retained history. See Storage lifecycle for configuration and Storage diagnostics for current policy and usage. Authentication and session state are independent from this switch.