## VMs ```bash E2B_API_URL=http://192.168.0.61:3000 # create vm curl -X POST $E2B_API_URL/sandboxes \ -H "X-API-Key: $E2B_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "templateID": "base", "timeout": 300 }' # response {"alias":"base","clientID":"6532622b","domain":null,"envdVersion":"0.5.8","sandboxID":"in3h60s6h0ie3kigrcls4","templateID":"pz1l1owhmy0w84e12eqv","trafficAccessToken":null} sandboxID=in3h60s6h0ie3kigrcls4 # create sandboxVM and capture id sandboxID=$(curl -s -X POST http://localhost:3000/sandboxes -H "X-API-Key: $E2B_API_KEY" -H "Content-Type: application/json" -d '{ "templateID": "base", "timeout": 300 }' | jq -r .sandboxID ) # get state curl http://localhost:3000/sandboxes/${sandboxID} \ -H "X-API-Key: $E2B_API_KEY" # list running sandboxes curl "http://localhost:3000/v2/sandboxes?state=running" \ -H "X-API-Key: $E2B_API_KEY" # sandbox resource metrics curl "http://localhost:3000/sandboxes/{sandboxID}/metrics?start=$(date -v-5M +%s)&end=$(date +%s)" \ -H "X-API-Key: $E2B_API_KEY" # sandbox logs curl "http://localhost:3000/v2/sandboxes/{sandboxID}/logs?limit=100&direction=backward" \ -H "X-API-Key: $E2B_API_KEY" ```