pforte

Admin API reference

Manage users, claims, clients and the audit log of a pforte identity service. Authenticate with an access token from the OAuth client_credentials grant of a client registered with the scope admin (everything) or directory (users and claims only). Errors are RFC 9457 application/problem+json documents.

The base address is the address of your pforte with /admin in front of the paths below, for example https://id.example.com/admin/users. This reference is made from openapi.json, which describes the same API for tools.

Users

Create, find, change and delete users; idempotent upsert by e-mail for imports.

GET /admin/whoami

Who is calling

Needs the scope directory or admin.

The caller of this request: a machine (a client with its scopes) or a person signed in to the administration UI.

Responses

  • 200 Success
    Body
    FieldTypeRequiredNotes
    kindenum "client" | "user"yes
    clientIdstringyes
    scopesarray of stringyes
    userobject or nullyes
  • 401 unauthorized, 403 forbidden, 429 too many requests: a problem document (application/problem+json)

GET /admin/users

List users

Needs the scope directory or admin.

Newest last. Pass nextCursor as cursor to get the following page.

Parameters

NameInTypeRequiredNotes
searchquerystringno1 to 200 characters
statusqueryenum "created" | "active" | "locked" | "deactivated"no
claimquerystringnoup to 300 characters; pattern ^[^:]+:.+$
cursorquerystring (uuid)no
limitqueryintegerno1 to 200; default 50

Responses

  • 200 Success
    Body
    FieldTypeRequiredNotes
    itemsarray of objectyes
    items[].idstring (uuid)yes
    items[].emailstringyes
    items[].firstNamestringyes
    items[].lastNamestringyes
    items[].phonestring or nullyes
    items[].phoneVerifiedAtstring or nullyes
    items[].languagestringyes
    items[].statusenum "created" | "active" | "locked" | "deactivated"yes
    items[].isAdminbooleanyes
    items[].lastLoginAtstring or nullyes
    items[].createdAtstringyes
    items[].updatedAtstringyes
    nextCursorstring (uuid)no
  • 400 invalid request, 401 unauthorized, 403 forbidden, 404 not found, 409 conflict: a problem document (application/problem+json)

POST /admin/users

Create a user

Needs the scope directory or admin.

Request body

FieldTypeRequiredNotes
emailstring (email)yes
firstNamestringyes1 to 200 characters
lastNamestringyes1 to 200 characters
phonestringnopattern ^\+[1-9]\d{6,14}$
languagestringnopattern ^[a-z]{2,3}$
isAdminbooleanno

Responses

  • 201 Success
    Body
    FieldTypeRequiredNotes
    idstring (uuid)yes
    emailstringyes
    firstNamestringyes
    lastNamestringyes
    phonestring or nullyes
    phoneVerifiedAtstring or nullyes
    languagestringyes
    statusenum "created" | "active" | "locked" | "deactivated"yes
    isAdminbooleanyes
    lastLoginAtstring or nullyes
    createdAtstringyes
    updatedAtstringyes
  • 400 invalid request, 401 unauthorized, 403 forbidden, 404 not found, 409 conflict: a problem document (application/problem+json)

GET /admin/users/{id}

Get a user

Needs the scope directory or admin.

Parameters

NameInTypeRequiredNotes
idpathstring (uuid)yes

Responses

  • 200 Success
    Body
    FieldTypeRequiredNotes
    idstring (uuid)yes
    emailstringyes
    firstNamestringyes
    lastNamestringyes
    phonestring or nullyes
    phoneVerifiedAtstring or nullyes
    languagestringyes
    statusenum "created" | "active" | "locked" | "deactivated"yes
    isAdminbooleanyes
    lastLoginAtstring or nullyes
    createdAtstringyes
    updatedAtstringyes
  • 400 invalid request, 401 unauthorized, 403 forbidden, 404 not found, 409 conflict: a problem document (application/problem+json)

PATCH /admin/users/{id}

Change a user

Needs the scope directory or admin.

Only the fields given are changed. Nothing is written when nothing differs.

Parameters

NameInTypeRequiredNotes
idpathstring (uuid)yes

Request body

FieldTypeRequiredNotes
emailstring (email)no
firstNamestringno1 to 200 characters
lastNamestringno1 to 200 characters
phonestring or nullno
languagestringnopattern ^[a-z]{2,3}$
isAdminbooleanno

