NetBox icon

NetBox

Consume NetBox API

Overview

This node integrates with the NetBox API, a popular infrastructure resource modeling tool. It allows users to interact with various NetBox domains and resources programmatically within n8n workflows. Specifically, the "Module Bay Template" resource's "Get" operation fetches details of a particular module bay template by its ID.

Common scenarios for this node include:

  • Automating inventory management by retrieving detailed hardware templates.
  • Integrating NetBox data into other systems or dashboards.
  • Triggering workflows based on specific NetBox resource states.

For example, you might use this node to get the configuration details of a module bay template in your DCIM domain to verify compatibility before deploying new hardware.

Properties

Name Meaning
Domain The NetBox API domain to target. Options: DCIM, IPAM, Tenancy, Extras, Virtualization, Circuits, Core, Users, Plugins, VPN, Wireless, Status. Default is DCIM.
Module Bay Template ID The numeric ID of the module bay template to retrieve. Required when Domain is DCIM, Resource is Module Bay Template, and Operation is Get.

Output

The node outputs JSON data representing the retrieved module bay template record from NetBox. This includes all fields returned by the NetBox API for that resource, such as template name, description, associated device types, and other metadata.

No binary data output is produced by this operation.

Dependencies

  • Requires an active connection to a NetBox instance via an API key credential configured in n8n.
  • The node depends on the external NetBox API being accessible and responsive.
  • No additional environment variables are required beyond the API authentication setup.

Troubleshooting

  • Common issues:
    • Invalid or missing Module Bay Template ID will cause the API call to fail.
    • Network connectivity problems to the NetBox server.
    • Insufficient permissions on the API token to access the requested resource.
  • Error messages:
    • Errors from the NetBox API (e.g., 404 Not Found if the ID does not exist).
    • Authentication errors if the API key is invalid or expired.
  • Resolutions:
    • Verify the Module Bay Template ID is correct and exists in NetBox.
    • Check network connectivity and firewall settings.
    • Ensure the API key has appropriate read permissions for the DCIM domain and Module Bay Template resource.
    • Enable "Continue on Fail" in the node settings to handle errors gracefully in workflows.

Links and References

Discussion