List device metrics
const url = 'https://example.com/api/v1.25f/devices/210404/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/devices/210404/metrics \ --header 'Authorization: <Authorization>'List all metrics available for a specific device, including available phases.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Device ID
Example
210404Responses
Section titled “Responses”Device metrics retrieved
object
Device ID
Array of metrics available for this device
object
Metric ID
Metric name
Unit of measurement
Metric data type
Available integer phase filter values for this device and metric.
Discovery responses can include 4 for legacy raw-data channels on some
Gridlink and Gridmate metrics, but clients should usually ignore 4
unless they explicitly need that legacy channel.
Available channel filter values for this device and metric.
Whether the metric should normally be interpreted as phase-specific
High-level phase shape for the metric family
Recommended default client behavior when grouping or summing rows
Aggregation guidance sourced from the metric definition
object
Customer-facing explanation for that aggregation rule
Examples
Example device metric discovery response
{ "device_id": 210404, "metrics": [ { "metric_id": 4001, "name": "gridmate_rms_voltage_v", "unit": "V", "data_type": "GAUGE", "available_phases": [ 1, 2, 3, 4 ], "available_channels": [], "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": "AVG", "description": "Time-weighted average RMS voltage" } ] }, { "metric_id": 7001, "name": "gridlink_voltage_histogram", "unit": "V", "data_type": "SUMMARY", "available_phases": [ 1, 2, 3 ], "available_channels": [], "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
object
Description of the error
Parent error if this is a nested error
Examples
Invalid time range error
{ "error": "time_to must be after time_from"}Unauthorized access error
{ "error": "invalid token"}