Skip to content
Connect an agent
Hosted diagrams and plans

Audit log

An organisation's audit log says who changed what in the organisation, and when. The owner and the admins read it in the portal, and on Enterprise they export it, or have their SIEM poll it with a key that can do nothing else.

TL;DR

QuestionAnswer
Which plan?Pro keeps 30 days of events and shows them in the portal. Enterprise keeps 365 days, or the days the contract sets, and adds the export. The Free plan records nothing.
Who can read it?The owner and the admins, on the organisation's Audit log tab. A member and a reader cannot. On Enterprise, an organisation API key with the audit:read scope can too.
What is recorded?Members, invitations and roles, ownership, API keys, diagrams, folder rules, the brand, icons, avatar and style rules, "Keep diagrams editable", drift reports from CI, single sign-on (its settings, its domains, every sign-in through your provider, failed ones, people added on first sign-in, and the owner's emailed-code sign-ins while it is required), and changes Plotwork support made, with the reason given.
What is never in it?A diagram's source, a key's value, a token, a color, or a full IP address.
How does a SIEM get it?It polls GET /orgs/{org}/audit/export with a key that has only audit:read, and sends the Plotwork-Next-Cursor header back as after each time.
Is there a push?Yes, on Enterprise: each event can be sent as it happens to Datadog, Dynatrace, Splunk, Microsoft Sentinel or a signed webhook. See Send audit events and drift to your tools. Polling the export still works, and is the record to reconcile against.

1. Read the log

Open the organisation in the portal and choose the Audit log tab. The newest events come first, a page at a time, with a button for older ones.

ColumnWhat it shows
WhenHow long ago, with the exact time on hover
WhoA member's email address, a key's name tagged API key, CI tagged CI, or Plotwork support
WhatWhat happened, with facts such as the role given or the setting chosen
OnWhat it was done to: a member, an invited address, a key, a diagram, an icon or a folder
FromThe network the request came from: an IPv4 /24 or an IPv6 /48, never the full address

Three filters narrow the list, and each reaches every event the plan keeps:

FilterNarrows to
WhatOne group of actions, such as Members or API keys
WhoOne email address or key name, as the log shows it. Choose a suggestion or press Enter.
WhenThe last 24 hours, 7 days, or 30 days

2. Export it (Enterprise)

The tab has two downloads, CSV and JSON Lines, with the filters you chose. One file holds up to 1,000 events, oldest first. Downloading is itself recorded.

The same export is an API route:

bash
curl -s "https://api.plotwork.dev/orgs/acme-platform/audit/export?format=jsonl" \  -H "X-API-Key: $PLOTWORK_AUDIT_KEY" -D headers.txt -o events.jsonl
Parameter or headerMeaning
formatjsonl (the default) or csv
afterWhere to start: the Plotwork-Next-Cursor header of the export before
actor, action, target, from, toThe same filters as the log. action takes an action or a group such as orgs.member; from and to take ISO 8601 times.
Plotwork-Next-CursorThe last event in this export. Send it as after next time.
Plotwork-Moretrue when more events are waiting after this export: ask again at once.

A cell in the CSV that a spreadsheet would run as a formula starts with ', because a diagram's name is text a member typed.

3. Connect a SIEM

  1. In the organisation's Keys tab, create a key and choose "Audit log only: read and export it". That key reads the log and is refused everywhere else, so it cannot publish or delete.
  2. Store the key in the SIEM's secret store.
  3. Poll the export every few minutes. Keep the last Plotwork-Next-Cursor you saw, and send it as after. While Plotwork-More is true, ask again straight away.
  4. Parse each line against the event schema (opens in a new tab).
SIEMHow it polls
SplunkAn HTTP input or a scripted input that runs the request above and keeps the cursor in a checkpoint
DatadogA small job that runs the request and sends each line to the Logs intake
Microsoft SentinelA codeless connector or a logic app with a REST API poller, paging by the after parameter

A key's export is not recorded as an event, so polling does not fill the log with its own reads. The key's last use is on the Keys tab.

4. The event

Every event has the same shape, version 1. A field may be added; none is removed or changes meaning without a new version.

FieldMeaning
version1
idThe event's id
orgIdThe organisation's id
atWhen it happened, as an ISO 8601 time in UTC
actionWhat happened, such as orgs.member.role (the list is below)
actor.kinduser, key, ci or operator
actor.idThe account id, the key id, or null for Plotwork support
actor.nameThe email address or key name when it was recorded, "Plotwork support", or null once a deleted account is forgotten
target.type, target.id, target.nameWhat it was done to: its kind, its id, and its name or address
metadataA few facts, such as role, keepEditable, folder, scopes or reason
ipThe network the request came from, or null
userAgentThe first 200 characters of the user agent, or null
requestIdThe request id, which Plotwork support can look up
GroupActions
Organisationorgs.org.create, orgs.org.rename
Membersorgs.member.add, orgs.member.remove, orgs.member.leave, orgs.member.role, orgs.owner.transfer
Invitationsorgs.invite.create, orgs.invite.revoke, orgs.invite.accept
API keysorgs.key.create, orgs.key.reveal, orgs.key.revoke
Diagramsorgs.diagram.publish, orgs.diagram.update, orgs.diagram.edit, orgs.diagram.restore, orgs.diagram.lock, orgs.diagram.unlock, orgs.diagram.delete
Folder rulesorgs.folder_rule.set, orgs.folder_rule.clear
Lookorgs.brand.set, orgs.brand.clear, orgs.icon.set, orgs.icon.delete, orgs.avatar.set, orgs.avatar.clear, orgs.style_rules.set, orgs.style_rules.clear
Settingsorgs.settings.editable, orgs.settings.publishing
Members' public diagramsorgs.publishing.move, orgs.publishing.unpublish
CIorgs.drift.report
Contractorgs.contract.set, orgs.contract.end
Integrationsorgs.integration.create, orgs.integration.update, orgs.integration.delete
The log itselforgs.audit.export

5. How long events are kept

PlanKept
FreeNothing is recorded
Pro30 days
Enterprise365 days, or the days the contract sets

A daily clean-up removes older events. When an organisation moves to a plan that keeps fewer days, the next clean-up removes what that plan does not keep. The log goes with the organisation. When an account is deleted, its email address is cleared from every log and its id stays.

See also

PageWhy
OrganisationsRoles, keys and who may do what
Single sign-onThe sign-in events this log records
Plans and billingWhat Pro and Enterprise include
Enterprise rolloutKeys and CI across many repositories
Send audit events and drift to your toolsPush each event to Datadog, Dynatrace, Splunk, Microsoft Sentinel or a webhook
Privacy policyWhat the log stores, and for how long
API referenceThe read and export routes