Get Sandbox Stats
GET
/v1/sandbox/{sessionId}/statsGET
/v1/sandbox/{sessionId}/statsYour instance endpoint, shown on the instance page in the dashboard. Each instance has its own host; there is no shared API host.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
sessionId | path | string | Yes | |
tenantId | query | string | No |
Responses
200 Get live stats for a sandbox
| Property | Type | Description |
|---|---|---|
stats | object | SandboxStats holds a point-in-time resource usage snapshot. |
default An unexpected error response.
| Property | Type | Description |
|---|---|---|
code | integer | |
message | string | |
details | object[] |
Request
curl -X GET "http://localhost:8089/v1/sandbox/{sessionId}/stats" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json"const response = await fetch("http://localhost:8089/v1/sandbox/{sessionId}/stats", {
method: "GET",
headers: {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json",
},
});
const data = await response.json();import requests
response = requests.get(
"http://localhost:8089/v1/sandbox/{sessionId}/stats",
headers={
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json",
},
)
data = response.json()Response
{
"stats": {
"cpuPercent": 0,
"memoryUsage": "string",
"memoryLimit": "string",
"memoryPercent": 0,
"networkRxBytes": "string",
"networkTxBytes": "string",
"blockRead": "string",
"blockWrite": "string",
"pids": 0,
"timestamp": "2024-01-01T00:00:00Z"
}
}{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
