Route.Allow — the host-level access rules
described in Access control. All endpoints on this page
require the Access capability to be enabled; see
Management API for how capabilities work.
Method-qualified rules
A rule normally applies to every HTTP method at a path, the same as writing"/api/" directly under [Route.Allow] in config.toml. This API can
also scope a rule to one method by giving it separately from the path,
which is written in configuration as a METHOD:/path key (for example,
"PUT:/api/user/"). A method-qualified rule and a method-less rule at
the same path are independent entries — setting one does not affect the
other. When both match the same request, the more specific one wins: an
exact method match beats a GET rule matching a HEAD request, which
beats a method-less rule; this is only decided among rules that already
share the longest matching path, per Access control.
groups empty ([]) makes a rule effectively public rather than denying
everyone — see Denying access for how to
write a rule that actually rejects every request.
List access rules
method is omitted for a rule that applies to every method.
Set an access rule
path is required. groups is required and must not be null; an empty
list ("groups":[]) is valid and makes the rule effectively public, per
Access control — an empty group list does not mean
“deny all”. method is optional; omit it to set a rule that applies to
every HTTP method at path.
Delete an access rule
path and method (or the
method-less rule at path, if method is omitted). groups is ignored if
present in the request body. Unlike the list and update responses, this
response always includes method, as an empty string when the deleted
rule was method-less: