Update Sandbox Settings
Update sandbox settings. Only updates fields provided in the request body. Refreshes the in-memory provider snapshot so changes take effect immediately without restart. Returns the full updated configuration.
Authorization
User API Key User API key (mgw_usr_live_* or mgw_usr_test_*)
In: header
Cookie Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
curl -X PATCH "https://loading/api/v1/settings/sandbox" \ -H "Content-Type: application/json" \ -d '{}'{
"provider_type": "docker",
"warm_pool_enabled": true,
"default_max_per_user": 0,
"idle_timeout_seconds": 0,
"stopped_retention_seconds": 0,
"config_fallback_image": "string",
"db_default_image": "string",
"env_allowlist": [
"string"
],
"db_active_images": [
"string"
],
"k8s_namespace": "string"
}{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string"
}
]
}Get Sandbox Settings
Return the current sandbox configuration. Reads from DB first (admin-editable values), falls back to env vars for fields not yet set in DB. Also includes image state from DB.
Create Sandbox
Create a new persistent sandbox. When ``session_key`` is set, reuses an existing sandbox for the same (user, session_key, image) triple instead of creating a new one. Resource limits (memory_mb, cpu_cores, disk_mb) default to the image's configured defaults if not explicitly provided. This ensures warm pool compatibility when callers don't specify custom resource limits.
