NetBox icon

NetBox

Consume NetBox API

Actions243

Module Bay → Create

AI-generated

Overview

This node interacts with the NetBox API to create a new Module Bay resource within the DCIM domain. It is useful for network and data center administrators who want to automate the management of hardware components in their infrastructure. For example, users can create a module bay by specifying the device ID it belongs to, optionally naming the module bay, and providing additional details such as installed module ID, label, position, description, tags, and custom fields.

Use Case Examples

  1. Creating a new module bay for a specific device in a data center to keep track of hardware modules.
  2. Automating the addition of module bays during device provisioning workflows.

Properties

Name Meaning
Domain Specifies the domain of the NetBox API to use, here it is 'dcim' for data center infrastructure management.
Device ID The ID of the device to which the module bay belongs. This is required.
Name Optional name of the module bay.
Additional Fields Optional additional details for the module bay, including installed module ID, label, position, description, tags, and custom fields.

Output

JSON

  • id - The unique identifier of the created module bay.
  • device - The device ID to which the module bay belongs.
  • name - The name of the module bay.
  • installed_module - The ID of the installed module in the bay, if any.
  • label - Label assigned to the module bay.
  • position - Position of the module bay.
  • description - Description text of the module bay.
  • tags - Tags associated with the module bay.
  • custom_fields - Custom fields data for the module bay.

Dependencies

  • NetBox API
  • An API key credential for authenticating with the NetBox API

Troubleshooting

  • Ensure the device ID provided exists in NetBox; otherwise, the creation will fail.
  • Verify that the API key credential is valid and has permissions to create module bays in the DCIM domain.
  • If the node throws an error about missing required fields, check that the device ID and domain are correctly set.
  • Errors related to invalid JSON in custom fields can be resolved by ensuring the custom fields string is properly formatted JSON.

Links

Discussion