---
title: "Get Session Metrics"
method: GET
path: "/v1/sessions/{id}/metrics"
tags: ["v1"]
---

# Get Session Metrics

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

## Request

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

List the CPU, memory, swap, and disk readings of every VM the
session ran on, oldest first.

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

## Path parameters

- `id` string, required

## 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)
