Skip to content

Organization audit log (customer-facing) ​

Organization admins can read, filter and export the audit trail of their own organization and its applications. Platform-level events and other organizations' events are never visible.

Endpoints ​

All routes are under /api/v1/console/organizations/{organizationId}/audit-events and require a signed-in organization admin (organization API keys are refused). Any other caller, or an organization you cannot access, gets the same 403 {"error":"Forbidden."}.

RoutePurpose
GET /Page of events, newest first. Query: cursor, limit (1-200, default 50), actorUserId, action, from, to, result.
GET /exportStreams matching events. format=csv (default) or format=ndjson. Up to 100,000 rows per export, fetched in 1,000-row keyset batches so memory stays flat.
GET /catalogThe stable action names listed below.

action is an exact name or a prefix ending in .* (for example application.role.*). Pagination: pass the nextCursor from the previous response; a null nextCursor means the end.

One application's audit log (#1481) ​

The same three routes exist under /api/v1/console/applications/{applicationId}/audit-events for the people who run one application: its Owners and Admins and the admins of its organization. TenancyEngine platform staff who hold the platform-wide organizations-read permission are treated as an admin of every organization, so they can read every application's log too (this is an elevation that platform role grants, not a per-application one). Billing, Viewer and Support roles, the team of a sibling application, organization billing staff and API keys get the same 403. Only events of that application are returned (never the organization's own events or another application's). Actors are named when they are members of the application's organization or of that application's team; anyone else is shown as platform support.

What an event contains ​

id, occurredAtUtc, action, resourceType, resourceId, applicationId, result, actorType, actorUserId, actorEmail, actorDisplayName, actorIp, correlationId. The raw before/after payloads are not exposed (they can contain secrets or personal data). Actor identity and IP are shown only for signed-in user actors.

Retention ​

The log is readable for the last 90 days by default (Audit:CustomerRetentionDays, 1 to 3650). Older events are outside the window and are not returned or exported. Per-plan windows are a follow-up: set the value per lane until then.

Event catalog (stable names; new names may be added, existing names are never renamed) ​

  • organization.create, organization.status.update, organization.region.update, organization.rename_slug
  • application.create, application.update, application.clone, application.rename_slug
  • application.environment.create|update|delete
  • application.feature.create|update|delete
  • application.role.create|update|delete
  • application.claim.create|update|delete
  • application.offering.create|update|delete
  • application.oauth_client.renewed, application.portal.update
  • application.member.invite, application.member.role_update, application.member.remove, application.member.leave

Member, invite and API-key events are added to this catalog as their writers gain an organization link.

How scoping works ​

An event belongs to an organization when its ApplicationId is one of the organization's applications, or when it is about the Organization resource itself (ResourceType = "Organization", ResourceId = the organization id). Scoping is the first filter on every query, and no request parameter can widen it. The application view's scope is narrower still: only events whose ApplicationId is that application.

TenancyEngine platform documentation