Activity Events Stream
/v1/admin/activity/eventsLive SSE feed of new activity rows for the current IdP admin.
Replaces the SPA's 10s polling loop. The browser opens one
EventSource against this endpoint; the server fans out every
record_event(...) call across the user's owned OAuth clients
via Postgres NOTIFY → in-process queue → SSE frame.
Scope is identical to GET /v1/admin/activity: only events
belonging to oauth_clients.idp_admin_id == user.id
are delivered, and an optional ?client_id= narrows further
(validated against the owned set up-front).
The endpoint does not push a data snapshot on connect — the SPA is
expected to issue GET /v1/admin/activity once for the initial
list and rely on this stream for deltas. That keeps the SSE wire
contract trivial (one event frame per row) and avoids a race
between snapshot fetch and the first live event. (It does flush an
initial retry: line + padding comment on connect — no data —
purely to defeat Safari's EventSource buffering; see gen.)
Query Parameters
Optional — narrow the stream to one OAuth application.
Response Body
application/json
application/json
curl -X GET "https://example.com/v1/admin/activity/events"null{ "detail": [ { "loc": [ "string" ], "msg": "string", "type": "string", "input": null, "ctx": {} } ]}