1.2 KiB
1.2 KiB
Snapshot API Prep — PREP-POLICY-ENGINE-35-201-SNAPSHOT-API-WAITS-
Status: Draft (2025-11-20) Owners: Policy Guild Scope: Describe the snapshot API contract that follows ledger export (34-101).
Dependencies
- Ledger export schema (34-101).
- Snapshot stream parameters (retention, pagination) from Policy data store.
Draft API surface
GET /policy/snapshots?tenant_id=&after_cursor=&limit=→ returns{items:[{snapshot_id, generated_at, ledger_export_id, overlay_hash, status_counts}], next_cursor}.GET /policy/snapshots/{snapshot_id}→ returns snapshot detail with materialized results (same ordering as ledger export).- Determinism: snapshot_id = hash of ledger_export_id + overlay_hash; ordering by
generated_atthensnapshot_id.
Acceptance
- Draft schema at
docs/modules/policy/schemas/policy-snapshot@draft.jsonand sample atdocs/modules/policy/samples/policy-snapshot@draft.json. - Cursor format defined (opaque base64 of
(generated_at, snapshot_id)suggested).
Handoff
This document is the prep artefact for PREP-POLICY-ENGINE-35-201-SNAPSHOT-API-WAITS-. Update with cursor and retention details once ledger export shape is frozen.