Appearance
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
| Method | Path | Minimum role | What it does | Main fields |
|---|---|---|---|---|
GET | /v1/events | viewer | Lists 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/groups | viewer | Counts events grouped by one field. | Query: the list filters and by (default rule). Response: groups. |
GET | /v1/events/stream | viewer | Streams new events as server-sent events (events messages). | Query: the list filters. |
POST | /v1/events/export Since v0.2 | viewer | Exports 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} | viewer | Returns one event with its traffic_id when a traffic record exists. | none |
POST | /v1/events/{id}/exception | operator | Proposes, or applies, a narrow exception for an event. | Body: apply, comment, base_version. Response: changes. |
GET | /v1/stats | viewer | Returns event and request counts over time. | none |
Traffic log
| Method | Path | Minimum role | What it does | Main fields |
|---|---|---|---|---|
GET | /v1/traffic Since v0.2 | viewer | Lists 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.2 | viewer | Exports matching traffic records. The export is written to the audit log. | Query: as the list. |
GET | /v1/traffic/{id} Since v0.2 | viewer | Returns 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"