Responses

  • 200 Success
    Body
    FieldTypeRequiredNotes
    idstring (uuid)yes
    emailstringyes
    firstNamestringyes
    lastNamestringyes
    phonestring or nullyes
    phoneVerifiedAtstring or nullyes
    languagestringyes
    statusenum "created" | "active" | "locked" | "deactivated"yes
    isAdminbooleanyes
    lastLoginAtstring or nullyes
    createdAtstringyes
    updatedAtstringyes
  • 400 invalid request, 401 unauthorized, 403 forbidden, 404 not found, 409 conflict: a problem document (application/problem+json)

DELETE /admin/users/{id}

Delete a user

Needs the scope directory or admin.

Removes the user, their claims and devices. The audit log keeps who they were.

Parameters

NameInTypeRequiredNotes
idpathstring (uuid)yes

Responses

  • 204 No content
  • 400 invalid request, 401 unauthorized, 403 forbidden, 404 not found, 409 conflict: a problem document (application/problem+json)

PUT /admin/users/by-email/{email}

Create or update a user by e-mail

Needs the scope directory or admin.

Idempotent, so an hourly import can call it blindly. Updates names, phone and language; never the password, status or administrator rights. With claims, replaces the values of exactly the claim types given (see PUT /users/{id}/claims). Writes nothing and says unchanged when nothing differs. Everything happens in one transaction: if a claim is invalid, the user is not created or changed either.

With dryRun=true the same checks and the same diff run, then everything is rolled back: nothing is written and no audit event is recorded. The answer says what would happen (created, updated, unchanged) and what would change, so a dry run cannot disagree with the real call.

Parameters

NameInTypeRequiredNotes
dryRunqueryenum "true" | "false"nodefault "false"
emailpathstring (email)yes

Request body

FieldTypeRequiredNotes
firstNamestringyes1 to 200 characters
lastNamestringyes1 to 200 characters
phonestring or nullno
languagestringnopattern ^[a-z]{2,3}$
claimsmap of array of stringno

Responses

  • 200 Success
    Body

    Shape 1 of 2

    FieldTypeRequiredNotes
    dryRunenum falseyes
    outcomeenum "updated" | "unchanged"yes
    userobjectyes
    user.idstring (uuid)yes
    user.emailstringyes
    user.firstNamestringyes
    user.lastNamestringyes
    user.phonestring or nullyes
    user.phoneVerifiedAtstring or nullyes
    user.languagestringyes
    user.statusenum "created" | "active" | "locked" | "deactivated"yes
    user.isAdminbooleanyes
    user.lastLoginAtstring or nullyes
    user.createdAtstringyes
    user.updatedAtstringyes
    claimsmap of array of stringyes

    Shape 2 of 2

    FieldTypeRequiredNotes
    dryRunenum trueyes
    outcomeenum "created" | "updated" | "unchanged"yes
    changesobjectyes
    changes.profilemap of objectyes
    changes.claimsmap of objectyes
  • 201 Success
    Body
    FieldTypeRequiredNotes
    dryRunenum falseyes
    outcomeenum "created"yes
    userobjectyes
    user.idstring (uuid)yes
    user.emailstringyes
    user.firstNamestringyes
    user.lastNamestringyes
    user.phonestring or nullyes
    user.phoneVerifiedAtstring or nullyes
    user.languagestringyes
    user.statusenum "created" | "active" | "locked" | "deactivated"yes
    user.isAdminbooleanyes
    user.lastLoginAtstring or nullyes
    user.createdAtstringyes
    user.updatedAtstringyes
    claimsmap of array of stringyes
  • 400 invalid request, 401 unauthorized, 403 forbidden, 404 not found, 409 conflict: a problem document (application/problem+json)

Lifecycle

Lock, unlock, activate, deactivate, reset the password and end the sessions of a user.

GET /admin/users/{id}/sessions

Where a user is signed in

Needs the scope directory or admin.

The browser sessions (single sign-on) that are open, and the applications that were granted access and stay signed in, such as an app on a phone. Identifiers and tokens are not returned. POST /users/{id}/end-sessions ends them all.

Parameters

NameInTypeRequiredNotes
idpathstring (uuid)yes

