Skip to content

The usage endpoint returns the metered totals of one project’s VMs between two times: CPU, memory, disk, running time and ingress, plus the organization’s retained object storage. The default range is the start of this UTC month to now.

The VM totals cover one project. project takes a name or id and defaults to default; an unknown project, or one outside the key’s scope, answers 404 project_not_found.

  1. Open the Usage page.
  2. Select 24h, 7d or 30d. 24h is selected first.
  3. Read the totals in CPU, Memory, Disk, Running time and Ingress.
  4. Read Per SVM for each VM’s own totals, and select CPU to change the sort.
  5. Read the plan block, whose heading names the plan, for the plan’s limits and the project’s use.

The dashboard’s range totals are of the default project, whatever the Project menu names. A request names another project with project.

The answer names the project and the two times, then gives the totals, the plan and one entry per VM.

Field Type What it is
project string The project id whose VMs the totals cover.
from_ms integer The first time of the sum, in Unix epoch milliseconds: the start of the hour of from.
to_ms integer The last time of the sum, in Unix epoch milliseconds: the end of the hour of to.
totals object The project’s VM totals, plus the organization’s retained storage.
plan object The organization’s plan and its limits.
svms array One entry per VM with a usage record in the range.

Scroll horizontally to see all columns.

Field Type What it is
running_ms integer Time that the VM ran, in milliseconds. Each running interval is billed in whole seconds rounded up, and a stopped or paused VM adds nothing.
shared_cpu_milli_s integer CPU time of the shared tier, in millicore-seconds: the base CPU millis times the running seconds, so a 2048 MiB shared VM adds 1000 per second. A dedicated VM adds nothing.
dedicated_cpu_milli_s integer CPU time of the dedicated tier, in millicore-seconds: the base CPU millis times the running seconds, so a 4096 MiB dedicated VM adds 2000 per second. A shared VM adds nothing.
shared_memory_mib_s integer RAM of the shared tier, in MiB-seconds: the VM’s RAM times the running seconds, so a 2048 MiB shared VM adds 2048 per second. A dedicated VM adds nothing.
dedicated_memory_mib_s integer RAM of the dedicated tier, in MiB-seconds: the VM’s RAM times the running seconds, so a 4096 MiB dedicated VM adds 4096 per second. A shared VM adds nothing.
disk_mib_ms integer Allocated local disk, in MiB-milliseconds: the host blocks the image holds, not the nominal disk size, counted while the VM exists, including while it sleeps.
ingress_bytes integer Bytes that the VM received from the network.
storage_byte_s integer Retained object storage of the organization, in byte-seconds: the hourly total of the stored body bytes in the cold tier, for the part of each hour in the range. A missing hour counts zero, a shared object counts once, and there is no per-VM total.

Scroll horizontally to see all columns.

Each svms[] entry has an id and a totals object with the seven node metrics above, without storage_byte_s.

Field Type What it is
id string The VM id.
totals object The seven node metrics for this VM.

Scroll horizontally to see all columns.

Field Type What it is
id string The plan id: standard, pro, or a custom enterprise plan id.
max_svms integer The most VMs that the organization may have at once.
max_snapshots integer The most ready and creating snapshots that the organization may have.
max_open_ports integer The most ports of one VM that may be open at once.
max_url_ttl_s integer The longest life of a preview link, in seconds.
inbox_allowed boolean Whether a VM of the organization may receive email.
public_ports_allowed boolean Whether a port of a VM may be public.
schedules_max integer The most schedules that one VM may have.
schedule_min_interval_s integer The shortest gap between two fires of a schedule, in seconds.
stream_max_s integer The longest server-sent event stream or watch of a VM, in seconds.

Scroll horizontally to see all columns.

The service meters CPU, memory, disk, saved memory and ingress. CPU and memory count each running second; disk counts while the VM exists, including sleep; saved memory counts while it is kept; ingress counts bytes the VM receives. Billing has the table and the sleep rules.

Field Type Default Allowed values What it changes
project string default A project name, or its proj_ id, in the key’s scope The project whose VMs the totals cover. Another project answers 404 project_not_found.
from string The start of this UTC month A non-negative whole number of milliseconds; rounded down to the start of its hour The first time of the sum.
to string Now A non-negative whole number not before from; rounded up to the end of its hour The last time of the sum.

Scroll horizontally to see all columns.

Code When Fix
invalid_range from or to is not a non-negative whole number, or to is before from. Send both as Unix epoch milliseconds with from first.
project_not_found project names no project in the organization or key scope. Use a project name or id in the key’s scope, or omit project.

Scroll horizontally to see all columns.

Errors that any request can return are in the error catalog.

Operation Who can Key action
Get usage Any member usage:read

Scroll horizontally to see all columns.

  • The default range starts at 00:00 UTC on the first day of the current month and ends now.
  • from and to are Unix epoch milliseconds; a running interval is billed in whole seconds rounded up.
  • storage_byte_s is the organization’s retained object storage and has no per-VM total.
  • The standard plan returns max_svms 5, max_snapshots 50 and max_open_ports 50; the pro plan returns 50, 200 and 50.
  • Usage is metered, not a quota; a VM is not stopped or refused at a CPU, memory or transfer total.

The full list is in Limits.

  • Billing: what each meter counts and how sleep changes the bill.
  • Limits: plan limits and the usage metrics.
  • Control API usage: the operation, fields and status codes.