SandboxesMonitoring

Get sandbox stats history

Get the CPU, memory and disk usage of a sandbox over time. The server keeps a sample every 3 s for 7 days and groups the samples to a step that gives at most 1,500 points. The answer also lists the periods in which the sandbox was paused, and the changes of its size that took effect, in the range. The live stream at /v1/sandboxes/{idOrName}/stats/live sends the newest samples.

GET
/v1/sandboxes/{idOrName}/stats/history
AuthorizationBearer <token>

API key starting with tektona_. Create one at app-dev.tektona.ai under API Keys.

In: header

Path Parameters

idOrName*string

Sandbox ID (ULID) or name

Query Parameters

org?string

Required when the path names the sandbox by name.

project?string

Required when the path names the sandbox by name.

start?string

Start of the range, inclusive, RFC 3339. Default: one hour before end.

Formatdate-time
end?string

End of the range, exclusive, RFC 3339. Default: now. The range is at most 7 days.

Formatdate-time

Response Body

application/json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

curl -X GET "https://example.com/v1/sandboxes/string/stats/history"
{  "pauses": [    {      "end": "2019-08-24T14:15:22Z",      "start": "2019-08-24T14:15:22Z"    }  ],  "resizes": [    {      "at": "2019-08-24T14:15:22Z",      "cause": "resize",      "from": {        "cpu": 0,        "disk_bytes": 0,        "memory_bytes": 0      },      "to": {        "cpu": 0,        "disk_bytes": 0,        "memory_bytes": 0      }    }  ],  "samples": [    {      "cpu_count": 0,      "cpu_used_percent": 0.1,      "cpu_used_percent_max": 0.1,      "disk_available_bytes": 0,      "disk_used_bytes": 0,      "disk_used_bytes_max": 0,      "mem_available_bytes": 0,      "mem_used_bytes": 0,      "mem_used_bytes_max": 0,      "sampled_at": "2019-08-24T14:15:22Z"    }  ],  "step_seconds": 0}