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, racks, and other network resources. Specifically, the "Manufacturer" resource with the "Create" operation allows users to add new manufacturers into the NetBox system under the DCIM domain.

Typical use cases include automating the addition of hardware manufacturers when onboarding new network equipment or synchronizing manufacturer data from external inventory systems. For example, a network engineer could use this node to programmatically create a manufacturer entry named "Cisco" with additional descriptive details and tags, streamlining asset management workflows.

Properties

Name Meaning
Domain The NetBox API domain to target. Options: DCIM, IPAM, Tenancy, Extras, Virtualization, Circuits, Core, Users, Plugins, VPN, Wireless, Status. For this operation, must be "DCIM".
Name The name of the manufacturer to create.
Additional Fields Optional extra fields for the manufacturer:
- Slug URL-friendly slug; if left blank, it will be generated automatically.
- Description A textual description of the manufacturer.
- Tags Comma-separated list of tags associated with the manufacturer.
- Custom Fields JSON object containing any custom fields defined in NetBox for the manufacturer resource.

Output

The node outputs an array of items where each item contains a json property representing the response from the NetBox API after creating the manufacturer. This typically includes the newly created manufacturer's details such as its ID, name, slug, description, tags, and any custom fields.

No binary data output is produced by this node.

Dependencies

  • Requires access to a NetBox instance with API enabled.
  • Needs an API authentication token credential configured in n8n to authorize requests to the NetBox API.
  • The node depends on an internal helper function (executeOperation) to perform the actual API call based on the selected domain, resource, and operation.

Troubleshooting

  • Common Issues:

    • Invalid or missing API credentials will cause authentication failures.
    • Providing invalid field values (e.g., malformed JSON in custom fields) may result in API validation errors.
    • Network connectivity issues to the NetBox server can cause request timeouts or connection errors.
  • Error Messages:

    • Errors thrown during execution are logged to the console.
    • If "Continue on Fail" is enabled, errors are returned as part of the node's output JSON with an error property describing the issue.
    • Typical error messages might include authentication failures, validation errors from NetBox API, or network errors.
  • Resolution Tips:

    • Verify that the API token is valid and has sufficient permissions.
    • Ensure all required fields are provided and correctly formatted.
    • Check network connectivity and firewall settings between n8n and the NetBox server.

Links and References

Discussion