Get VPS metrics

GET /api/v2/vps/{id}/metrics

Return time-series CPU, memory, disk, and network metrics for one VPS.

Get {id} from GET /api/v2/vps data[].id.

Use timeframe to choose the sampled window; canonical values are hour, day, week, month, and year.

Common duration aliases such as 1h, 24h, 1d, 7d, 30d, and 1y are accepted and normalized in the response.

Units are encoded in field names; sample rates use binary KB/s and MB/s (1 KB/s = 1024 B/s).

totals carries exact selected-window byte totals from cumulative traffic counters (source: "counters") that are independent of chart resolution and robust across restarts; summary totals are the same values expressed in decimal GB.

Window totals are not the monthly bandwidth allowance usage — they only cover the selected range.

diskDailyAverage reports rolling per-day disk read/write volume over the trailing 7 days — the same basis as the platform's disk fair-use monitoring — independent of timeframe.

window describes the actual sample coverage, and telemetry.available: false means metrics could not be collected (empty samples must not be read as zero usage).

Missing aggregates are null, never zero.

VPS Services Monitoring & Jobs

Authentication

Required API scope: read:vm

Authenticate with an API key in the Authorization: Bearer <token> header.

Context

Path Parameters

id string required Example: vps_01hxa3b4c5d6e7f8g9h0j1k2m3

Public VPS ID. Get it from GET /api/v2/vps data[].id. Do not invent this value; use the exact ID returned by the referenced API response.

Query Parameters

timeframe string · default: hour · enum

Metrics window to load. Defaults to hour when omitted. Use canonical values where possible; aliases 1h, 24h, 1d, 7d, 30d, and 1y are accepted.

hour
day
week
month
year

Headers

Authorization Bearer <token>
Accept application/json

Responses

200 VPS metrics.
id string · Example: vps_01hxa3b4c5d6e7f8g9h0j1k2m3
timeframe string · enum · Example: hour
hour
day
week
month
year
samples array<object>
samples[].recordedAt string required · Example: 2026-04-27T12:00:00.000Z
samples[].cpuUsagePercent number required · Example: 12.5
samples[].memoryUsagePercent number required · Example: 42.5
samples[].diskReadMbPerSecond number required · Example: 1.05
samples[].diskWriteMbPerSecond number required · Example: 0.52
samples[].networkInboundKbPerSecond number required · Example: 2048
samples[].networkOutboundKbPerSecond number required · Example: 4096
summary object

Rolled-up aggregates over the sampled window. Averages are time-weighted over the actual sample intervals; totals are decimal GB (1 GB = 10^9 bytes) derived from the same byte counts exposed under totals. null means the aggregate is unavailable for the window — zero is always a measured zero.

summary.avgDiskReadMbPerSecond number · nullable required · Example: 0.8

Nullable: may be null when not applicable.

summary.avgDiskWriteMbPerSecond number · nullable required · Example: 0.4

Nullable: may be null when not applicable.

summary.peakDiskReadMbPerSecond number · nullable required · Example: 2.1

Nullable: may be null when not applicable.

summary.peakDiskWriteMbPerSecond number · nullable required · Example: 1.3

Nullable: may be null when not applicable.

summary.totalDiskReadGb number · nullable required · Example: 0.75

Nullable: may be null when not applicable.

summary.totalDiskWriteGb number · nullable required · Example: 0.42

Nullable: may be null when not applicable.

summary.totalNetworkInboundGb number · nullable required · Example: 1.25

Nullable: may be null when not applicable.

summary.totalNetworkOutboundGb number · nullable required · Example: 2.5

Nullable: may be null when not applicable.

summary.avgNetworkInboundKbPerSecond number · nullable required · Example: 2048

Nullable: may be null when not applicable.

summary.avgNetworkOutboundKbPerSecond number · nullable required · Example: 4096

Nullable: may be null when not applicable.

summary.peakNetworkInboundKbPerSecond number · nullable required · Example: 8192

Nullable: may be null when not applicable.

summary.peakNetworkOutboundKbPerSecond number · nullable required · Example: 16384

Nullable: may be null when not applicable.

totals object

Exact transfer totals for the selected window in bytes. source: "counters" means the value comes from cumulative traffic counters — authoritative, unaffected by chart resolution, and robust across server restarts. source: "estimated" means it was integrated from the sampled rate series. null bytes mean the total is unknown for the window (never zero). Window totals are separate from the monthly bandwidth allowance usage and only cover the selected time range.

