State
Snapshots and Forking
Save reproducible state, clone from snapshots, and branch live containers.
Snapshot routes:
GET /api/snapshots
GET /api/snapshots?container_id=<container_id>
GET /api/snapshots/<snapshot_id>
GET /api/snapshots/<snapshot_id>/lineage
POST /api/containers/<container_id>/snapshot
POST /api/snapshots/<snapshot_id>/clone
POST /api/snapshots/<snapshot_id>/pin
POST /api/snapshots/<snapshot_id>/unpin
DELETE /api/snapshots/<snapshot_id>
Fork route:
POST /api/containers/<container_id>/fork
These routes require:
X-Tenant-Id: <tenant_id>
Snapshot Payload
{
"consistency_mode": "crash-consistent",
"network_mode": "reset",
"volume_mode": "exclude",
"ttl_seconds": 3600,
"labels": {
"suite": "demo"
}
}
Accepted values:
consistency_mode:crash-consistent,app-consistentnetwork_mode:reset,preserve_ns,preserve_conn_best_effortvolume_mode:exclude,include_named,include_all_allowed
Clone Payload
{
"resume_policy": "immediate",
"name": "clone-name",
"labels": {
"suite": "demo"
}
}
Accepted resume_policy values:
manualimmediate
Fork Payload
{
"consistency_mode": "crash-consistent",
"network_mode": "reset",
"volume_mode": "exclude",
"resume_policy": "immediate",
"name": "fork-name",
"labels": {
"suite": "demo"
}
}
Fork validates resume_policy during request validation rather than deferring the enum failure to background work.
Snapshot Source Fields
Snapshot responses include:
source_container_idsource_container_name
source_container_name may be null.
Practical Rule
- use snapshots plus clone when reproducibility matters
- use fork when you want a writable branch from a live container
- use lineage before making ancestry assumptions
