Skip to content

Metrics API

Metrics.

2 operations. Every call needs a session cookie or an Authorization: Bearer nct_… token unless marked Public. Conventions, errors and scopes

GET/servers/{serverId}/metrics

Host CPU, memory and disk over time

ParameterInTypeDescription
serverIdrequiredpathstring
rangequeryenum: 5m | 10m | 30m | 1h | 6h | 12h | 24h | 7d | 30dTime window; each response has at most 300 points
Response 200 · OK · application/json
ServerMetricsOutputBody
  • MetricPoint[] | nullrequired
  • retentionDaysinteger (int64)required
    How many days of history this server keeps; longer ranges only show what is retained
  • stepSecondsinteger (int64)required
    Bucket width of every point
Errors
  • 401Unauthorized
  • 403Forbidden
  • 404Not Found
  • 422Unprocessable Entity
  • 500Internal Server Error

Errors are RFC 9457 application/problem+json with a stable code field.

GET/services/{serviceId}/metrics

CPU and memory of a service's container

At most 300 points of stepSeconds each. range is one of 5m, 10m, 30m, 1h (default), 6h, 12h, 24h, 7d, 30d; longer ranges read downsampled tiers and carry the per-bucket peaks cpuMax/memMax. Memory is usage minus inactive file cache. retentionDays is how long the service's server keeps history.

ParameterInTypeDescription
serviceIdrequiredpathstring
rangequeryenum: 5m | 10m | 30m | 1h | 6h | 12h | 24h | 7d | 30d
Response 200 · OK · application/json
MetricsOutputBody
  • ServiceMetricPoint[] | nullrequired
  • retentionDaysinteger (int64)required
    Days of history kept on the service's server; longer ranges only show what is retained
  • stepSecondsinteger (int64)required
    Bucket width of every point
Errors
  • 401Unauthorized
  • 403Forbidden
  • 404Not Found
  • 422Unprocessable Entity
  • 500Internal Server Error

Errors are RFC 9457 application/problem+json with a stable code field.