totals.network object required
totals.network.inboundBytes integer · nullable required · Example: 935403011173

Nullable: may be null when not applicable.

totals.network.outboundBytes integer · nullable required · Example: 743130341033

Nullable: may be null when not applicable.

totals.network.source string · nullable · enum required · Example: counters

Nullable: may be null when not applicable.

counters
estimated
totals.disk object required
totals.disk.readBytes integer · nullable required · Example: 805306368

Nullable: may be null when not applicable.

totals.disk.writeBytes integer · nullable required · Example: 450971566

Nullable: may be null when not applicable.

totals.disk.source string · nullable · enum required · Example: counters

Nullable: may be null when not applicable.

counters
estimated
diskDailyAverage object

Rolling daily disk activity: total bytes read/written over the trailing basisDays days divided by that day count. This uses the same measurement basis as the platform's disk fair-use monitoring, and is independent of the selected timeframe. null means unknown for the period — never zero.

diskDailyAverage.basisDays integer required · Example: 7
diskDailyAverage.readBytesPerDay integer · nullable required · Example: 11504566272

Nullable: may be null when not applicable.

diskDailyAverage.writeBytesPerDay integer · nullable required · Example: 6442450944

Nullable: may be null when not applicable.

window object

Actual coverage of the returned samples. startAt/endAt are the first and last sample timestamps (null when no samples exist); aggregationWindowSeconds is the sampling resolution the series was aggregated to (null when unknown).

window.startAt string · nullable required · Example: 2026-04-27T11:00:00.000Z

Nullable: may be null when not applicable.

window.endAt string · nullable required · Example: 2026-04-27T12:00:00.000Z

Nullable: may be null when not applicable.

window.sampleCount integer required · Example: 60
window.aggregationWindowSeconds integer · nullable required · Example: 60

Nullable: may be null when not applicable.

telemetry object

Availability of the telemetry pipeline itself. When available is false the samples list is empty because metrics could not be collected — treat the data as unavailable, not as zero usage.

telemetry.available boolean required · Example: true
telemetry.reason string · nullable required · Example: null

Nullable: may be null when not applicable.

400 Invalid request. The response body is an RFC 7807 Problem Details document.
type string · Example: https://developer.hostup.se/errors/invalid_request
title string · Example: Validation failed
status integer · Example: 400
detail string · Example: The request body failed validation.
code string · Example: invalid_request

Stable machine-readable code. Branch on this field, not on detail.

instance string · Example: /api/v2/orders
requestId string · Example: req_01hxa3b4c5d6e7f8g9h0j1k2m3
timestamp string · Example: 2026-04-27T12:34:56.000Z
errors array<object>

Field-level validation errors when code is invalid_request.

errors[].pointer string required · Example: /items/0/eppCode
errors[].detail string required · Example: `eppCode` is required for this transfer.
errors[].code string required · Example: missing_required
extensions object
401 Unauthorized. Authentication is required.
type string · Example: https://developer.hostup.se/errors/invalid_request
title string · Example: Validation failed
status integer · Example: 400
detail string · Example: The request body failed validation.
code string · Example: invalid_request

Stable machine-readable code. Branch on this field, not on detail.

instance string · Example: /api/v2/orders
requestId string · Example: req_01hxa3b4c5d6e7f8g9h0j1k2m3
timestamp string · Example: 2026-04-27T12:34:56.000Z
errors array<object>

Field-level validation errors when code is invalid_request.

errors[].pointer string required · Example: /items/0/eppCode
errors[].detail string required · Example: `eppCode` is required for this transfer.
errors[].code string required · Example: missing_required
extensions object
403 Forbidden. The caller lacks a required scope or does not own the resource.
type string · Example: https://developer.hostup.se/errors/invalid_request
title string · Example: Validation failed
status integer · Example: 400
detail string · Example: The request body failed validation.
code string · Example: invalid_request

Stable machine-readable code. Branch on this field, not on detail.

instance string · Example: /api/v2/orders
requestId string · Example: req_01hxa3b4c5d6e7f8g9h0j1k2m3
timestamp string · Example: 2026-04-27T12:34:56.000Z
errors array<object>

Field-level validation errors when code is invalid_request.

errors[].pointer string required · Example: /items/0/eppCode
errors[].detail string required · Example: `eppCode` is required for this transfer.
errors[].code string required · Example: missing_required
extensions object
404 Not found. The resource does not exist or is not owned by the caller.
type string · Example: https://developer.hostup.se/errors/invalid_request
title string · Example: Validation failed
status integer · Example: 400
detail string · Example: The request body failed validation.
code string · Example: invalid_request

