Unifi icon

Unifi

Interact with Unifi API

Sites and Monitoring → Historical Stats

AI-generated

Summary

Retrieve historical statistics for a specified Unifi site by its site ID.

Inputs

  • siteId (required) — The identifier of the Unifi site to fetch historical stats for, found in the "name" field from the "Get Sites" operation.
  • splitIntoItems — Whether to split each item in the response into separate items (true) or return the whole raw response as a single item (false). Defaults to true.

Output shape

a list of JSON objects representing historical statistics data if splitIntoItems is true; otherwise a single JSON object containing the raw API response

If splitIntoItems is true, the operation returns each element in the response array as an individual item. If false, returns the entire response as one item. Errors related to authentication or permissions will be raised as node errors.

Examples

Example 1: Fetch historical stats for site named 'default' and split each stat into a separate item.

Set resource to 'Sites and Monitoring', operation to 'Historical Stats', and provide siteId as 'default'. Enable splitIntoItems to true (default).

Example 2: Fetch historical stats for a site without splitting the response items.

Set resource to 'Sites and Monitoring', operation to 'Historical Stats', provide the siteId, and set splitIntoItems to false to receive the entire API response in one item.

Discussion