Skip to main content
All of these need machines:read. Sandbox.usage also works with images:read.

getMetrics

Get a machine’s resource samples: one per 30 s, oldest first, measured on the host.
since (a Date) is the start of the window: by default 5 minutes ago, at most 24 h back.
  • There are samples only for the times in the window when the machine ran. A machine that is paused or stopped now still returns the samples from when it ran. A machine that did not run in the window gets an empty list.
  • The last sample of a running machine is its host’s latest report (at most about 30 s old, CPU and memory only), so a new machine shows its first sample within about 30 s.
  • The CLI prints the same: instabox metrics <id-or-name> [--json].
For /data and / with a fullness level, use GET /v1/machines/{id}/disk or instabox disk <id-or-name> (CLI reference).

getUsage

Get what a machine used between from and to (both Dates), for billing your own customers.
The default range is the current UTC month: from is the start of the month, and to is now. to is at most 366 days after from. A deleted machine’s usage stays readable by its account, by ID. Running time is recorded from the deploy of 2026-10-14. Earlier time is not counted.

Sandbox.usage

Get your counts, stored bytes and limits (GET /v1/usage).
Bytes are measured about hourly.
storage has machines (each with id, name, state, sizeBytes, diskBytes, snapshots and snapshotBytes), deletedMachineSnapshots and deletedMachineSnapshotBytes. computedAt is null and storage absent before your first measurement.