Responses

  • 200 Success
    Body
    FieldTypeRequiredNotes
    sessionsarray of objectyes
    sessions[].startedAtstringyes
    sessions[].expiresAtstring or nullyes
    sessions[].acrstring or nullyes
    sessions[].applicationsarray of objectyes
    sessions[].applications[].clientIdstringyes
    sessions[].applications[].namestringyes
    grantsarray of objectyes
    grants[].clientIdstringyes
    grants[].namestringyes
    grants[].sincestringyes
    grants[].expiresAtstring or nullyes
  • 400 invalid request, 401 unauthorized, 403 forbidden, 404 not found, 429 too many requests: a problem document (application/problem+json)

POST /admin/users/{id}/lock

Lock a user

Needs the scope directory or admin.

For a created or active user. Ends all their sessions and refresh tokens; they cannot sign in until unlocked.

Parameters

NameInTypeRequiredNotes
idpathstring (uuid)yes

Responses

  • 200 Success
    Body
    FieldTypeRequiredNotes
    idstring (uuid)yes
    emailstringyes
    firstNamestringyes
    lastNamestringyes
    phonestring or nullyes
    phoneVerifiedAtstring or nullyes
    languagestringyes
    statusenum "created" | "active" | "locked" | "deactivated"yes
    isAdminbooleanyes
    lastLoginAtstring or nullyes
    createdAtstringyes
    updatedAtstringyes
  • 400 invalid request, 401 unauthorized, 403 forbidden, 404 not found, 409 conflict, 429 too many requests, 503 unavailable: a problem document (application/problem+json)

POST /admin/users/{id}/unlock

Unlock a user

Needs the scope directory or admin.

For a locked user: they become active again, or created if they never set a password. For an active user, who is not locked, nothing changes except that the failed sign-in attempts held against their address are forgotten, so they can try again at once after too many mistakes.

Parameters

NameInTypeRequiredNotes
idpathstring (uuid)yes

Responses

  • 200 Success
    Body
    FieldTypeRequiredNotes
    idstring (uuid)yes
    emailstringyes
    firstNamestringyes
    lastNamestringyes
    phonestring or nullyes
    phoneVerifiedAtstring or nullyes
    languagestringyes
    statusenum "created" | "active" | "locked" | "deactivated"yes
    isAdminbooleanyes
    lastLoginAtstring or nullyes
    createdAtstringyes
    updatedAtstringyes
  • 400 invalid request, 401 unauthorized, 403 forbidden, 404 not found, 409 conflict, 429 too many requests, 503 unavailable: a problem document (application/problem+json)

POST /admin/users/{id}/deactivate

Deactivate a user

Needs the scope directory or admin.

For someone who has left. Ends all sessions and refresh tokens and cancels a pending activation link.

Parameters

NameInTypeRequiredNotes
idpathstring (uuid)yes

Responses

  • 200 Success
    Body
    FieldTypeRequiredNotes
    idstring (uuid)yes
    emailstringyes
    firstNamestringyes
    lastNamestringyes
    phonestring or nullyes
    phoneVerifiedAtstring or nullyes
    languagestringyes
    statusenum "created" | "active" | "locked" | "deactivated"yes
    isAdminbooleanyes
    lastLoginAtstring or nullyes
    createdAtstringyes
    updatedAtstringyes
  • 400 invalid request, 401 unauthorized, 403 forbidden, 404 not found, 409 conflict, 429 too many requests, 503 unavailable: a problem document (application/problem+json)

POST /admin/users/{id}/activate

Activate a user

Needs the scope directory or admin.

For a created user: sends the activation link, where they choose their first password; a new call replaces the earlier link. For a deactivated user who already has a password: makes them active again, without a link. The link is never returned or logged by pforte.

Parameters

NameInTypeRequiredNotes
idpathstring (uuid)yes

Responses

  • 200 Success
    Body
    FieldTypeRequiredNotes
    userobjectyes
    user.idstring (uuid)yes
    user.emailstringyes
    user.firstNamestringyes
    user.lastNamestringyes
    user.phonestring or nullyes
    user.phoneVerifiedAtstring or nullyes
    user.languagestringyes
    user.statusenum "created" | "active" | "locked" | "deactivated"yes
    user.isAdminbooleanyes
    user.lastLoginAtstring or nullyes
    user.createdAtstringyes
    user.updatedAtstringyes
    activationobjectyes
    activation.linkSentbooleanyes
    activation.expiresAtstring or nullyes
  • 400 invalid request, 401 unauthorized, 403 forbidden, 404 not found, 409 conflict, 429 too many requests, 503 unavailable: a problem document (application/problem+json)

