NetBox icon

NetBox

Consume NetBox API

Actions243

Device Role → Delete

AI-generated

Overview

This node interacts with the NetBox API to delete a specific Device Role record within the DCIM domain. It is useful in scenarios where you need to programmatically remove device roles from your NetBox inventory, such as cleaning up obsolete roles or automating infrastructure management.

Use Case Examples

  1. Deleting a device role by specifying its ID to keep the NetBox inventory up to date.
  2. Automating the removal of device roles as part of a decommissioning workflow.

Properties

Name Meaning
Domain Specifies the domain of the NetBox API to target, here it is set to 'dcim' for device-related resources.
Device Role ID The unique identifier of the device role to be deleted.

Output

JSON

  • success - Indicates whether the deletion operation was successful.
  • message - A message providing additional information about the deletion result.

Dependencies

  • NetBox API
  • An API key credential for authentication

Troubleshooting

  • Ensure the Device Role ID provided is correct and exists in the NetBox instance to avoid 'not found' errors.
  • Verify that the API key credential has sufficient permissions to delete device roles.
  • Check network connectivity to the NetBox API endpoint.
  • Common error messages include authorization errors (due to invalid or insufficient API credentials) and resource not found errors (due to incorrect Device Role ID). Resolving these involves verifying credentials and input parameters.

Links

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

Discussion