Get the storage allowance of a VPS
GET /api/v2/vps/{id}/storage-quota
Returns how much attachable storage the VPS has bought and how much of it is free. It also returns the size of the main disk. Attachable storage is the pool that extra disks come from: new disks with POST /api/v2/vps/{id}/actions/add-disk and growth of disks other than the main disk. When a disk needs more than attachable.availableGb, buy more with additionalStorageGb on POST /api/v2/vps/{id}/actions/config. Then read this endpoint again. The main disk grows with the storageGb option instead.
Authentication: An API key with the scope read:vm. About keys and scopes
Request
Path parameters
idstringrequiredThe VPS ID (
vps_…).Example
curl "https://cloud.hostup.se/api/v2/vps/vps_01hxa3b4c5d6e7f8g9h0j1k2m3/storage-quota" \ -H "Authorization: Bearer $HOSTUP_API_KEY"Responses
200 The attachable storage pool and the main disk size.
{ "attachable": { "purchasedGb": 100, "usedGb": 40, "availableGb": 60, "upgradeAvailable": { "allowed": true, "reason": null } }, "mainDisk": { "purchasedGb": 50 }}Response fields
attachableobjectStorage for extra disks.
purchasedGbnumberAttachable storage bought for the VPS, in GB. Set with the
additionalStorageGb option.usedGbnumberAttachable storage used by extra disks, in GB.
availableGbnumberAttachable storage still free for new disks or growth of extra disks, in GB.
upgradeAvailableobjectallowed is true when the VPS already has attachable storage. It is false when none has been bought yet, even when it can be bought.allowedbooleanreasonstring or nullcodestring or nullA machine-readable code for why the action is blocked.
mainDiskobjectThe main disk.
purchasedGbnumberSize of the main disk you pay for, in GB. Set with the
storageGb option.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 | Not found. The resource does not exist or is not owned by the caller; code is vps_not_found. |
| 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. |