Skip to main content

Module routes

Module routes 

Source
Expand description

Admin API endpoints for route CRUD. Mutations rewrite the in-memory gateway config and trigger validation + graph recompilation via SharedState::reload.

Functionsยง

create_route ๐Ÿ”’
POST /api/routes โ€” creates a new route from the JSON body, then revalidates and recompiles all route graphs. Returns 201 Created with {"status": "created"} on success.
delete_route ๐Ÿ”’
DELETE /api/routes/{name} โ€” removes the named route, then revalidates and recompiles. Returns {"status": "deleted"} on success.
get_route ๐Ÿ”’
GET /api/routes/{name} โ€” returns the named route as JSON.
list_routes ๐Ÿ”’
GET /api/routes โ€” returns all configured routes as a JSON array.
router
Builds the router for the /api/routes endpoints.
update_route ๐Ÿ”’
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.