NetBox icon

NetBox

Consume NetBox API

Overview

This node interacts with the NetBox API, specifically targeting the "Module Bay Template" resource within the "DCIM" domain. The "List" operation retrieves a collection of module bay templates from NetBox, optionally filtered by various criteria. This is useful for users who want to programmatically access and manage hardware configuration templates related to device bays in their data center infrastructure.

Practical examples include:

  • Fetching all module bay templates to audit or inventory hardware configurations.
  • Filtering module bay templates by device type or module type to find compatible hardware setups.
  • Limiting results to a subset for performance or pagination purposes.

Properties

Name Meaning
Domain The domain of the NetBox API to interact with. Options: DCIM, IPAM, Tenancy, Extras, Virtualization, Circuits, Core, Users, Plugins, VPN, Wireless, Status. For this operation, must be "DCIM".
Return All Boolean flag indicating whether to return all available results (true) or limit the number of results (false). Only shown when Domain is "DCIM", Resource is "module-bay-templates", and Operation is "list".
Limit Maximum number of results to return if "Return All" is false. Minimum value is 1. Only shown when "Return All" is false and other conditions as above. Default is 50.
Filters A collection of optional filters to narrow down the list of module bay templates. Available filters:
- Module Bay Template ID (number)
- Device Type ID (number)
- Module Type ID (number)
- Name (string)

Output

The node outputs an array of JSON objects representing module bay templates retrieved from the NetBox API. Each object corresponds to a single module bay template and contains its properties as returned by the API, such as IDs, names, and associated device or module types.

If the node encounters an error during execution and "Continue on Fail" is enabled, it outputs an object with an error field containing the error message.

No binary data output is produced by this node.

Dependencies

  • Requires a valid API key credential for authenticating with the NetBox API.
  • The node depends on the external NetBox API service being accessible.
  • No additional environment variables are required beyond the API authentication setup.

Troubleshooting

  • Common Issues:

    • Authentication failures due to invalid or missing API credentials.
    • Network connectivity issues preventing access to the NetBox API endpoint.
    • Incorrect filter values causing no results to be returned.
    • Exceeding API rate limits if requesting too many records without proper pagination.
  • Error Messages:

    • Errors thrown by the node will be logged to the console.
    • If "Continue on Fail" is enabled, errors are returned as part of the node's output under the error field.
    • To resolve errors, verify API credentials, check network connectivity, and ensure filter parameters are valid.

Links and References

Discussion