Users, groups and operators
Opening accounts and handing out enrolment codes, masked addresses and the recorded reveal, disabling an account, groups and the roles they carry, operator grants, and companies.
All routes below are under <ADMIN_URL>/admin/<company>/api and follow the
change rules in The admin console.
Accounts (role users)
GET users?limit=&after=lists the company's accounts in id order, at most 100 a page (50 unlesslimitsays), withnextnaming the cursor of the following page and no total.?email=<address>instead finds the one account that exact address signs in with;GET users/<user>reads one.- Every address in these answers is masked to its first character and domain
(
k***@acme.example).POST users/<user>/email/revealwith areasonshows one address whole, and is recorded before it is shown; when the record cannot be written, nothing is shown. - The accounts each operator is shown are counted per hour, and the read that takes
an operator to 1 000 in an hour is logged as
operator_reads_high.
Opening an account
POST users with {"email", "reason"} opens an active account that signs in with
that address and answers 201 with its id and the address masked; an address the
company already has is refused as email_taken. The account has no password until
its user enrols:
POST users/<user>/enrolmentwith areasonanswers201with an enrolment code valid for 72 hours, shown in that answer only and kept only as its digest. A new code replaces the earlier one.- With
"by_mail": truethe code is never shown: it goes to the account's address as a link to<issuer>/login/enrol#code=<code>and the answer says"mailed": true, so nobody at the console learns it. Without a relay the request answers503 mail_unavailableand issues nothing. - A code is refused for an account that already has a password
(
already_enrolled) or is disabled (account_disabled).
Disabling an account
POST users/<user>/disable and .../enable move an account between active and
disabled, each only from the other status. Disabling ends every session of the
account, telling its clients through the back channel, revokes every refresh
family, ends any console session of its own, and answers access_tokens_end_by,
when its access tokens stop working. A disabled account cannot sign in. Enabling
gives back only that: nothing ended comes back.
Groups (role users)
A group holds accounts, never another group, and carries roles your applications
read from UserInfo under the groups
scope.
GET groups,GET groups/<group>with its roles,GET groups/<group>/members.POST groupswith{"group", "description", "roles", "reason"}makes one (409 group_takenfor an id in use). A group id and a role are 1 to 64 lowercase letters, digits,-and_.POST groups/<group>/rolesreplaces its roles;POST groups/<group>/memberswith{"user"}adds an account (409 too_many_groupspast 100 groups for one account);POST groups/<group>/members/<user>/removetakes one out;POST groups/<group>/removedeletes the group with every membership.
Operators
Holding a role is what lets an operator give it.
GET operatorslists the current grants of the roles the viewer holds.POST operators/<user>/grants/<role>with{"reason", "valid_days"}grants a role to an active account of the company forvalid_days, 90 unless given and at most 365; no grant made in the console is permanent. A grant to oneself is refused asself_grant.POST operators/<user>/grants/<role>/revoketakes it away; the console of an operator with no role left ends at their next request.
Every grant and revoke is on the company's audit trail.
Companies (role companies, system console only)
GET <ADMIN_URL>/admin/system/api/companieslists them, at most 100 a page.POSTthere with{"id", "name", "reason"}creates a company, makes its database and its console's client, and serves its issuer at once (201). An id in use is refused ascompany_taken, except a company whose creation stopped before it was served, which the same request completes.POST .../companies/<id>/suspendand.../resumestop and restart serving a company's issuer, on this node at once and on the others at their next directory refresh. A suspended company answers404like a name that was never one;systemis never suspended.
A new company's first operator comes from
tessaridb-oauth bootstrap-operator --company <id> (see
Running it).