UniFi Network icon

UniFi Network

Work with the UniFi Network API

Actions3

Overview

This node integrates with the UniFi Network API to retrieve information about network devices. Specifically, the "Device" resource with the "Get Many" operation allows users to fetch multiple devices associated with a specified site within their UniFi network. This is useful for network administrators who want to monitor or manage all devices in a particular site, such as listing all access points, switches, or clients connected to that site.

Practical examples include:

  • Retrieving all devices from a specific site to audit network hardware.
  • Automating inventory updates by periodically fetching device lists.
  • Integrating device data into dashboards or monitoring tools.

Properties

Name Meaning
Site ID The unique identifier of the site from which to retrieve all devices. This property is required and must be provided as a string.

Output

The node outputs JSON data representing an array of device objects retrieved from the specified site. Each device object contains detailed information about a network device managed by the UniFi controller, such as its ID, name, status, type, and other relevant metadata.

If the node supports binary data output (not explicitly shown in the code), it would typically represent device-related files or media, but this is not indicated here.

Dependencies

  • Requires an active connection to the UniFi Network API.
  • Needs an API key credential configured in n8n to authenticate requests.
  • The base URL for API requests is dynamically constructed using the host value from credentials.
  • The node depends on internal modules handling transport and routing logic to communicate with the UniFi API.

Troubleshooting

  • Invalid API Key: If the API key is incorrect or expired, the node will return an error indicating invalid authentication. Ensure the API key credential is correctly set up and has necessary permissions.
  • Missing Site ID: Since the Site ID is required, omitting it or providing an invalid value will cause the request to fail. Verify that the Site ID corresponds to an existing site in your UniFi controller.
  • Network Connectivity Issues: Failure to reach the UniFi API endpoint may result in timeouts or connection errors. Check network connectivity and firewall settings.
  • API Changes: If the UniFi API changes, some fields or endpoints might become deprecated. Keep the node and API documentation updated.

Links and References

Discussion