Stable machine-readable code. Branch on this field, not on detail.

instance string · Example: /api/v2/orders
requestId string · Example: req_01hxa3b4c5d6e7f8g9h0j1k2m3
timestamp string · Example: 2026-04-27T12:34:56.000Z
errors array<object>

Field-level validation errors when code is invalid_request.

errors[].pointer string required · Example: /items/0/eppCode
errors[].detail string required · Example: `eppCode` is required for this transfer.
errors[].code string required · Example: missing_required
extensions object
429 Rate limited. Retry after the limit resets. 429 responses include Retry-After seconds plus X-RateLimit-* headers.
type string · Example: https://developer.hostup.se/errors/invalid_request
title string · Example: Validation failed
status integer · Example: 400
detail string · Example: The request body failed validation.
code string · Example: invalid_request

Stable machine-readable code. Branch on this field, not on detail.

instance string · Example: /api/v2/orders
requestId string · Example: req_01hxa3b4c5d6e7f8g9h0j1k2m3
timestamp string · Example: 2026-04-27T12:34:56.000Z
errors array<object>

Field-level validation errors when code is invalid_request.

errors[].pointer string required · Example: /items/0/eppCode
errors[].detail string required · Example: `eppCode` is required for this transfer.
errors[].code string required · Example: missing_required
extensions object
500 Internal error. Retry later or contact support if the issue persists.
type string · Example: https://developer.hostup.se/errors/invalid_request
title string · Example: Validation failed
status integer · Example: 400
detail string · Example: The request body failed validation.
code string · Example: invalid_request

Stable machine-readable code. Branch on this field, not on detail.

instance string · Example: /api/v2/orders
requestId string · Example: req_01hxa3b4c5d6e7f8g9h0j1k2m3
timestamp string · Example: 2026-04-27T12:34:56.000Z
errors array<object>

Field-level validation errors when code is invalid_request.

errors[].pointer string required · Example: /items/0/eppCode
errors[].detail string required · Example: `eppCode` is required for this transfer.
errors[].code string required · Example: missing_required
extensions object
GET https://cloud.hostup.se/api/v2/vps/{id}/metrics
For AI assistants
View as Markdown
cURL
curl -X GET "https://cloud.hostup.se/api/v2/vps/vps_01hxa3b4c5d6e7f8g9h0j1k2m3/metrics" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Accept: application/json"
Response
{
  "id": "vps_01hxa3b4c5d6e7f8g9h0j1k2m3",
  "timeframe": "hour",
  "samples": [
    {
      "recordedAt": "2026-04-27T12:00:00.000Z",
      "cpuUsagePercent": 12.5,
      "memoryUsagePercent": 42.5,
      "diskReadMbPerSecond": 1.05,
      "diskWriteMbPerSecond": 0.52,
      "networkInboundKbPerSecond": 2048,
      "networkOutboundKbPerSecond": 4096
    }
  ],
  "totals": {
    "network": {
      "inboundBytes": 7549747200,
      "outboundBytes": 15099494400,
      "source": "counters"
    },
    "disk": {
      "readBytes": 805306368,
      "writeBytes": 450971566,
      "source": "counters"
    }
  },
  "diskDailyAverage": {
    "basisDays": 7,
    "readBytesPerDay": 11504566272,
    "writeBytesPerDay": 6442450944
  },
  "window": {
    "startAt": "2026-04-27T11:00:00.000Z",
    "endAt": "2026-04-27T12:00:00.000Z",
    "sampleCount": 60,
    "aggregationWindowSeconds": 60
  },
  "telemetry": {
    "available": true,
    "reason": null
  },
  "summary": {
    "avgDiskReadMbPerSecond": 0.8,
    "avgDiskWriteMbPerSecond": 0.4,
    "peakDiskReadMbPerSecond": 2.1,
    "peakDiskWriteMbPerSecond": 1.3,
    "totalDiskReadGb": 0.81,
    "totalDiskWriteGb": 0.45,
    "totalNetworkInboundGb": 7.55,
    "totalNetworkOutboundGb": 15.1,
    "avgNetworkInboundKbPerSecond": 2048,
    "avgNetworkOutboundKbPerSecond": 4096,
    "peakNetworkInboundKbPerSecond": 8192,
    "peakNetworkOutboundKbPerSecond": 16384
  }
}