Skip to content
HelicarrierDevelopers

Get metrics

Read service resource usage over a supported time window.

GET/api/services/{id}/metricsHTTPS
Request & response examples
Request exampleServer-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 example200
{
"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

idstringrequired

Service id.

Query parameters

rangestringoptional

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.

rangestring

Resolved metrics window.

seriesarray

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

Child fields
  • tsinteger

    Runtime log timestamp.

  • cpunumber
  • memUsedinteger
  • memMaxinteger
  • memLimitinteger
  • netRxRateinteger
  • netTxRateinteger
summaryobject

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

Child fields
  • samplesinteger

    Number of metric samples in the selected time window.

  • instancesinteger

    Effective number of instances.

  • currentobject | 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