Device uptime statistics

Uptime for every device the token and the device filters select, over one
window [start, end), computed from every heartbeat_status_change event
in the window. Per device: uptime (online seconds / window seconds; At
Risk counts against it), seconds and shares per status, transitions, and
the status at the window start and end. Also a summary (devices in scope,
never reported, evaluated, matching, an uptime histogram and the mean) and
paging.

A window with no status change is filled with the status known at its
start: the heartbeat_last_status of the first event after the window,
else the device's current status. Any part of a window before the device
partition's device_events retention cutoff is no_data (a device whose
current status is never_reported stays never_reported).

Devices that had not reported by the window end are excluded from the
evaluation and counted in summary.never_reported.

Device filters are the ones GET /devices accepts, as
<field>_<operator>=<value> (for example device_type_id_eq,
tags_incany, heartbeat_status_in); the most used are listed below.
heartbeat_status_* filters use the raw devices-table vocabulary
(online, offline, idle, never_reported). A stats key under an
operator this route does not support (for example uptime_eq or
start_gte) is a 400, not an ignored filter.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Query Params
date-time

Window start, RFC 3339. Defaults to end minus 24 hours. The window must span at least one whole second and at most 366 days.

date-time

Window end (exclusive), RFC 3339. Defaults to now. Must be after start.

string
enum
Defaults to uptime

Sort key, ascending; prefix with - for descending. Ties are broken by unique_id ascending.

integer
≥ 1
Defaults to 1

Page number. A page past the end returns an empty resources.

integer
0 to 1000
Defaults to 100

Devices per page. 0 returns only the summary and total.

string
Defaults to 0.5,0.9,0.95,0.99,1

Uptime histogram edges: strictly ascending numbers in (0, 1], comma-separated or repeated. With a last edge of 1 the top bucket is exactly 1; with a lower last edge the top bucket closes at 1 inclusive.

boolean
Defaults to false

Include never-reported devices in resources (they stay out of the evaluation).

string

Keep devices whose status at the window start is one of these, comma-separated: online, at_risk, offline, never_reported, no_data.

string

Keep devices whose status at the window end is one of these, comma-separated: online, at_risk, offline, never_reported, no_data.

number
0 to 1

Keep devices whose uptime is less than this fraction.

number
0 to 1

Keep devices whose uptime is less than or equal to this fraction.

number
0 to 1

Keep devices whose uptime is greater than this fraction.

number
0 to 1

Keep devices whose uptime is greater than or equal to this fraction.

number
0 to 1

Keep devices whose online_share is less than this fraction.

number
0 to 1

Keep devices whose online_share is less than or equal to this fraction.

number
0 to 1

Keep devices whose online_share is greater than this fraction.

number
0 to 1

Keep devices whose online_share is greater than or equal to this fraction.

number
0 to 1

Keep devices whose at_risk_share is less than this fraction.

number
0 to 1

Keep devices whose at_risk_share is less than or equal to this fraction.

number
0 to 1

Keep devices whose at_risk_share is greater than this fraction.

number
0 to 1

Keep devices whose at_risk_share is greater than or equal to this fraction.

number
0 to 1

Keep devices whose offline_share is less than this fraction.

number
0 to 1

Keep devices whose offline_share is less than or equal to this fraction.

number
0 to 1

Keep devices whose offline_share is greater than this fraction.

number
0 to 1

Keep devices whose offline_share is greater than or equal to this fraction.

number
0 to 1

Keep devices whose never_reported_share is less than this fraction.

number
0 to 1

Keep devices whose never_reported_share is less than or equal to this fraction.

number
0 to 1

Keep devices whose never_reported_share is greater than this fraction.

number
0 to 1

Keep devices whose never_reported_share is greater than or equal to this fraction.

number
0 to 1

Keep devices whose no_data_share is less than this fraction.

number
0 to 1

Keep devices whose no_data_share is less than or equal to this fraction.

number
0 to 1

Keep devices whose no_data_share is greater than this fraction.

number
0 to 1

Keep devices whose no_data_share is greater than or equal to this fraction.

number
≥ 0

Keep devices whose transitions count is less than this value.

number
≥ 0

Keep devices whose transitions count is less than or equal to this value.

number
≥ 0

Keep devices whose transitions count is greater than this value.

number
≥ 0

Keep devices whose transitions count is greater than or equal to this value.

Partial case-insensitive search term

string

Only devices in this fleet.

string

Only devices of this company.

string

Only devices of this company and its descendants.

string
string

Only devices whose device type has this role.

string

A software version filter in the form <package>[:<operator><version>]. Supported operators include: =, >, >=, <, <=. Multiple parameters can be provided to filter by several packages.

string

Only devices related to this rule. ingestor_id, command_id, setting_id and scheduled_job_id work the same way.

string

SIM filters (sims_<column>, with operator suffixes) work as on GET /devices.

Responses

400

Invalid window, order_by, paging, bucket, status or result-filter value, a stats key under an unsupported operator, or unparseable device filters.

401

You are not authorized

500

An unexpected error was encountered.

Language
Credentials
Header
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json