POST /admin/users/{id}/reset-password

Reset the password of a user

Needs the scope directory or admin.

For an active user. Sends them a code to choose a new password and ends all their sessions and refresh tokens, since the account may be compromised.

Parameters

NameInTypeRequiredNotes
idpathstring (uuid)yes

Responses

  • 200 Success
    Body
    FieldTypeRequiredNotes
    idstring (uuid)yes
    emailstringyes
    firstNamestringyes
    lastNamestringyes
    phonestring or nullyes
    phoneVerifiedAtstring or nullyes
    languagestringyes
    statusenum "created" | "active" | "locked" | "deactivated"yes
    isAdminbooleanyes
    lastLoginAtstring or nullyes
    createdAtstringyes
    updatedAtstringyes
  • 400 invalid request, 401 unauthorized, 403 forbidden, 404 not found, 409 conflict, 429 too many requests, 503 unavailable: a problem document (application/problem+json)

POST /admin/users/{id}/end-sessions

End all sessions of a user

Needs the scope directory or admin.

Deletes their sessions, grants and refresh tokens and revokes their remembered devices, so they must sign in again, with a code. Their status does not change.

Parameters

NameInTypeRequiredNotes
idpathstring (uuid)yes

Responses

  • 200 Success
    Body
    FieldTypeRequiredNotes
    sessionsEndedintegeryes-9007199254740991 to 9007199254740991
    devicesRevokedintegeryes-9007199254740991 to 9007199254740991
  • 400 invalid request, 401 unauthorized, 403 forbidden, 404 not found, 409 conflict, 429 too many requests, 503 unavailable: a problem document (application/problem+json)

Devices

The devices a user asked pforte to remember, so they skip the second factor there.

GET /admin/users/{id}/devices

List the remembered devices of a user

Needs the scope directory or admin.

Devices that skip the second factor: not revoked and not expired. Most recently seen first.

Parameters

NameInTypeRequiredNotes
idpathstring (uuid)yes

Responses

  • 200 Success
    Body
    FieldTypeRequiredNotes
    itemsarray of objectyes
    items[].idstring (uuid)yes
    items[].userAgentstring or nullyes
    items[].createdAtstringyes
    items[].lastSeenAtstringyes
    items[].expiresAtstringyes
  • 400 invalid request, 401 unauthorized, 403 forbidden, 404 not found: a problem document (application/problem+json)

DELETE /admin/users/{id}/devices

Revoke all remembered devices of a user

Needs the scope directory or admin.

Every sign-in of the user asks for the code again. Locking, deactivating, resetting the password and ending sessions do this as well.

Parameters

NameInTypeRequiredNotes
idpathstring (uuid)yes

Responses

  • 200 Success
    Body
    FieldTypeRequiredNotes
    devicesRevokedintegeryes-9007199254740991 to 9007199254740991
  • 400 invalid request, 401 unauthorized, 403 forbidden, 404 not found: a problem document (application/problem+json)

DELETE /admin/users/{id}/devices/{deviceId}

Revoke a remembered device

Needs the scope directory or admin.

The next sign-in on that device asks for the code again.

Parameters

NameInTypeRequiredNotes
idpathstring (uuid)yes
deviceIdpathstring (uuid)yes

Responses

  • 204 No content
  • 400 invalid request, 401 unauthorized, 403 forbidden, 404 not found: a problem document (application/problem+json)

Claims

The claim values of a user.

GET /admin/users/{id}/claims

The claim values of a user

Needs the scope directory or admin.

Parameters

NameInTypeRequiredNotes
idpathstring (uuid)yes

Responses

  • 200 Success
    Body
    FieldTypeRequiredNotes
    claimsmap of array of stringyes
  • 400 invalid request, 401 unauthorized, 403 forbidden, 404 not found, 409 conflict: a problem document (application/problem+json)

PUT /admin/users/{id}/claims

Set claims in bulk

Needs the scope directory or admin.

Replaces the values of exactly the claim types given and leaves every other claim of the user untouched. An empty list removes all values of a type. All values are checked first; if any is invalid nothing is changed.

Parameters

NameInTypeRequiredNotes
idpathstring (uuid)yes

Request body

FieldTypeRequiredNotes
claimsmap of array of stringyes

