Restore snapshot
restore_snapshotRevert a document's working copy to a specific snapshot. Undo changes by rolling back to an earlier checkpoint without altering the original file.
Instructions
Revert a document's working copy to a chosen snapshot.
When to use: undoing/rolling back to an earlier checkpoint. To find a snapshot_id use
list_snapshots; to make a new checkpoint use create_snapshot.
Key params: snapshot_id names the target checkpoint (must exist for this document).
Return shape: RestoreResult — the reversibility-chain links plus restored_sha256 (SHA-256
hex digest) and restored_size_bytes of the restored working copy, so a caller can assert
recovery succeeded without reading the document off disk.
Example: restore_snapshot(doc_id, snapshot_id)
Risk class: medium (reverts working copy via Operation Record; never touches the original).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| doc_id | Yes | ||
| snapshot_id | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| doc_id | Yes | ||
| operation_id | Yes | ||
| restored_from | Yes | ||
| restored_sha256 | Yes | ||
| restored_size_bytes | Yes | ||
| pre_restore_snapshot_id | Yes |