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
The sandbox identifier. Format: sbx-<8 chars>.
Response
Returns an array of SandboxMetrics objects.
UTC timestamp of the measurement in ISO 8601 format.
CPU utilisation as a percentage (0–100).
Resident memory usage in megabytes.
Example
curl https://api.declaw.ai/sandboxes/sbx-a1b2c3d4/metrics \
-H "X-API-Key: YOUR_API_KEY"
[
{
"timestamp": "2024-01-15T10:30:00Z",
"cpu_usage_percent": 15.0,
"memory_usage_mb": 256.0,
"disk_usage_mb": 100.0
}
]
Error Responses
| Status | Cause |
|---|
401 | Missing or invalid API key |
404 | Sandbox not found |