NetBox icon

NetBox

Consume NetBox API

Actions243

Device Role → Get

AI-generated

Overview

This node interacts with the NetBox API to retrieve information about a specific Device Role within the DCIM domain. It is useful for scenarios where you need to fetch detailed data about a device role by its ID, such as in network management or inventory automation workflows.

Use Case Examples

  1. Fetching details of a device role by its ID to display or process in an automation workflow.
  2. Integrating with NetBox to dynamically retrieve device role information for reporting or configuration purposes.

Properties

Name Meaning
Domain Specifies the domain of the NetBox API to use, here it is set to 'dcim' for device-related resources.
Device Role ID The unique identifier of the device role to retrieve. This is required to specify which device role to get.

Output

JSON

  • id - The unique identifier of the device role.
  • name - The name of the device role.
  • slug - A URL-friendly identifier for the device role.
  • color - The color associated with the device role for UI representation.
  • vmRole - Indicates if the device role is for virtual machines.
  • description - A textual description of the device role.
  • tags - Tags associated with the device role for categorization.

Dependencies

  • NetBox API with appropriate authentication credentials

Troubleshooting

  • Ensure the Device Role ID is correctly provided and exists in the NetBox instance.
  • Verify that the API credentials have sufficient permissions to access device roles in the DCIM domain.
  • Check network connectivity to the NetBox API endpoint.
  • Common error messages include authentication failures, resource not found (404), and permission denied (403). Resolving these involves verifying credentials, IDs, and user permissions.

Links

Discussion