Get a volume
GET /api/v2/volumes/{id}
Gets one block storage volume: its name, size and the VPS it is attached to. actions says whether it can be attached, detached or deleted now. Only volumes on your active Cloud VPS are found. The data can be up to 30 seconds old.
Authentication: An API key with the scope read:vm. About keys and scopes
Request
Path parameters
idstringrequiredThe volume ID (
vol_…).Example
curl "https://cloud.hostup.se/api/v2/volumes/vol_01hxa3b4c5d6e7f8g9h0j1k2m3" \ -H "Authorization: Bearer $HOSTUP_API_KEY"Responses
200 The volume.
{ "id": "vol_01hxa3b4c5d6e7f8g9h0j1k2m3", "displayId": "database-data", "name": "database-data", "sizeGb": 100, "status": "attached", "attachedVpsId": "vps_01hxa3b4c5d6e7f8g9h0j1k2m3", "actions": { "canAttach": { "allowed": true, "reason": null }, "canDetach": { "allowed": true, "reason": null }, "canDelete": { "allowed": false, "reason": "Detach this volume before deleting it." } }, "createdAt": "2026-04-27T12:00:00.000Z"}Response fields
idstringThe volume ID (
vol_…).displayIdstringDisplay label. The same as
name.namestringThe volume name. A generated disk name when no name was given at creation.
sizeGbintegerSize in GB.
statusstringattached: on the VPS in attachedVpsId. available: detached, with its data kept. creating and deleting: an operation is running. error: the volume is in an unexpected state. One of available, attached, creating, deleting, error.attachedVpsIdstring or nullThe VPS the volume is attached to (
vps_…). null when it is detached.actionsobjectWhat you can do with the volume right now. A closed gate has a
reason.canAttachobjectAttach the volume to a VPS. Also allowed while it is attached: attaching it to another VPS moves it.
allowedbooleantrue when the action is allowed now.reasonstring or nullWhy the action is not allowed.
null when it is.canDetachobjectDetach the volume from its VPS.
allowedbooleantrue when the action is allowed now.reasonstring or nullWhy the action is not allowed.
null when it is.canDeleteobjectDelete the volume. Closed while it is attached.
allowedbooleantrue when the action is allowed now.reasonstring or nullWhy the action is not allowed.
null when it is.createdAtstring or nullWhen the volume was created (ISO 8601).
null when the creation time is not recorded.Errors
Errors are Problem Details with a stable code. Branch on the code, not on the text.
| 400 | Invalid request. The response body is an RFC 7807 Problem Details document. |
| 401 | Unauthorized. Authentication is required. |
| 403 | Forbidden. The caller lacks a required scope or does not own the resource. |
| 404 | volume_not_found: no volume with that ID on your account. |
| 429 | Rate limited. Retry after the limit resets. 429 responses include Retry-After seconds plus X-RateLimit-* headers. |
| 500 | Internal error. Retry later or contact support if the issue persists. |