Keyboard shortcuts

Press ← or → to navigate between chapters

Press ? to show this help

Press Esc to hide this help

Audit

Who did what: the audit log (the audit permission) and your own activity.

GET /api/v1/audit

The audit log, filtered. Needs the audit permission.

Who may call it: anyone with the audit permission.

Parameters

InType
actorquerytextA user's or token's name (a user's tokens count as theirs).
actionquerytextAn action (message.dismiss) or a group of them (message, user, session).
interfacequerytext
messagequerynumberA message id.
fromquerytime (RFC 3339)From this time (inclusive).
toquerytime (RFC 3339)Until this time (exclusive).
beforequerynumberEntries older than this id (the previous page's next_before).
afterquerynumberEntries newer than this id, oldest first (what an export follows).
formatquerytextjson (default: a page, newest first) or ndjson (one entry per line, oldest first, up to limit, default 10,000, at most 100,000: continue with after the last id). An export is itself logged.
limitquerynumberPage size, at most 500 (default 100).

Answers

  • 200 With format=ndjson: application/x-ndjson, one entry (as in entries) per line (application/json): AuditPage
  • 400 (application/json): ErrorBody
  • 403 (application/json): ErrorBody

Shapes

The JSON bodies the operations above take and return.

AuditEntry

FieldType
actiontextmessage.payload.read, message.dismiss, user.create, ...
actortextThe user's or token's name when it happened.
actor_kindtextuser, token, system (the engine, or someone at the server's command line) or anonymous (a sign-in as a name nobody has).
attime (RFC 3339)
detail (optional)object or nullMore about it, by action (never a password, token or payload).
idnumber
interface (optional)text or null
ip (optional)text or nullThe address the request came from (a proxy's, if there is one).
message (optional)number or null
outcometextok, denied or failed.
subject (optional)text or nullWhat it was done to: a username, a token, interface/destination.
via (optional)text or nullsession (the web UI), token, cli or engine; none for entries from before the log.

AuditPage

FieldType
entrieslist of AuditEntryNewest first.
next_before (optional)number or nullPass as before for the next (older) page; absent on the last page.

ErrorBody

FieldType
errortextWhat went wrong, in plain words.