History and recovery

Large payloads can end a page before the requested count (about 4 MiB of message bodies per page). Always follow next_cursor.

Replay a fixed interval

History is the sequence of captured deliveries, including superseded versions and explicit removals. A snapshot is the state currently held at a point in time. Trial history starts at activation, day passes cover a rolling 24 hours and month/quarter plans a rolling 30 days. Data availability starts with the first captured baseline for that match/channel.

  • Choose one match_id, one channel and two UTC timestamps T0 ≤ T1. Request GET /v1/football/matches/{id}/snapshot?feeds=A&at=T0. URL-encode timestamps. Take the A envelope as the starting state and keep its cursor.
  • Request GET /v1/football/matches/{id}/history?feed=A&after=CURSOR&to=T1&limit=200. If T0 predates the first baseline, query history with from=T0 instead, then start applying only at the first snapshot.
  • Apply messages in returned order. Continue with next_cursor as after, keeping the same to, until next_cursor is null. next_cursor means more pages; for live polling always save the last applied message.cursor, including the last page. Empty pages keep the prior cursor.
  • 409 reset_required means the cursor is invalid, expired or belongs to another stream. Establish a fresh allowed snapshot. Use a fixed to when following a paginated live interval; the response includes until as the effective upper timestamp.

from and to are inclusive capture-time bounds; after is exclusive. Pages default to 200 messages and accept limit 1–1000. An earlier source event may appear in a later snapshot with no recorded original arrival time. Never infer that missing history was a quiet period.

Offline replay

The public synthetic fixture covers repeated action IDs, rejection, deduplication, replacement, deletion, independent state updates, order changes, a gap and a replacement snapshot. Feed each NDJSON line to the same reducer used for live delivery and compare the final objects by channel. Sample cursors are offline identifiers.

replay-v1.ndjson · expected.json · JSON Schema

Missing baselines at the requested instant

If a requested match and channel are in the directory but no snapshot existed at T0, HTTP 200 includes a status-only entry. In this example feeds=A,B was requested, A has no baseline at T0 and B has no matching directory entry.

{
  "match_id": "mf_00000000000000000001",
  "feeds": {
    "A": {
      "status": "waiting"
    }
  }
}

A status-only entry has no type, data or cursor. For current-time queries it can also be listed before coverage starts. A requested, unrepresented channel is omitted. If no requested channel can be returned the response is HTTP 404 {"error":{"code":"match_not_found"}}. A time outside the entitlement or a future at returns HTTP 403 outside_history_window. With a recorded match but no baseline at T0, fetch history from T0 and wait for a full snapshot; an empty history page is {"messages":[],"next_cursor":null,"until":"…"}. A history lookup for an unknown match/channel returns 404.

A complete REST snapshot carries status alongside its envelope fields. It describes coverage at the requested instant: available after a verified baseline; stale if that instant is more than two minutes after the last delivery, or while recovering from a gap; finished when the projected native status is final. A gap takes precedence. A current query may therefore say stale while a historical query at the same delivery’s capture time says available, with identical data and cursor. data.status describes native match state. WebSocket and history data envelopes may omit the outer status.

REST · WebSocket · Event fields · Historical replay