Releasesv0.1.0
Api referenceEndpointsAudit

The tenant's audit log, newest first

GET
/v1/audit

One event per authenticated request (tenant key or user token) and per administrative or system action: who (the credential), what (the action and route), about which user, when, and the status. Never a health value, a secret or a query string. Append only; events older than OHS_AUDIT_RETENTION_DAYS (default 365) are pruned.

Authorization

tenantKey
headerAuthorizationBearer <token>

Tenant API key, ohs_sk_ + 43 base62 characters.

Query Parameters

user_id?string

Only events about this end user.

Formatuuid
action?string

An exact action (data.export), or a prefix ending in a dot (data.).

since?string

Events at or after this time (RFC 3339 or YYYY-MM-DD).

until?string

Events before this time (RFC 3339 or YYYY-MM-DD).

cursor?string

The next_cursor of the previous page.

limit?integer
Range1 <= value <= 1000
Default100

Header Parameters

Authorization*string

The tenant API key, as a bearer secret.

Response Body

One page of events.

application/json
  1. response
data*array<>
next_cursor*|

Null on the last page.

curl -X GET 'http://localhost:8080/v1/audit' \  -H 'Authorization: Bearer ohs_sk_...'
{  "next_cursor": "string",  "data": [    {      "id": 0,      "at": "2019-08-24T14:15:22Z",      "actor": {        "type": "api_key",        "id": "string"      },      "action": "string",      "user_id": "a169451c-8525-4352-b8ca-070dd449a1a5",      "method": "string",      "route": "string",      "status": 0,      "request_id": "string",      "detail": {}    }  ]}
Edit on GitHub