NetBox icon

NetBox

Consume NetBox API

Actions243

Device Bay → Create

AI-generated

Overview

This node interacts with the NetBox API to create a new Device Bay within the DCIM domain. It is useful for network and data center administrators who want to automate the management of device bays in their infrastructure. For example, it can be used to programmatically add a new device bay to a specific parent device, including optional details like label, description, installed device, tags, and custom fields.

Use Case Examples

  1. Creating a new device bay named 'Bay A' under a device with ID 12345 in the DCIM domain.
  2. Adding metadata such as a physical label and description to the device bay during creation.

Properties

Name Meaning
Domain Specifies the domain of the NetBox API to use, here it is set to 'dcim' for data center infrastructure management.
Device ID The ID of the parent device under which the new device bay will be created.
Device Bay Name The name of the device bay to be created.
Additional Fields Optional additional properties for the device bay such as label, description, installed device ID, tags, and custom fields.

Output

JSON

  • id - Unique identifier of the created device bay.
  • name - Name of the created device bay.
  • label - Physical label of the device bay, if provided.
  • description - Description of the device bay, if provided.
  • installed_device - Details of the device installed in the bay, if any.
  • tags - Tags associated with the device bay.
  • custom_fields - Custom fields associated with the device 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 device bays in the DCIM domain.
  • Check that required fields like Device Bay Name and Device ID are not empty or null.
  • If the node throws an error, enabling 'Continue on Fail' will output the error message as JSON instead of stopping execution.

Links

Discussion