Skip to main content
Update sandbox configurations, manage timeouts, and monitor resource usage for optimal performance.

Update Timeout

Extend or reduce the sandbox timeout:
curl -X POST https://api.gravixlayer.com/v1/agents/sandboxes/550e8400-e29b-41d4-a716-446655440000/timeout \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "timeout": 1800
  }'
Response:
{
  "message": "Timeout updated successfully",
  "timeout": 1800,
  "timeout_at": "2025-10-23T13:00:00Z"
}

Resource Monitoring

Monitor real-time resource usage:
curl -X GET https://api.gravixlayer.com/v1/agents/sandboxes/550e8400-e29b-41d4-a716-446655440000/metrics \
  -H "Authorization: Bearer YOUR_API_KEY"
Response:
{
  "timestamp": "2025-10-23T12:35:00Z",
  "cpu_usage": 45.5,
  "memory_usage": 1024.0,
  "memory_total": 2048.0,
  "disk_read": 1048576,
  "disk_write": 524288,
  "network_rx": 2097152,
  "network_tx": 1048576
}

Host URL Access

Get the public URL for accessing specific ports:
curl -X GET https://api.gravixlayer.com/v1/agents/sandboxes/550e8400-e29b-41d4-a716-446655440000/host/8000 \
  -H "Authorization: Bearer YOUR_API_KEY"
Response:
{
  "url": "https://550e8400-e29b-41d4-a716-446655440000-8000.gravixlayer.com"
}

Common Ports

PortServiceUse Case
3000Node.js/ReactWeb development
5000FlaskPython web applications
8000HTTP ServerSimple web servers
8888JupyterNotebook servers

Next Steps