Oblive Docs

Replay timeline

Read what Oblive held for a business over any time range, and one entry's saved content.

The replay timeline answers “what did Oblive hold for this business at moment T?” for any range up to 92 days. It reads saved history only. It never calls a live provider, never fills a gap with current data, and never runs an agent. Running an agent at a past cutoff stays with replay environments. For the whole feature, see Replays and Replays architecture.

Turn it on for one business

Reads need two things: a deployment read token and a per-business flag.

  1. Set REPLAY_READ_TOKEN (at least 32 characters) on the backend and the frontend server only. In the local stack, set replayReadToken (at least 32 characters) in config/local-stack.json and run bun run stack env. The backend refuses to start when the token equals AGENT_SERVICE_TOKEN or RUN_EXECUTION_CAPTURE_READ_TOKEN, and the stack generator never gives it to agents.
  2. Turn the flag on for the business. No API writes organization config, so it has its own command:
bun run replays:flag --organization 11111111-1111-4111-8111-111111111111 --enabled true

The flag is off when absent. --enabled false turns it off again. The command changes only organizations.config.replaysEnabled and writes an audit line with the OS user and time.

Read a range

GET /organizations/{organizationId}/replays/timeline?from=2026-10-19T00:00:00.000Z&to=2026-10-26T00:00:00.000Z
Authorization: Bearer <REPLAY_READ_TOKEN>

The range is [from, to). Each page holds at most 1,000 entries in available-time order. Pass pagination.nextCursor as cursor for the next page. The first page also carries start, the state at from, and startEntries, the entries that state names. timeline?from=T&to=T returns the state at T.

The response types, the fold and a synthetic fixture live in @oblive/types/replay-timeline:

import { foldReplayState } from "@oblive/types/replay-timeline";

const atPlayhead = foldReplayState(page.start, page.entries, playhead);

An entry counts at T only when its available time is before T. Available time is the evidence-availability confirmedAt, or a run’s start or finish. A T after settledThrough (the database clock minus 5 minutes) is provisional, because a confirmation transaction may still be committing. Late arrivals describe the range but became available after to; they are for display and never enter the state.

Entries are visible only while their source is. A saved collection or recording is listed while its integration is enabled and its permission fingerprint matches the current one; reading its content runs the full archive authorization. An Insights result is listed while every analytical source it used is still readable. Internal revisions appear only for scopes the organization’s run-input policy allows. Archives saved before availability records existed appear as gap entries placed at their save time; they never enter the state.

Read one entry

GET /organizations/{organizationId}/replays/entries/observation%3A<archiveId>
Authorization: Bearer <REPLAY_READ_TOKEN>

Content comes back as captured JSON, the newest 100 log items of a run with hasOlder, or metadata only. Database images (MongoDB and Redis backups) always return metadata only. Content past its original retention is refused with 410 before any byte is read, even while a replay pin holds it; on the timeline its values become a retention_insufficient gap. Only plain saved objects are served as JSON. Responses carry Cache-Control: no-store and X-Content-Type-Options: nosniff. Every authenticated read, served or refused, writes one audit line at a fixed level that no LOG_LEVEL silences: Replay timeline read. with the organization, the validated range, whether a cursor was sent and how many saved bodies were read, or Replay entry content read. with the validated entry ID. Invalid values are logged as invalid. Requests refused for their token are not logged there. Render content as text, never as markup: messages and pull requests carry third-party text.

Limits and errors

StatusCodeWhen
400invalid_requestA missing or malformed range, cursor or entry id.
401agent_unauthorizedAny token other than REPLAY_READ_TOKEN, including agent capabilities.
403replays_disabledThe business is unknown or inactive, or its flag is off.
403forbidden_sourceThe source’s access changed since the entry was saved.
404missing_sourceThe entry is not readable in this organization.
409integrity_mismatchSaved content no longer matches its recorded hashes.
410content_expiredThe content is past its original retention.
413limit_exceededThe range exceeds 92 days, the start exceeds 5,000 keys, or content exceeds 8 MiB.
503replay_read_auth_unavailableThe read token is missing or shared with another credential.
503replay_unavailableAny other failure, including a saved record that breaks the contract.

Ranges, pages and the starting state never truncate: a cap fails explicitly. The full rules are in docs/plans/replay-rsi-v2/replay-api-and-ui-design.md and decision D046.