---
title: "Get Initial VM Statistics"
method: GET
path: "/vm/{rid}/stats"
tags: ["VM"]
---

# Get Initial VM Statistics

`GET /vm/{rid}/stats`

Retrieve the finest available statistics window and its availability metadata for a virtual machine

## Path parameters

- `rid` integer, required

## Response `200`

Success

- GithubComAlchemillahqSylveInternalAPIResponseGithubComAlchemillahqSylveInternalDbStatsBootstrapGithubComAlchemillahqSylveInternalDbModelsVmVMStats
  - `data` GithubComAlchemillahqSylveInternalDbStatsBootstrapGithubComAlchemillahqSylveInternalDbModelsVmVMStats
    - `historyState` 'available' | 'never-recorded' | 'outside-supported-range'
    - `lastSampleAt` string
    - `points` GithubComAlchemillahqSylveInternalDbModelsVmVMStats[]
      - `cpuUsage` number
      - `createdAt` string
      - `id` integer
      - `memoryUsage` number
      - `memoryUsed` number
      - `vmId` integer
    - `resolvedStep` 'minutely' | 'hourly' | 'daily' | 'weekly' | 'monthly' | 'yearly'
  - `error` string
  - `message` string
  - `status` string

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `404` — VM Not Found
- `500` — Internal Server Error

---

[API](https://skmtc.net/alchemillahq/apis/sylve-api.md) · [All operations](https://skmtc.net/alchemillahq/apis/sylve-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/alchemillahq/sylve-api/revisions/9822c41c8ac0/schema)
