NetBox icon

NetBox

Consume NetBox API

Actions243

Inventory Item Role → Update

AI-generated

Overview

This node updates an existing Inventory Item Role in the NetBox API under the DCIM domain. It is useful for automating the modification of inventory item roles, such as changing their name, slug, color, description, tags, or custom fields. For example, it can be used to update the color code or description of a specific inventory item role based on its ID.

Use Case Examples

  1. Updating the name and description of an inventory item role by specifying its ID and new values.
  2. Changing the color hex code and tags of an inventory item role to reflect new categorization.

Properties

Name Meaning
Domain Specifies the domain of the NetBox API to use, here it is 'dcim' for inventory item roles.
Inventory Item Role ID The unique identifier of the inventory item role to update.
Update Fields Collection of fields to update on the inventory item role, including name, slug, color, description, tags, and custom fields.

Output

JSON

  • id - The unique identifier of the updated inventory item role.
  • name - The updated name of the inventory item role.
  • slug - The updated URL-friendly slug of the role.
  • color - The updated color hex code of the role.
  • description - The updated description of the inventory item role.
  • tags - The updated tags associated with the role.
  • custom_fields - The updated custom fields as a JSON object.

Dependencies

  • NetBox API
  • An API key credential for authentication

Troubleshooting

  • Ensure the Inventory Item Role ID is correct and exists in the NetBox instance to avoid 'not found' errors.
  • Verify that the API key credential is valid and has sufficient permissions to update inventory item roles.
  • Check that the color hex code is provided without the '#' symbol to prevent validation errors.
  • If updating custom fields, ensure the JSON object is correctly formatted to avoid parsing errors.

Links

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

Discussion