Edit an existing route in the Router
The Router API database is populated from the Publishing API, and also the deprecated router-data tool. Changes to routes should be made in the Publishing API as this is the authoritative source of the data, however, it can be helpful to make short term changes to routes manually, when going through the Publishing API would take too long, for example during an incident.
If there’s a need to edit a route in the database:
- Connect to a router-backend machine
in Carrenza, and
govukcli set-context integration govukcli ssh router_backend
- Connect to router-api and get the route
govuk_app_console router-api > r = Route.where(incoming_path: '/path-to-item').first
- Manipulate the
robject directly (see the documentation for available options), for example:
> r.route_type = 'exact' > r.save!
- Once you’ve edited the route appropriately and saved it, reload the router