Create a sandbox
Create a new sandbox from a template. The sandbox will start booting immediately. A maximum of 3 sandboxes per organization is enforced.
Create a new sandbox from a template. The sandbox will start booting immediately. A maximum of 3 sandboxes per organization is enforced.
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 template to create the sandbox from.
Environment variables to set in the sandbox.
Read-only object storage mounts to attach before boot. They are exposed inside the sandbox through a lazy FUSE mount, while credentials stay on the runner and are not exposed inside the sandbox.
items <= 8Number of virtual CPUs. Defaults to 1 if not provided.
11 <= value <= 8Memory in MiB. Must be an even number. Defaults to 1024 if not provided.
1024int64512 <= value <= 8192Sandbox timeout in seconds. Defaults to 300 if not provided.
int641 <= value <= 28800Automatically pause the sandbox into a snapshot when it reaches its timeout.
falseNetwork egress policy for a sandbox. When omitted, defaults to allow-all.
Response Body
application/json
application/json
application/json
application/json
curl -X POST "https://api.leap0.dev/v1/sandbox/" \ -H "Content-Type: application/json" \ -d '{ "template_name": "my-template" }'{ "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"}
