Skip to content
Helicarrier Developers

Get metrics

Read service resource usage over a supported time window.

GET /api/services/{id}/metrics HTTPS
Request & response examples
Request example Server-side
curl --fail-with-body --request GET \
'https://app.helicarrier.xyz/api/services/YOUR_ID/metrics?range=1h' \
-H "Authorization: Bearer $HELI_API_KEY"
Response example 200
{
"range": "1h",
"series": [],
"summary": {
"samples": 0,
"instances": 1,
"current": null
}
}

Illustrative values · selected fields

Authorization

An account key with access, or a project/service key with metrics:read. The resource must be within the key’s project, service, and environment scope.

Authorization: Bearer <key> Key setup ↗

Path parameters

id string required

Service id.

Query parameters

range string optional

Window to report over: 1h, 6h, 24h or 7d. Defaults to 1h, so ask for a wider range when investigating a pattern rather than a spike.

Response 200

The range query accepts 1h, 6h, 24h, or 7d. Resource series aggregate the service’s replicas and are downsampled over time. They are not per-instance averages. Network rates are bytes per second; summary.instances reports the latest sampled replica count.

Examples show selected response fields with illustrative values. Your response can contain additional fields.

range string

Resolved metrics window.

series array

Downsampled metric series. CPU and memory aggregate the service replicas; network rates are bytes per second.

Child fields
  • ts integer

    Runtime log timestamp.

  • cpu number
  • memUsed integer
  • memMax integer
  • memLimit integer
  • netRxRate integer
  • netTxRate integer
summary object

Current metrics, percentiles, and the latest sampled instance count.

Child fields
  • samples integer

    Number of metric samples in the selected time window.

  • instances integer

    Effective number of instances.

  • current object | null

    Latest sampled metrics, or null when no samples exist.

Errors

401

The API key is missing, invalid, or revoked.

403

The caller or key scope does not permit this operation.

500

The operation could not be completed. Check resource state before retrying a write.

Error handling and safe retries
ALSO AVAILABLE VIA MCP

get_metrics

Required MCP arguments: id. Send path, query, and body fields together as tool arguments.

Connect your agent ↗