Skip to content

Server-sent events naming what changed, so a frontend knows what to reload

The OpenAPI spec (JSON)Licence, versions and sign-in

GET
/api/v1/events
curl --request GET \
--url https://deck.example.com/api/v1/events \
--cookie qd_auth=<qd_auth>

Server-sent events. Every event is named changed (listen with addEventListener("changed", …): onmessage sees only unnamed events), and its data is a JSON string naming what changed (Changed), never the data itself: refetch that. all means the stream fell behind: refetch everything. A comment line every 20 seconds keeps the connection open. The stream ends when the deck restarts: reconnect (EventSource does) and refetch.

The event stream.

Media typetext/event-stream

event: changed lines, each with a data: line holding a Changed.

string

Example

event: changed
data: "cards"

An error, with its message.

Media typeapplication/json

Every error the REST API returns, with an HTTP status.

object
error
required
string

Example generated

{
"error": "example"
}