Compare a device to its peers
device_rankingAnswer 'is MY phone normal?' — rank one device's metric against other devices of the same model AND against the whole fleet, in one call. Returns the device's value, its 1-based rank, its percentile, and the cohort median / mean / min / max for both cohorts.
Prefer this over fetching device_summary + model_summary and comparing
by hand: it is a single call and gives the percentile directly. The model
cohort is the meaningful one for 'is this device degraded'; the fleet cohort
puts the model itself in context.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| metric | No | Which battery metric to rank on. One of: 'temperature_c' (mean battery temperature, C), 'max_temperature_c' / 'min_temperature_c' (hottest / coldest ever seen, C), 'battery_level_pct' (mean charge level, 0-100), 'discharge_hours' (hours to drain a full 100% - HIGHER means longer battery life), 'ac_charge_hours' / 'usb_charge_hours' / 'wireless_charge_hours' (hours to charge a full 100% on that source - LOWER means faster charging), 'awake_ratio' (fraction of time awake / screen-on, 0..1), 'snapshot_count' (how much data the device contributed), 'uptime_hours' (longest single uptime between reboots). | discharge_hours |
| device_uid | Yes | Stable device UUID returned by `devices`, `top_devices` or the share flow. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | Public BatterySnap page with this device's interactive battery history. | |
| brand | No | Lowercase Android brand identifier. | |
| fleet | No | Rank against every device in the fleet, all models mixed. | |
| model | No | Resolved model name (street name). | |
| value | No | This device's value for the metric. | |
| metric | No | The metric that was ranked. | |
| raw_model | No | Raw Build.MODEL identifier. | |
| device_uid | No | The device that was ranked. | |
| model_cohort | No | Rank against other devices of the SAME brand + model — the fair like-for-like comparison. | |
| snapshot_count | No | Snapshots behind this device's aggregate. |