Observability
3 endpoints at https://api.kosa8.com, sent with Authorization: Bearer $KOSA8_API_KEY. Generated from the API's own OpenAPI description, which a test holds to the router.
CPU, memory, disk and network use, read on the host#
GET
/v1/sandboxes/{id}/metricsscope sandboxes:readRead from outside the VM: it never wakes a sleeping sandbox or keeps one awake. Takes about a quarter second.
Parametersidrequiredpath · stringSandbox id (sbx_…)
200401403404409501502
curl -s -X GET https://api.kosa8.com/v1/sandboxes/$SBX/metrics \ -H "Authorization: Bearer $KOSA8_API_KEY"
The sandbox's last commands, with exit codes and output tails#
GET
/v1/sandboxes/{id}/logsscope sandboxes:readKept on the sandbox's host, the newest 200, and removed with the sandbox.
Parametersidrequiredpath · stringSandbox id (sbx_…)
limitquery · integer—
200400401403404409501502
curl -s -X GET https://api.kosa8.com/v1/sandboxes/$SBX/logs \ -H "Authorization: Bearer $KOSA8_API_KEY"
Replace the sandbox's labels (null clears them)#
PUT
Parameters/v1/sandboxes/{id}/labelsscope sandboxes:writeidrequiredpath · stringSandbox id (sbx_…)
labelsrequiredobject | nullUp to 16 labels: keys of 1-63 letters, digits, '.', '_', '/' or '-'; string values up to 256 characters
200400401403404
curl -s -X PUT https://api.kosa8.com/v1/sandboxes/$SBX/labels \ -H "Authorization: Bearer $KOSA8_API_KEY" \ -H 'Content-Type: application/json' -d @body.json