โ† API reference
Query / devices

metricHeartbeat

Analyze uptime and downtime for a heartbeat-style metric. Detects gaps where no value was received within the expected interval. Returns total uptime/downtime, uptime percentage, and individual gap periods. Uses Toolkit heartbeat_agg(). Requires metric:read permission.

Arguments

Heartbeat parameters

Returns MetricHeartbeatResult!

Scalar fields at a glance

metricIdMetricID!
uptimeSecondsFloat!
downtimeSecondsFloat!
uptimePercentFloat!
numGapsInt!
โ†— View the complete MetricHeartbeatResult type

Explore in a view

Device Fleet
View exact SDL
"""
Analyze uptime and downtime for a heartbeat-style metric. Detects gaps where no value was received within the expected interval. Returns total uptime/downtime, uptime percentage, and individual gap periods. Uses Toolkit heartbeat_agg(). Requires metric:read permission.
"""
metricHeartbeat(
  """Heartbeat parameters"""
  input: MetricHeartbeatInput!
): MetricHeartbeatResult! @topic(names: ["devices"])

Schema reference describes the API contract. Actual access is checked by the platform for every operation.