UniFi Network icon

UniFi Network

Work with the UniFi Network API

Actions3

Overview

This node integrates with the UniFi Network API, specifically allowing users to retrieve detailed information about a particular device within a specified site. It is useful in network management scenarios where administrators need to programmatically access device data such as status, configuration, or metadata from their UniFi-managed network.

Practical examples include:

  • Automatically fetching device details for inventory or monitoring purposes.
  • Integrating device information into dashboards or alerting systems.
  • Using device data to trigger workflows based on device state or attributes.

Properties

Name Meaning
Site ID The unique identifier of the site within the UniFi network where the device is located.
Device ID The unique identifier of the device to retrieve information about.

Output

The node outputs JSON data representing the detailed information of the requested device. This typically includes device attributes such as its status, configuration parameters, network interfaces, and other metadata provided by the UniFi Network API.

No binary data output is indicated.

Dependencies

  • Requires an active connection to the UniFi Network API.
  • Needs an API key credential configured in n8n for authentication.
  • The base URL for API requests is dynamically set based on the host provided in credentials.
  • The node uses HTTP headers including X-API-KEY for authorization and expects JSON content.

Troubleshooting

  • Invalid API Key: If the API key is incorrect or expired, the node will fail to authenticate. The error message will indicate an invalid API key. To resolve, verify and update the API key credential.
  • Missing Required Properties: Both Site ID and Device ID are required. Omitting either will cause the node to fail. Ensure these inputs are correctly provided.
  • Network Connectivity Issues: Failure to reach the UniFi API endpoint due to network problems or incorrect host configuration will result in errors. Verify network access and host settings.
  • Permission Issues: The API key must have sufficient permissions to access device information. Insufficient privileges will cause authorization errors.

Links and References

Discussion