Skip to Content
DocsAuthorityAuthority API Spec

Authority API Spec

MethodHTTP request
Create Access TokenPOST /token
Delete ClaimDELETE /acr/username_password/admin/claim/{claimName}/delete
Delete GroupDELETE /acr/username_password/admin/group/{groupName}/delete
Delete ScopeDELETE /acr/username_password/admin/scope/{scopeName}/delete
Delete UserDELETE /acr/username_password/admin/user/{username}/delete
Update ClaimPATCH /acr/username_password/admin/claim/{claimName}/update
Add Scope to GroupPATCH /acr/username_password/admin/group/{groupName}/add/scope
Add User to GroupPATCH /acr/username_password/admin/group/{groupName}/add/user
Remove Scope from GroupPATCH /acr/username_password/admin/group/{groupName}/remove/scope
Remove User To GroupPATCH /acr/username_password/admin/group/{groupName}/remove/user
Update GroupPATCH /acr/username_password/admin/group/{groupName}/update
Add Claim to ScopePATCH /acr/username_password/admin/scope/{scopeName}/add/claim
Remove Claim from ScopePATCH /acr/username_password/admin/scope/{scopeName}/remove/claim
Update ScopePATCH /acr/username_password/admin/scope/{scopeName}/update
Add Group to UserPATCH /acr/username_password/admin/user/{username}/add/group
Add Scope to UserPATCH /acr/username_password/admin/user/{username}/add/scope
Restore UserPATCH /acr/username_password/admin/user/{username}/archive/restore
Remove Group from UserPATCH /acr/username_password/admin/user/{username}/remove/group
Remove Scope from UserPATCH /acr/username_password/admin/user/{username}/remove/scope
Update UserPATCH /acr/username_password/admin/user/{username}/update
Update Claim of UserPATCH /acr/username_password/admin/user/{username}/update/claim
Create ClaimPOST /acr/username_password/admin/claim/create
Create GroupPOST /acr/username_password/admin/group/create
Create ScopePOST /acr/username_password/admin/scope/create
Create UserPOST /acr/username_password/admin/user/create
Create User from EmailPOST /acr/username_password/admin/user/email/create

Create Access Token

Creates a new access token.

Route

POST: /token

Request Body

FieldTypeRequiredDescriptionExample
grant_typestringtrueThe type of grant for the access token.client_credentials
client_idstringtrueThe client ID for authentication.TestAuth
client_secretstringtrueThe client secret for authentication.TestAuthSecret
scopestringtrueThe scope of the access token.upe_admin

Responses

Status CodeDescriptionType
200Returns an object with the new access token inside.object

Authorization

No authorization required.

HTTP request headers

  • Content-Type: application/x-www-form-urlencoded
  • Accept: application/json

Create Claim

Creates a new claim.

Route

POST: /acr/username_password/admin/claim/create

Request Body

FieldTypeRequiredDescriptionExample
namestringtrueThe name of the new claim.TestClaim
typestringtrueThe type of the new claim. (Possible values: string, boolean, int, object)string
descriptionstringThe description for the new claim.This is a test claim.

Responses

Status CodeDescriptionContent Type
200Returns the newly created claim, if successful.application/json

Authorization

Auth Header: ‘Bearer {AccessToken}

Access Token needs to have the claim upe__can_manage_users.

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

Update Claim

Updates claim name and description.

Route

PATCH: /acr/username_password/admin/claim/{claimName}/update

Parameters

NameTypeDescriptionNotes
claimNamestringThe current name of the claim.[default to null]

Request Body

FieldTypeRequiredDescriptionExample
namestringUpdated name of the claim.UpdatedTestClaim
descriptionstringUpdated description of the claim.This is an updated test claim!

Responses

Status CodeDescriptionContent Type
200Returns the updated claim, if successful.application/json

Authorization

Auth Header: ‘Bearer {AccessToken}

Access Token needs to have the claim upe__can_manage_users.

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

Delete Claim

Deletes a claim.

Route

DELETE: /acr/username_password/admin/claim/{claimName}/delete

Parameters

NameTypeDescriptionNotes
claimNamestringThe name of the claim.[default to null]

Responses

Status CodeDescriptionContent Type
200Returns the deleted claim, if successful.application/json

