List
The audit trail, newest first, filter-scoped by role: a platform admin sees their own tenant by default (tenant_id for another tenant, all_tenants=true for every tenant, including tenant-less platform events), tenant_admin sees only their own tenant, everyone else sees nothing (not even their own actions — use GET /me/audit-events instead). from/to accept RFC3339 or YYYY-MM-DD; a malformed bound is a 400, not a silently ignored filter. session_id matches EITHER the enforcer refresh-token family (session_id) or the upstream provider's session (external_session_id, e.g. a Privy sid), so one query finds every audit event from one login regardless of which id space logged it.
Request
- Base URL: https://api.instruxi.dev/api/v1/enforcer
- URL: https://api.instruxi.dev/api/v1/enforcer/audit-events
- Auth: one of:
- API key in header Authorization
- API key in header X-API-Key
Query parameters
filter by actor account id
only events whose ACTOR is a member of this group (system events, which have no actor, never match); 404 group_not_found if the group is not visible to you
drop events whose actor is a member of this group (system events are kept); 404 group_not_found if not visible
filter by action (e.g. person.updated)
filter by resource type (e.g. person)
filter by resource id
created_at >= (RFC3339 or YYYY-MM-DD); malformed = 400
created_at <= (RFC3339 or YYYY-MM-DD); malformed = 400
sort order
page size
page offset
one login's events — matches session_id (enforcer refresh-token family) OR external_session_id (the provider's, e.g. a Privy sid)
list this tenant instead of your own (default: the caller's own tenant, platform admins included). Another tenant requires the cross_tenant grant — 403 otherwise
list EVERY tenant (platform-wide admin view). Requires the cross_tenant grant — 403 otherwise. Mutually exclusive with tenant_id (400 conflicting_tenant_scope)
Response
OK
Example response
{
"success": true
}Changes
No recorded changes to this operation across all 1 revision of this API.