Skip to content

Admin API ​

The admin API under /api/* manages Authora. The admin interface uses it, and scripts can too; see Call the admin API.

  • Authentication: an Access Token of Authora with the Scope authora.admin, as Authorization: Bearer …. ID Tokens and Session cookies are not accepted. The admin interface's own cookie is accepted only together with the header X-Authora-Admin: 1 from the same origin.
  • Authorization: every action needs the Permission in the tables below. Permissions come from the User's Roles, directly or through Groups, and are loaded on every request.
  • Format: JSON in and out; enums as strings. Errors are problem details: 400 (validation), 401, 403, 404, 409 (conflict with the current state).
  • Lists: GET /api/users and GET /api/audit-events are paged: they take page (from 1) and pageSize and return {"items": […], "total": n}. The other lists return a plain JSON array.
  • No CORS: the admin API cannot be called from other origins in a browser.
  • Schema: the OpenAPI document and Swagger UI (/swagger) are served in Development.

Current User ​

EndpointPermissionDescription
GET /api/me–The signed-in User and their Permissions.

Users ​

EndpointPermissionDescription
GET /api/usersusers.readList; filter by state and search (part of the Email, first or last name). pageSize 1 to 100, default 25.
GET /api/users/{id}users.readDetails.
POST /api/usersusers.createCreate, with email, firstName, lastName and an initial password (12 to 128 characters).
PUT /api/users/{id}users.updateChange Email or name.
DELETE /api/users/{id}users.deleteDelete.
POST /api/users/{id}/deactivateusers.manage-accessBlock sign-in and end all Sessions and tokens.
POST /api/users/{id}/activateusers.manage-accessAllow sign-in again.
POST /api/users/{id}/unlockusers.manage-accessEnd a lockout after failed sign-ins.
POST /api/users/{id}/revoke-sessionsusers.manage-accessSign out everywhere: end all Sessions and tokens.
PUT /api/users/{id}/passwordusers.set-passwordSet a new password; ends all Sessions and tokens.
GET /api/users/{id}/rolesusers.readDirectly assigned Roles and Roles from Groups.
PUT /api/users/{id}/roles/{roleId}users.assign-rolesAssign a Role.
DELETE /api/users/{id}/roles/{roleId}users.assign-rolesRemove a Role.
GET /api/users/{id}/permissionsusers.readEffective Permissions and their source.
GET /api/users/{id}/groupsusers.readGroups the User is a member of.

Groups ​

EndpointPermissionDescription
GET /api/groupsgroups.readList.
GET /api/groups/{id}groups.readDetails.
POST /api/groupsgroups.createCreate, with name (a-z, 0-9, ., _, -), displayName, description.
PUT /api/groups/{id}groups.updateChange.
DELETE /api/groups/{id}groups.deleteDelete.
PUT /api/groups/{id}/roles/{roleId}groups.assign-rolesAssign a Role (not admin).
DELETE /api/groups/{id}/roles/{roleId}groups.assign-rolesRemove a Role.
GET /api/groups/{id}/membersgroups.readMembers.
PUT /api/groups/{id}/members/{userId}groups.manage-membersAdd a member.
DELETE /api/groups/{id}/members/{userId}groups.manage-membersRemove a member.

Roles and Permissions ​

EndpointPermissionDescription
GET /api/rolesroles.readList.
GET /api/roles/{id}roles.readDetails with Permissions.
POST /api/rolesroles.createCreate, with name (a-z, 0-9, ., _, -), displayName, description.
PUT /api/roles/{id}roles.updateChange.
DELETE /api/roles/{id}roles.deleteDelete (not System Roles).
PUT /api/roles/{id}/permissions/{permissionId}roles.grant-permissionsGrant a Permission (not on admin).
DELETE /api/roles/{id}/permissions/{permissionId}roles.grant-permissionsRevoke a Permission (not on admin).
GET /api/permissionspermissions.readAll Permissions.

Scopes ​

EndpointPermissionDescription
GET /api/scopesscopes.readList.
GET /api/scopes/{id}scopes.readDetails.
POST /api/scopesscopes.createCreate, with name, displayName (shown on the consent screen), description.
PUT /api/scopes/{id}scopes.updateChange the display name or description.
DELETE /api/scopes/{id}scopes.deleteDelete. 409 while Clients use it, unless ?force=true, which removes it from them. System Scopes cannot be deleted.

Clients ​

EndpointPermissionDescription
GET /api/clientsclients.readList.
GET /api/clients/{id}clients.readDetails, including Redirect URIs, Scopes, Secrets (without values) and isFirstParty.
POST /api/clientsclients.createRegister, with name, type (Public or Confidential), and optionally grantTypes, accessTokenTTL, refreshTokenTTL (seconds), redirectUris, scopeIds. For a Confidential Client, the response contains its first Secret, once.
PUT /api/clients/{id}clients.updateChange name, Grant Types or token lifetimes.
DELETE /api/clients/{id}clients.deleteDelete, with all its codes and Grants.
POST /api/clients/{id}/enableclients.updateEnable.
POST /api/clients/{id}/disableclients.updateDisable; revokes all its Grants.
PUT /api/clients/{id}/first-partyclients.manage-first-partyMark as first-party: no consent screen.
DELETE /api/clients/{id}/first-partyclients.manage-first-partyMark as third-party again.
POST /api/clients/{id}/redirect-urisclients.updateAdd a Redirect URI (not while first-party).
DELETE /api/clients/{id}/redirect-urisclients.updateRemove a Redirect URI.
PUT /api/clients/{id}/scopes/{scopeId}clients.updateAllow a Scope (not while first-party).
DELETE /api/clients/{id}/scopes/{scopeId}clients.updateDisallow a Scope.
PUT /api/clients/{id}/served-scopes/{scopeId}clients.updateLet this Confidential Client introspect tokens with the Scope.
DELETE /api/clients/{id}/served-scopes/{scopeId}clients.updateStop serving the Scope.
POST /api/clients/{id}/secretsclients.manage-secretsCreate a Secret, optionally with expiresAt (default 1 year, at most 2 years). The value is returned once.
POST /api/clients/{id}/secrets/{secretId}/revokeclients.manage-secretsRevoke a Secret.

Audit log and health ​

EndpointPermissionDescription
GET /api/audit-eventsaudit.readSearch the audit log, see Audit events.
GET /api/audit-events/verificationaudit.verifyVerify the hash chain, see Audit events.
GET /health/detailshealth.readFull health report, see Health checks.

Permissions ​

All Permissions, as returned by GET /api/permissions. The System Role admin has all of them.

AreaPermissions
Usersusers.read, users.create, users.update, users.delete, users.manage-access, users.set-password, users.assign-roles
Groupsgroups.read, groups.create, groups.update, groups.delete, groups.manage-members, groups.assign-roles
Rolesroles.read, roles.create, roles.update, roles.delete, roles.grant-permissions
Permissionspermissions.read
Scopesscopes.read, scopes.create, scopes.update, scopes.delete
Clientsclients.read, clients.create, clients.update, clients.delete, clients.manage-secrets, clients.manage-first-party
Healthhealth.read
Auditaudit.read, audit.verify

Released under the MIT License.