NetBox icon

NetBox

Consume NetBox API

Actions243

Device Role → Update

AI-generated

Overview

This node updates a Device Role resource in the NetBox API within the DCIM domain. It is useful for managing and modifying device role details such as name, slug, color, VM role status, description, tags, and custom fields in an automated workflow. For example, it can be used to update the color code or description of a device role programmatically based on changes in an inventory system.

Use Case Examples

  1. Updating the color and description of a device role to reflect new organizational standards.
  2. Modifying the VM role status of a device role to indicate whether it applies to virtual machines.

Properties

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

Output

JSON

  • id - ID of the updated device role record.
  • name - Name of the updated device role.
  • slug - Slug of the updated device role.
  • color - Color code of the updated device role.
  • vm_role - VM role status of the updated device role.
  • description - Description of the updated device role.
  • tags - Tags associated with the updated device role.
  • custom_fields - Custom fields of the updated device role.

Dependencies

  • NetBox API
  • An API key credential for authentication

Troubleshooting

  • Ensure the Device 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 device roles.
  • Check that the color code is in valid hexadecimal format to prevent validation errors.
  • 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