Users and roles
List permissions
GET /api/v1/admin/permissions
Who can use this: Site admins As Markdown
Permissions come with the software, since each one only means something where the code checks for it, so there is no way to add one here. Give them to roles; a site admin holds them all already.
cURL
Perl
homelab-cli
Copy
curl -s 'https://api.mailmasker.org/api/v1/admin/permissions' \
-H "Authorization: Bearer $TOKEN"
use Mojo::Base -strict;
use Mojo::UserAgent;
my $ua = Mojo::UserAgent->new;
my $res = $ua->get('https://api.mailmasker.org/api/v1/admin/permissions',
{ Authorization => "Bearer $ENV{TOKEN}" })->result;
die $res->code, ' ', ($res->json('/error') // $res->message), "\n" unless $res->is_success;
print $res->body, "\n";
homelab-cli admin permissions list
Response 200 OK
Copy
[
{
"id": 1,
"name": "audit.view",
"description": "View the system audit log (own entries always allowed; this grants viewing other users' entries too)"
},
{
"id": 3,
"name": "domains.catchall",
"description": "Manage domain catch-all routing + domain send-as (the myaccount \"Domain catch-all routing\" area)"
},
{
"id": 2,
"name": "metrics.view",
"description": "View the fleet metrics dashboard (Prometheus-backed) in myaccount"
}
]