Responses

  • 200 Success
    Body
    FieldTypeRequiredNotes
    changedbooleanyes
    claimsmap of array of stringyes
  • 400 invalid request, 401 unauthorized, 403 forbidden, 404 not found, 409 conflict: a problem document (application/problem+json)

POST /admin/users/{id}/claims/{type}

Add one value to a claim type

Needs the scope directory or admin.

Does nothing if the user already has the value. A single-valued type refuses a second, different value.

Parameters

NameInTypeRequiredNotes
idpathstring (uuid)yes
typepathstringyespattern ^[a-z][a-z0-9_]{0,62}$

Request body

FieldTypeRequiredNotes
valuestringyes

Responses

  • 200 Success
    Body
    FieldTypeRequiredNotes
    changedbooleanyes
    claimsmap of array of stringyes
  • 400 invalid request, 401 unauthorized, 403 forbidden, 404 not found, 409 conflict: a problem document (application/problem+json)

PUT /admin/users/{id}/claims/{type}

Set the values of one claim type

Needs the scope directory or admin.

Parameters

NameInTypeRequiredNotes
idpathstring (uuid)yes
typepathstringyespattern ^[a-z][a-z0-9_]{0,62}$

Request body

FieldTypeRequiredNotes
valuesarray of stringyes

Responses

  • 200 Success
    Body
    FieldTypeRequiredNotes
    changedbooleanyes
    claimsmap of array of stringyes
  • 400 invalid request, 401 unauthorized, 403 forbidden, 404 not found, 409 conflict: a problem document (application/problem+json)

DELETE /admin/users/{id}/claims/{type}/{value}

Remove one value of a claim type

Needs the scope directory or admin.

Does nothing if the user does not have the value.

Parameters

NameInTypeRequiredNotes
idpathstring (uuid)yes
typepathstringyespattern ^[a-z][a-z0-9_]{0,62}$
valuepathstringyesat least 1 characters

Responses

  • 200 Success
    Body
    FieldTypeRequiredNotes
    changedbooleanyes
    claimsmap of array of stringyes
  • 400 invalid request, 401 unauthorized, 403 forbidden, 404 not found, 409 conflict: a problem document (application/problem+json)

Claim types

The kinds of claims, and which clients receive them.

GET /admin/claim-types

List claim types

Needs the scope directory or admin.

Responses

  • 200 Success
    Body
    FieldTypeRequiredNotes
    itemsarray of objectyes
    items[].keystringyes
    items[].descriptionstringyes
    items[].valuePatternstring or nullyes
    items[].multiValuedbooleanyes
    items[].clientsarray of stringyes
  • 400 invalid request, 401 unauthorized, 403 forbidden, 404 not found, 409 conflict: a problem document (application/problem+json)

POST /admin/claim-types

Create a claim type

Needs the scope admin.

The key is the claim name in tokens. Names that tokens already use (email, name, …) are reserved.

Request body

FieldTypeRequiredNotes
keystringyespattern ^[a-z][a-z0-9_]{0,62}$
descriptionstringnoup to 500 characters
valuePatternstring or nullno
multiValuedbooleanno

Responses

  • 201 Success
    Body
    FieldTypeRequiredNotes
    keystringyes
    descriptionstringyes
    valuePatternstring or nullyes
    multiValuedbooleanyes
    clientsarray of stringyes
  • 400 invalid request, 401 unauthorized, 403 forbidden, 404 not found, 409 conflict: a problem document (application/problem+json)

PATCH /admin/claim-types/{key}

Change a claim type

Needs the scope admin.

Refused with 409 when existing values would violate the change: a new pattern they do not match, or single-valued while a user holds several values.

Parameters

NameInTypeRequiredNotes
keypathstringyespattern ^[a-z][a-z0-9_]{0,62}$

Request body

FieldTypeRequiredNotes
descriptionstringnoup to 500 characters
valuePatternstring or nullno
multiValuedbooleanno

Responses

  • 200 Success
    Body
    FieldTypeRequiredNotes
    keystringyes
    descriptionstringyes
    valuePatternstring or nullyes
    multiValuedbooleanyes
    clientsarray of stringyes
  • 400 invalid request, 401 unauthorized, 403 forbidden, 404 not found, 409 conflict: a problem document (application/problem+json)

DELETE /admin/claim-types/{key}

Delete a claim type

Needs the scope admin.

Refused with 409 while users hold values of it. With force=true the values are deleted too, and the audit log records how many users and values were affected.

Parameters

