NetBox icon

NetBox

Consume NetBox API

Actions243

Device → List

AI-generated

Overview

This node interacts with the NetBox API to list devices within the DCIM domain. It allows users to retrieve device information from NetBox, applying various filters and limits to control the returned data. This is useful for network administrators or IT professionals who want to automate the retrieval of device inventories, monitor device statuses, or integrate device data into other workflows.

Use Case Examples

  1. Retrieve all devices from a specific site by filtering with the site name.
  2. Get a limited number of devices with a specific status, such as 'active'.
  3. Fetch devices filtered by manufacturer or device role to analyze hardware distribution.

Properties

Name Meaning
Domain Specifies the domain of the NetBox API to use, here it is 'dcim' for device-related data.
Return All Determines whether to return all matching devices or limit the number of results.
Limit Maximum number of device results to return when 'Return All' is false.
Filters Collection of filters to narrow down the list of devices based on various attributes such as device ID, name, serial number, asset tag, site, status, role, tenant, manufacturer, model, platform, region, tags, and date ranges for creation or last update.

Output

JSON

  • id - Unique identifier of the device.
  • name - Name of the device.
  • serial - Serial number of the device.
  • asset_tag - Asset tag associated with the device.
  • site_id - Identifier of the site where the device is located.
  • site - Name (slug) of the site.
  • status - Current status of the device (e.g., active, offline).
  • role_id - Identifier of the device role.
  • role - Name (slug) of the device role.
  • tenant_id - Identifier of the tenant.
  • tenant - Name (slug) of the tenant.
  • device_type_id - Identifier of the device type.
  • manufacturer_id - Identifier of the manufacturer.
  • manufacturer - Name (slug) of the manufacturer.
  • model - Model name of the device.
  • platform_id - Identifier of the platform.
  • platform - Name (slug) of the platform.
  • has_primary_ip - Boolean indicating if the device has a primary IP address.
  • region_id - Identifier of the region.
  • region - Name (slug) of the region.
  • tag - Tag associated with the device.
  • created__lt - Filter for devices created before a specific date.
  • created__gt - Filter for devices created after a specific date.
  • last_updated__lt - Filter for devices last updated before a specific date.
  • last_updated__gt - Filter for devices last updated after a specific date.

Dependencies

  • NetBox API with appropriate API key credentials

Troubleshooting

  • Common issues include authentication failures due to invalid or missing API credentials. Ensure the NetBox API key is correctly configured.
  • Incorrect filter values or unsupported filter combinations may result in empty responses or errors. Verify filter parameters against NetBox API documentation.
  • Network connectivity issues to the NetBox server can cause request failures. Check network access and server availability.
  • If 'Return All' is false and the limit is set too low, the returned data may be incomplete. Adjust the limit or enable 'Return All' as needed.

Links

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

Discussion