Skip to main content
Retrieve all sandboxes for your account with optional pagination and filtering.
from gravixlayer import GravixLayer

client = GravixLayer(api_key="YOUR_API_KEY")

sandboxes = client.sandbox.sandboxes.list()

print(f"You have {len(sandboxes.sandboxes)} sandboxes:")
for sb in sandboxes.sandboxes:
    print(f"- {sb.sandbox_id}: {sb.status}")

Query Parameters

ParameterTypeDefaultDescription
limitinteger100Maximum results per page (1-1000)
offsetinteger0Number of results to skip

Response

{
  "sandboxes": [
    {
      "sandbox_id": "550e8400-e29b-41d4-a716-446655440000",
      "template": "python-base-v1",
      "status": "running",
      "started_at": "2025-01-27T10:30:00Z",
      "timeout_at": "2025-01-27T11:30:00Z",
      "metadata": {
        "project": "data-analysis"
      },
      "cpu_count": 2,
      "memory_mb": 2048
    }
  ],
  "total": 1
}

Response Fields

FieldTypeDescription
sandbox_idstringUnique sandbox identifier
templatestringTemplate name used
statusstringCurrent status (creating, running, stopped, failed, terminated, timed_out)
started_atstringCreation timestamp (ISO 8601)
ended_atstringEnd timestamp (null if running)
timeout_atstringTimeout timestamp (ISO 8601)
metadataobjectCustom metadata tags
cpu_countintegerAllocated vCPUs
memory_mbintegerAllocated memory in MB

Next Steps

Create Sandbox

Create new sandboxes

Get Sandbox Info

Get detailed sandbox information

Configure Sandbox

Update sandbox settings

Terminate Sandbox

Clean up resources