Keycloak Admin REST API
This is a REST API reference for the Keycloak Admin
Developer tools#openapi#developer-tools
Fork copies the collection into your workspace, without the publisher's secrets, so you can add your own key and send requests. Star saves it to your starred APIs (Account › Marketplace) and helps others find it.
Overview
This is a REST API reference for the Keycloak Admin
Endpoints 281
Root
- GETGet themes, social providers, auth providers, and event listeners available on this server
/
Realms Admin
- POSTImport a realm Imports a realm from a full representation of that realm.
/ - GETGet the top-level representation of the realm It will not include nested information like User and Client representations.
/:realm - PUTUpdate the top-level information of the realm Any user, roles or client information in the representation will be ignored.
/:realm - DELETEDelete the realm
/:realm - GETGet admin events Returns all admin events, or filters events based on URL query parameters listed here
/:realm/admin-events?authClient=string&authIpAddress=string&authRealm=string&authUser=string&dateFrom=string&dateTo=string&first=0&max=0&operationTypes=string&resourcePath=string&resourceTypes=string - DELETEDelete all admin events
/:realm/admin-events - POSTClear cache of external public keys (Public keys of clients or Identity providers)
/:realm/clear-keys-cache - POSTClear realm cache
/:realm/clear-realm-cache - POSTClear user cache
/:realm/clear-user-cache - POSTBase path for importing clients under this realm.
/:realm/client-description-converter - GETGet client session stats Returns a JSON map.
/:realm/client-session-stats - GETGET /{realm}/credential-registrators
/:realm/credential-registrators - GETGet realm default client scopes.
/:realm/default-default-client-scopes - PUTPUT /{realm}/default-default-client-scopes/{clientScopeId}
/:realm/default-default-client-scopes/:clientScopeId - DELETEDELETE /{realm}/default-default-client-scopes/{clientScopeId}
/:realm/default-default-client-scopes/:clientScopeId - GETGet group hierarchy.
/:realm/default-groups - PUTPUT /{realm}/default-groups/{groupId}
/:realm/default-groups/:groupId - DELETEDELETE /{realm}/default-groups/{groupId}
/:realm/default-groups/:groupId - GETGet realm optional client scopes.
/:realm/default-optional-client-scopes - PUTPUT /{realm}/default-optional-client-scopes/{clientScopeId}
/:realm/default-optional-client-scopes/:clientScopeId - DELETEDELETE /{realm}/default-optional-client-scopes/{clientScopeId}
/:realm/default-optional-client-scopes/:clientScopeId - GETGet events Returns all events, or filters them based on URL query parameters listed here
/:realm/events?client=string&dateFrom=string&dateTo=string&first=0&ipAddress=string&max=0&type=string&user=string - DELETEDelete all events
/:realm/events - GETGet the events provider configuration Returns JSON object with events provider configuration
/:realm/events/config - PUTUpdate the events provider Change the events provider and/or its configuration
/:realm/events/config - GETGET /{realm}/group-by-path/{path}
/:realm/group-by-path/:path - POSTRemoves all user sessions.
/:realm/logout-all - POSTPartial export of existing realm into a JSON file.
/:realm/partial-export?exportClients=true&exportGroupsAndRoles=true - POSTPartial import from a JSON file to an existing realm.
/:realm/partialImport - POSTPush the realm’s revocation policy to any client that has an admin url associated with it.
/:realm/push-revocation - DELETERemove a specific user session.
/:realm/sessions/:session - POSTTest LDAP connection
/:realm/testLDAPConnection - POSTPOST /{realm}/testSMTPConnection
/:realm/testSMTPConnection - GETGET /{realm}/users-management-permissions
/:realm/users-management-permissions - PUTPUT /{realm}/users-management-permissions
/:realm/users-management-permissions
User Storage Provider
- GETNeed this for admin console to display simple name of provider when displaying client detail KEYCLOAK-4328
/:id/name - GETNeed this for admin console to display simple name of provider when displaying user detail KEYCLOAK-4328
/:realm/user-storage/:id/name - POSTRemove imported users
/:realm/user-storage/:id/remove-imported-users - POSTTrigger sync of users Action can be "triggerFullSync" or "triggerChangedUsersSync"
/:realm/user-storage/:id/sync?action=string - POSTUnlink imported users from a storage provider
/:realm/user-storage/:id/unlink-users - POSTTrigger sync of mapper data related to ldap mapper (roles, groups, …) direction is "fedToKeycloak" or "keycloakToFed"
/:realm/user-storage/:parentId/mappers/:id/sync?direction=string
Attack Detection
- DELETEClear any user login failures for all users This can release temporary disabled users
/:realm/attack-detection/brute-force/users - GETGet status of a username in brute force detection
/:realm/attack-detection/brute-force/users/:userId - DELETEClear any user login failures for the user This can release temporary disabled user
/:realm/attack-detection/brute-force/users/:userId
Authentication Management
- GETGet authenticator providers Returns a list of authenticator providers.
/:realm/authentication/authenticator-providers - GETGet client authenticator providers Returns a list of client authenticator providers.
/:realm/authentication/client-authenticator-providers - GETGet authenticator provider’s configuration description
/:realm/authentication/config-description/:providerId - GETGet authenticator configuration
/:realm/authentication/config/:id - PUTUpdate authenticator configuration
/:realm/authentication/config/:id - DELETEDelete authenticator configuration
/:realm/authentication/config/:id - POSTAdd new authentication execution
/:realm/authentication/executions - GETGet Single Execution
/:realm/authentication/executions/:executionId - DELETEDelete execution
/:realm/authentication/executions/:executionId - POSTUpdate execution with new configuration
/:realm/authentication/executions/:executionId/config - POSTLower execution’s priority
/:realm/authentication/executions/:executionId/lower-priority - POSTRaise execution’s priority
/:realm/authentication/executions/:executionId/raise-priority - GETGet authentication flows Returns a list of authentication flows.
/:realm/authentication/flows - POSTCreate a new authentication flow
/:realm/authentication/flows - POSTCopy existing authentication flow under a new name The new name is given as 'newName' attribute of the passed JSON object
/:realm/authentication/flows/:flowAlias/copy - GETGet authentication executions for a flow
/:realm/authentication/flows/:flowAlias/executions - PUTUpdate authentication executions of a flow
/:realm/authentication/flows/:flowAlias/executions - POSTAdd new authentication execution to a flow
/:realm/authentication/flows/:flowAlias/executions/execution - POSTAdd new flow with new execution to existing flow
/:realm/authentication/flows/:flowAlias/executions/flow - GETGet authentication flow for id
/:realm/authentication/flows/:id - PUTUpdate an authentication flow
/:realm/authentication/flows/:id - DELETEDelete an authentication flow
/:realm/authentication/flows/:id - GETGet form action providers Returns a list of form action providers.
/:realm/authentication/form-action-providers - GETGet form providers Returns a list of form providers.
/:realm/authentication/form-providers - GETGet configuration descriptions for all clients
/:realm/authentication/per-client-config-description - POSTRegister a new required actions
/:realm/authentication/register-required-action - GETGet required actions Returns a list of required actions.
/:realm/authentication/required-actions - GETGet required action for alias
/:realm/authentication/required-actions/:alias - PUTUpdate required action
/:realm/authentication/required-actions/:alias - DELETEDelete required action
/:realm/authentication/required-actions/:alias - POSTLower required action’s priority
/:realm/authentication/required-actions/:alias/lower-priority - POSTRaise required action’s priority
/:realm/authentication/required-actions/:alias/raise-priority - GETGet unregistered required actions Returns a list of unregistered required actions.
/:realm/authentication/unregistered-required-actions
Client Registration Policy
- GETBase path for retrieve providers with the configProperties properly filled
/:realm/client-registration-policy/providers
Client Scopes
- GETGet client scopes belonging to the realm Returns a list of client scopes belonging to the realm
/:realm/client-scopes - POSTCreate a new client scope Client Scope’s name must be unique!
/:realm/client-scopes - GETGet representation of the client scope
/:realm/client-scopes/:id - PUTUpdate the client scope
/:realm/client-scopes/:id - DELETEDelete the client scope
/:realm/client-scopes/:id
Protocol Mappers
- GETGet mapper by id
/:realm/client-scopes/:id1/protocol-mappers/models/:id2 - PUTUpdate the mapper
/:realm/client-scopes/:id1/protocol-mappers/models/:id2 - DELETEDelete the mapper
/:realm/client-scopes/:id1/protocol-mappers/models/:id2 - POSTCreate multiple mappers
/:realm/client-scopes/:id/protocol-mappers/add-models - GETGet mappers
/:realm/client-scopes/:id/protocol-mappers/models - POSTCreate a mapper
/:realm/client-scopes/:id/protocol-mappers/models - GETGet mappers by name for a specific protocol
/:realm/client-scopes/:id/protocol-mappers/protocol/:protocol - GETGet mapper by id
/:realm/clients/:id1/protocol-mappers/models/:id2 - PUTUpdate the mapper
/:realm/clients/:id1/protocol-mappers/models/:id2 - DELETEDelete the mapper
/:realm/clients/:id1/protocol-mappers/models/:id2 - POSTCreate multiple mappers
/:realm/clients/:id/protocol-mappers/add-models - GETGet mappers
/:realm/clients/:id/protocol-mappers/models - POSTCreate a mapper
/:realm/clients/:id/protocol-mappers/models - GETGet mappers by name for a specific protocol
/:realm/clients/:id/protocol-mappers/protocol/:protocol
Scope Mappings
- GETGet all scope mappings for the client
/:realm/client-scopes/:id/scope-mappings - GETGet the roles associated with a client’s scope Returns roles for the client.
/:realm/client-scopes/:id/scope-mappings/clients/:client - POSTAdd client-level roles to the client’s scope
/:realm/client-scopes/:id/scope-mappings/clients/:client - DELETERemove client-level roles from the client’s scope.
/:realm/client-scopes/:id/scope-mappings/clients/:client - GETThe available client-level roles Returns the roles for the client that can be associated with the client’s scope
/:realm/client-scopes/:id/scope-mappings/clients/:client/available - GETGet effective client roles Returns the roles for the client that are associated with the client’s scope.
/:realm/client-scopes/:id/scope-mappings/clients/:client/composite - GETGet realm-level roles associated with the client’s scope
/:realm/client-scopes/:id/scope-mappings/realm - POSTAdd a set of realm-level roles to the client’s scope
/:realm/client-scopes/:id/scope-mappings/realm - DELETERemove a set of realm-level roles from the client’s scope
/:realm/client-scopes/:id/scope-mappings/realm - GETGet realm-level roles that are available to attach to this client’s scope
/:realm/client-scopes/:id/scope-mappings/realm/available - GETGet effective realm-level roles associated with the client’s scope What this does is recurse any composite roles associated with the client’s scope and adds the roles to this lists.
/:realm/client-scopes/:id/scope-mappings/realm/composite - GETGet all scope mappings for the client
/:realm/clients/:id/scope-mappings - GETGet the roles associated with a client’s scope Returns roles for the client.
/:realm/clients/:id/scope-mappings/clients/:client - POSTAdd client-level roles to the client’s scope
/:realm/clients/:id/scope-mappings/clients/:client - DELETERemove client-level roles from the client’s scope.
/:realm/clients/:id/scope-mappings/clients/:client - GETThe available client-level roles Returns the roles for the client that can be associated with the client’s scope
/:realm/clients/:id/scope-mappings/clients/:client/available - GETGet effective client roles Returns the roles for the client that are associated with the client’s scope.
/:realm/clients/:id/scope-mappings/clients/:client/composite - GETGet realm-level roles associated with the client’s scope
/:realm/clients/:id/scope-mappings/realm - POSTAdd a set of realm-level roles to the client’s scope
/:realm/clients/:id/scope-mappings/realm - DELETERemove a set of realm-level roles from the client’s scope
/:realm/clients/:id/scope-mappings/realm - GETGet realm-level roles that are available to attach to this client’s scope
/:realm/clients/:id/scope-mappings/realm/available - GETGet effective realm-level roles associated with the client’s scope What this does is recurse any composite roles associated with the client’s scope and adds the roles to this lists.
/:realm/clients/:id/scope-mappings/realm/composite
Clients
- GETGet clients belonging to the realm Returns a list of clients belonging to the realm
/:realm/clients?clientId=string&first=0&max=0&search=true&viewableOnly=true - POSTCreate a new client Client’s client_id must be unique!
/:realm/clients - GETGet representation of the client
/:realm/clients/:id - PUTUpdate the client
/:realm/clients/:id - DELETEDelete the client
/:realm/clients/:id - GETGet the client secret
/:realm/clients/:id/client-secret - POSTGenerate a new secret for the client
/:realm/clients/:id/client-secret - GETGet default client scopes.
/:realm/clients/:id/default-client-scopes - PUTPUT /{realm}/clients/{id}/default-client-scopes/{clientScopeId}
/:realm/clients/:id/default-client-scopes/:clientScopeId - DELETEDELETE /{realm}/clients/{id}/default-client-scopes/{clientScopeId}
/:realm/clients/:id/default-client-scopes/:clientScopeId - GETCreate JSON with payload of example access token
/:realm/clients/:id/evaluate-scopes/generate-example-access-token?scope=string&userId=string - GETReturn list of all protocol mappers, which will be used when generating tokens issued for particular client.
/:realm/clients/:id/evaluate-scopes/protocol-mappers?scope=string - GETGet effective scope mapping of all roles of particular role container, which this client is defacto allowed to have in the accessToken issued for him.
/:realm/clients/:id/evaluate-scopes/scope-mappings/:roleContainerId/granted?scope=string - GETGet roles, which this client doesn’t have scope for and can’t have them in the accessToken issued for him.
/:realm/clients/:id/evaluate-scopes/scope-mappings/:roleContainerId/not-granted?scope=string - GETGET /{realm}/clients/{id}/installation/providers/{providerId}
/:realm/clients/:id/installation/providers/:providerId - GETReturn object stating whether client Authorization permissions have been initialized or not and a reference
/:realm/clients/:id/management/permissions - PUTReturn object stating whether client Authorization permissions have been initialized or not and a reference
/:realm/clients/:id/management/permissions - POSTRegister a cluster node with the client Manually register cluster node to this client - usually it’s not needed to call this directly as adapter should handle by sending registration request to Keycloak
/:realm/clients/:id/nodes - DELETEUnregister a cluster node from the client
/:realm/clients/:id/nodes/:node - GETGet application offline session count Returns a number of offline user sessions associated with this client { "count": number }
/:realm/clients/:id/offline-session-count - GETGet offline sessions for client Returns a list of offline user sessions associated with this client
/:realm/clients/:id/offline-sessions?first=0&max=0 - GETGet optional client scopes.
/:realm/clients/:id/optional-client-scopes - PUTPUT /{realm}/clients/{id}/optional-client-scopes/{clientScopeId}
/:realm/clients/:id/optional-client-scopes/:clientScopeId - DELETEDELETE /{realm}/clients/{id}/optional-client-scopes/{clientScopeId}
/:realm/clients/:id/optional-client-scopes/:clientScopeId - POSTPush the client’s revocation policy to its admin URL If the client has an admin URL, push revocation policy to it.
/:realm/clients/:id/push-revocation - POSTGenerate a new registration access token for the client
/:realm/clients/:id/registration-access-token - GETGet a user dedicated to the service account
/:realm/clients/:id/service-account-user - GETGet application session count Returns a number of user sessions associated with this client { "count": number }
/:realm/clients/:id/session-count - GETTest if registered cluster nodes are available Tests availability by sending 'ping' request to all cluster nodes.
/:realm/clients/:id/test-nodes-available - GETGet user sessions for client Returns a list of user sessions associated with this client
/:realm/clients/:id/user-sessions?first=0&max=0
Client Initial Access
- GETGET /{realm}/clients-initial-access
/:realm/clients-initial-access - POSTCreate a new initial access token.
/:realm/clients-initial-access - DELETEDELETE /{realm}/clients-initial-access/{id}
/:realm/clients-initial-access/:id
Client Attribute Certificate
- GETGet key info
/:realm/clients/:id/certificates/:attr - POSTGet a keystore file for the client, containing private key and public certificate
/:realm/clients/:id/certificates/:attr/download - POSTGenerate a new certificate with new key pair
/:realm/clients/:id/certificates/:attr/generate - POSTGenerate a new keypair and certificate, and get the private key file Generates a keypair and certificate and serves the private key in a specified keystore format.
/:realm/clients/:id/certificates/:attr/generate-and-download - POSTUpload certificate and eventually private key
/:realm/clients/:id/certificates/:attr/upload - POSTUpload only certificate, not private key
/:realm/clients/:id/certificates/:attr/upload-certificate
Roles
- GETGet all roles for the realm or client
/:realm/clients/:id/roles?briefRepresentation=true&first=0&max=0&search=string - POSTCreate a new role for the realm or client
/:realm/clients/:id/roles - GETGet a role by name
/:realm/clients/:id/roles/:role-name - PUTUpdate a role by name
/:realm/clients/:id/roles/:role-name - DELETEDelete a role by name
/:realm/clients/:id/roles/:role-name - GETGet composites of the role
/:realm/clients/:id/roles/:role-name/composites - POSTAdd a composite to the role
/:realm/clients/:id/roles/:role-name/composites - DELETERemove roles from the role’s composite
/:realm/clients/:id/roles/:role-name/composites - GETAn app-level roles for the specified app for the role’s composite
/:realm/clients/:id/roles/:role-name/composites/clients/:client - GETGet realm-level roles of the role’s composite
/:realm/clients/:id/roles/:role-name/composites/realm - GETReturn List of Groups that have the specified role name
/:realm/clients/:id/roles/:role-name/groups?briefRepresentation=true&first=0&max=0 - GETReturn object stating whether role Authoirzation permissions have been initialized or not and a reference
/:realm/clients/:id/roles/:role-name/management/permissions - PUTReturn object stating whether role Authoirzation permissions have been initialized or not and a reference
/:realm/clients/:id/roles/:role-name/management/permissions - GETReturn List of Users that have the specified role name
/:realm/clients/:id/roles/:role-name/users?first=0&max=0 - GETGet all roles for the realm or client
/:realm/roles?briefRepresentation=true&first=0&max=0&search=string - POSTCreate a new role for the realm or client
/:realm/roles - GETGet a role by name
/:realm/roles/:role-name - PUTUpdate a role by name
/:realm/roles/:role-name - DELETEDelete a role by name
/:realm/roles/:role-name - GETGet composites of the role
/:realm/roles/:role-name/composites - POSTAdd a composite to the role
/:realm/roles/:role-name/composites - DELETERemove roles from the role’s composite
/:realm/roles/:role-name/composites - GETAn app-level roles for the specified app for the role’s composite
/:realm/roles/:role-name/composites/clients/:client - GETGet realm-level roles of the role’s composite
/:realm/roles/:role-name/composites/realm - GETReturn List of Groups that have the specified role name
/:realm/roles/:role-name/groups?briefRepresentation=true&first=0&max=0 - GETReturn object stating whether role Authoirzation permissions have been initialized or not and a reference
/:realm/roles/:role-name/management/permissions - PUTReturn object stating whether role Authoirzation permissions have been initialized or not and a reference
/:realm/roles/:role-name/management/permissions - GETReturn List of Users that have the specified role name
/:realm/roles/:role-name/users?first=0&max=0
Component
- GETGET /{realm}/components
/:realm/components?name=string&parent=string&type=string - POSTPOST /{realm}/components
/:realm/components - GETGET /{realm}/components/{id}
/:realm/components/:id - PUTPUT /{realm}/components/{id}
/:realm/components/:id - DELETEDELETE /{realm}/components/{id}
/:realm/components/:id - GETList of subcomponent types that are available to configure for a particular parent component.
/:realm/components/:id/sub-component-types?type=string
Groups
- GETGet group hierarchy.
/:realm/groups?briefRepresentation=true&first=0&max=0&search=string - POSTcreate or add a top level realm groupSet or create child.
/:realm/groups - GETReturns the groups counts.
/:realm/groups/count?search=string&top=true - GETGET /{realm}/groups/{id}
/:realm/groups/:id - PUTUpdate group, ignores subgroups.
/:realm/groups/:id - DELETEDELETE /{realm}/groups/{id}
/:realm/groups/:id - POSTSet or create child.
/:realm/groups/:id/children - GETReturn object stating whether client Authorization permissions have been initialized or not and a reference
/:realm/groups/:id/management/permissions - PUTReturn object stating whether client Authorization permissions have been initialized or not and a reference
/:realm/groups/:id/management/permissions - GETGet users Returns a list of users, filtered according to query parameters
/:realm/groups/:id/members?briefRepresentation=true&first=0&max=0
Role Mapper
- GETGet role mappings
/:realm/groups/:id/role-mappings - GETGet realm-level role mappings
/:realm/groups/:id/role-mappings/realm - POSTAdd realm-level role mappings to the user
/:realm/groups/:id/role-mappings/realm - DELETEDelete realm-level role mappings
/:realm/groups/:id/role-mappings/realm - GETGet realm-level roles that can be mapped
/:realm/groups/:id/role-mappings/realm/available - GETGet effective realm-level role mappings This will recurse all composite roles to get the result.
/:realm/groups/:id/role-mappings/realm/composite - GETGet role mappings
/:realm/users/:id/role-mappings - GETGet realm-level role mappings
/:realm/users/:id/role-mappings/realm - POSTAdd realm-level role mappings to the user
/:realm/users/:id/role-mappings/realm - DELETEDelete realm-level role mappings
/:realm/users/:id/role-mappings/realm - GETGet realm-level roles that can be mapped
/:realm/users/:id/role-mappings/realm/available - GETGet effective realm-level role mappings This will recurse all composite roles to get the result.
/:realm/users/:id/role-mappings/realm/composite
Client Role Mappings
- GETGet client-level role mappings for the user, and the app
/:realm/groups/:id/role-mappings/clients/:client - POSTAdd client-level roles to the user role mapping
/:realm/groups/:id/role-mappings/clients/:client - DELETEDelete client-level roles from user role mapping
/:realm/groups/:id/role-mappings/clients/:client - GETGet available client-level roles that can be mapped to the user
/:realm/groups/:id/role-mappings/clients/:client/available - GETGet effective client-level role mappings This recurses any composite roles
/:realm/groups/:id/role-mappings/clients/:client/composite - GETGet client-level role mappings for the user, and the app
/:realm/users/:id/role-mappings/clients/:client - POSTAdd client-level roles to the user role mapping
/:realm/users/:id/role-mappings/clients/:client - DELETEDelete client-level roles from user role mapping
/:realm/users/:id/role-mappings/clients/:client - GETGet available client-level roles that can be mapped to the user
/:realm/users/:id/role-mappings/clients/:client/available - GETGet effective client-level role mappings This recurses any composite roles
/:realm/users/:id/role-mappings/clients/:client/composite
Identity Providers
- POSTImport identity provider from uploaded JSON file
/:realm/identity-provider/import-config - GETGet identity providers
/:realm/identity-provider/instances - POSTCreate a new identity provider
/:realm/identity-provider/instances - GETGet the identity provider
/:realm/identity-provider/instances/:alias - PUTUpdate the identity provider
/:realm/identity-provider/instances/:alias - DELETEDelete the identity provider
/:realm/identity-provider/instances/:alias - GETExport public broker configuration for identity provider
/:realm/identity-provider/instances/:alias/export?format=string - GETReturn object stating whether client Authorization permissions have been initialized or not and a reference
/:realm/identity-provider/instances/:alias/management/permissions - PUTReturn object stating whether client Authorization permissions have been initialized or not and a reference
/:realm/identity-provider/instances/:alias/management/permissions - GETGet mapper types for identity provider
/:realm/identity-provider/instances/:alias/mapper-types - GETGet mappers for identity provider
/:realm/identity-provider/instances/:alias/mappers - POSTAdd a mapper to identity provider
/:realm/identity-provider/instances/:alias/mappers - GETGet mapper by id for the identity provider
/:realm/identity-provider/instances/:alias/mappers/:id - PUTUpdate a mapper for the identity provider
/:realm/identity-provider/instances/:alias/mappers/:id - DELETEDelete a mapper for the identity provider
/:realm/identity-provider/instances/:alias/mappers/:id - GETGet identity providers
/:realm/identity-provider/providers/:provider_id
Key
- GETGET /{realm}/keys
/:realm/keys
Roles (by ID)
- GETGet a specific role’s representation
/:realm/roles-by-id/:role-id - PUTUpdate the role
/:realm/roles-by-id/:role-id - DELETEDelete the role
/:realm/roles-by-id/:role-id - GETGet role’s children Returns a set of role’s children provided the role is a composite.
/:realm/roles-by-id/:role-id/composites - POSTMake the role a composite role by associating some child roles
/:realm/roles-by-id/:role-id/composites - DELETERemove a set of roles from the role’s composite
/:realm/roles-by-id/:role-id/composites - GETGet client-level roles for the client that are in the role’s composite
/:realm/roles-by-id/:role-id/composites/clients/:client - GETGet realm-level roles that are in the role’s composite
/:realm/roles-by-id/:role-id/composites/realm - GETReturn object stating whether role Authoirzation permissions have been initialized or not and a reference
/:realm/roles-by-id/:role-id/management/permissions - PUTReturn object stating whether role Authoirzation permissions have been initialized or not and a reference
/:realm/roles-by-id/:role-id/management/permissions
Users
- GETGet users Returns a list of users, filtered according to query parameters
/:realm/users?briefRepresentation=true&email=string&first=0&firstName=string&lastName=string&max=0&search=string&username=string - POSTCreate a new user Username must be unique.
/:realm/users - GETReturns the number of users that match the given criteria.
/:realm/users/count?email=string&firstName=string&lastName=string&search=string&username=string - GETGet representation of the user
/:realm/users/:id - PUTUpdate the user
/:realm/users/:id - DELETEDelete the user
/:realm/users/:id - GETReturn credential types, which are provided by the user storage where user is stored.
/:realm/users/:id/configured-user-storage-credential-types - GETGet consents granted by the user
/:realm/users/:id/consents - DELETERevoke consent and offline tokens for particular client from user
/:realm/users/:id/consents/:client - GETGET /{realm}/users/{id}/credentials
/:realm/users/:id/credentials - DELETERemove a credential for a user
/:realm/users/:id/credentials/:credentialId - POSTMove a credential to a position behind another credential
/:realm/users/:id/credentials/:credentialId/moveAfter/:newPreviousCredentialId - POSTMove a credential to a first position in the credentials list of the user
/:realm/users/:id/credentials/:credentialId/moveToFirst - PUTUpdate a credential label for a user
/:realm/users/:id/credentials/:credentialId/userLabel - PUTDisable all credentials for a user of a specific type
/:realm/users/:id/disable-credential-types - PUTSend a update account email to the user An email contains a link the user can click to perform a set of required actions.
/:realm/users/:id/execute-actions-email?client_id=string&lifespan=0&redirect_uri=string - GETGet social logins associated with the user
/:realm/users/:id/federated-identity - POSTAdd a social login provider to the user
/:realm/users/:id/federated-identity/:provider - DELETERemove a social login provider from user
/:realm/users/:id/federated-identity/:provider - GETGET /{realm}/users/{id}/groups
/:realm/users/:id/groups?briefRepresentation=true&first=0&max=0&search=string - GETGET /{realm}/users/{id}/groups/count
/:realm/users/:id/groups/count?search=string - PUTPUT /{realm}/users/{id}/groups/{groupId}
/:realm/users/:id/groups/:groupId - DELETEDELETE /{realm}/users/{id}/groups/{groupId}
/:realm/users/:id/groups/:groupId - POSTImpersonate the user
/:realm/users/:id/impersonation - POSTRemove all user sessions associated with the user Also send notification to all clients that have an admin URL to invalidate the sessions for the particular user.
/:realm/users/:id/logout - GETGet offline sessions associated with the user and client
/:realm/users/:id/offline-sessions/:clientId - PUTSet up a new password for the user.
/:realm/users/:id/reset-password - PUTSend an email-verification email to the user An email contains a link the user can click to verify their email address.
/:realm/users/:id/send-verify-email?client_id=string&redirect_uri=string - GETGet sessions associated with the user
/:realm/users/:id/sessions
API details
- Base URL
http://keycloak.local- Authentication
- A bearer token in the Authorization header
- Operations
- 281 operations on 192 pathsGET 134POST 67DELETE 44PUT 36
- Main resources
- Realms Admin 35Authentication Management 33Clients 30Users 29Roles 28Scope Mappings 22Identity Providers 16Protocol Mappers 14Role Mapper 12Client Role Mappings 10
- Response formats
application/jsonapplication/octet-stream- Description format
- OpenAPI 3.0.2, API version
1 - Links
- Documentation · OpenAPI document
- Listed from
- APIs.guru OpenAPI Directory (CC0-1.0)
Source updated
How to test the Keycloak Admin REST API in Swastik Codes
- Open the APISelect “Fork & run in Swastik Codes” on this page. Sign in or create a free account if asked.
- Fork it into your workspaceChoose a workspace. You get your own copy of the Keycloak Admin REST API collection, without the publisher's secrets.
- Add your credentialsThis API uses A bearer token in the Authorization header. Add yours in the collection's variables or an environment; the requests already reference it.
- Send a requestPick an endpoint, for example “Get themes, social providers, auth providers, and event listeners available on this server” (GET /), and press Send. Check the response, add tests and run the whole collection with the runner.
Frequently asked questions
What is the Keycloak Admin REST API?
This is a REST API reference for the Keycloak Admin It is listed under Developer tools and has 281 endpoints.
Who publishes the Keycloak Admin REST API?
It is listed from Keycloak's public API description (an OpenAPI document), not published by Keycloak on Swastik Codes. Anyone who controls keycloak.org can claim the profile by adding a DNS TXT record.
What is the base URL of the Keycloak Admin REST API?
Requests go to http://keycloak.local. Endpoint paths are added to this base URL.
How do I authenticate with the Keycloak Admin REST API?
With A bearer token in the Authorization header.
How many endpoints does the Keycloak Admin REST API have?
281 operations on 192 paths (134 GET, 67 POST, 44 DELETE, 36 PUT). The largest groups are Realms Admin, Authentication Management, Clients, Users.
Is forking the Keycloak Admin REST API free?
Yes. Forking copies the collection into your workspace for free. It has been starred 0 times and forked 0 times.