List audit events

GET/v2/audit-events
AuthorizationBearer <token>

API key for authentication. Use format: Bearer YOUR_API_KEY

In: header

Query Parameters

occurred_after?string

Only events that occurred at or after this time (ISO 8601).

Match^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
Formatdate-time
occurred_before?string

Only events that occurred at or before this time (ISO 8601).

Match^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
Formatdate-time
actions?array<>

Filter by action, written resource.verb.

actor_ids?array<>

Filter by the user or station that acted.

vias?array<>

Filter by the surface the action came through.

outcomes?array<>

Filter by outcome.

target_type?string

Filter by the type of record acted on.

Lengthlength <= 60
target_id?string

Filter by the ID of the record acted on.

Lengthlength <= 200
request_id?string

Filter by request ID, to find the events one API request produced.

Lengthlength <= 200
search_query?string

Match the actor name or email, the record name, or the action.

Lengthlength <= 100
limit?integer

Maximum number of events to return.

Default50
Range1 <= value <= 100
cursor?|

Opaque cursor of the next page: pass next_cursor from the previous response unchanged. A keyset cursor rather than an offset: paging is stable while new events arrive. An event is timestamped when its request starts and appears when it commits, so a poller re-reads the last 10 minutes and de-duplicates by id.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/v2/audit-events"
{
  "data": [
    {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "occurred_at": "2019-08-24T14:15:22Z",
      "action": "unit.update",
      "outcome": "success",
      "actor": {
        "type": "user",
        "id": "string",
        "name": "string",
        "email": "string"
      },
      "on_behalf_of": {
        "id": "string",
        "name": "string",
        "email": "string"
      },
      "via": "dashboard",
      "client": "string",
      "api_key_id": "string",
      "target": {
        "type": "unit",
        "id": "string",
        "label": "SN-0042"
      },
      "changes": [
        {
          "field": "serial_number",
          "previous": "string",
          "next": "string"
        }
      ],
      "input": {
        "property1": null,
        "property2": null
      },
      "error": "string",
      "request_id": "string",
      "ip_address": "string",
      "user_agent": "string"
    }
  ],
  "meta": {
    "has_more": true,
    "next_cursor": "string"
  }
}
{
  "message": "Bad request",
  "code": "BAD_REQUEST",
  "issues": []
}
{
  "message": "Unauthorized",
  "code": "UNAUTHORIZED",
  "issues": []
}
{
  "message": "Forbidden",
  "code": "FORBIDDEN",
  "issues": []
}
{
  "message": "Request timeout",
  "code": "TIMEOUT",
  "issues": []
}
{
  "message": "Internal server error",
  "code": "INTERNAL_SERVER_ERROR",
  "issues": []
}

How is this guide?