Leap0

Create a snapshot

Create a snapshot from a running sandbox. The snapshot captures the sandbox's memory image, VM state, writable disk diff, and resource configuration. The source sandbox resumes after the snapshot is stored unless `kill_sandbox_after` is set.

POST
/v1/sandbox/{sandboxID}/snapshot/create

Create a snapshot from a running sandbox. The snapshot captures the sandbox's memory image, VM state, writable disk diff, and resource configuration. The source sandbox resumes after the snapshot is stored unless kill_sandbox_after is set.

Authorization

BearerAuth
AuthorizationBearer <token>

API key passed as a Bearer token in the Authorization header. Alternatively, use the leap0-authorization header.

In: header

Path Parameters

sandboxID*string

Unique sandbox identifier.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

name?string

Optional snapshot name. If omitted, Leap0 generates one.

kill_sandbox_after?boolean

Terminate the source sandbox after the snapshot is stored.

Defaultfalse

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://api.leap0.dev/v1/sandbox/string/snapshot/create" \  -H "Content-Type: application/json" \  -d '{}'
{  "id": "snap-abc123",  "name": "workspace-warm",  "template_id": "string",  "vcpu": 1,  "memory": 1,  "disk": 1,  "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"}