Skip to content
Subako Docs
English
Esc
↑↓navigate↵open⌘Jpreview

List the audit log

What was done in the organization over the last year, by which credential, and whether it was allowed.

GET/v1/organization/audit-logs
Authorization
AuthorizationBearer token · headerrequired
Query parameters
limitinteger<int64>
min 1 · max 200
afterstring<uuid>
Rows past this id in `order`'s direction: a page's `next_cursor`.
beforestring<uuid>
Rows just before this id, still in `order`'s direction: a page's `prev_cursor`.
orderOrderParam
Newest first when omitted.
Allowed:ascdesc
sincestring<date-time>
Only rows recorded at or after this instant.
untilstring<date-time>
Only rows recorded before this instant.
categoryAuditCategoryBody
Only rows whose action is in this category.
Allowed:managementauthenticationsession
actionstring
Only rows of this action.
resultAuditResultBody
Only rows with this result.
Allowed:successdenied
actor_idstring<uuid>
Only rows this member, API key, or session token acted in, or that a credential it issued acted in.
workspace_idstring<uuid>
Only rows in this workspace.
subjectstring
Only rows about this subject.
Responses
200One page, newest first unless order=asc.
itemsAuditLogEntryBody[]required
Show properties
Array of AuditLogEntryBody
actionstringrequired
What was done. An open vocabulary: an action Subako starts recording later arrives under its own name, so a client keeps a row it does not know rather than rejecting it. `AuditEvent` lists the actions this version knows.
actorAuditActorBodyrequired
The credential an action came in on. Stable vocabulary for v1: adding a value requires a new API version.
Show properties
One of:
object
grant_idstring<uuid> | null
typestringrequired
Allowed:user
user_idstring<uuid>required
object
api_key_idstring<uuid>required
typestringrequired
Allowed:api_key
object
session_idstring<uuid> | null
session_token_idstring<uuid> | null
typestringrequired
Allowed:session_token
object
typestringrequired
Allowed:operator
object
typestringrequired
Allowed:billing
object
typestringrequired
Allowed:system
categorystring | null
The action's category, or null for an action this version does not know. An open vocabulary, as `action` is.
detailsobjectrequired
The action's facts. Their shape is the action's, as `AuditEvent` documents it; a field added later is absent from older rows.
idstring<uuid>required
ipstring | null
The address a member's or an API key's request came from. A session token's request, and Subako's own, record none.
issuerany | AuditIssuerBody
Show properties
One of:
any
any
AuditIssuerBody
One of:
object
typestringrequired
Allowed:user
user_idstring<uuid>required
object
api_key_idstring<uuid>required
typestringrequired
Allowed:api_key
namesAuditNamesBodyrequired
The names of what an entry names, as they are now. A field is null where the entry has no such id, or where what it names has no name: a session token, a login, a credit lot, an identity provider, or Subako itself.
Show properties
actorany | AuditNameBody
Show properties
One of:
any
any
AuditNameBody
One of:
object
namestring | null
statestringrequired
Allowed:current
object
statestringrequired
Allowed:deleted
issuerany | AuditNameBody
Show properties
One of:
any
any
AuditNameBody
One of:
object
namestring | null
statestringrequired
Allowed:current
object
statestringrequired
Allowed:deleted
subjectany | AuditNameBody
Show properties
One of:
any
any
AuditNameBody
One of:
object
namestring | null
statestringrequired
Allowed:current
object
statestringrequired
Allowed:deleted
workspaceany | AuditNameBody
Show properties
One of:
any
any
AuditNameBody
One of:
object
namestring | null
statestringrequired
Allowed:current
object
statestringrequired
Allowed:deleted
occurred_atstring<date-time>required
request_idstring<uuid> | null
The request that did it, as its response's `x-request-id` named it.
resultAuditResultBodyrequired
Whether the operation went ahead. Stable vocabulary for v1: adding a value requires a new API version.
Allowed:successdenied
run_idstring<uuid> | null
The run the action happened in, for what an agent did.
subjectstring | null
The id of what the action was done to.
subject_kindstring | null
What kind of thing `subject` is, which its action decides: `agent`, `vault`, `user`, and so on, as `KnownAuditSubjectKind` lists them. An open vocabulary, as `action` is; null when there is no subject or the action is one this version does not know.
user_agentstring | null
The `User-Agent` the request came with. A session token's request, and the server acting on its own, record none.
workspace_idstring<uuid> | null
next_cursorstring<uuid> | nullrequired
Pass back as `after` for the next page; `null` on the last page.
prev_cursorstring<uuid> | nullrequired
Pass back as `before` for the previous page; `null` on the first page.
400Bad limit, cursor, order, instant, category, or result.
errorErrorDetailrequired
What went wrong: a `code` to branch on and a `message` to show. The message is written for a person and may change; the code will not.
Show properties
codeErrorCoderequired
The machine-readable half of an error response, and the field a client branches on. Closed: every error carries exactly one of these.
Allowed:unauthorizedforbiddennot_foundinvalid_requestconflictclient_outdatedprecondition_failedtoo_many_requestsinternal
messagestringrequired
401Missing, malformed, or invalid bearer token.
errorErrorDetailrequired
What went wrong: a `code` to branch on and a `message` to show. The message is written for a person and may change; the code will not.
Show properties
codeErrorCoderequired
The machine-readable half of an error response, and the field a client branches on. Closed: every error carries exactly one of these.
Allowed:unauthorizedforbiddennot_foundinvalid_requestconflictclient_outdatedprecondition_failedtoo_many_requestsinternal
messagestringrequired
403Caller lacks org.audit.read.
errorErrorDetailrequired
What went wrong: a `code` to branch on and a `message` to show. The message is written for a person and may change; the code will not.
Show properties
codeErrorCoderequired
The machine-readable half of an error response, and the field a client branches on. Closed: every error carries exactly one of these.
Allowed:unauthorizedforbiddennot_foundinvalid_requestconflictclient_outdatedprecondition_failedtoo_many_requestsinternal
messagestringrequired
Try it
Server
Authorization
Parameters
Request
curl -X GET "https://api.us.cloud.subako.ai/v1/organization/audit-logs" \
  -H "Authorization: Bearer YOUR_TOKEN"
Response
{
  "items": [
    {
      "action": "string",
      "actor": {
        "grant_id": "a3c1da8e-13c6-4cab-955b-2120b58c2982",
        "type": "user",
        "user_id": "a169451c-8525-4352-b8ca-070dd449a1a5"
      },
      "category": "string",
      "details": {},
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "ip": "string",
      "issuer": {},
      "names": {
        "actor": {},
        "issuer": {},
        "subject": {},
        "workspace": {}
      },
      "occurred_at": "2019-08-24T14:15:22Z",
      "request_id": "266ea41d-adf5-480b-af50-15b940c2b846",
      "result": "success",
      "run_id": "dded282c-8ebd-44cf-8ba5-9a234973d1ec",
      "subject": "string",
      "subject_kind": "string",
      "user_agent": "string",
      "workspace_id": "0967198e-ec7b-4c6b-b4d3-f71244cadbe9"
    }
  ],
  "next_cursor": "a7ec8888-a9c3-4732-a281-9a08510f220b",
  "prev_cursor": "2ffdd032-1f96-48c2-8179-571201598694"
}