NameInTypeRequiredNotes
forcequeryenum "true" | "false"nodefault "false"
keypathstringyespattern ^[a-z][a-z0-9_]{0,62}$

Responses

  • 204 No content
  • 400 invalid request, 401 unauthorized, 403 forbidden, 404 not found, 409 conflict: a problem document (application/problem+json)

GET /admin/clients/{clientId}/claim-types

The claim types a client receives

Needs the scope admin.

Parameters

NameInTypeRequiredNotes
clientIdpathstringyesat least 1 characters

Responses

  • 200 Success
    Body
    FieldTypeRequiredNotes
    claimTypesarray of stringyes
  • 400 invalid request, 401 unauthorized, 403 forbidden, 404 not found, 409 conflict: a problem document (application/problem+json)

PUT /admin/clients/{clientId}/claim-types

Set the claim types a client receives

Needs the scope admin.

Replaces the whole set. A client only ever receives the claim types assigned to it.

Parameters

NameInTypeRequiredNotes
clientIdpathstringyesat least 1 characters

Request body

FieldTypeRequiredNotes
claimTypesarray of stringyes

Responses

  • 200 Success
    Body
    FieldTypeRequiredNotes
    claimTypesarray of stringyes
  • 400 invalid request, 401 unauthorized, 403 forbidden, 404 not found, 409 conflict: a problem document (application/problem+json)

Clients

The applications and machines that use pforte.

GET /admin/clients

List clients

Needs the scope admin.

Responses

  • 200 Success
    Body
    FieldTypeRequiredNotes
    itemsarray of objectyes
    items[].systembooleanyes
    items[].clientIdstringyes
    items[].namestringyes
    items[].typeenum "public" | "confidential"yes
    items[].redirectUrisarray of stringyes
    items[].postLogoutRedirectUrisarray of stringyes
    items[].backchannelLogoutUristring or nullyes
    items[].backchannelLogoutSessionRequiredbooleanyes
    items[].allowedGrantsarray of stringyes
    items[].scopesarray of stringyes
    items[].pkceRequiredbooleanyes
    items[].claimTypesarray of stringyes
    items[].createdAtstringyes
    items[].updatedAtstringyes
  • 400 invalid request, 401 unauthorized, 403 forbidden, 404 not found, 409 conflict: a problem document (application/problem+json)

POST /admin/clients

Register a client

Needs the scope admin.

Two kinds exist. An application signs users in (authorization code flow, public or confidential) and has OpenID scopes and redirect URIs. A machine calls the admin API with the client_credentials grant and has only the scopes admin and/or directory. They never mix. A confidential client gets a generated secret, returned here once and never again. Redirect URIs must be https (http only for localhost).

Request body

FieldTypeRequiredNotes
clientIdstringyespattern ^[a-z0-9][a-z0-9._-]{2,62}$
namestringyes1 to 200 characters
typeenum "public" | "confidential"yes
redirectUrisarray of stringno
postLogoutRedirectUrisarray of stringno
backchannelLogoutUristring or nullno
backchannelLogoutSessionRequiredbooleanno
allowedGrantsarray of stringno
scopesarray of stringno
pkceRequiredbooleanno

Responses

  • 201 Success
    Body
    FieldTypeRequiredNotes
    clientobjectyes
    client.systembooleanyes
    client.clientIdstringyes
    client.namestringyes
    client.typeenum "public" | "confidential"yes
    client.redirectUrisarray of stringyes
    client.postLogoutRedirectUrisarray of stringyes
    client.backchannelLogoutUristring or nullyes
    client.backchannelLogoutSessionRequiredbooleanyes
    client.allowedGrantsarray of stringyes
    client.scopesarray of stringyes
    client.pkceRequiredbooleanyes
    client.claimTypesarray of stringyes
    client.createdAtstringyes
    client.updatedAtstringyes
    clientSecretstring or nullyes
  • 400 invalid request, 401 unauthorized, 403 forbidden, 404 not found, 409 conflict: a problem document (application/problem+json)

GET /admin/clients/{clientId}

Get a client

Needs the scope admin.

Parameters

NameInTypeRequiredNotes
clientIdpathstringyesat least 1 characters

