Keycloak REST Services 1.3.1.Final
Resources
MethodURLDescription
GET/admin/realmsReturns a list of realms.
POST/admin/realmsImport a realm from a full representation of that realm.
POST/admin/realmsUpload a realm from a uploaded JSON file.
GET/admin/realms/{realm}Get the top-level representation of the realm.
PUT/admin/realms/{realm}Update the top-level information of this realm.
DELETE/admin/realms/{realm}Delete this realm.
GET/admin/realms/{realm}/admin-events?authRealm=…&authClient=…&authUser=…&authIpAddress=…&resourcePath=…&dateFrom=…&dateTo=…&first=…&max=…Query admin events.
DELETE/admin/realms/{realm}/admin-eventsDelete all admin events.
GET/admin/realms/{realm}/client-session-statsReturns a JSON map.
GET/admin/realms/{realm}/clientsList of clients belonging to this realm.
POST/admin/realms/{realm}/clientsCreate a new client.
PUT/admin/realms/{realm}/clients/{id}Update the client.
GET/admin/realms/{realm}/clients/{id}Get representation of the client.
DELETE/admin/realms/{realm}/clients/{id}Delete this client.
GET/admin/realms/{realm}/clients/{id}/allowed-originsReturns set of allowed origin.
PUT/admin/realms/{realm}/clients/{id}/allowed-originsChange the set of allowed origins.
DELETE/admin/realms/{realm}/clients/{id}/allowed-originsRemove set of allowed origins from current allowed origins list.
GET/admin/realms/{realm}/clients/{id}/certificates/{attr} 
POST/admin/realms/{realm}/clients/{id}/certificates/{attr}/download 
POST/admin/realms/{realm}/clients/{id}/certificates/{attr}/generate 
POST/admin/realms/{realm}/clients/{id}/certificates/{attr}/upload 
POST/admin/realms/{realm}/clients/{id}/client-secretGenerates a new secret for this client
GET/admin/realms/{realm}/clients/{id}/client-secretGet the secret of this client
GET/admin/realms/{realm}/clients/{id}/installation/jbossReturn XML that can be included in the JBoss/Wildfly Keycloak subsystem to configure the adapter of that client.
GET/admin/realms/{realm}/clients/{id}/installation/jsonReturn keycloak.json file for this client to be used to configure the adapter of that client.
POST/admin/realms/{realm}/clients/{id}/logout-allIf the client has an admin URL, invalidate all sessions associated with that client directly.
POST/admin/realms/{realm}/clients/{id}/logout-user/{username}If the client has an admin URL, invalidate the sessions for a particular user directly.
POST/admin/realms/{realm}/clients/{id}/nodesManually 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
DELETE/admin/realms/{realm}/clients/{id}/nodes/{node}Unregister cluster node from this client
POST/admin/realms/{realm}/clients/{id}/protocol-mappers/add-modelscreates multiple mapper
POST/admin/realms/{realm}/clients/{id}/protocol-mappers/modelscreates mapper
GET/admin/realms/{realm}/clients/{id}/protocol-mappers/models 
GET/admin/realms/{realm}/clients/{id}/protocol-mappers/models/{id} 
PUT/admin/realms/{realm}/clients/{id}/protocol-mappers/models/{id} 
DELETE/admin/realms/{realm}/clients/{id}/protocol-mappers/models/{id} 
GET/admin/realms/{realm}/clients/{id}/protocol-mappers/protocol/{protocol}Map of mappers by name for a specific protocol
POST/admin/realms/{realm}/clients/{id}/push-revocationIf the client has an admin URL, push the client's revocation policy to it.
GET/admin/realms/{realm}/clients/{id}/rolesList all roles for this realm or client
POST/admin/realms/{realm}/clients/{id}/rolesCreate a new role for this realm or client
GET/admin/realms/{realm}/clients/{id}/roles/{role-name}Get a role by name
DELETE/admin/realms/{realm}/clients/{id}/roles/{role-name}Delete a role by name
PUT/admin/realms/{realm}/clients/{id}/roles/{role-name}Update a role by name
POST/admin/realms/{realm}/clients/{id}/roles/{role-name}/compositesAdd a composite to this role
GET/admin/realms/{realm}/clients/{id}/roles/{role-name}/compositesList composites of this role
DELETE/admin/realms/{realm}/clients/{id}/roles/{role-name}/compositesRemove roles from this role's composite
GET/admin/realms/{realm}/clients/{id}/roles/{role-name}/composites/clients/{client}An app-level roles for a specific app for this role's composite
GET/admin/realms/{realm}/clients/{id}/roles/{role-name}/composites/realmGet realm-level roles of this role's composite
GET/admin/realms/{realm}/clients/{id}/scope-mappingsGet all scope mappings for this client
GET/admin/realms/{realm}/clients/{id}/scope-mappings/clients/{client}Get the roles associated with a client's scope for a specific client.
POST/admin/realms/{realm}/clients/{id}/scope-mappings/clients/{client}Add client-level roles to the client's scope
DELETE/admin/realms/{realm}/clients/{id}/scope-mappings/clients/{client}Remove client-level roles from the client's scope.
GET/admin/realms/{realm}/clients/{id}/scope-mappings/clients/{client}/availableThe available client-level roles that can be associated with the client's scope
GET/admin/realms/{realm}/clients/{id}/scope-mappings/clients/{client}/compositeGet effective client roles that are associated with the client's scope for a specific client.
GET/admin/realms/{realm}/clients/{id}/scope-mappings/realmGet list of realm-level roles associated with this client's scope.
POST/admin/realms/{realm}/clients/{id}/scope-mappings/realmAdd a set of realm-level roles to the client's scope
DELETE/admin/realms/{realm}/clients/{id}/scope-mappings/realmRemove a set of realm-level roles from the client's scope
GET/admin/realms/{realm}/clients/{id}/scope-mappings/realm/availableGet list of realm-level roles that are available to attach to this client's scope.
GET/admin/realms/{realm}/clients/{id}/scope-mappings/realm/compositeGet all effective realm-level roles that are associated with this client's scope.
GET/admin/realms/{realm}/clients/{id}/session-countNumber of user sessions associated with this client { "count": number }
GET/admin/realms/{realm}/clients/{id}/test-nodes-availableTest if registered cluster nodes are available by sending 'ping' request to all of them
GET/admin/realms/{realm}/clients/{id}/user-sessions?first=…&max=…Return a list of user sessions associated with this client
GET/admin/realms/{realm}/events?client=…&user=…&dateFrom=…&dateTo=…&ipAddress=…&first=…&max=…Query events.
DELETE/admin/realms/{realm}/eventsDelete all events.
GET/admin/realms/{realm}/events/configView the events provider and how it is configured.
PUT/admin/realms/{realm}/events/configChange the events provider and/or it's configuration
POST/admin/realms/{realm}/identity-provider/import-config 
POST/admin/realms/{realm}/identity-provider/import-config 
GET/admin/realms/{realm}/identity-provider/instances 
POST/admin/realms/{realm}/identity-provider/instances 
GET/admin/realms/{realm}/identity-provider/instances/{alias} 
DELETE/admin/realms/{realm}/identity-provider/instances/{alias} 
PUT/admin/realms/{realm}/identity-provider/instances/{alias} 
GET/admin/realms/{realm}/identity-provider/instances/{alias}/export?format=… 
GET/admin/realms/{realm}/identity-provider/instances/{alias}/mapper-types 
GET/admin/realms/{realm}/identity-provider/instances/{alias}/mappers 
POST/admin/realms/{realm}/identity-provider/instances/{alias}/mappers 
GET/admin/realms/{realm}/identity-provider/instances/{alias}/mappers/{id} 
PUT/admin/realms/{realm}/identity-provider/instances/{alias}/mappers/{id} 
DELETE/admin/realms/{realm}/identity-provider/instances/{alias}/mappers/{id} 
GET/admin/realms/{realm}/identity-provider/providers/{provider_id} 
POST/admin/realms/{realm}/logout-allRemoves all user sessions.
POST/admin/realms/{realm}/push-revocationPush the realm's revocation policy to any client that has an admin url associated with it.
GET/admin/realms/{realm}/rolesList all roles for this realm or client
POST/admin/realms/{realm}/rolesCreate a new role for this realm or client
GET/admin/realms/{realm}/roles/{role-name}Get a role by name
DELETE/admin/realms/{realm}/roles/{role-name}Delete a role by name
PUT/admin/realms/{realm}/roles/{role-name}Update a role by name
POST/admin/realms/{realm}/roles/{role-name}/compositesAdd a composite to this role
GET/admin/realms/{realm}/roles/{role-name}/compositesList composites of this role
DELETE/admin/realms/{realm}/roles/{role-name}/compositesRemove roles from this role's composite
GET/admin/realms/{realm}/roles/{role-name}/composites/clients/{client}An app-level roles for a specific app for this role's composite
GET/admin/realms/{realm}/roles/{role-name}/composites/realmGet realm-level roles of this role's composite
GET/admin/realms/{realm}/roles-by-id/{role-id}Get a specific role's representation
DELETE/admin/realms/{realm}/roles-by-id/{role-id}Delete this role
PUT/admin/realms/{realm}/roles-by-id/{role-id}Update this role
POST/admin/realms/{realm}/roles-by-id/{role-id}/compositesMake this role a composite role by associating some child roles to it.
GET/admin/realms/{realm}/roles-by-id/{role-id}/compositesIf this role is a composite, return a set of its children
DELETE/admin/realms/{realm}/roles-by-id/{role-id}/compositesRemove the listed set of roles from this role's composite
GET/admin/realms/{realm}/roles-by-id/{role-id}/composites/clients/{client}Return a set of client-level roles for a specific client that are in the role's composite
GET/admin/realms/{realm}/roles-by-id/{role-id}/composites/realmReturn a set of realm-level roles that are in the role's composite
GET/admin/realms/{realm}/roles-by-id/{role}/composites/clients/{client}Return a set of client-level roles for a specific client that are in the role's composite
DELETE/admin/realms/{realm}/sessions/{session}Remove a specific user session.
GET/admin/realms/{realm}/testLDAPConnection?action=…&connectionUrl=…&bindDn=…&bindCredential=… 
POST/admin/realms/{realm}/user-federation/instancesCreate a provider
GET/admin/realms/{realm}/user-federation/instanceslist configured providers
PUT/admin/realms/{realm}/user-federation/instances/{id}Update a provider
GET/admin/realms/{realm}/user-federation/instances/{id}get a provider
DELETE/admin/realms/{realm}/user-federation/instances/{id}Delete a provider
GET/admin/realms/{realm}/user-federation/instances/{id}/mapper-typesList of available User Federation mapper types
GET/admin/realms/{realm}/user-federation/instances/{id}/mappersGet mappers configured for this provider
POST/admin/realms/{realm}/user-federation/instances/{id}/mappersCreate mapper
GET/admin/realms/{realm}/user-federation/instances/{id}/mappers/{id}Get mapper
PUT/admin/realms/{realm}/user-federation/instances/{id}/mappers/{id}Update mapper
DELETE/admin/realms/{realm}/user-federation/instances/{id}/mappers/{id}Delete mapper with given ID
POST/admin/realms/{realm}/user-federation/instances/{id}/sync?action=…trigger sync of users
GET/admin/realms/{realm}/user-federation/providersGet List of available provider factories
GET/admin/realms/{realm}/user-federation/providers/{id}Get factory with given ID
POST/admin/realms/{realm}/usersCreate a new user.
GET/admin/realms/{realm}/users?search=…&lastName=…&firstName=…&email=…&username=…&first=…&max=…Query list of users.
PUT/admin/realms/{realm}/users/{id}Update the user
GET/admin/realms/{realm}/users/{id}Get represenation of the user
DELETE/admin/realms/{realm}/users/{id}delete this user
GET/admin/realms/{realm}/users/{id}/consentsList set of consents granted by this user.
DELETE/admin/realms/{realm}/users/{id}/consents/{client}Revoke consent for particular client
GET/admin/realms/{realm}/users/{id}/federated-identityList set of social logins associated with this user.
POST/admin/realms/{realm}/users/{id}/federated-identity/{provider} 
DELETE/admin/realms/{realm}/users/{id}/federated-identity/{provider} 
POST/admin/realms/{realm}/users/{id}/logoutRemove all user sessions associated with this user.
PUT/admin/realms/{realm}/users/{id}/remove-totp 
PUT/admin/realms/{realm}/users/{id}/reset-passwordSet up a temporary password for this user.
PUT/admin/realms/{realm}/users/{id}/reset-password-email?redirect_uri=…&client_id=…Send an email to the user with a link they can click to reset their password.
GET/admin/realms/{realm}/users/{id}/role-mappingsGet role mappings for this user
GET/admin/realms/{realm}/users/{id}/role-mappings/clients/{client}Get client-level role mappings for this user for a specific app
POST/admin/realms/{realm}/users/{id}/role-mappings/clients/{client}Add client-level roles to the user role mapping.
DELETE/admin/realms/{realm}/users/{id}/role-mappings/clients/{client}Delete client-level roles from user role mapping.
GET/admin/realms/{realm}/users/{id}/role-mappings/clients/{client}/availableGet available client-level roles that can be mapped to the user
GET/admin/realms/{realm}/users/{id}/role-mappings/clients/{client}/compositeGet effective client-level role mappings.
GET/admin/realms/{realm}/users/{id}/role-mappings/realmGet realm-level role mappings for this user
POST/admin/realms/{realm}/users/{id}/role-mappings/realmAdd realm-level role mappings
DELETE/admin/realms/{realm}/users/{id}/role-mappings/realmDelete realm-level role mappings
GET/admin/realms/{realm}/users/{id}/role-mappings/realm/availableRealm-level roles that can be mapped to this user
GET/admin/realms/{realm}/users/{id}/role-mappings/realm/compositeEffective realm-level role mappings for this user.
PUT/admin/realms/{realm}/users/{id}/send-verify-email?redirect_uri=…&client_id=…Send an email to the user with a link they can click to verify their email address.
GET/admin/realms/{realm}/users/{id}/sessionsList set of sessions associated with this user.
GET/admin/serverinfoReturns a list of themes, social providers, auth providers, and event listeners available on this server

Keycloak REST Services 1.3.1.Final