Get a device KPI

Computes a state-based KPI defined in the device's firmware (for example running hours) over a period, as one value or as a time series.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

Permission: View permission on the device.

The value is the weighted total of time spent in the KPI's state values (hours × coefficient), in the KPI's unit; derive rates yourself (value / hours in range). summary (min, max, mean, first, last, plus total when aggregation=sum) is present only for time series with numeric values. 400 also for state_aggregate (no longer supported), invalid bucket/sub_bucket/aggregation/interval, and KPIs not exposed here (metric KPIs: use /devices/{device_id}/metrics).

Path Params
string
required

Device id

string
required

KPI type as configured on the device's firmware (see GET /devices/{machine_id}/kpis, field type, e.g. uptime). Only KPIs with variable_type = states are supported.

Query Params
string
required

Start of the period

string
required

End of the period

boolean
Defaults to false

true returns one total over the whole period in data (a number) instead of a time series. Allowed: true, false.

string

Calendar bucket of the time series. Mutually exclusive with aggregate_interval_in_minutes. Allowed: hour, day, week, month.

int32

Fixed bucket length in minutes (> 0). If neither this nor bucket is sent, an interval is chosen from the period length.

string

Finer calendar unit used inside each bucket (or inside the whole period with single_value=true), then reduced with aggregation. Must be strictly finer than bucket (hour < day < week < month). Allowed: hour, day, week, month.

string
Defaults to sum

How sub-buckets are combined. Values other than sum require sub_bucket. Allowed: sum, avg, min, max.

Responses

Language
Credentials
Header
LoadingLoading…
Response
Choose an example:
application/json