Get metrics
Read service resource usage over a supported time window.
Request & response examples
curl --fail-with-body --request GET \ 'https://app.helicarrier.xyz/api/services/YOUR_ID/metrics?range=1h' \ -H "Authorization: Bearer $HELI_API_KEY"const response = await fetch( "https://app.helicarrier.xyz/api/services/YOUR_ID/metrics?range=1h", { method: "GET", headers: { Authorization: `Bearer ${process.env.HELI_API_KEY}` } });const data = await response.json();if (!response.ok) { throw new Error(`HTTP ${response.status}: ${data.error}`);}// Inspect data; avoid logging secret responses.import osimport requests
response = requests.request( "GET", "https://app.helicarrier.xyz/api/services/YOUR_ID/metrics?range=1h", headers={ "Authorization": f"Bearer {os.environ['HELI_API_KEY']}" }, timeout=30,)response.raise_for_status()data = response.json()# Inspect data; avoid logging secret responses.{ "range": "1h", "series": [], "summary": { "samples": 0, "instances": 1, "current": null }}Illustrative values · selected fields
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
-
tsintegerRuntime log timestamp.
-
cpunumber -
memUsedinteger -
memMaxinteger -
memLimitinteger -
netRxRateinteger -
netTxRateinteger
summary object Current metrics, percentiles, and the latest sampled instance count.
Child fields
-
samplesintegerNumber of metric samples in the selected time window.
-
instancesintegerEffective number of instances.
-
currentobject | nullLatest 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.
get_metrics
Required MCP arguments: id. Send path, query,
and body fields together as tool arguments.