Server-sent events naming what changed, so a frontend knows what to reload
GET
/api/v1/events
const url = 'https://deck.example.com/api/v1/events';const options = {method: 'GET', headers: {cookie: 'qd_auth=<qd_auth>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”The event stream.
Media typetext/event-stream
event: changed lines, each with a data: line holding a Changed.
string
Example
event: changeddata: "cards"default
Section titled “default”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"}