Skip to main content

update_route

Function update_route 

Source
async fn update_route(
    __arg0: State<Arc<SharedState>>,
    __arg1: Path<String>,
    __arg2: Json<RouteConfig>,
) -> impl IntoResponse
Expand description

PUT /api/routes/{name} — replaces the named route with the JSON body (the path name overrides any name in the body), then revalidates and recompiles. Returns {"status": "updated"} on success.

Errors: 404 Not Found if the route does not exist (unlike policies, routes are not upserted); 400 Bad Request if recompilation fails.