---
title: "Get Volume Capacity History"
method: GET
path: "/volumes/{volume_id}/capacity-history"
tags: ["Volumes"]
---

# Get Volume Capacity History

`GET /volumes/{volume_id}/capacity-history`

## Request

- Base URL: `https://am1.portal.api.nasuni.com`
- URL: `https://am1.portal.api.nasuni.com/volumes/{volume_id}/capacity-history`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/nasuni/apis/portal-api/docs/volumes/:volume_id/capacity-history/get.ts> (a function with typed inputs; its response is checked against the schema)

Get capacity history for a volume.

Gated by ``can_view_volume_data``.

Returns 200 with an empty data_points list when no capacity data exists yet.
Returns 404 when the volume_id does not exist.

The existence check is a cheap PK lookup on ``volumes_v2`` — it avoids a
full ``volume_capacity_history`` scan (potentially millions of rows across
the tenant) for a not-found volume, and it distinguishes "unknown volume"
(404) from "known volume with no history yet" (200 with empty points).

Args:
    volume_id: The ID of the volume to retrieve capacity history for

Returns:
    VolumeCapacityHistoryResponseDto: Capacity history data points

## Path parameters

- `volume_id` string, required

## Response `200`

Volume capacity history retrieved successfully

- VolumeCapacityHistoryResponseDto
  - `volume_id` string, required
  - `data_points` VolumeCapacityHistoryPointDto[]
    - `timestamp` string, date-time, required
    - `bytes_in_cloud` integer, required

## Other responses

- `401`: Not authenticated
- `403`: Insufficient permissions
- `404`: Resource not found
- `422`: Invalid input data
- `500`: Internal server error

---

[API](https://skmtc.dev/nasuni/apis/portal-api.md) - [All operations](https://skmtc.dev/nasuni/apis/portal-api/llms.txt) - [OpenAPI document](https://skmtc.dev/nasuni/apis/portal-api/revisions/2a505bec6d14?raw)
