Log in Create workspace
Skip to content

API reference

Operator - Audit

Investigate gateway decisions and operator activity recorded for one workspace.

Jump to 2 endpoints
On this page

Overview

Audit events help answer who or what acted, which subject and connector were involved, and what outcome was recorded. The operator endpoints only read those events, while governed data-control requests may export or delete eligible audit rows.

Events are correlation anchors
subject_type and subject_id identify the affected resource; user, service_agent, and connector identify participants. trace_id joins execution history, while metadata carries the authorization snapshot or operation details.
Audit is not observability search
Use audit for accountable decisions and state-changing actions. Use traces, alerts, and failure groups for runtime diagnosis, then pivot back to audit when you need the actor and policy outcome.
Metadata is not automatically secret-safe
Gateway authorization metadata can contain the submitted payload, and the JSON view returns metadata directly. Callers must sanitize before submission; readers should handle audit output as potentially sensitive.

Before you begin

  • A signed-in browser session with a selected workspace backed by an active membership is required; an archived workspace remains readable but rejects mutations. Every /api/v1/operator endpoint rejects API credentials and bearer tokens, regardless of their scopes.
  • Any active owner, admin, member, or auditor membership can read the current workspace's audit events.
  • Have an event ID, trace ID, subject type, or event type ready when investigating a specific incident.

How it works

  1. Narrow the timeline

    List recent events and narrow by filter[event_type] or filter[subject_type]. Results are paged newest first (limit defaults to 50, maximum 200); pass next_cursor back as cursor to read older events. Open the event detail and use its actor, connector, subject, and trace identifiers before drawing conclusions from a compact row.

  2. Follow the identifiers

    Correlate trace_id with a trace and subject_id with the referenced resource. Treat absent actor fields as meaningful: some system processes have no user, while human actions should identify the session user.

Examples

These examples are illustrative. Replace the sample values with your own. Keep credentials in environment variables or a secret manager, never in client-side code.

Find authorization checks

This read asks the current workspace for gateway authorization-check subjects and preserves the browser session.

javascript
const response = await fetch("/api/v1/operator/audit_events?filter%5Bsubject_type%5D=authorization_check", {
  credentials: "same-origin",
  headers: {"Accept": "application/json"}
});
const body = await response.json();
if (!response.ok) throw new Error(`${response.status}: ${body.detail}`);
console.log(body);
What to expect

200 OK. The response wrapper is {"audit_events": [], "next_cursor": null}; populated entries include event_type, status, subject_type, subject_id, metadata, occurred_at, and optional actor records.

Troubleshooting

An event is missing
Verify the selected workspace and remove filters one at a time. A valid ID from another workspace returns 404, and an authorized data-deletion request may have removed eligible audit events when include_audit_logs was true.
Metadata contains sensitive content
The audit reader returns stored metadata directly and cannot retroactively make an unsafe submitted payload safe. Restrict access, remediate the submitting integration, and use governed deletion only under the workspace's data-handling policy.

Endpoint reference

Ready to integrate? Open an endpoint for its required permissions, request fields, response format, and status codes. The examples above explain the workflow; these details define each individual request.

GET
/api/v1/operator/audit_events Web Session

List audit events

Description

Returns one page of audit events for the current workspace, newest first. Pass next_cursor back as cursor to read older events; it is null on the last page. Use filter[subject_type]=maintenance_work_order and filter[subject_id]=the work-order UUID to discover immutable lifecycle audit counterparts after recent event detail expires. metadata.work_order_event_id is the stable original event ID and metadata.event_occurred_at retains its exact timestamp; legacy archival copies identify their provenance.

Auth

Web Session
Parameters
Name In Type Required Description
limit query integer No Maximum audit events to return (default 50, maximum 200)
filter[event_type] query string No Nested event type filter
filter[subject_type] query string No Nested subject type filter
filter[subject_id] query string No Workspace-scoped subject UUID, for example a maintenance work order
filter[fleet] query string No true limits results to fleet-related subject types
cursor query string No Opaque next_cursor from the previous page
Responses
200

Page of audit events with next_cursor

Returns: AuditEventList

400

Invalid cursor

GET
/api/v1/operator/audit_events/:id Web Session

Get audit event details

Description

Returns details of a specific audit event.

Auth

Web Session
Parameters
Name In Type Required Description
id path string Yes Audit event UUID
Responses
200

Audit event details

Returns: AuditEvent

404

Audit event not found

Where to go next

see also