get
https://api.things5.digital/v1/kpis/
Fans out the same KPI query to every device in devices[] and returns one entry per device. When single_value=true, an additional fleet block aggregates the numeric results across the fleet.
Recent Requests
Log in to see full request history
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Loading…
📘 About the fleet block
- Emitted only when single_value=true and at least one device returned a numeric result.
- count is the number of devices that produced a numeric value; errors and non-numeric results are excluded from the aggregation.
- unit is set only when every numeric result reports the same unit; otherwise it is null. This typically happens when mixing total (e.g. kWh) and rate/percentage results
- don't do that in a single fleet call.
Per-device errors
When a device fails (KPI not found on its firmware, permission denied, or invalid params for that device's KPI), its entry in data carries an error field instead of
data/unit. The overall request still returns 200 OK so successful devices are not dropped. Possible values:
-
kpi_not_found
-
forbidden
-
value_field_not_supported_for_states
-
invalid_state_aggregate:
Errors 400 Bad Request
Returned when the request itself is malformed (missing devices[], from, or to, or malformed dates).
state_aggregate values (state KPIs only)
state_aggregate values (state KPIs only)| Value | Meaning | Unit returned |
|---|---|---|
total (default) | Sum of duration_in_hours × coefficient over matching state intervals. | KPI's configured unit (e.g. kWh, h). |
rate | Fraction of the requested range spent in the matching state(s), 0–1. | null (dimensionless). |
percentage | Same as rate, scaled to 0–100. | "%". |
