NetBox icon

NetBox

Consume NetBox API

Actions243

Inventory Item Role → Create

AI-generated

Overview

This node interacts with the NetBox API to create a new Inventory Item Role within the DCIM domain. It is useful for users who want to programmatically add roles for inventory items in their network infrastructure management system. For example, a network administrator can use this node to automate the creation of roles like 'Server', 'Router', or 'Switch' with specific attributes such as color coding, descriptions, and tags.

Use Case Examples

  1. Automate adding new inventory item roles during network setup.
  2. Integrate with other systems to dynamically create roles based on external data.

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 inventory item role to be created.
Slug A URL-friendly slug for the inventory item role, used for identification in URLs.
Additional Fields Optional additional fields for the inventory item role such as color, description, tags, and custom fields in JSON format.

Output

JSON

  • id - Unique identifier of the created inventory item role.
  • name - Name of the created inventory item role.
  • slug - Slug of the created inventory item role.
  • color - Color code associated with the role.
  • description - Description of the inventory item role.
  • tags - Tags assigned to the inventory item role.
  • custom_fields - Custom fields data for the inventory item role.

Dependencies

  • NetBox API with appropriate authentication credentials

Troubleshooting

  • Ensure the API credentials are correctly configured and have permissions to create inventory item roles.
  • Verify that the 'Name' and 'Slug' fields are unique and valid to avoid conflicts.
  • Check the format of additional fields, especially JSON in custom fields, to prevent parsing errors.
  • Common error messages include authentication failures, validation errors for missing or invalid fields, and network connectivity issues. Resolving these involves checking credentials, input data, and network status.

Links

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

Discussion