NetBox icon

NetBox

Consume NetBox API

Actions243

Rack Role → Create

AI-generated

Overview

This node interacts with the NetBox API to create a new Rack Role within the DCIM domain. It is useful for network administrators or data center managers who want to automate the addition of rack roles in their infrastructure management system. For example, it can be used to programmatically add roles like 'Server Rack', 'Network Rack', or 'Storage Rack' with specific attributes such as name, slug, and color.

Use Case Examples

  1. Creating a new rack role named 'Server Rack' with a specific slug and color to categorize racks in a data center.
  2. Automating the addition of multiple rack roles with descriptions and tags for better organization in NetBox.

Properties

Name Meaning
Domain Specifies the domain of the NetBox API to use, here it is set to 'dcim' for data center infrastructure management.
Name The name of the rack role to be created.
Slug A URL-friendly identifier for the rack role.
Color (Hex) A 6-character hexadecimal color code representing the rack role color.
Additional Fields Optional additional fields such as description, tags, and custom fields in JSON format to provide more details about the rack role.

Output

JSON

  • id - The unique identifier of the created rack role.
  • name - The name of the created rack role.
  • slug - The slug of the created rack role.
  • color - The color code of the created rack role.
  • description - Description of the rack role if provided.
  • tags - Tags associated with the rack role if provided.
  • custom_fields - Custom fields in JSON format if provided.

Dependencies

  • NetBox API
  • An API key credential for authentication

Troubleshooting

  • Ensure the API key credential is correctly configured and has permissions to create rack roles in NetBox.
  • Verify that the color code is a valid 6-character hexadecimal string to avoid validation errors.
  • Check that required fields like name, slug, and color are not empty to prevent request failures.
  • If the node throws an error, enabling 'Continue on Fail' will allow the workflow to proceed and output the error message for debugging.

Links

Discussion