Audit Log

Last updated on November 19, 2026

The audit log records every change made in your organization: who made it, when, from where, and what it replaced. It covers the dashboard, the REST API, and the MCP server. Owners and admins can browse it, export it as CSV or as OCSF events for a SIEM, and pull it through the REST API.

What gets recorded

One event is written for every attempt to change data from the dashboard, the API, MCP and the CLI, including attempts that fail or that TofuPilot refuses. Every plan records the same events.

AreaEvents
Test data and configurationRuns, units, parts, revisions, batches, procedures, deployments, stations, workflows, alerts, environment variables and organization settings, from the dashboard, the API and MCP, and procedures deployed with tofupilot deploy
MembersRole changes, removals and departures, invitations, access changes, members added or removed by your identity provider (SCIM, recorded as SCIM directory), and members added on their first SSO sign-in (recorded as SSO (<provider>)). A member is named by user ID and email, which outlive the membership
AccountsSign-ins with their method (SSO, magic link, passkey, OAuth), sign-outs, revoked sessions, passkeys added or removed, sign-in methods linked or unlinked (Google, Microsoft, SSO...), email change requests and the change once its link is confirmed. When TofuPilot staff impersonate a member, the sign-in, every change made during the session and its end are recorded with the staff member as actor and the member as on_behalf_of
CredentialsAPI keys created or deleted, including the key tofupilot login creates, stations logging in with the CLI (with the person who issued the setup token) and out, refused CLI logins and enrollments, and secrets pulled with tofupilot env pull (their names, never their values)
IntegrationsGitHub, GitLab, Bitbucket, Linear, Odoo and InvenTree connections

An account event is recorded in every organization the person belongs to, but the IP address and user agent only in the organization the session works in: a member of several organizations does not reveal to one where they work for another.

Reads are not recorded. A failed sign-in is not recorded either: before it succeeds, TofuPilot cannot tell which organization's member is trying. A request refused before it reaches TofuPilot's checks, such as a call with an invalid API key or a key whose role cannot use the endpoint, appears in API Logs only.

FieldValue
TimeWhen the event happened, in UTC with millisecond precision, taken from the database clock.
ActionWhat was done, as resource.verb, for example unit.update, revision.create or api_key.delete. The same operation has the same name from the dashboard, the API and MCP.
Outcomesuccess, or failure with the error message.
ActorThe user or Station that acted, with its name and email as they were at the time. During staff impersonation, the staff member, with the member as on_behalf_of.
Viadashboard, api or mcp, with the client when known (the SDK, the CLI, or the name the MCP client registered with, such as Claude or Cursor, which the app chooses itself) and the API key used.
TargetThe record acted on: its type, ID and name (a serial number, a part number).
ChangesThe previous and new value of each field the action changed, metadata included: units, parts, revisions, batches, procedures, stations and their configuration, access groups, workflows, alert rules, variables, member access and organization settings. Credentials are recorded as changed, never with their values, and a Secret by its digest. For a deletion of runs, units, parts, revisions, batches, procedures, stations, access groups, workflows and API keys, the columns of the deleted record. Other actions keep their request input.
InputThe request input. Passwords, tokens, API keys, chat webhook URLs and secret variable values are replaced by [redacted]. Run uploads and imports keep their top-level fields (serial number, procedure, outcome, times): the phases and measurements are in the run itself. Other inputs larger than 16 KB are reduced the same way.
IP address and user agentWhere the request came from. The IP is the one the edge reports in x-real-ip (Vercel on TofuPilot Cloud, your reverse proxy when self-hosted). A self-hosted instance reachable without a proxy records whatever the client sends.
Request IDLinks the event to its entry in API Logs.

Integrity

Events cannot be edited or deleted: the database refuses every update and deletion of an audit event made by the application. Events are kept for the lifetime of the organization, even after the record they describe or the member who acted is deleted.

A successful change and its audit event are saved together in the same database transaction, so a change cannot be saved without its event. A failed attempt is rolled back and its event is saved on its own. Member roles, invitations and the organization's name are the exception: the sign-in service saves those changes itself, and their event is saved right after.

Deleting the organization

Deleting an organization deletes its audit log with it. Export the log first if you need to keep it.

