Route policy management for enabling/disabling endpoints.
Backed by DETS for persistence. Routes are keyed as "method|path"
(e.g. "get|/api/users"). Some routes are immutable (protected) and
cannot be toggled — configured via :api_management_console, :protected_routes.
Supports string prefixes/suffixes and regex patterns (matched against path and controller):
config :api_management_console,
protected_routes: ["/dev/dashboard", ~r{HealthController}]
Summary
Functions
Returns a specification to start this module under a supervisor.
Check if a path belongs to the API console itself.
Check if a route is enabled by key.
Returns all routes as a flat list.
Returns routes grouped by namespace, with enabled state and mutable flag.
Check if a request (method + path) is allowed.
Reset all policies — delete DETS file.
Toggle all mutable routes in a group. Returns [{key, old_state}].
Toggle a single route by key. Returns the old state.
Functions
Returns a specification to start this module under a supervisor.
See Supervisor.
Check if a path belongs to the API console itself.
Check if a route is enabled by key.
Returns all routes as a flat list.
Returns routes grouped by namespace, with enabled state and mutable flag.
Check if a request (method + path) is allowed.
Reset all policies — delete DETS file.
Toggle all mutable routes in a group. Returns [{key, old_state}].
Toggle a single route by key. Returns the old state.