Operator

Events

GET /api/events and /api/events/stream — the audit trail, polled or streamed.

GET /api/events

GET/api/eventsBearer adminToken

Recent events, polled. Same authentication and limit as receipts.

curl -s "http://localhost:8080/api/events?limit=50" \
  -H "Authorization: Bearer $ADMIN_TOKEN"

GET /api/events/stream

GET/api/events/streamBearer adminToken

Server-Sent Events: one data: frame per CommerceEvent, with a heartbeat comment every 15 seconds. Frames are unnamed, so they arrive as the default message event. Concurrent subscribers are capped.

bash
curl -N http://localhost:8080/api/events/stream -H "Authorization: Bearer $ADMIN_TOKEN"
sse
: connected

data: {"id":"…","type":"resource.requested","requestId":"…","resourceId":"market_report","at":"…"}

data: {"id":"…","type":"payment.required","requestId":"…","resourceId":"market_report","at":"…"}

: heartbeat
Browsers cannot read the streamEventSource cannot send the admin token, and the token is deliberately not accepted as a query parameter. Browser dashboards poll GET /api/events.

Event types

TypeEmitted when
resource.discoveredreserved in the event vocabulary; not emitted by the pipeline in this release
resource.requesteda call enters the pipeline
authorization.verified / .rejectedan AP2 mandate was checked
payment.requireda challenge was issued
payment.rejecteda proof failed verification
payment.verifieda proof passed verification — no money moved yet
payment.settledthe transfer settled
backend.calledthe merchant backend answered
backend.failedthe backend failed or timed out
resource.deliveredthe result went back to the agent