List client history
unifi_list_client_historyRetrieve offline UniFi client inventory for a site to identify disconnected devices. Returns MACs, names, first/last seen times, wired status, and total count.
Instructions
List historical/offline client inventory using the controller v2 API. Returns OFFLINE clients only — currently connected clients are excluded, so merge with unifi_list_clients for a full inventory. Includes names, MACs, first_seen and last_seen epoch seconds when available. This is inventory, not session history; use unifi_list_client_sessions for past connections. Requires controller history API-key support; errors never mean zero activity. Retention depends on the controller. Returns the most recently seen clients first, up to limit, with totalCount; truncated: true means less recently seen clients were left out, so raise limit (narrowing withinHours drops those same clients). Rows carry only mac, hostname, display_name, first_seen, last_seen, is_wired, status.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum clients, most recently seen first | |
| withinHours | No | Lookback in hours, up to one year; does not extend controller retention | |
| siteReference | Yes | Site internalReference from unifi_list_sites (often default), not the Integration API UUID |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes | ||
| count | Yes | ||
| limit | Yes | ||
| coverage | Yes | ||
| truncated | Yes | ||
| totalCount | Yes | ||
| withinHours | Yes |