Skip to main content
GET
/
sandboxes
/
{sandbox_id}
/
metrics
Get Metrics
curl --request GET \
  --url https://api.declaw.ai/sandboxes/{sandbox_id}/metrics \
  --header 'X-API-Key: <api-key>'
{
  "[].timestamp": "<string>",
  "[].cpu_usage_percent": 123,
  "[].memory_usage_mb": 123,
  "[].disk_usage_mb": 123
}
Returns an array of recent resource-usage snapshots for the sandbox. Each entry captures CPU utilisation, memory usage, and disk usage at a point in time.
Metrics collection is not yet implemented. The endpoint currently returns 501 Not Implemented. The signature and response schema below describe the shape that will be returned once collection ships.

Path Parameters

sandbox_id
string
required
The sandbox identifier. Format: sbx-<8 chars>.

Response

Returns an array of SandboxMetrics objects.
[].timestamp
string
UTC timestamp of the measurement in ISO 8601 format.
[].cpu_usage_percent
number
CPU utilisation as a percentage (0–100).
[].memory_usage_mb
number
Resident memory usage in megabytes.
[].disk_usage_mb
number
Disk usage in megabytes.

Example

curl https://api.declaw.ai/sandboxes/sbx-a1b2c3d4/metrics \
  -H "X-API-Key: YOUR_API_KEY"
Response
[
  {
    "timestamp": "2024-01-15T10:30:00Z",
    "cpu_usage_percent": 15.0,
    "memory_usage_mb": 256.0,
    "disk_usage_mb": 100.0
  }
]

Error Responses

StatusCause
401Missing or invalid API key
404Sandbox not found