Python Inventory Examples
The inventory package lists WAN Edge devices, selects a device by system IP, and retrieves its running configuration.
List WAN Edge Devices
Section titled “List WAN Edge Devices”uv run -m inventory.devices --insecure listThis calls GET /system/device/vedges and displays UUID, model, certificate state, hostname, system IP, site ID, and management type.
Select a Device
Section titled “Select a Device”Filter the inventory by system IP:
uv run -m inventory.devices --insecure get 10.0.0.20The 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.
Retrieve Running Configuration
Section titled “Retrieve Running Configuration”Use the device UUID returned by list or get:
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.
Save Complete Responses
Section titled “Save Complete Responses”Table output intentionally shows only useful columns. Use JSON output or save the complete API response when developing an integration:
uv run -m inventory.devices --insecure --output json listuv run -m inventory.devices --insecure --save output/devices.json listSee Get Devices for the response structure and Overview and Setup for shared options.