Get VPS bandwidth usage for this period
GET /api/v2/vps/{id}/bandwidth
Shows how much bandwidth a VPS has used in the current allowance period and when the traffic happened. allowance holds the same numbers as bandwidth on GET /api/v2/vps/{id}. breakdown.days splits the traffic by calendar day in Europe/Stockholm time. breakdown.peakHour is the busiest hour. Traffic is measured on the VPS’s network interface. A single large transfer shows up as one busy day or hour. When breakdown.available is false, the traffic could not be measured. It does not mean there was no traffic. This also works for a suspended VPS and for a VPS over its allowance.
Authentication: An API key with the scope read:vm. About keys and scopes
Request
Path parameters
idstringrequiredvps_…).Example
curl "https://cloud.hostup.se/api/v2/vps/vps_01hxa3b4c5d6e7f8g9h0j1k2m3/bandwidth" \ -H "Authorization: Bearer $HOSTUP_API_KEY"Responses
200 Bandwidth use in the current period.
{ "id": "vps_01hxa3b4c5d6e7f8g9h0j1k2m3", "period": { "startAt": "2026-08-25T22:00:00.000Z", "endAt": "2026-09-25T22:00:00.000Z", "timezone": "Europe/Stockholm" }, "allowance": { "usedGb": 123.25, "limitGb": 2048, "inboundGb": 65.13, "outboundGb": 58.12, "usagePercent": 6.02, "hasOverage": false }, "breakdown": { "available": true, "reason": null, "source": "counters", "window": { "startAt": "2026-08-27T15:00:00.000Z", "endAt": "2026-08-31T12:00:00.000Z" }, "days": [ { "date": "2026-08-26", "inboundGb": 0, "outboundGb": 0 }, { "date": "2026-08-27", "inboundGb": 65.05, "outboundGb": 57.61 }, { "date": "2026-08-28", "inboundGb": 0.2, "outboundGb": 0.1 }, { "date": "2026-08-29", "inboundGb": 0.1, "outboundGb": 0.05 }, { "date": "2026-08-30", "inboundGb": 0, "outboundGb": 0 }, { "date": "2026-08-31", "inboundGb": 0.02, "outboundGb": 0.01 } ], "hasHourlyResolution": true, "hours": [ { "startAt": "2026-08-27T15:00:00.000Z", "inboundGb": 0.05, "outboundGb": 0.01 }, { "startAt": "2026-08-27T16:00:00.000Z", "inboundGb": 65, "outboundGb": 57.6 }, { "startAt": "2026-08-27T23:00:00.000Z", "inboundGb": 0.2, "outboundGb": 0.1 }, { "startAt": "2026-08-29T10:00:00.000Z", "inboundGb": 0.1, "outboundGb": 0.05 }, { "startAt": "2026-08-31T09:00:00.000Z", "inboundGb": 0.02, "outboundGb": 0.01 } ], "peakHour": { "startAt": "2026-08-27T16:00:00.000Z", "inboundGb": 65, "outboundGb": 57.6 } }}Response fields
idstringperiodobject or nullallowanceobjectbandwidth on GET /api/v2/vps/{id}.usedGbnumberlimitGbnumberinboundGbnumberoutboundGbnumberusagePercentnumberhasOveragebooleanbreakdownobjectavailablebooleandays is then empty and peakHour null.reasonstring or nullavailable is false. Null otherwise.sourcestring or nullcounters for exact interface counters. estimated for amounts worked out from sampled traffic rates. Null when unavailable. The same values as totals.source on GET /api/v2/vps/{id}/metrics. One of counters, estimated.windowobjectstartAtstring or nullendAtstring or nulldaysarray of objectdatestringinboundGbnumberoutboundGbnumberhasHourlyResolutionbooleanestimated breakdown with samples further apart than an hour. hours is then empty and peakHour null.hoursarray of objecthasHourlyResolution is false.startAtstringinboundGbnumberoutboundGbnumberpeakHourobject or nullhasHourlyResolution is false.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. |