Authorization

Auth Header: ‘Bearer {AccessToken}

Access Token needs to have the claim upe__can_manage_users.

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

Create Scope

Creates a new scope.

Route

POST: /acr/username_password/admin/scope/create

Request Body

FieldTypeRequiredDescriptionExample
namestringtrueThe name of the new scope.TestScope
claimNamesstring[]The claims with which the new scope is created.[“name”, “company”, “website”]
descriptionstringThe description of the new scope.This is a test scope!

Responses

Status CodeDescriptionType
200Returns the newly created scope, if the scope was successfully created.object

Authorization

Auth Header: ‘Bearer {AccessToken}

Access Token needs to have the claim upe__can_manage_users.

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

Update Scope

Updates scope name, description or overwrites the claims from a scope.

Route

PATCH: /acr/username_password/admin/scope/{scopeName}/update

Parameters

NameTypeDescriptionNotes
scopeNamestringThe current name of the scope.[default to null]

Request Body

FieldTypeRequiredDescriptionExample
namestringUpdated name of the scope.UpdatedTestScope
descriptionstringUpdated description of the scope.This is an updated test scope!
claimNamesstring[]New claims for the scope. Old claims will be exchanged with the new ones.[“zoneinfo”, “nickname”]

Responses

Status CodeDescriptionContent Type
200Returns the updated scope, if successful.application/json

Authorization

Auth Header: ‘Bearer {AccessToken}

Access Token needs to have the claim upe__can_manage_users.

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

Add Claim to Scope

Adds a claim to a scope.

Route

PATCH: /acr/username_password/admin/scope/{scopeName}/add/claim

Parameters

NameTypeDescriptionNotes
scopeNamestringThe name of the scope.[default to null]

Request Body

FieldTypeRequiredDescriptionExample
claimNamestringtrueName of the claim to add.picture

Responses

Status CodeDescriptionType
200Returns the scope, if the claim was successfully added.object

Authorization

Auth Header: ‘Bearer {AccessToken}

Access Token needs to have the claim upe__can_manage_users.

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

Remove Claim from Scope

Removes a claim from a scope.

Route

PATCH: /acr/username_password/admin/scope/{scopeName}/remove/claim

Parameters

NameTypeDescriptionNotes
scopeNamestringThe name of the scope.[default to null]

Request Body

FieldTypeRequiredDescriptionExample
claimNamestringtrueName of the claim to remove from the scope.picture

Responses

Status CodeDescriptionType
200Returns the scope, if the claim was successfully removed.object

Authorization

Auth Header: ‘Bearer {AccessToken}

Access Token needs to have the claim upe__can_manage_users.

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

Delete Scope

Deletes a scope.

Route

DELETE: /acr/username_password/admin/scope/{scopeName}/delete

Parameters

NameTypeDescriptionNotes
scopeNamestringThe name of the scope.[default to null]

Responses

Status CodeDescriptionType
200Returns the deleted scope, if the scope was successfully deleted.object

Authorization

Auth Header: ‘Bearer {AccessToken}

Access Token needs to have the claim upe__can_manage_users.

HTTP request headers

  • Content-Type: Not Defined
  • Accept: application/json

Create User

Creates a new user.

Route

POST: /acr/username_password/admin/user/create

Request Body

NameTypeDescriptionRequiredExample
namestringThe updated name of the group.true”TestUser”
passwordstringThe password for the new user.true”Password123”
groupIdsstring[]Ids of groups assigned to user[“87d086d8-2314-4506-b332-de622ceb11cd”]
scopeIdsstring[]Ids of scopes assigned to user[“87d086d8-2314-4506-b332-de622ceb11cd”]
claimValuesobjectValues of Claims assigned to User{ "email": "TestUser@test-email.com", "upe_admin": true }

Responses

Status CodeDescriptionType
200Returns an object with the new user inside.object

Authorization

Auth Header: ‘Bearer {AccessToken}

Access Token needs to have the claim upe__can_manage_users.

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

Create User from Email

Creates a new user with his e-mail instead of an username.

Route

POST: /acr/username_password/admin/user/email/create/

Request Body

