---
title: "List Vm Metrics"
method: GET
path: "/v1/vms/{id}/metrics"
tags: ["v1", "VMs"]
---

# List Vm Metrics

`GET /v1/vms/{id}/metrics`

## Request

- Base URL: `https://api.ellipsis.dev`
- URL: `https://api.ellipsis.dev/v1/vms/{id}/metrics`
- Auth: HTTP bearer

List a VM's CPU, memory, swap, and disk readings, oldest first.

A reading is taken every 5 seconds while a session runs on the VM.

## Path parameters

- `id` string, required

## Query parameters

- `start` string, date-time, nullable: Only readings at or after this time.
- `end` string, date-time, nullable: Only readings before this time.

## Headers

- `user-agent` string, nullable

## Response `200`

Successful Response

- VMMetricsResponse
  - `metrics` VMMetrics[], required
    - `cpu_count` number, required: CPUs available to the VM.
    - `cpu_percent` number, required: Share of all CPUs in use over the 5 seconds before the reading, from 0 to 100.
    - `disk_total_bytes` integer, required
    - `disk_used_bytes` integer, required: Used space on the root filesystem.
    - `memory_cache_bytes` integer, required: Memory holding cached file data.
    - `memory_total_bytes` integer, required
    - `memory_used_bytes` integer, required: Memory in use, excluding memory the kernel can reclaim from its file cache.
    - `sampled_at` string, date-time, required
    - `swap_total_bytes` integer, required
    - `swap_used_bytes` integer, required

## Other responses

- `401`: The bearer token is missing, invalid, or revoked.
- `403`: The credential may not perform this action, or the account is blocked.
- `422`: Validation Error

---

[API](https://skmtc.dev/ellipsis/apis/ellipsis-rest-api.md) - [All operations](https://skmtc.dev/ellipsis/apis/ellipsis-rest-api/llms.txt) - [OpenAPI document](https://skmtc.dev/ellipsis/apis/ellipsis-rest-api/revisions/344b16df9a1a?raw)