Responses

  • 200 Success
    Body
    FieldTypeRequiredNotes
    systembooleanyes
    clientIdstringyes
    namestringyes
    typeenum "public" | "confidential"yes
    redirectUrisarray of stringyes
    postLogoutRedirectUrisarray of stringyes
    backchannelLogoutUristring or nullyes
    backchannelLogoutSessionRequiredbooleanyes
    allowedGrantsarray of stringyes
    scopesarray of stringyes
    pkceRequiredbooleanyes
    claimTypesarray of stringyes
    createdAtstringyes
    updatedAtstringyes
  • 400 invalid request, 401 unauthorized, 403 forbidden, 404 not found, 409 conflict: a problem document (application/problem+json)

PATCH /admin/clients/{clientId}

Change a client

Needs the scope admin.

Only the fields given are changed, and the result must still be a valid client of its kind. Takes effect at once. The last client with the admin scope cannot lose it.

Parameters

NameInTypeRequiredNotes
clientIdpathstringyesat least 1 characters

Request body

FieldTypeRequiredNotes
namestringno1 to 200 characters
redirectUrisarray of stringno
postLogoutRedirectUrisarray of stringno
backchannelLogoutUristring or nullno
backchannelLogoutSessionRequiredbooleanno
allowedGrantsarray of stringno
scopesarray of stringno
pkceRequiredbooleanno

Responses

  • 200 Success
    Body
    FieldTypeRequiredNotes
    systembooleanyes
    clientIdstringyes
    namestringyes
    typeenum "public" | "confidential"yes
    redirectUrisarray of stringyes
    postLogoutRedirectUrisarray of stringyes
    backchannelLogoutUristring or nullyes
    backchannelLogoutSessionRequiredbooleanyes
    allowedGrantsarray of stringyes
    scopesarray of stringyes
    pkceRequiredbooleanyes
    claimTypesarray of stringyes
    createdAtstringyes
    updatedAtstringyes
  • 400 invalid request, 401 unauthorized, 403 forbidden, 404 not found, 409 conflict: a problem document (application/problem+json)

DELETE /admin/clients/{clientId}

Delete a client

Needs the scope admin.

Also removes its claim type assignments and revokes every grant and token issued to it. Refused for the last client with the admin scope and for the client making the call.

Parameters

NameInTypeRequiredNotes
clientIdpathstringyesat least 1 characters

Responses

  • 204 No content
  • 400 invalid request, 401 unauthorized, 403 forbidden, 404 not found, 409 conflict: a problem document (application/problem+json)

POST /admin/clients/{clientId}/rotate-secret

Replace the secret of a confidential client

Needs the scope admin.

The old secret stops working at once. The new one is returned here once and never again.

Parameters

NameInTypeRequiredNotes
clientIdpathstringyesat least 1 characters

Responses

  • 200 Success
    Body
    FieldTypeRequiredNotes
    clientSecretstringyes
  • 400 invalid request, 401 unauthorized, 403 forbidden, 404 not found, 409 conflict: a problem document (application/problem+json)

Audit

Who did what, when and to whom.

GET /admin/audit-events

List audit events

Needs the scope admin.

Newest first. Every change through the admin API and every lifecycle action is recorded with the client that made it. Pass nextCursor as cursor to get older events; the order is stable while new events arrive.

Parameters

NameInTypeRequiredNotes
actorTypequeryenum "user" | "client" | "system"no
actorIdquerystringnoat least 1 characters
actionquerystringnoAn exact action such as user.lock, or a prefix ending in * such as user.*.
at least 1 characters
targetTypequerystringnoat least 1 characters
targetIdquerystringnoat least 1 characters
fromquerystring (date-time)noOnly events at or after this time (ISO 8601).
toquerystring (date-time)noOnly events before this time (ISO 8601).
cursorquerystring (uuid)no
limitqueryintegerno1 to 200; default 50

Responses

  • 200 Success
    Body
    FieldTypeRequiredNotes
    itemsarray of objectyes
    items[].idstring (uuid)yes
    items[].createdAtstringyes
    items[].actorTypeenum "user" | "client" | "system"yes
    items[].actorIdstring or nullyes
    items[].actionstringyes
    items[].targetTypestring or nullyes
    items[].targetIdstring or nullyes
    items[].detailsmap of anyyes
    items[].ipstring or nullyes
    items[].userAgentstring or nullyes
    nextCursorstring (uuid)no
  • 400 invalid request, 401 unauthorized, 403 forbidden: a problem document (application/problem+json)

This page is made from docs/openapi.json, which the tests keep in step with the code.