NetBox icon

NetBox

Consume NetBox API

Overview

This node interacts with the NetBox API to retrieve information about a specific Virtual Device Context within the "DCIM" domain. It is designed to fetch detailed data for a given Virtual Device Context by its unique identifier. This functionality is useful in network infrastructure automation scenarios where you need to programmatically access or verify virtual device context details managed in NetBox.

Practical examples:

  • Automatically retrieving configuration or status details of a virtual device context before performing further automation steps.
  • Integrating NetBox virtual device context data into monitoring dashboards or CMDB synchronization workflows.
  • Validating the existence and properties of a virtual device context during deployment pipelines.

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".
Virtual Device Context ID The numeric ID of the virtual device context record to retrieve from NetBox. This uniquely identifies the virtual device context within the DCIM domain.

Output

The node outputs JSON data representing the full details of the requested Virtual Device Context as returned by the NetBox API. This typically includes all attributes and metadata associated with that virtual device context, such as name, description, related devices, and other configuration parameters.

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 NetBox API being accessible and the provided Virtual Device Context ID existing in the specified NetBox instance.
  • Proper permissions on the API key are necessary to read virtual device context data.

Troubleshooting

  • Common issues:

    • Invalid or missing Virtual Device Context ID will result in errors or empty responses.
    • Network connectivity problems or incorrect API credentials will cause authentication or connection failures.
    • Selecting a domain other than "dcim" while trying to get a Virtual Device Context will not work because this resource belongs specifically to the DCIM domain.
  • Error messages:

    • Errors indicating "Not Found" usually mean the Virtual Device Context ID does not exist.
    • Authentication errors suggest invalid or expired API credentials.
    • Timeout or connection refused errors indicate network or server availability issues.
  • Resolutions:

    • Verify the Virtual Device Context ID is correct and exists in NetBox.
    • Check and update API credentials if needed.
    • Ensure the NetBox server URL is reachable from the n8n environment.

Links and References

Discussion