Skip to Content

Incremental sync with updatedSince

Read only what changed since your last run, with a sync loop.

/events, /showtimes, /locations, /event-series, /festivals, /artists, /works and /genres take updatedSince (an instant with Z or an offset). The list then contains only records whose updatedAt is at or after that instant. Regions have no change time; re-read them now and then (their answers may be kept for a day, Caching with ETag).

  • On events and showtimes, updatedAt is the latest change of the showtime, its event series or its venue. If any of the three changed, all days of that showtime are listed again.
  • On venues, event series, festivals, artists, works and genres, it is the change time of the record itself.
  • Edits your organisation makes in the console (your own texts and images) are not included in updatedAt. Changes to linked records other than those named (for example an artist or a festival linked to an event) do not move it either.

A sync loop:

  1. Remember the time T at which you start a sync run, minus a safety margin of a few minutes.
  2. Read GET /events?updatedSince=<last T>&paginate=cursor&limit=100 (with your usual filters) until hasMore is false. Store each row by id.
  3. Read GET /changes?since=<last T>&types=events until hasMore is false and apply it (see Removals: the changes feed).
  4. Save T for the next run.

Use id as the key of an event row (Stable ids and merged records). Combine with If-None-Match on detail requests you repeat.