Operator
Events
GET /api/events and /api/events/stream — the audit trail, polled or streamed.
GET /api/events
GET
/api/eventsBearer adminTokenRecent 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 adminTokenServer-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.
curl -N http://localhost:8080/api/events/stream -H "Authorization: Bearer $ADMIN_TOKEN": connected
data: {"id":"…","type":"resource.requested","requestId":"…","resourceId":"market_report","at":"…"}
data: {"id":"…","type":"payment.required","requestId":"…","resourceId":"market_report","at":"…"}
: heartbeatBrowsers cannot read the stream
EventSource cannot send the admin token, and the token is deliberately not accepted as a query parameter. Browser dashboards poll GET /api/events.Event types
| Type | Emitted when |
|---|---|
resource.discovered | reserved in the event vocabulary; not emitted by the pipeline in this release |
resource.requested | a call enters the pipeline |
authorization.verified / .rejected | an AP2 mandate was checked |
payment.required | a challenge was issued |
payment.rejected | a proof failed verification |
payment.verified | a proof passed verification — no money moved yet |
payment.settled | the transfer settled |
backend.called | the merchant backend answered |
backend.failed | the backend failed or timed out |
resource.delivered | the result went back to the agent |