Dashboard

Open Settings › Audit Log. Events are listed newest first and grouped by month. Repeated actions by the same actor are collapsed into one group.

Pick the date range next to Filters, then filter by:

  • Date range: from the last 24 hours to all time, within what your plan shows. The default is the last 3 months (30 days on Lab).
  • Type: one or more actions. Search the list by name.
  • Actor: one or more users or Stations.
  • Source: dashboard, API, MCP or system.
  • Outcome: succeeded or failed.
  • Search: an actor, a record name or an action.

Click an event to see everything recorded for it, including the table of changed values and the request input.

Export

On Settings › Audit Log, click Export, pick a date range and a format, and confirm. The export holds every event of the range, whatever filters the page shows. CSV export needs the Pro plan, OCSF the Enterprise plan. The file is streamed by the server and holds up to 100,000 events: a larger range is refused before anything is written, so narrow it and export in several files. Every export is itself recorded in the audit log as audit.export, with its range and event count.

FormatUse it forContent
CSVSpreadsheets, an auditor's requestOne row per event, newest first, with the columns occurred_at, action, outcome, actor_type, actor_id, actor_name, actor_email, on_behalf_of_id, on_behalf_of_email, via, client, api_key_id, target_type, target_id, target_label, changes, input, error, ip_address, user_agent, request_id and id.
OCSF (NDJSON)A SIEM: Splunk, Datadog, Microsoft Sentinel, AWS Security LakeOne OCSF API Activity event (class 6003) per line, as JSON.

OCSF mapping

Each audit event becomes one OCSF API Activity event, version 1.3.0.

OCSF attributeAudit event field
activity_id1 Create, 3 Update, 4 Delete or 99 Other, from the verb of the action
timeTime, in epoch milliseconds
status_id, status_detail1 Success or 2 Failure, and the error message
api.operationAction, for example unit.update
actor.userActor ID, name and email
actor.app_nameSDK, CLI or MCP client
src_endpoint.ip, http_request.user_agentIP address and user agent
resources[0]Target type, ID and name
metadata.uid, metadata.correlation_uidEvent ID and request ID
metadata.tenant_uidOrganization ID
unmappedVia, the member acted on behalf of (staff impersonation), changed values and request input

API

Pull the audit trail from a script or a SIEM collector with GET /v2/audit-events, using the API key of an Owner or Admin, on the Enterprise plan. Events are returned newest first, 50 per page by default (100 at most). Pass meta.next_cursor as cursor to fetch the next page, and use each event's id to skip events you already have.

An event is timestamped when its request starts, and becomes visible when that request commits: a long import can land a few minutes in the past. When you poll, start each pull 10 minutes before the newest occurred_at you already have, and de-duplicate by id.

# Events of the last day, newest first
curl -s "https://www.tofupilot.app/api/v2/audit-events?occurred_after=2026-11-11T00:00:00Z" \
  -H "Authorization: Bearer $TOFUPILOT_API_KEY"

Every SDK has the same call (audit_log.list in Python), and the CLI lists events with tofupilot audit-log ls.

Filters: occurred_after, occurred_before, actions, actor_ids, vias, outcomes, target_type, target_id, request_id and search_query. Errors: 400 for a cursor that was altered, 403 for a role or plan that cannot read the audit log. Station and Developer API keys are refused. Reading the audit log, in the dashboard or through the API, is not itself recorded; exporting it from Settings is.

Plans

Every plan records every event: an organization that upgrades sees the history it built up before.

PlanWhat you can see and do
LabThe last 30 days in the dashboard
ProThe full history, and CSV export
EnterpriseEverything on Pro, plus OCSF export and GET /v2/audit-events for your SIEM

On a self-hosted instance, the audit log is a licensed feature, like MCP and alerts: Settings › Audit Log, the export, GET /v2/audit-events and tofupilot audit-log ls are available when the license includes it, then follow the plan above. Events are recorded either way, so turning it on shows the history built up before. Settings › Plan lists the features of your license.

Permissions

RoleAccess
Owner, AdminBrowse, filter and export the audit log, and pull it with their API key.
Developer, Viewer, OperatorNo access.

How is this guide?

On this page