Actions88
- Module Actions
- Platform Actions
- Device Actions
- Device Bay Actions
- Device Bay Template Actions
- Device Role Actions
- Device Type Actions
- Interface Actions
- Manufacturer Actions
- Module Bay Actions
- Module Bay Template Actions
- Module Type Actions
- Region Actions
- Site Actions
- Virtual Chassis Actions
- Virtual Device Context Actions
Overview
This node integrates with the NetBox API, specifically targeting the "Site" resource to retrieve racks associated with a given site. It is useful in scenarios where users need to programmatically access infrastructure details such as rack layouts within a specific data center or site managed in NetBox. For example, network engineers can automate inventory management by fetching all racks for a particular site to update documentation or trigger further automation workflows.
Properties
| Name | Meaning |
|---|---|
| Domain | The domain of the NetBox API to use. Options include: DCIM, IPAM, Tenancy, Extras, Virtualization, Circuits, Core, Users, Plugins, VPN, Wireless, Status. For this operation, it must be "DCIM". |
| Site ID | The unique identifier of the site from which to retrieve racks. |
| Return All | Whether to return all racks or limit the number of results. |
| Limit | Maximum number of racks to return if "Return All" is false. Minimum value is 1, default is 50. |
Output
The output is a JSON array containing rack objects retrieved from the specified site in NetBox. Each object represents a rack with its associated properties as defined by the NetBox API schema (e.g., name, id, location, etc.). This allows downstream nodes or workflows to process detailed rack information.
If binary data were involved (not applicable here), it would typically represent files or images related to the racks, but this operation only returns JSON data.
Dependencies
- Requires an active connection to the NetBox API via an API key credential configured in n8n.
- The node depends on the NetBox API being accessible and the user having appropriate permissions to read site and rack data.
- No additional external services are required beyond the NetBox API.
Troubleshooting
- Common Issues:
- Invalid or missing Site ID will result in errors or empty results.
- Network connectivity issues to the NetBox API endpoint.
- Insufficient permissions on the API token to access site or rack data.
- Error Messages:
- Errors during execution are logged and, if "Continue on Fail" is enabled, returned as part of the output JSON under an
errorfield. - Typical error messages may include authentication failures, resource not found, or rate limiting by the NetBox API.
- Errors during execution are logged and, if "Continue on Fail" is enabled, returned as part of the output JSON under an
- Resolutions:
- Verify the Site ID is correct and exists in NetBox.
- Ensure the API key has read permissions for the DCIM domain.
- Check network connectivity and API endpoint URL configuration.
- Enable "Continue on Fail" to handle errors gracefully in workflows.
Links and References
- NetBox API Documentation
- NetBox Official Website
- n8n Documentation on Creating Custom Nodes