NameTypeDescriptionRequiredExample
emailstringEmail of the new user. (It’s used as Username)trueTest.User@5Minds.de
passwordstringPassword for the new user.true”Password123”
givenNamestringGiven name or first name of the user.”John”
familyNamestringSurname or last name of the user.”Doe”
companystringThe company of the user.”5Minds”

Responses

Status CodeDescriptionType
200Returns an object with the new user inside.object

Authorization

Auth Header: ‘Bearer {AccessToken}

Access Token needs to have the claim upe__can_manage_users.

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

Update User

Update username and password from a user.

Route

PATCH: /acr/username_password/admin/user/{username}/update

Parameters

NameTypeDescriptionNotes
usernamestringThe current name of the user.[default to null]

Request Body

FieldTypeRequiredDescriptionExample
namestringtrueUpdated name of the user.UpdatedTestUser
passwordstringUpdated password for the user.UpdatedPassword123

Responses

Status CodeDescriptionType
200Returns an object with the updated user inside.object

Authorization

Auth Header: ‘Bearer {AccessToken}

Access Token needs to have the claim upe__can_manage_users.

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

Update Claim of User

Updates a claim from a user.

Route

PATCH: /acr/username_password/admin/user/{username}/update/claim

Parameters

NameTypeDescriptionNotes
usernamestringThe name of the user.[default to null]

Request Body

FieldTypeRequiredDescriptionExample
claimNamestringtrueName of the claim.phone_number
claimValueanyValue of the claim.012517

Responses

Status CodeDescriptionContent Type
200Returns the updated claim, if successful.application/json

Authorization

Auth Header: ‘Bearer {AccessToken}

Access Token needs to have the claim upe__can_manage_users.

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

Add Group to User

Adds a group to a user.

Route

PATCH: /acr/username_password/admin/user/{username}/add/group

Parameters

NameTypeDescriptionNotes
usernamestringThe name of the user.[default to null]

Request Body

NameTypeDescriptionRequiredExample
groupNamestringName of the group.true”TestGroup”

Responses

Status CodeDescriptionType
200Returns an object with the updated user inside.object

Authorization

Auth Header: ‘Bearer {AccessToken}

Access Token needs to have the claim upe__can_manage_users.

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

Add Scope to User

Adds a scope to a user.

Route

PATCH: /acr/username_password/admin/user/{username}/add/scope

Parameters

NameTypeDescriptionNotes
usernamestringThe name of the user.[default to null]

Request Body

NameTypeDescriptionExample
scopeNamestringName of the scope.”phone”

Responses

Status CodeDescriptionType
200Returns an object with the updated inside.object

Authorization

Auth Header: ‘Bearer {AccessToken}

Access Token needs to have the claim upe__can_manage_users.

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

Remove Group from User

Removes a group from a user.

Route

DELETE: /acr/username_password/admin/user/{username}/remove/group

Parameters

NameTypeDescriptionNotes
usernamestringThe name of the user.[default to null]

Request Body

FieldTypeRequiredDescriptionExample
groupNamestringtrueName of the group.TestGroup

Responses

Status CodeDescriptionType
200Returns an object with the updated user inside.object

Authorization

Auth Header: ‘Bearer {AccessToken}

Access Token needs to have the claim upe__can_manage_users.

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

Remove Scope from User

Removes a scope from a user.

Route

PATCH: /acr/username_password/admin/user/{username}/remove/scope

Parameters

NameTypeDescriptionNotes
usernamestringThe name of the user.[default to null]

Request Body

FieldTypeRequiredDescriptionExample
scopeNamestringtrueName of the scope.phone

Responses

Status CodeDescriptionType
200Returns an object with the updated user inside.object

Authorization

Auth Header: ‘Bearer {AccessToken}

Access Token needs to have the claim upe__can_manage_users.

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

Delete User

Delete or archive a user.

Route

DELETE: /acr/username_password/admin/user/{username}/delete

Parameters

NameTypeDescriptionNotes
usernamestringThe name of the user.[default to null]

Request Body

FieldTypeRequiredDescriptionExample
archiveUserbooleanWhen true, the user will be archived instead of deleted.false

Responses

Status CodeDescriptionType
200Returns an object with the deleted user inside.object

Authorization

Auth Header: ‘Bearer {AccessToken}

Access Token needs to have the claim upe__can_manage_users.

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

