PPactDocs
Productivity

Time travel

Rewind your dashboard to any captured moment — the snapshot store, the 4D scrubber, and the per-kind snapshot API behind it.

Time travel

Time travel replays how your workspace looked at any moment in the past. Pact captures a snapshot of dashboard state on a schedule; the scrubber above the KPI strip lets you drag back through those snapshots — usually up to 30 days — and watch metrics evolve, then jump back to live. It is the same data you see today, frozen at each capture, not an estimate.

Live surface

The snapshot store and its read API are real, tenant-scoped, and enforced. Every endpoint derives tenant_id from the auth context — it is never read from a request body — so one tenant can never scrub into another's history.

How it works

While you scrub, every chart and KPI re-renders against the snapshot nearest the chosen time. KPIs gain a small "since then" delta tail, and a subtle wax-toned background reminds you that you are looking at history, not live data. Click Now (or the floating chip at the top of the page) to return to live.

The snapshot API

The scrubber is powered by GET /v1/snapshots and its siblings:

EndpointPurpose
GET /v1/snapshotsList snapshots in a window (legacy headline counters)
GET /v1/snapshots/at?ts=…Closest dashboard snapshot to ts
GET /v1/snapshots/{kind}?at=ISOSnapshot of a specific kind, on-or-before at
GET /v1/snapshots/{kind}/range?from=&to=&step=1dSampled series for animation
POST /v1/snapshots/captureAdmin/cron hook to capture a fresh snapshot

Snapshots are captured per kind, so each surface has its own time-series rather than one monolithic blob:

  • sales_today, marketing_today, consent_today, cs_today, admin_today — the day-flow rollups for each persona.
  • analytics_pipeline — open-pipeline rollup (count / value / by stage).
  • analytics_attribution — 30-day journey performance (sends / opens / clicks).
bash
# The pipeline rollup as it stood at a specific instant
curl -s "https://api.pact.place/v1/snapshots/analytics_pipeline?at=2026-07-01T09:00:00Z" \
  -H "Authorization: Bearer $PACT_API_KEY"

Replay fallback

When no snapshot sits close enough to a requested timestamp, GET /v1/snapshots/at doesn't return an empty result — it derives the state by replaying the event log up to that instant (core.snapshots.replay). The scrubber stays continuous even between capture points.

Demo tenants: refresh instead of wait

Demo workspaces expose POST /v1/admin/refresh-demo-data, which shifts the seeded timeline so "yesterday" anchors to now — so a demo dashboard always has a fresh, scrub-able 30-day window without waiting for real time to pass. This is a demo convenience, not part of the production capture path.