Create Sandbox

circle-info

Request POST /v1/sandboxes/create

Try it

Example response (201):

Response (201) - application/json
{
  "id": "sbx_x1y2z3a4b5c6d7e8",
  "name": "API Development",
  "created_at": "2024-01-15T12:00:00Z",
  "cpu": 2,
  "memory": 512,
  "status": "creating",
  "volumes": [
    {
      "volume_id": "vol_x1y2z3a4b5c6d7e8",
      "mount_path": "/data",
      "volume_name": "my-volume"
    }
  ]
}

Authorizations

circle-info

x-api-key (string) — header — required API key provided in the x-api-key header. Required.


Body (application/json)

  • image (string)

    • default: dvmcodes/dvm-default-sandbox

    • Docker image name (e.g., dvmcodes/dvm-default-sandbox)

  • name (string)

    • Sandbox name

  • resources (object)

    • resources.cpus (integer)

      • default: 2

      • Number of vCPUs

      • Required range: 1 < x < 32

    • resources.memory (integer)

      • default: 512

      • Memory size in MiB

      • Required range: 128 < x < 32768

  • env_vars (object)

    • Environment variables

    • env_vars.{key} (string)

  • volumes (object[]) — Volumes to attach to the sandbox

    • volumes.volume_id (string) — required

      • Volume ID or Snapshot ID. If a snapshot ID is provided, a new volume will be created from the snapshot.

    • volumes.mount_path (string) — required

      • Mount path in the container


Response (201 - application/json)

  • id (string) — required

    • Sandbox ID

  • name (string) — required

    • Sandbox name

  • created_at (string) — required

    • Creation timestamp

  • cpu (number) — required

    • CPU count

  • memory (number) — required

    • Memory size in MB

  • status (string) — required

    • Sandbox status

  • volumes (object[]) — Volumes mounted on this sandbox

    • volumes.volume_id (string) — required

    • volumes.mount_path (string) — required

    • volumes.volume_name (string) — required


Last updated