List CPU and memory use of all VPS
GET /api/v2/vps/metrics
Returns the latest CPU and memory use of every VPS on the account, for a table or an overview. Use GET /api/v2/vps/{id}/metrics for one VPS over time, with disk and network figures. The list is built from the VPS list you loaded shortly before. Call GET /api/v2/vps first. Without a recent list, metrics is empty. A stopped VPS has null values. So does a VPS without a sample from the last 5 minutes.
Authentication: An API key with the scope read:vm. About keys and scopes
Example
curl "https://cloud.hostup.se/api/v2/vps/metrics" \ -H "Authorization: Bearer $HOSTUP_API_KEY"Responses
200 CPU and memory use per VPS.
{ "metrics": [ { "vpsId": "vps_01hxa3b4c5d6e7f8g9h0j1k2m3", "metrics": { "cpuPercent": 12.4, "memoryPercent": 48.2 }, "recordedAt": "2026-04-27T12:00:00.000Z" } ]}Response fields
metricsarray of objectOne entry per VPS.
vpsIdstringThe VPS ID.
metricsobjectThe latest sample.
cpuPercentnumber or nullCPU use in percent. Null without a recent sample.
memoryPercentnumber or nullMemory use in percent of the VPS’s memory, 0 to 100. Null without a recent sample.
recordedAtstring or nullWhen the sample was taken. Null without a recent sample.
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. |
| 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. |