Restore a snapshot
Create a new sandbox from a previously saved snapshot. The restored sandbox reuses the snapshot's template, CPU, memory, and disk settings. `timeout` auto-pause behavior and network policy can be overridden at restore time.
Create a new sandbox from a previously saved snapshot. The restored sandbox
reuses the snapshot's template, CPU, memory, and disk settings. timeout
auto-pause behavior and network policy can be overridden at restore time.
Authorization
BearerAuth API key passed as a Bearer token in the Authorization header.
Alternatively, use the leap0-authorization header.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Name of the snapshot to restore.
Sandbox timeout in seconds. Defaults to 300 if not provided.
int641 <= value <= 28800Enable auto-pause for the restored sandbox.
falseNetwork egress policy for a sandbox. When omitted, defaults to allow-all.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://api.leap0.dev/v1/snapshot/restore" \ -H "Content-Type: application/json" \ -d '{ "snapshot_name": "workspace-warm" }'{ "id": "sbx-abc123", "template_id": "string", "mounts": [ { "id": "mnt-abc123", "type": "object-storage", "bucket": "string", "mount_path": "string", "prefix": "string", "read_only": true } ], "vcpu": 1, "memory": 1, "disk": 1, "timeout": 1, "state": "starting", "auto_pause": true, "network_policy": { "mode": "allow-all", "allow_domains": [ "string" ], "allow_cidrs": [ "string" ], "transforms": [ { "domain": "string", "inject_headers": { "property1": "string", "property2": "string" }, "strip_headers": [ "string" ] } ] }, "created_at": "2019-08-24T14:15:22Z"}{ "message": "string", "errors": [ { "field": "string", "error": "string" } ]}{ "message": "string"}{ "message": "string"}{ "message": "string"}{ "message": "string"}
