NetBox icon

NetBox

Consume NetBox API

Overview

This node integrates with the NetBox API, a popular infrastructure resource modeling tool used for managing IP addresses, devices, and network components. Specifically, the "Interface" resource with the "Get Connections" operation allows users to retrieve connection details related to a specific network interface within the DCIM domain of NetBox.

Typical use cases include:

  • Fetching connection information of a particular interface on a device to understand its network topology.
  • Automating audits or documentation of physical or virtual connections in a data center.
  • Integrating connection data into broader network management or monitoring workflows.

For example, a network engineer could use this node to programmatically retrieve all connections for an interface identified by its ID to verify cable connections or virtual links.

Properties

Name Meaning
Domain The domain of the NetBox API to interact with. Options include: DCIM, IPAM, Tenancy, Extras, Virtualization, Circuits, Core, Users, Plugins, VPN, Wireless, Status. For this operation, it must be "DCIM".
Interface ID The unique identifier (ID) of the interface whose connections are to be retrieved. This is a required string input.

Output

The node outputs JSON data representing the connections associated with the specified interface ID in NetBox. The structure typically includes details about connected interfaces or devices, connection types, and related metadata as provided by the NetBox API.

No binary data output is expected from this operation.

Dependencies

  • Requires an active connection to a NetBox instance via its REST API.
  • Requires an API authentication token or key configured in n8n credentials to authorize requests to the NetBox API.
  • The node depends on an internal helper function (executeOperation) to perform the actual API call.

Troubleshooting

  • Common Issues:

    • Invalid or missing Interface ID: The node requires a valid interface ID; ensure this is correctly provided.
    • Authentication errors: Ensure the API key or token credential is correctly configured and has sufficient permissions.
    • Network connectivity issues: Verify that n8n can reach the NetBox API endpoint.
    • Domain or Resource mismatch: The domain must be set to "DCIM" and resource to "interfaces" for this operation.
  • Error Messages:

    • Errors from the NetBox API (e.g., 404 Not Found) typically indicate that the interface ID does not exist.
    • Authentication errors will return messages related to unauthorized access.
    • The node logs errors internally and, if configured to continue on failure, outputs the error message in JSON format.

Links and References

Discussion