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

# Get VM Statistics

`GET /vm/{rid}/stats/{step}`

Retrieve statistics for a virtual machine

## Path parameters

- `rid` integer, required
- `step` 'minutely' | 'hourly' | 'daily' | 'weekly' | 'monthly' | 'yearly', required

## Response `200`

Success

- GithubComAlchemillahqSylveInternalAPIResponseArrayGithubComAlchemillahqSylveInternalDbModelsVmVMStats
  - `data` GithubComAlchemillahqSylveInternalDbModelsVmVMStats[]
    - `cpuUsage` number
    - `createdAt` string
    - `id` integer
    - `memoryUsage` number
    - `memoryUsed` number
    - `vmId` integer
  - `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)
