Skip to content

List device metrics

GET
/devices/{device_id}/metrics
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.

device_id
required

Device ID

integer format: int64

Example

210404

Device metrics retrieved

Media typeapplication/json
object
device_id
required

Device ID

integer format: int64
metrics
required

Array of metrics available for this device

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
Allowed values: GAUGE COUNTER SUMMARY
available_phases
required

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.

Array<integer>
available_channels
required

Available channel filter values for this device and metric.

Array<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
Allowed values: non_phased phases_1_3_only phases_1_3_with_legacy_phase_4
recommended_phase_handling
required

Recommended default client behavior when grouping or summing rows

string
Allowed values: do_not_group_by_phase group_by_phases_1_3 group_by_phases_1_3_ignore_4_by_default
aggregation_guidance
required

Aggregation guidance sourced from the metric definition

Array<object>
object
agg_fn
required
string
Allowed values: AVG MAX SUM NONE
description
required

Customer-facing explanation for that aggregation rule

string
complex_payload_type
string
Allowed values: fuse_state_array voltage_histogram

Examples

Exampledevice_metrics

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"
}
]
}

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"
}