Skip to content

Python Inventory Examples

The inventory package lists WAN Edge devices, selects a device by system IP, and retrieves its running configuration.

Terminal window
uv run -m inventory.devices --insecure list

This calls GET /system/device/vedges and displays UUID, model, certificate state, hostname, system IP, site ID, and management type.

Filter the inventory by system IP:

Terminal window
uv run -m inventory.devices --insecure get 10.0.0.20

The command passes the system IP as the deviceIP query parameter. This differs from several real-time endpoints, where the query parameter is named deviceId even though its value is also a system IP.

Use the device UUID returned by list or get:

Terminal window
uv run -m inventory.devices --insecure config <device-uuid>

This calls GET /template/config/running/{deviceId} and prints the configuration text when table output is selected.

Table output intentionally shows only useful columns. Use JSON output or save the complete API response when developing an integration:

Terminal window
uv run -m inventory.devices --insecure --output json list
uv run -m inventory.devices --insecure --save output/devices.json list

See Get Devices for the response structure and Overview and Setup for shared options.