Live events
A Server-Sent Events stream of what an environment's charging stations are doing right now, so a client doesn't have to poll — see docs/architecture/live-charger-updates-roadmap.md. Events are nudges to refetch, delivered best-effort: reconcile over the REST endpoints on connect and after every reconnect.
1 endpoint
Streams live charging_station events for one environment.
get/v1/environments/{environment_id}/live-eventsRequires a bearer token
Opens a text/event-stream that stays open until the client closes it
or 30 minutes pass, whichever comes first. Each event's SSE event:
field is its type, and its data: field is a JSON
[LiveEventPayload]. Comment frames are sent every 15 s so idle
connections aren't dropped by intermediaries.
Events are nudges to refetch, not a record: they are delivered
best-effort, so a client must reconcile over REST when it connects and
after every reconnect rather than treating the stream as complete.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
| environment_id* | path | string<uuid> | Environment id |
Responses
| Status | Body | Description |
|---|---|---|
| 200 | — | An open event stream. The body is text/event-stream, not a single JSON document: each frame carries one LiveEventPayload. |
| 401 | ErrorBody | Missing, invalid, or expired bearer token |
| 404 | ErrorBody | No environment with this id exists, or the caller cannot access it |