List metrics
GET
/metrics
const url = 'https://example.com/api/v1.25f/metrics';const options = {method: 'GET', headers: {Authorization: '<Authorization>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://example.com/api/v1.25f/metrics \ --header 'Authorization: <Authorization>'List all available metric definitions.
Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”Metric list retrieved
Media typeapplication/json
object
metrics
required
Array of metric definitions
Array<object>
object
metric_id
required
Metric ID
integer format: int32
name
required
Metric name
string
unit
required
Unit of measurement
string
data_type
required
Metric data type
string
description
required
Metric description and usage notes
string
is_phased
required
Whether the metric should normally be interpreted as phase-specific
boolean
phase_behavior
required
High-level phase shape for the metric family
string
recommended_phase_handling
required
Recommended default client behavior when grouping or summing rows
string
aggregation_guidance
required
Aggregation guidance sourced from the metric definition
Array<object>
object
agg_fn
required
string
description
required
Customer-facing explanation for that aggregation rule
string
complex_payload_type
string
Examples
Examplemetrics
Example metric definitions response
{ "metrics": [ { "metric_id": 4007, "name": "gridmate_total_pos_active_energy_wh", "unit": "Wh", "data_type": "COUNTER", "description": "Gridmate per-phase positive active energy counter.", "is_phased": true, "phase_behavior": "phases_1_3_with_legacy_phase_4", "recommended_phase_handling": "group_by_phases_1_3_ignore_4_by_default", "aggregation_guidance": [ { "agg_fn": "SUM", "description": "Sum energy deltas" } ] }, { "metric_id": 7001, "name": "gridlink_voltage_histogram", "unit": "V", "data_type": "SUMMARY", "description": "Gridlink voltage distribution histogram.", "is_phased": true, "phase_behavior": "phases_1_3_only", "recommended_phase_handling": "group_by_phases_1_3", "aggregation_guidance": [ { "agg_fn": "SUM", "description": "Merge histograms by summing bucket counts" } ], "complex_payload_type": "voltage_histogram" } ]}default
Section titled “default”Error response with details
Media typeapplication/json
object
error
required
Description of the error
string
parent
Parent error if this is a nested error
string
Examples
Invalid time range error
{ "error": "time_to must be after time_from"}Unauthorized access error
{ "error": "invalid token"}