List client sessions
unifi_list_client_sessionsRead past client connections, including disconnected clients, from a UniFi controller for a specified site and UTC time window (max 31 days). Returns session details: MAC, hostname, and data usage.
Instructions
Read retained past client connections, including disconnected clients, from the controller stat/session query endpoint. POST here only reads statistics. Rows carry only _id, mac, hostname, is_wired, 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.
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 |