NetBox icon

NetBox

Consume NetBox API

Actions243

Rack Reservation → Create

AI-generated

Overview

This node interacts with the NetBox API to create a rack reservation within the DCIM domain. It is useful for automating the process of reserving specific units in a rack for a user, including optional details like tenant, tags, and custom fields. Practical examples include reserving rack units for new hardware installations or managing rack space allocation in data centers.

Use Case Examples

  1. Reserve units 1, 2, and 3 in rack ID 10 for user ID 5 with a description 'Reserved for new servers'.
  2. Create a rack reservation with additional tenant information and tags for better organization.

Properties

Name Meaning
Domain Specifies the domain of the NetBox API to use, here it is 'dcim' for data center infrastructure management.
Rack ID The identifier of the rack where units are to be reserved.
Units Comma-separated list of unit numbers to reserve in the rack.
User ID The identifier of the user for whom the rack units are reserved.
Description A textual description of the rack reservation.
Additional Fields Optional additional information such as Tenant ID, Tags, and Custom Fields in JSON format.

Output

JSON

  • id - Unique identifier of the created rack reservation.
  • rack_id - ID of the rack where the reservation was made.
  • units - List of reserved unit numbers.
  • user_id - ID of the user associated with the reservation.
  • description - Description provided for the reservation.
  • tenant - Tenant ID if specified.
  • tags - Tags associated with the reservation.
  • custom_fields - Custom fields data in JSON format.

Dependencies

  • NetBox API
  • API key credential for authentication

Troubleshooting

  • Ensure the Rack ID and User ID are valid and exist in the NetBox system to avoid errors.
  • Verify that the units specified are available and not already reserved to prevent conflicts.
  • Check API credentials and permissions if authentication errors occur.
  • If the node throws an error, enabling 'Continue on Fail' will output the error message as JSON instead of stopping execution.

Links

  • NetBox API Documentation - Official documentation for the NetBox API, useful for understanding available endpoints and data structures.

Discussion