apistockdocs
v0.4 GitHub apistock.dev
API reference/Ops: audit

Count audit events

GET /ops/audit/stats
Counts events in a window of at most 90 days (default the last 7), grouped by action, outcome, actor kind, resource type or UTC day. Filters are the audit list's.

Authorization

bearer
Authorizationheader · stringrequired

Session token from POST /v1/auth/login with "transport": "bearer". Browsers use the session cookie that login sets instead.

Query

group_bystringrequired
one of: action, outcome, actor_kind, resource_type, day
actor_kindstring

user, service, system or anonymous

maxLength: 32
actor_idstring
maxLength: 200
actionstring
maxLength: 200
action_prefixstring
maxLength: 200
resource_typestring
maxLength: 100
org_idstring
maxLength: 200
outcomestring

success, failure or denied

maxLength: 16
fromstring

Start, inclusive (RFC 3339); default 7 days before to

format: date-time
tostring

End, exclusive (RFC 3339); default now. At most 90 days after from

format: date-time

Responses

errors: application/problem+json
200

OK

401

Unauthorized

403

Forbidden

422

Unprocessable Entity

500

Internal Server Error

Match errors on the problem's code, which stays the same, not on its message.

esc
↑↓ move↵ openesc close