Skip to main content
GET
/
metrics
Get the stats of the service
curl --request GET \
  --url https://{port}-{sandboxID}.e2b.app/metrics \
  --header 'X-Access-Token: <api-key>'
{
  "ts": 123,
  "cpu_count": 123,
  "cpu_used_pct": 123,
  "mem_total": 123,
  "mem_used": 123,
  "disk_used": 123,
  "disk_total": 123,
  "mem_used_mib": 123,
  "mem_total_mib": 123
}

Authorizations

X-Access-Token
string
header
required

Sandbox access token (envdAccessToken) for authenticating requests to a running sandbox. Returned by: POST /sandboxes (on create), POST /sandboxes/{sandboxID}/connect (on connect), POST /sandboxes/{sandboxID}/resume (on resume), and GET /sandboxes/{sandboxID} (for running or paused sandboxes).

Response

The resource usage metrics of the service

Resource usage metrics

ts
integer<int64>

Unix timestamp in UTC for current sandbox time

cpu_count
integer

Number of CPU cores

cpu_used_pct
number<float>

CPU usage percentage

mem_total
integer<int64>

Total virtual memory in bytes

mem_used
integer<int64>

Used virtual memory in bytes

disk_used
integer<int64>

Used disk space in bytes

disk_total
integer<int64>

Total disk space in bytes

mem_used_mib
integer<int64>

Used virtual memory in MiB

mem_total_mib
integer<int64>

Total virtual memory in MiB