NetBox icon

NetBox

Consume NetBox API

Overview

This node integrates with the NetBox API, specifically allowing users to create a new Region within the DCIM domain. It is useful for network administrators and infrastructure managers who want to automate the management of geographical or logical regions in their data center inventory system. For example, you can use this node to programmatically add a new region such as "North America" or "Europe" to organize sites and devices geographically.

Properties

Name Meaning
Domain The domain of the NetBox API to interact with. Options include: DCIM, IPAM, Tenancy, etc.
Name The name of the region to create (e.g., "North America").
Additional Fields Optional extra fields for the region:
- Slug URL-friendly slug for the region; if left blank, it will be generated automatically.
- Parent Region ID Numeric ID of a parent region to nest this region under.
- Description Text description of the region.
- Tags Comma-separated list of tags for categorization.
- Custom Fields JSON object containing any custom fields defined for the region.

Output

The node outputs JSON data representing the newly created region object as returned by the NetBox API. This typically includes the region's ID, name, slug, description, parent region reference, tags, and any custom fields. The output does not include binary data.

Example output structure (simplified):

{
  "id": 123,
  "name": "North America",
  "slug": "north-america",
  "description": "Region covering North American sites",
  "parent": null,
  "tags": ["tag1", "tag2"],
  "custom_fields": {}
}

Dependencies

  • Requires an API key credential for authenticating with the NetBox API.
  • The node must be configured with the correct domain ("dcim") and resource ("regions") to create regions.
  • Network connectivity to the NetBox instance is necessary.

Troubleshooting

  • Common issues:
    • Authentication failures due to invalid or missing API credentials.
    • Validation errors if required fields like "Name" are missing or malformed.
    • API endpoint errors if the domain or resource is incorrectly set.
  • Error messages:
    • Errors from the NetBox API will be returned in the output JSON under an error field if "Continue on Fail" is enabled.
    • Typical error messages include "Unauthorized" (check API key), "Bad Request" (check input fields), or "Not Found" (incorrect domain/resource).
  • Resolutions:
    • Verify API credentials and permissions.
    • Ensure all required properties are provided and valid.
    • Confirm the domain is set to "dcim" and resource to "regions" for creating regions.

Links and References

Discussion