Skip to content
Luna
Esc
↑↓navigate↵open⌘Jpreview

Read the audit log

Returns a page of an organisation’s audit log, oldest first. The log records every request that changed something, with who sent it and how it ended.

GET/_luna/orgs/{org}/audit
Authorization
AuthorizationBearer token · headerrequired

An account key (la_…), an API key (lt_…) or a session token (ls_…). The scopes listed are the permissions the operation needs.

Scopes:audit:read
Path parameters
orgstringrequired

The organisation, by its slug.

Query parameters
sinceinteger<int64>

Entries from this moment on, in milliseconds since the Unix epoch.

min 0
untilinteger<int64>

Entries up to this moment, in milliseconds since the Unix epoch.

min 0
actionstring

Entries whose action contains this text, such as DELETE.

actorstring

Entries by this actor: an email address or an id.

limitinteger

How many entries to return. 200 when left out, 5000 at most.

min 0
cursorstring

The cursor of the last page, to read the next one.

formatstring

ndjson returns one entry per line as application/x-ndjson.

Responses
200

A page of the audit log.

entriesAuditEntry[]required
Show properties
Array of AuditEntry
atinteger<int64>required

When, in milliseconds since the Unix epoch.

min 0
actorAuditActorrequired

Who made a change.

Show properties
kindstringrequired

account, token or operator.

idstring | null
emailstring | null

The account's address, for an account.

namestring | null

The key's name, for a token.

keystring | null

The name of the account key the request came with.

actionstringrequired

The method and the route, such as POST /_luna/deploy.

pathstringrequired

The path of the request.

tenantstring | null

The tenant it was about, when it was about one.

statusinteger<int32>required

The status the request ended with.

min 0
cursorstring | null

Pass this as cursor to read the next page. Null on the last page.

default

The request failed. The status says how and error.message says why.

errorErrorDetailrequired
Show properties
codestring | null

A code for programs to branch on, when the error has one.

messagestringrequired

What went wrong, in a sentence a person can read.

Try it
Server
Authorization
Parameters
Request
curl -X GET 'https://luna.example.com/_luna/orgs/string/audit' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json'
Response
{
  "entries": [
    {
      "at": 0,
      "actor": {
        "kind": "string",
        "id": "string",
        "email": "string",
        "name": "string",
        "key": "string"
      },
      "action": "string",
      "path": "string",
      "tenant": "string",
      "status": 0
    }
  ],
  "cursor": "string"
}

Was this page helpful?