Restore User

Restore a user.

Route

PATCH: /acr/username_password/admin/user/{username}/archive/restore

Parameters

NameTypeDescriptionNotes
usernamestringThe name of the user.

Responses

Status CodeDescriptionType
200Returns an object with the restored user inside.object

Authorization

Auth Header: ‘Bearer {AccessToken}

Access Token needs to have the claim upe__can_manage_users.

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

Create Group

Creates a new group.

Route

POST: /acr/username_password/admin/group/create

Request Body

FieldTypeRequiredDescriptionExample
namestringtrueThe name of the new group.TestGroup
descriptionstringThe description for the new group.This is a test group.

Responses

Status CodeDescriptionType
200Returns the newly created group, if successful.object

Authorization

Auth Header: ‘Bearer {AccessToken}

Access Token needs to have the claim upe__can_manage_users.

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

Update Group

Updates the name or description of a group.

Route

PATCH: /acr/username_password/admin/group/{groupName}/update

Parameters

NameTypeDescriptionNotes
groupNamestringThe current name of the group.[default to null]

Request Body

FieldTypeRequiredDescriptionExample
namestringThe updated name of the group.TestUpdatedGroup
descriptionstringThe description for the updated group.This is an updated test group.

Responses

Status CodeDescriptionType
200Returns the updated group, if the update was successful.object

Authorization

Auth Header: ‘Bearer {AccessToken}

Access Token needs to have the claim upe__can_manage_users.

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

Add Scope to Group

Adds a scope to a group.

Route

PATCH: /acr/username_password/admin/group/{groupName}/add/scope

Parameters

NameTypeDescriptionNotes
groupNamestringThe current name of the group.[default to null]

Request Body

FieldTypeRequiredDescriptionExample
scopeNamestringtrueThe name of the scope.openid

Responses

Status CodeDescriptionType
200Returns all claims from the group, if successful.object

Authorization

Auth Header: ‘Bearer {AccessToken}

Access Token needs to have the claim upe__can_manage_users.

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

Add User to Group

Adds a user to a group.

Route

PATCH: /acr/username_password/admin/group/{groupName}/add/user

Parameters

NameTypeDescriptionNotes
groupNamestringThe name of the group.[default to null]

Request Body

FieldTypeRequiredDescriptionExample
usernamestringtrueThe name of the user.TestUser

Responses

Status CodeDescriptionType
200Returns the group with all associated users, if the user was successfully added.object

Authorization

Auth Header: ‘Bearer {AccessToken}

Access Token needs to have the claim upe__can_manage_users.

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

Remove Scope from Group

Removes a scope from a group.

Route

PATCH: /acr/username_password/admin/group/{groupName}/remove/scope

Parameters

NameTypeDescriptionNotes
groupNamestringThe current name of the group.[default to null]

Request Body

FieldTypeRequiredDescriptionExample
scopeNamestringtrueThe name of the scope to remove.openid

Responses

Status CodeDescriptionType
200Returns all claims from the group, if the scope was successfully removed.object

Authorization

Auth Header: ‘Bearer {AccessToken}

Access Token needs to have the claim upe__can_manage_users.

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

Remove User from Group

Removes a user from a group.

Route

PATCH: /acr/username_password/admin/group/{groupName}/remove/user

Parameters

NameTypeDescriptionNotes
groupNamestringThe name of the group.[default to null]

Request Body

FieldTypeRequiredDescriptionExample
usernamestringtrueThe name of the user to remove from the group.TestUser

Responses

Status CodeDescriptionType
200Returns the group with all associated users, if the user was successfully removed.object

Authorization

Auth Header: ‘Bearer {AccessToken}

Access Token needs to have the claim upe__can_manage_users.

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

Delete Group

Deletes a group.

Route

DELETE: /acr/username_password/admin/group/{groupName}/delete

Parameters

NameTypeDescriptionNotes
groupNamestringThe current name of the group.[default to null]

Responses

Status CodeDescriptionType
200Returns the deleted group, if deletion was successful.object

Authorization

Auth Header: ‘Bearer {AccessToken}

Access Token needs to have the claim upe__can_manage_users.

HTTP request headers

  • Content-Type: Not Defined
  • Accept: application/json