Skip to content

Events and traffic log API Since v0.1 ​

Security events keep full values; callers with the viewer role receive masked values on every route here. Callers limited to some applications see only those applications. For the fields, see Event and log fields.

For the base URL, sign-in, roles and error format, see Management API. Except sign-in, a route answers 401 without credentials and 403 when the role is too low.

Routes ​

Security events ​

MethodPathMinimum roleWhat it doesMain fields
GET/v1/eventsviewerLists events, newest first.Query: app, rule, client, path, action, identity, since, until, limit (default 100, at most 1000), q (filter language), fields. Response: events.
GET/v1/events/groupsviewerCounts events grouped by one field.Query: the list filters and by (default rule). Response: groups.
GET/v1/events/streamviewerStreams new events as server-sent events (events messages).Query: the list filters.
POST/v1/events/export Since v0.2viewerExports matching events as JSON lines. The export is written to the audit log.Query: app, rule, client, path, action, since, until, q, max.
GET/v1/events/{id}viewerReturns one event with its traffic_id when a traffic record exists.none
POST/v1/events/{id}/exceptionoperatorProposes, or applies, a narrow exception for an event.Body: apply, comment, base_version. Response: changes.
GET/v1/statsviewerReturns event and request counts over time.none

Traffic log ​

MethodPathMinimum roleWhat it doesMain fields
GET/v1/traffic Since v0.2viewerLists traffic records of this node.Query: app, rule, client, path, action, vip, listener, member, since, until, before, limit, max, order, q.
POST/v1/traffic/export Since v0.2viewerExports matching traffic records. The export is written to the audit log.Query: as the list.
GET/v1/traffic/{id} Since v0.2viewerReturns one traffic record.none

Example ​

sh
curl -sk -H "Authorization: Bearer waap_EXAMPLE" "https://127.0.0.1:9443/v1/events?app=shop&since=1h&limit=50"