unifi_list_client_sessions
Retrieve retained past client sessions from UniFi Network, including disconnected clients, within a UTC time window. Returns session IDs, MACs, association time, duration, and traffic bytes.
Instructions
Read retained past client connections, including disconnected clients, from the controller stat/session query endpoint. POST here only reads statistics. Returns controller session IDs, MACs, assoc_time (epoch seconds), duration (seconds), rx_bytes/tx_bytes (controller perspective), and roaming_sessions when available. Use an explicit UTC epoch-second window (max 31 days). If mayBeTruncated is true, split the time window (overlap boundaries and deduplicate IDs) or filter by MAC. The controller ignores offset pagination. Records reflect controller retention and may omit ongoing sessions. Wi-Fi association/bytes do not establish end-to-end Internet success. Do not interpret controller is_guest as proof of a person's identity or ownership.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| end | Yes | End Unix epoch seconds; after start and at most 31 days later | |
| mac | No | Optional client MAC address | |
| limit | No | Maximum records; a full result requires a narrower window or MAC filter | |
| start | Yes | Start Unix epoch seconds, not milliseconds | |
| siteReference | Yes | Site internalReference from unifi_list_sites (often default), not the Integration API UUID |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| end | Yes | ||
| data | Yes | ||
| count | Yes | ||
| limit | Yes | ||
| start | Yes | ||
| coverage | Yes | ||
| mayBeTruncated | Yes |