DATASTORETHE RACING NOTEBOOK
Discover/API/Streaming and polling
API / GUIDE

Streaming and polling

One account-wide stream lease for all timing clients.

Server-sent events

GET /api/v1/live/stream?session=current returns text/event-stream. Read timing events as JSON. The service sends a state every second; that does not guarantee a fresh upstream sample. Disconnect when finished and retry dropped connections with a delay.

Polling identity

GET /api/v1/live/state requires a unique X-Stream-ID for each polling client. Generate a UUID once and reuse it across that client’s requests. The web player shares this account slot. A competing client returns HTTP 409; abandoned leases expire within 30 seconds.

Avoid unnecessary acquisition

Clients read the shared DataStore collector. Opening more keys does not improve upstream coverage. Catalogue, replay metadata and provider-status requests do not occupy a timing slot.