Skip to content

list_routes

List user-defined static (next-hop) routes on the controller.

Side effects: None (read-only).

Returns one record per route with _id, name, type, static-route_network (destination CIDR), static-route_nexthop (next-hop IP), static-route_distance, and enabled. Empty on a gateway with no custom routes (the default route is managed by the WAN config, not listed here).

list_routes(controller="default")
ParameterTypeRequiredDefaultDescription
controllerstringno”default”Name of the UniFi controller to target. Defaults to "default".