Skip to content

update_route

Patch fields on an existing static route.

Side effects:

  • Modifies the named route in place. Only fields supplied in updates change; everything else is preserved.
  • Takes effect immediately on the gateway’s routing table.
  • Mutates controller state. Use dry_run=True to preview the change without applying.
update_route(route_id="65f...", updates={"enabled": False})
ParameterTypeRequiredDefaultDescription
route_idstringyesThe _id from list_routes.
updatesobjectyesPartial route record. Common keys: name, enabled, static-route_network (destination CIDR), static-route_nexthop (next-hop IP), static-route_distance.
controllerstringno”default”Name of the UniFi controller to target. Defaults to "default".
dry_runbooleannofalsePreview the change without applying it. Returns the predicted change set.