keycloak.keycloak_admin
=======================

.. py:module:: keycloak.keycloak_admin

.. autoapi-nested-parse::

   The keycloak admin module.



Classes
-------

.. autoapisummary::

   keycloak.keycloak_admin.KeycloakAdmin


Module Contents
---------------

.. py:class:: KeycloakAdmin(server_url: str | None = None, grant_type: str | None = None, username: str | None = None, password: str | None = None, token: dict | None = None, totp: str | None = None, realm_name: str = 'master', client_id: str = 'admin-cli', verify: bool | str = True, client_secret_key: str | None = None, custom_headers: dict | None = None, user_realm_name: str | None = None, timeout: int = 60, cert: str | tuple | None = None, max_retries: int = 1, connection: keycloak.openid_connection.KeycloakOpenIDConnection | None = None, pool_maxsize: int | None = None)

   Keycloak Admin client.

   :param server_url: Keycloak server url
   :type server_url: str
   :param username: admin username
   :type username: str
   :param password: admin password
   :type password: str
   :param token: access and refresh tokens
   :type token: dict
   :param totp: Time based OTP
   :type totp: str
   :param realm_name: realm name
   :type realm_name: str
   :param client_id: client id
   :type client_id: str
   :param verify: Boolean value to enable or disable certificate validation or a string
       containing a path to a CA bundle to use
   :type verify: Union[bool,str]
   :param client_secret_key: client secret key
       (optional, required only for access type confidential)
   :type client_secret_key: str
   :param custom_headers: dict of custom header to pass to each HTML request
   :type custom_headers: dict
   :param user_realm_name: The realm name of the user, if different from realm_name
   :type user_realm_name: str
   :param timeout: connection timeout in seconds
   :type timeout: int
   :param cert: An SSL certificate used by the requested host to authenticate the client.
       Either a path to an SSL certificate file, or two-tuple of
       (certificate file, key file).
   :type cert: Union[str,Tuple[str,str]]
   :param max_retries: The total number of times to retry HTTP requests.
   :type max_retries: int
   :param connection: A KeycloakOpenIDConnection as an alternative to individual params.
   :type connection: KeycloakOpenIDConnection
   :param pool_maxsize: The maximum number of connections to save in the pool.
   :type pool_maxsize: int


   .. py:attribute:: PAGE_SIZE
      :value: 100



   .. py:property:: connection
      :type: keycloak.openid_connection.KeycloakOpenIDConnection


      Get connection.

      :returns: Connection manager
      :rtype: KeycloakOpenIDConnection



   .. py:method:: __fetch_all(url: str, query: dict | None = None) -> list

      Paginate over get requests.

      Wrapper function to paginate GET requests.

      :param url: The url on which the query is executed
      :type url: str
      :param query: Existing query parameters (optional)
      :type query: dict

      :return: Combined results of paginated queries
      :rtype: list



   .. py:method:: __fetch_paginated(url: str, query: dict | None = None) -> dict | list

      Make a specific paginated request.

      :param url: The url on which the query is executed
      :type url: str
      :param query: Pagination settings
      :type query: dict
      :returns: Response
      :rtype: dict



   .. py:method:: get_current_realm() -> str

      Return the currently configured realm.

      :returns: Currently configured realm name
      :rtype: str



   .. py:method:: change_current_realm(realm_name: str) -> None

      Change the current realm.

      :param realm_name: The name of the realm to be configured as current
      :type realm_name: str



   .. py:method:: import_realm(payload: dict) -> dict | bytes

      Import a new realm from a RealmRepresentation.

      Realm name must be unique.

      RealmRepresentation
      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_realmrepresentation

      :param payload: RealmRepresentation
      :type payload: dict
      :return: RealmRepresentation
      :rtype: dict



   .. py:method:: partial_import_realm(realm_name: str, payload: dict) -> dict | bytes

      Partial import realm configuration from PartialImportRepresentation.

      Realm partialImport is used for modifying configuration of existing realm.

      PartialImportRepresentation
      https://www.keycloak.org/docs-api/24.0.2/rest-api/#_partialimportrepresentation

      :param realm_name: Realm name (not the realm id)
      :type realm_name: str
      :param payload: PartialImportRepresentation
      :type payload: dict

      :return: PartialImportResponse
      :rtype: dict



   .. py:method:: export_realm(export_clients: bool = False, export_groups_and_role: bool = False) -> dict

      Export the realm configurations in the json format.

      RealmRepresentation
      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_partialexport

      :param export_clients: Skip if not want to export realm clients
      :type export_clients: bool
      :param export_groups_and_role: Skip if not want to export realm groups and roles
      :type export_groups_and_role: bool

      :return: realm configurations JSON
      :rtype: dict



   .. py:method:: get_realms() -> list

      List all realms in Keycloak deployment.

      :return: realms list
      :rtype: list



   .. py:method:: get_realm(realm_name: str) -> dict

      Get a specific realm.

      RealmRepresentation:
      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_realmrepresentation

      :param realm_name: Realm name (not the realm id)
      :type realm_name: str
      :return: RealmRepresentation
      :rtype: dict



   .. py:method:: create_realm(payload: dict, skip_exists: bool = False) -> dict | bytes

      Create a realm.

      RealmRepresentation:
      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_realmrepresentation

      :param payload: RealmRepresentation
      :type payload: dict
      :param skip_exists: Skip if Realm already exist.
      :type skip_exists: bool
      :return: Keycloak server response (RealmRepresentation)
      :rtype: dict



   .. py:method:: update_realm(realm_name: str, payload: dict) -> dict | bytes

      Update a realm.

      This will only update top level attributes and will ignore any user,
      role, or client information in the payload.

      RealmRepresentation:
      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_realmrepresentation

      :param realm_name: Realm name (not the realm id)
      :type realm_name: str
      :param payload: RealmRepresentation
      :type payload: dict
      :return: Http response
      :rtype: dict



   .. py:method:: delete_realm(realm_name: str) -> dict | bytes

      Delete a realm.

      :param realm_name: Realm name (not the realm id)
      :type realm_name: str
      :return: Http response
      :rtype: dict



   .. py:method:: get_organizations(query: dict | None = None) -> list

      Fetch all organizations.

      Returns a list of organizations, filtered according to query parameters

      OrganizationRepresentation
      https://www.keycloak.org/docs-api/26.1.4/rest-api/index.html#OrganizationRepresentation

      :return: List of organizations
      :rtype: list



   .. py:method:: a_get_organizations(query: dict | None = None) -> list
      :async:


      Fetch all organizations asynchronously.

      Returns a list of organizations, filtered according to query parameters

      OrganizationRepresentation
      https://www.keycloak.org/docs-api/26.1.4/rest-api/index.html#OrganizationRepresentation

      :return: List of organizations
      :rtype: list



   .. py:method:: get_organization(organization_id: str) -> dict

      Get representation of the organization.

      OrganizationRepresentation:
      https://www.keycloak.org/docs-api/26.1.4/rest-api/index.html#OrganizationRepresentation

      :param organization_id: ID of the organization
      :type organization_id: str

      :return: Organization details
      :rtype: dict



   .. py:method:: a_get_organization(organization_id: str) -> dict
      :async:


      Get representation of the organization asynchronously.

      OrganizationRepresentation:
      https://www.keycloak.org/docs-api/26.1.4/rest-api/index.html#OrganizationRepresentation

      :param organization_id: ID of the organization
      :type organization_id: str

      :return: Organization details
      :rtype: dict



   .. py:method:: create_organization(payload: dict) -> str | None

      Create a new organization.

      Organization name and alias must be unique.

      OrganizationRepresentation:
      https://www.keycloak.org/docs-api/26.1.4/rest-api/index.html#OrganizationRepresentation

      :param payload: Dictionary containing organization details
      :type payload: dict
      :return: org_id
      :rtype: str



   .. py:method:: a_create_organization(payload: dict) -> str | None
      :async:


      Create a new organization asynchronously.

      Organization name and alias must be unique.

      OrganizationRepresentation:
      https://www.keycloak.org/docs-api/26.1.4/rest-api/index.html#OrganizationRepresentation

      :param payload: Dictionary containing organization details
      :type payload: dict
      :return: org_id
      :rtype: str



   .. py:method:: update_organization(organization_id: str, payload: dict) -> dict | bytes

      Update an existing organization.

      OrganizationRepresentation:
      https://www.keycloak.org/docs-api/26.1.4/rest-api/index.html#OrganizationRepresentation

      :param organization_id: ID of the organization
      :type organization_id: str
      :param payload: Dictionary with updated organization details
      :type payload: dict
      :return: Response from Keycloak
      :rtype: dict | bytes



   .. py:method:: a_update_organization(organization_id: str, payload: dict) -> dict | bytes
      :async:


      Update an existing organization asynchronously.

      OrganizationRepresentation:
      https://www.keycloak.org/docs-api/26.1.4/rest-api/index.html#OrganizationRepresentation

      :param organization_id: ID of the organization
      :type organization_id: str
      :param payload: Dictionary with updated organization details
      :type payload: dict
      :return: Response from Keycloak
      :rtype: dict | bytes



   .. py:method:: delete_organization(organization_id: str) -> dict | bytes

      Delete an organization.

      :param organization_id: ID of the organization
      :type organization_id: str
      :return: Response from Keycloak
      :rtype: dict | bytes



   .. py:method:: a_delete_organization(organization_id: str) -> dict | bytes
      :async:


      Delete an organization asynchronously.

      :param organization_id: ID of the organization
      :type organization_id: str
      :return: Response from Keycloak
      :rtype: dict | bytes



   .. py:method:: get_organization_idps(organization_id: str) -> list

      Get IDPs by organization id.

      IdentityProviderRepresentation
      https://www.keycloak.org/docs-api/26.1.4/rest-api/index.html#IdentityProviderRepresentation

      :param organization_id: ID of the organization
      :type organization_id: str
      :return: List of IDPs in the organization
      :rtype: list



   .. py:method:: a_get_organization_idps(organization_id: str) -> list
      :async:


      Get IDPs by organization id asynchronously.

      IdentityProviderRepresentation
      https://www.keycloak.org/docs-api/26.1.4/rest-api/index.html#IdentityProviderRepresentation

      :param organization_id: ID of the organization
      :type organization_id: str
      :return: List of IDPs in the organization
      :rtype: list



   .. py:method:: organization_idp_add(organization_id: str, idp_alias: str) -> dict | bytes

      Add an IDP to an organization.

      :param organization_id: ID of the organization
      :type organization_id: str
      :param idp_alias: Alias of the IDP
      :type idp_alias: str
      :return: Response from Keycloak
      :rtype: dict | bytes



   .. py:method:: a_organization_idp_add(organization_id: str, idp_alias: str) -> dict | bytes
      :async:


      Add an IDP to an organization asynchronously.

      :param organization_id: ID of the organization
      :type organization_id: str
      :param idp_alias: Alias of the IDP
      :type idp_alias: str
      :return: Response from Keycloak
      :rtype: dict | bytes



   .. py:method:: organization_idp_remove(organization_id: str, idp_alias: str) -> dict | bytes

      Remove an IDP from an organization.

      :param organization_id: ID of the organization
      :type organization_id: str



   .. py:method:: a_organization_idp_remove(organization_id: str, idp_alias: str) -> dict | bytes
      :async:


      Remove an IDP from an organization asynchronously.

      :param organization_id: ID of the organization
      :type organization_id: str



   .. py:method:: get_user_organizations(user_id: str) -> list

      Get organizations by user id.

      OrganizationRepresentation
      https://www.keycloak.org/docs-api/26.1.4/rest-api/index.html#OrganizationRepresentation

      :param user_id: ID of the user
      :type user_id: str
      :return: List of organizations the user is member of
      :rtype: list



   .. py:method:: a_get_user_organizations(user_id: str) -> list
      :async:


      Get organizations by user id asynchronously.

      OrganizationRepresentation
      https://www.keycloak.org/docs-api/26.1.4/rest-api/index.html#OrganizationRepresentation

      :param user_id: ID of the user
      :type user_id: str
      :return: List of organizations the user is member of
      :rtype: list



   .. py:method:: get_organization_members(organization_id: str, query: dict | None = None) -> list

      Get members by organization id.

      Returns organization members, filtered according to query parameters

      MemberRepresentation
      https://www.keycloak.org/docs-api/26.1.4/rest-api/index.html#MemberRepresentation

      :param organization_id: ID of the organization
      :type organization_id: str
      :param query: Additional query parameters
          (see https://www.keycloak.org/docs-api/26.1.4/rest-api/index.html#_organizations)
      :type query: dict
      :return: List of users in the organization
      :rtype: list



   .. py:method:: a_get_organization_members(organization_id: str, query: dict | None = None) -> list
      :async:


      Get members by organization id asynchronously.

      Returns organization members, filtered according to query parameters

      MemberRepresentation
      https://www.keycloak.org/docs-api/26.1.4/rest-api/index.html#MemberRepresentation

      :param organization_id: ID of the organization
      :type organization_id: str
      :param query: Additional query parameters
          (see https://www.keycloak.org/docs-api/26.1.4/rest-api/index.html#_organizations)
      :type query: dict
      :return: List of users in the organization
      :rtype: list



   .. py:method:: get_organization_members_count(organization_id: str) -> int

      Get the number of members in the organization.

      :param organization_id: ID of the organization
      :type organization_id: str
      :return: Number of members in the organization
      :rtype: int



   .. py:method:: a_get_organization_members_count(organization_id: str) -> int
      :async:


      Get the number of members in the organization asynchronously.

      :param organization_id: ID of the organization
      :type organization_id: str
      :return: Number of members in the organization
      :rtype: int



   .. py:method:: organization_user_add(user_id: str, organization_id: str) -> dict | bytes

      Add a user to an organization.

      :param user_id: ID of the user to be added
      :type user_id: str
      :param organization_id: ID of the organization
      :type organization_id: str
      :return: Response from Keycloak
      :rtype: dict | bytes



   .. py:method:: a_organization_user_add(user_id: str, organization_id: str) -> dict | bytes
      :async:


      Add a user to an organization asynchronously.

      :param user_id: ID of the user to be added
      :type user_id: str
      :param organization_id: ID of the organization
      :type organization_id: str
      :return: Response from Keycloak
      :rtype: dict | bytes



   .. py:method:: organization_user_remove(user_id: str, organization_id: str) -> dict | bytes

      Remove a user from an organization.

      :param user_id: ID of the user to be removed
      :type user_id: str
      :param organization_id: ID of the organization
      :type organization_id: str
      :return: Response from Keycloak
      :rtype: dict | bytes



   .. py:method:: a_organization_user_remove(user_id: str, organization_id: str) -> dict | bytes
      :async:


      Remove a user from an organization asynchronously.

      :param user_id: ID of the user to be removed
      :type user_id: str
      :param organization_id: ID of the organization
      :type organization_id: str
      :return: Response from Keycloak
      :rtype: dict | bytes



   .. py:method:: get_users(query: dict | None = None) -> list

      Get all users.

      Return a list of users, filtered according to query parameters

      UserRepresentation
      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_userrepresentation

      :param query: Query parameters (optional)
      :type query: dict
      :return: users list
      :rtype: list



   .. py:method:: create_idp(payload: dict) -> dict | bytes

      Create an ID Provider.

      IdentityProviderRepresentation
      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_identityproviderrepresentation

      :param: payload: IdentityProviderRepresentation
      :type payload: dict
      :returns: Keycloak server response
      :rtype: dict



   .. py:method:: update_idp(idp_alias: str, payload: dict) -> dict | bytes

      Update an ID Provider.

      IdentityProviderRepresentation
      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_identity_providers_resource

      :param: idp_alias: alias for IdP to update
      :type idp_alias: str
      :param: payload: The IdentityProviderRepresentation
      :type payload: dict
      :returns: Keycloak server response
      :rtype: dict



   .. py:method:: add_mapper_to_idp(idp_alias: str, payload: dict) -> dict | bytes

      Create an ID Provider.

      IdentityProviderRepresentation
      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_identityprovidermapperrepresentation

      :param: idp_alias: alias for Idp to add mapper in
      :type idp_alias: str
      :param: payload: IdentityProviderMapperRepresentation
      :type payload: dict
      :returns: Keycloak server response
      :rtype: dict



   .. py:method:: update_mapper_in_idp(idp_alias: str, mapper_id: str, payload: dict) -> dict | bytes

      Update an IdP mapper.

      IdentityProviderMapperRepresentation
      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_update

      :param: idp_alias: alias for Idp to fetch mappers
      :type idp_alias: str
      :param: mapper_id: Mapper Id to update
      :type mapper_id: str
      :param: payload: IdentityProviderMapperRepresentation
      :type payload: dict
      :return: Http response
      :rtype: dict



   .. py:method:: get_idp_mappers(idp_alias: str) -> list

      Get IDP mappers.

      Returns a list of ID Providers mappers

      IdentityProviderMapperRepresentation
      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_getmappers

      :param: idp_alias: alias for Idp to fetch mappers
      :type idp_alias: str
      :return: array IdentityProviderMapperRepresentation
      :rtype: list



   .. py:method:: get_idps() -> list

      Get IDPs.

      Returns a list of ID Providers,

      IdentityProviderRepresentation
      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_identityproviderrepresentation

      :return: array IdentityProviderRepresentation
      :rtype: list



   .. py:method:: get_idp(idp_alias: str) -> dict

      Get IDP provider.

      Get the representation of a specific IDP Provider.

      IdentityProviderRepresentation
      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_identityproviderrepresentation

      :param: idp_alias: alias for IdP to get
      :type idp_alias: str
      :return: IdentityProviderRepresentation
      :rtype: dict



   .. py:method:: delete_idp(idp_alias: str) -> dict | bytes

      Delete an ID Provider.

      :param: idp_alias: idp alias name
      :type idp_alias: str
      :returns: Keycloak server response
      :rtype: dict



   .. py:method:: create_user(payload: dict, exist_ok: bool = False) -> str

      Create a new user.

      Username must be unique

      UserRepresentation
      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_userrepresentation

      :param payload: UserRepresentation
      :type payload: dict
      :param exist_ok: If False, raise KeycloakGetError if username already exists.
          Otherwise, return existing user ID.
      :type exist_ok: bool

      :return: user_id
      :rtype: str



   .. py:method:: users_count(query: dict | None = None) -> int

      Count users.

      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_users_resource

      :param query: (dict) Query parameters for users count
      :type query: dict

      :return: counter
      :rtype: int



   .. py:method:: get_user_id(username: str) -> str | None

      Get internal keycloak user id from username.

      This is required for further actions against this user.

      UserRepresentation
      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_userrepresentation

      :param username: id in UserRepresentation
      :type username: str

      :return: user_id
      :rtype: str



   .. py:method:: get_user(user_id: str, user_profile_metadata: bool = False) -> dict

      Get representation of the user.

      UserRepresentation
      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_userrepresentation

      :param user_id: User id
      :type user_id: str
      :param user_profile_metadata: Whether to include user profile metadata in the response
      :type user_profile_metadata: bool
      :return: UserRepresentation



   .. py:method:: get_user_groups(user_id: str, query: dict | None = None, brief_representation: bool = True) -> list

      Get user groups.

      Returns a list of groups of which the user is a member

      :param user_id: User id
      :type user_id: str
      :param query: Additional query options
      :type query: dict
      :param brief_representation: whether to omit attributes in the response
      :type brief_representation: bool
      :return: user groups list
      :rtype: list



   .. py:method:: update_user(user_id: str, payload: dict) -> dict | bytes

      Update the user.

      :param user_id: User id
      :type user_id: str
      :param payload: UserRepresentation
      :type payload: dict

      :return: Http response
      :rtype: bytes



   .. py:method:: disable_user(user_id: str) -> dict | bytes

      Disable the user from the realm. Disabled users can not log in.

      :param user_id: User id
      :type user_id: str

      :return: Http response
      :rtype: bytes



   .. py:method:: enable_user(user_id: str) -> dict | bytes

      Enable the user from the realm.

      :param user_id: User id
      :type user_id: str

      :return: Http response
      :rtype: bytes



   .. py:method:: disable_all_users() -> None

      Disable all existing users.



   .. py:method:: enable_all_users() -> None

      Disable all existing users.



   .. py:method:: delete_user(user_id: str) -> dict | bytes

      Delete the user.

      :param user_id: User id
      :type user_id: str
      :return: Http response
      :rtype: bytes



   .. py:method:: set_user_password(user_id: str, password: str, temporary: bool = True) -> dict | bytes

      Set up a password for the user.

      If temporary is True, the user will have to reset
      the temporary password next time they log in.

      https://www.keycloak.org/docs-api/24.0.2/rest-api/#_users_resource
      https://www.keycloak.org/docs-api/24.0.2/rest-api/#_credentialrepresentation

      :param user_id: User id
      :type user_id: str
      :param password: New password
      :type password: str
      :param temporary: True if password is temporary
      :type temporary: bool
      :returns: Response
      :rtype: dict



   .. py:method:: get_credentials(user_id: str) -> list

      Get user credentials.

      Returns a list of credential belonging to the user.

      CredentialRepresentation
      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_credentialrepresentation

      :param: user_id: user id
      :type user_id: str
      :returns: Keycloak server response (CredentialRepresentation)
      :rtype: list



   .. py:method:: delete_credential(user_id: str, credential_id: str) -> dict | bytes

      Delete credential of the user.

      CredentialRepresentation
      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_credentialrepresentation

      :param: user_id: user id
      :type user_id: str
      :param: credential_id: credential id
      :type credential_id: str
      :return: Keycloak server response (ClientRepresentation)
      :rtype: bytes



   .. py:method:: user_logout(user_id: str) -> dict | bytes

      Log out the user.

      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_logout

      :param user_id: User id
      :type user_id: str
      :returns: Keycloak server response
      :rtype: bytes



   .. py:method:: user_consents(user_id: str) -> list

      Get consents granted by the user.

      UserConsentRepresentation
      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_userconsentrepresentation

      :param user_id: User id
      :type user_id: str
      :returns: List of UserConsentRepresentations
      :rtype: list



   .. py:method:: revoke_consent(user_id: str, client_id: str) -> dict | bytes

      Revoke consent and offline tokens for particular client from user.

      :param user_id: User id
      :type user_id: str
      :param client_id: Client id
      :type client_id: str




   .. py:method:: get_user_social_logins(user_id: str) -> list

      Get user social logins.

      Returns a list of federated identities/social logins of which the user has been associated
      with
      :param user_id: User id
      :type user_id: str
      :returns: Federated identities list
      :rtype: list



   .. py:method:: add_user_social_login(user_id: str, provider_id: str, provider_userid: str, provider_username: str) -> dict | bytes

      Add a federated identity / social login provider to the user.

      :param user_id: User id
      :type user_id: str
      :param provider_id: Social login provider id
      :type provider_id: str
      :param provider_userid: userid specified by the provider
      :type provider_userid: str
      :param provider_username: username specified by the provider
      :type provider_username: str
      :returns: Keycloak server response
      :rtype: bytes



   .. py:method:: delete_user_social_login(user_id: str, provider_id: str) -> dict | bytes

      Delete a federated identity / social login provider from the user.

      :param user_id: User id
      :type user_id: str
      :param provider_id: Social login provider id
      :type provider_id: str
      :returns: Keycloak server response
      :rtype: bytes



   .. py:method:: send_update_account(user_id: str, payload: list, client_id: str | None = None, lifespan: int | None = None, redirect_uri: str | None = None) -> dict | bytes

      Send an update account email to the user.

      An email contains a link the user can click to perform a set of required actions.

      :param user_id: User id
      :type user_id: str
      :param payload: A list of actions for the user to complete
      :type payload: list
      :param client_id: Client id (optional)
      :type client_id: str
      :param lifespan: Number of seconds after which the generated token expires (optional)
      :type lifespan: int
      :param redirect_uri: The redirect uri (optional)
      :type redirect_uri: str

      :returns: Keycloak server response
      :rtype: bytes



   .. py:method:: send_verify_email(user_id: str, client_id: str | None = None, redirect_uri: str | None = None) -> dict | bytes

      Send a update account email to the user.

      An email contains a link the user can click to perform a set of required actions.

      :param user_id: User id
      :type user_id: str
      :param client_id: Client id (optional)
      :type client_id: str
      :param redirect_uri: Redirect uri (optional)
      :type redirect_uri: str

      :returns: Keycloak server response
      :rtype: bytes



   .. py:method:: get_sessions(user_id: str) -> list

      Get sessions associated with the user.

      UserSessionRepresentation
      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_usersessionrepresentation

      :param user_id: Id of user
      :type user_id: str
      :return: UserSessionRepresentation
      :rtype: list



   .. py:method:: get_server_info() -> dict

      Get themes, social providers, etc. on this server.

      ServerInfoRepresentation
      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_serverinforepresentation

      :return: ServerInfoRepresentation
      :rtype: dict



   .. py:method:: get_groups(query: dict | None = None, full_hierarchy: bool = False) -> list

      Get groups.

      Returns a list of groups belonging to the realm

      GroupRepresentation
      https://www.keycloak.org/docs-api/24.0.2/rest-api/#_grouprepresentation

      Notice that when using full_hierarchy=True, the response will be a nested structure
      containing all the children groups. If used with query parameters, the full_hierarchy
      will be applied to the received groups only.

      :param query: Additional query options
      :type query: dict
      :param full_hierarchy: If True, return all of the nested children groups, otherwise only
          the first level children are returned
      :type full_hierarchy: bool
      :return: array GroupRepresentation
      :rtype: list



   .. py:method:: get_group(group_id: str, full_hierarchy: bool = False) -> dict

      Get group by id.

      Returns full group details

      GroupRepresentation
      https://www.keycloak.org/docs-api/24.0.2/rest-api/#_grouprepresentation

      :param group_id: The group id
      :type group_id: str
      :param full_hierarchy: If True, return all of the nested children groups, otherwise only
          the first level children are returned
      :type full_hierarchy: bool
      :return: Keycloak server response (GroupRepresentation)
      :rtype: dict



   .. py:method:: get_subgroups(group: str, path: str) -> dict | None

      Get subgroups.

      Utility function to iterate through nested group structures

      GroupRepresentation
      https://www.keycloak.org/docs-api/24.0.2/rest-api/#_grouprepresentation

      :param group: group (GroupRepresentation)
      :type group: dict
      :param path: group path (string)
      :type path: str
      :return: Keycloak server response (GroupRepresentation)
      :rtype: dict



   .. py:method:: get_group_children(group_id: str, query: dict | None = None, full_hierarchy: bool = False) -> dict

      Get group children by parent id.

      Returns full group children details

      :param group_id: The parent group id
      :type group_id: str
      :param query: Additional query options
      :type query: dict
      :param full_hierarchy: If True, return all of the nested children groups
      :type full_hierarchy: bool
      :return: Keycloak server response (GroupRepresentation)
      :rtype: dict
      :raises ValueError: If both query and full_hierarchy parameters are used



   .. py:method:: get_group_members(group_id: str, query: dict | None = None) -> list

      Get members by group id.

      Returns group members

      GroupRepresentation
      https://www.keycloak.org/docs-api/24.0.2/rest-api/#_userrepresentation

      :param group_id: The group id
      :type group_id: str
      :param query: Additional query parameters
          (see https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_getmembers)
      :type query: dict
      :return: Keycloak server response (UserRepresentation)
      :rtype: list



   .. py:method:: get_group_by_path(path: str) -> dict

      Get group id based on name or path.

      Returns full group details for a group defined by path

      GroupRepresentation
      https://www.keycloak.org/docs-api/24.0.2/rest-api/#_grouprepresentation

      :param path: group path
      :type path: str
      :return: Keycloak server response (GroupRepresentation)
      :rtype: dict



   .. py:method:: create_group(payload: dict, parent: str | None = None, skip_exists: bool = False) -> str | None

      Create a group in the Realm.

      GroupRepresentation
      https://www.keycloak.org/docs-api/24.0.2/rest-api/#_grouprepresentation

      :param payload: GroupRepresentation
      :type payload: dict
      :param parent: parent group's id. Required to create a sub-group.
      :type parent: str
      :param skip_exists: If true then do not raise an error if it already exists
      :type skip_exists: bool

      :return: Group id for newly created group or None for an existing group
      :rtype: str



   .. py:method:: update_group(group_id: str, payload: dict) -> dict | bytes

      Update group, ignores subgroups.

      GroupRepresentation
      https://www.keycloak.org/docs-api/24.0.2/rest-api/#_grouprepresentation

      :param group_id: id of group
      :type group_id: str
      :param payload: GroupRepresentation with updated information.
      :type payload: dict

      :return: Http response
      :rtype: bytes



   .. py:method:: groups_count(query: dict | None = None) -> dict

      Count groups.

      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_groups

      :param query: (dict) Query parameters for groups count
      :type query: dict

      :return: Keycloak Server Response
      :rtype: dict



   .. py:method:: group_set_permissions(group_id: str, enabled: bool = True) -> bytes

      Enable/Disable permissions for a group.

      Cannot delete group if disabled

      :param group_id: id of group
      :type group_id: str
      :param enabled: Enabled flag
      :type enabled: bool
      :return: Keycloak server response
      :rtype: bytes



   .. py:method:: group_user_add(user_id: str, group_id: str) -> bytes

      Add user to group (user_id and group_id).

      :param user_id:  id of user
      :type user_id: str
      :param group_id:  id of group to add to
      :type group_id: str
      :return: Keycloak server response
      :rtype: bytes



   .. py:method:: group_user_remove(user_id: str, group_id: str) -> bytes

      Remove user from group (user_id and group_id).

      :param user_id:  id of user
      :type user_id: str
      :param group_id:  id of group to remove from
      :type group_id: str
      :return: Keycloak server response
      :rtype: bytes



   .. py:method:: delete_group(group_id: str) -> dict | bytes

      Delete a group in the Realm.

      :param group_id:  id of group to delete
      :type group_id: str
      :return: Keycloak server response
      :rtype: bytes



   .. py:method:: get_clients() -> list

      Get clients.

      Returns a list of clients belonging to the realm

      ClientRepresentation
      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_clientrepresentation

      :return: Keycloak server response (ClientRepresentation)
      :rtype: list



   .. py:method:: get_client(client_id: str) -> dict

      Get representation of the client.

      ClientRepresentation
      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_clientrepresentation

      :param client_id:  id of client (not client-id)
      :type client_id: str
      :return: Keycloak server response (ClientRepresentation)
      :rtype: dict



   .. py:method:: get_client_id(client_id: str) -> str | None

      Get internal keycloak client id from client-id.

      This is required for further actions against this client.

      :param client_id: clientId in ClientRepresentation
          https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_clientrepresentation
      :type client_id: str
      :return: client_id (uuid as string)
      :rtype: str



   .. py:method:: get_client_authz_settings(client_id: str) -> dict

      Get authorization json from client.

      :param client_id: id in ClientRepresentation
          https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_clientrepresentation
      :type client_id: str
      :return: Keycloak server response
      :rtype: dict



   .. py:method:: create_client_authz_resource(client_id: str, payload: dict, skip_exists: bool = False) -> dict | bytes

      Create resources of client.

      :param client_id: id in ClientRepresentation
          https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_clientrepresentation
      :type client_id: str
      :param payload: ResourceRepresentation
          https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_resourcerepresentation
      :type payload: dict
      :param skip_exists: Skip the creation in case the resource exists
      :type skip_exists: bool

      :return: Keycloak server response
      :rtype: bytes



   .. py:method:: update_client_authz_resource(client_id: str, resource_id: str, payload: dict) -> dict | bytes

      Update resource of client.

      Any parameter missing from the ResourceRepresentation in the payload WILL be set
      to default by the Keycloak server.

      :param client_id: id in ClientRepresentation
          https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_clientrepresentation
      :type client_id: str
      :param payload: ResourceRepresentation
          https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_resourcerepresentation
      :type payload: dict
      :param client_id: id in ClientRepresentation
          https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_clientrepresentation
      :type client_id: str
      :param resource_id: id in ResourceRepresentation
          https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_resourcerepresentation
      :type resource_id: str

      :return: Keycloak server response
      :rtype: bytes



   .. py:method:: delete_client_authz_resource(client_id: str, resource_id: str) -> bytes

      Delete a client resource.

      :param client_id: id in ClientRepresentation
          https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_clientrepresentation
      :type client_id: str
      :param resource_id: id in ResourceRepresentation
          https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_resourcerepresentation
      :type resource_id: str

      :return: Keycloak server response
      :rtype: bytes



   .. py:method:: get_client_authz_resources(client_id: str) -> list

      Get resources from client.

      :param client_id: id in ClientRepresentation
          https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_clientrepresentation
      :type client_id: str
      :return: Keycloak server response (ResourceRepresentation)
      :rtype: list



   .. py:method:: get_client_authz_resource(client_id: str, resource_id: str) -> dict | bytes

      Get a client resource.

      :param client_id: id in ClientRepresentation
          https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_clientrepresentation
      :type client_id: str
      :param resource_id: id in ResourceRepresentation
          https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_resourcerepresentation
      :type resource_id: str

      :return: Keycloak server response (ResourceRepresentation)
      :rtype: dict



   .. py:method:: create_client_authz_role_based_policy(client_id: str, payload: dict, skip_exists: bool = False) -> dict | bytes

      Create role-based policy of client.

      Payload example::

          payload={
              "type": "role",
              "logic": "POSITIVE",
              "decisionStrategy": "UNANIMOUS",
              "name": "Policy-1",
              "roles": [
                  {
                  "id": id
                  }
              ]
          }

      :param client_id: id in ClientRepresentation
          https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_clientrepresentation
      :type client_id: str
      :param payload: No Document
      :type payload: dict
      :param skip_exists: Skip creation in case the object exists
      :type skip_exists: bool
      :return: Keycloak server response
      :rtype: bytes




   .. py:method:: create_client_authz_policy(client_id: str, payload: dict, skip_exists: bool = False) -> dict | bytes

      Create an authz policy of client.

      Payload example::

          payload={
              "name": "Policy-time-based",
              "type": "time",
              "logic": "POSITIVE",
              "decisionStrategy": "UNANIMOUS",
              "config": {
                  "hourEnd": "18",
                  "hour": "9"
              }
          }

      :param client_id: id in ClientRepresentation
          https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_clientrepresentation
      :type client_id: str
      :param payload: No Document
      :type payload: dict
      :param skip_exists: Skip creation in case the object exists
      :type skip_exists: bool
      :return: Keycloak server response
      :rtype: bytes




   .. py:method:: create_client_authz_resource_based_permission(client_id: str, payload: dict, skip_exists: bool = False) -> bytes

      Create resource-based permission of client.

      Payload example::

          payload={
              "type": "resource",
              "logic": "POSITIVE",
              "decisionStrategy": "UNANIMOUS",
              "name": "Permission-Name",
              "resources": [
                  resource_id
              ],
              "policies": [
                  policy_id
              ]

      :param client_id: id in ClientRepresentation
          https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_clientrepresentation
      :type client_id: str
      :param payload: PolicyRepresentation
          https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_policyrepresentation
      :type payload: dict
      :param skip_exists: Skip creation in case the object already exists
      :type skip_exists: bool
      :return: Keycloak server response
      :rtype: bytes




   .. py:method:: get_client_authz_scopes(client_id: str) -> list

      Get scopes from client.

      :param client_id: id in ClientRepresentation
          https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_clientrepresentation
      :type client_id: str
      :return: Keycloak server response
      :rtype: list



   .. py:method:: create_client_authz_scopes(client_id: str, payload: dict) -> bytes

      Create scopes for client.

      :param client_id: id in ClientRepresentation
          https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_clientrepresentation
      :param payload: ScopeRepresentation
          https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_ScopeRepresentation
      :type payload: dict
      :type client_id: str
      :return: Keycloak server response
      :rtype: bytes



   .. py:method:: get_client_authz_permissions(client_id: str) -> list

      Get permissions from client.

      :param client_id: id in ClientRepresentation
          https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_clientrepresentation
      :type client_id: str
      :return: Keycloak server response
      :rtype: list



   .. py:method:: get_client_authz_policies(client_id: str) -> list

      Get policies from client.

      :param client_id: id in ClientRepresentation
          https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_clientrepresentation
      :type client_id: str
      :return: Keycloak server response
      :rtype: list



   .. py:method:: delete_client_authz_policy(client_id: str, policy_id: str) -> dict | bytes

      Delete a policy from client.

      :param client_id: id in ClientRepresentation
          https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_clientrepresentation
      :type client_id: str
      :param policy_id: id in PolicyRepresentation
          https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_policyrepresentation
      :type policy_id: str
      :return: Keycloak server response
      :rtype: dict



   .. py:method:: get_client_authz_policy(client_id: str, policy_id: str) -> dict

      Get a policy from client.

      :param client_id: id in ClientRepresentation
          https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_clientrepresentation
      :type client_id: str
      :param policy_id: id in PolicyRepresentation
          https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_policyrepresentation
      :type policy_id: str
      :return: Keycloak server response
      :rtype: dict



   .. py:method:: get_client_service_account_user(client_id: str) -> dict

      Get service account user from client.

      :param client_id: id in ClientRepresentation
          https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_clientrepresentation
      :type client_id: str
      :return: UserRepresentation
      :rtype: dict



   .. py:method:: get_client_default_client_scopes(client_id: str) -> list

      Get all default client scopes from client.

      :param client_id: id of the client in which the new default client scope should be added
      :type client_id: str

      :return: list of client scopes with id and name
      :rtype: list



   .. py:method:: add_client_default_client_scope(client_id: str, client_scope_id: str, payload: dict) -> bytes

      Add a client scope to the default client scopes from client.

      Payload example::

          payload={
              "realm":"testrealm",
              "client":"aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa",
              "clientScopeId":"bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb"
          }

      :param client_id: id of the client in which the new default client scope should be added
      :type client_id: str
      :param client_scope_id: id of the new client scope that should be added
      :type client_scope_id: str
      :param payload: dictionary with realm, client and clientScopeId
      :type payload: dict

      :return: Http response
      :rtype: bytes



   .. py:method:: delete_client_default_client_scope(client_id: str, client_scope_id: str) -> dict | bytes

      Delete a client scope from the default client scopes of the client.

      :param client_id: id of the client in which the default client scope should be deleted
      :type client_id: str
      :param client_scope_id: id of the client scope that should be deleted
      :type client_scope_id: str

      :return: list of client scopes with id and name
      :rtype: bytes



   .. py:method:: get_client_optional_client_scopes(client_id: str) -> list

      Get all optional client scopes from client.

      :param client_id: id of the client in which the new optional client scope should be added
      :type client_id: str

      :return: list of client scopes with id and name
      :rtype: list



   .. py:method:: add_client_optional_client_scope(client_id: str, client_scope_id: str, payload: dict) -> bytes

      Add a client scope to the optional client scopes from client.

      Payload example::

          payload={
              "realm":"testrealm",
              "client":"aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa",
              "clientScopeId":"bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb"
          }

      :param client_id: id of the client in which the new optional client scope should be added
      :type client_id: str
      :param client_scope_id: id of the new client scope that should be added
      :type client_scope_id: str
      :param payload: dictionary with realm, client and clientScopeId
      :type payload: dict

      :return: Http response
      :rtype: bytes



   .. py:method:: delete_client_optional_client_scope(client_id: str, client_scope_id: str) -> dict | bytes

      Delete a client scope from the optional client scopes of the client.

      :param client_id: id of the client in which the optional client scope should be deleted
      :type client_id: str
      :param client_scope_id: id of the client scope that should be deleted
      :type client_scope_id: str

      :return: list of client scopes with id and name
      :rtype: list



   .. py:method:: create_initial_access_token(count: int = 1, expiration: int = 1) -> dict | bytes

      Create an initial access token.

      :param count: Number of clients that can be registered
      :type count: int
      :param expiration: Days until expireation
      :type expiration: int
      :return: initial access token
      :rtype: dict



   .. py:method:: create_client(payload: dict, skip_exists: bool = False) -> str

      Create a client.

      ClientRepresentation:
      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_clientrepresentation

      :param skip_exists: If true then do not raise an error if client already exists
      :type skip_exists: bool
      :param payload: ClientRepresentation
      :type payload: dict
      :return: Client ID
      :rtype: str



   .. py:method:: update_client(client_id: str, payload: dict) -> bytes

      Update a client.

      :param client_id: Client id
      :type client_id: str
      :param payload: ClientRepresentation
      :type payload: dict

      :return: Http response
      :rtype: bytes



   .. py:method:: delete_client(client_id: str) -> bytes

      Get representation of the client.

      ClientRepresentation
      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_clientrepresentation

      :param client_id: keycloak client id (not oauth client-id)
      :type client_id: str
      :return: Keycloak server response (ClientRepresentation)
      :rtype: bytes



   .. py:method:: get_client_installation_provider(client_id: str, provider_id: str) -> list

      Get content for given installation provider.

      Related documentation:
      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_clients_resource

      Possible provider_id list available in the ServerInfoRepresentation#clientInstallations
      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_serverinforepresentation

      :param client_id: Client id
      :type client_id: str
      :param provider_id: provider id to specify response format
      :type provider_id: str
      :returns: Installation providers
      :rtype: list



   .. py:method:: get_realm_users_profile() -> dict

      Get list of attributes and group for given realm.

      Related documentation:
      https://www.keycloak.org/docs-api/26.0.0/rest-api/index.html#_get_adminrealmsrealmusersprofile

      Return https://www.keycloak.org/docs-api/26.0.0/rest-api/index.html#UPConfig
      :returns: UPConfig




   .. py:method:: get_realm_roles(brief_representation: bool = True, search_text: str = '', query: dict | None = None) -> list

      Get all roles for the realm or client.

      RoleRepresentation
      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_rolerepresentation

      :param brief_representation: whether to omit role attributes in the response
      :type brief_representation: bool
      :param search_text: optional search text to limit the returned result.
      :type search_text: str
      :param query: Query parameters (optional)
      :type query: dict
      :return: Keycloak server response (RoleRepresentation)
      :rtype: list



   .. py:method:: get_realm_role_groups(role_name: str, query: dict | None = None, brief_representation: bool = True) -> list

      Get role groups of realm by role name.

      :param role_name: Name of the role.
      :type role_name: str
      :param query: Additional Query parameters
          (see https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_parameters_226)
      :type query: dict
      :param brief_representation: whether to omit role attributes in the response
      :type brief_representation: bool
      :return: Keycloak Server Response (GroupRepresentation)
      :rtype: list



   .. py:method:: get_realm_role_members(role_name: str, query: dict | None = None) -> list

      Get role members of realm by role name.

      :param role_name: Name of the role.
      :type role_name: str
      :param query: Additional Query parameters
          (see https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_roles_resource)
      :type query: dict
      :return: Keycloak Server Response (UserRepresentation)
      :rtype: list



   .. py:method:: get_default_realm_role_id() -> str

      Get the ID of the default realm role.

      :return: Realm role ID
      :rtype: str



   .. py:method:: get_realm_default_roles() -> list

      Get all the default realm roles.

      :return: Keycloak Server Response (UserRepresentation)
      :rtype: list



   .. py:method:: remove_realm_default_roles(payload: dict) -> dict | bytes

      Remove a set of default realm roles.

      :param payload: List of RoleRepresentations
      :type payload: list
      :return: Keycloak Server Response
      :rtype: dict



   .. py:method:: add_realm_default_roles(payload: dict) -> dict | bytes

      Add a set of default realm roles.

      :param payload: List of RoleRepresentations
      :type payload: list
      :return: Keycloak Server Response
      :rtype: dict



   .. py:method:: get_client_roles(client_id: str, brief_representation: bool = True) -> list

      Get all roles for the client.

      RoleRepresentation
      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_rolerepresentation

      :param client_id: id of client (not client-id)
      :type client_id: str
      :param brief_representation: whether to omit role attributes in the response
      :type brief_representation: bool
      :return: Keycloak server response (RoleRepresentation)
      :rtype: list



   .. py:method:: get_client_role(client_id: str, role_name: str) -> dict

      Get client role by name.

      RoleRepresentation
      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_rolerepresentation

      :param client_id: id of client (not client-id)
      :type client_id: str
      :param role_name: role's name (not id!)
      :type role_name: str
      :return: Role object
      :rtype: dict



   .. py:method:: get_client_role_id(client_id: str, role_name: str) -> str | None

      Get client role id by name.

      This is required for further actions with this role.

      RoleRepresentation
      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_rolerepresentation

      :param client_id: id of client (not client-id)
      :type client_id: str
      :param role_name: role's name (not id!)
      :type role_name: str
      :return: role_id
      :rtype: str



   .. py:method:: create_client_role(client_role_id: str, payload: dict, skip_exists: bool = False) -> str

      Create a client role.

      RoleRepresentation
      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_rolerepresentation

      :param client_role_id: id of client (not client-id)
      :type client_role_id: str
      :param payload: RoleRepresentation
      :type payload: dict
      :param skip_exists: If true then do not raise an error if client role already exists
      :type skip_exists: bool
      :return: Client role name
      :rtype: str



   .. py:method:: add_composite_client_roles_to_role(client_role_id: str, role_name: str, roles: str | list) -> bytes

      Add composite roles to client role.

      :param client_role_id: id of client (not client-id)
      :type client_role_id: str
      :param role_name: The name of the role
      :type role_name: str
      :param roles: roles list or role (use RoleRepresentation) to be updated
      :type roles: list
      :return: Keycloak server response
      :rtype: bytes



   .. py:method:: remove_composite_client_roles_from_role(client_role_id: str, role_name: str, roles: str | list) -> bytes

      Remove composite roles from a client role.

      :param client_role_id: id of client (not client-id)
      :type client_role_id: str
      :param role_name: The name of the role
      :type role_name: str
      :param roles: roles list or role (use RoleRepresentation) to be removed
      :type roles: list
      :return: Keycloak server response
      :rtype: bytes



   .. py:method:: update_client_role(client_id: str, role_name: str, payload: dict) -> bytes

      Update a client role.

      RoleRepresentation
      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_rolerepresentation

      :param client_id: id of client (not client-id)
      :type client_id: str
      :param role_name: role's name (not id!)
      :type role_name: str
      :param payload: RoleRepresentation
      :type payload: dict
      :returns: Keycloak server response
      :rtype: bytes



   .. py:method:: delete_client_role(client_role_id: str, role_name: str) -> bytes

      Delete a client role.

      RoleRepresentation
      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_rolerepresentation

      :param client_role_id: id of client (not client-id)
      :type client_role_id: str
      :param role_name: role's name (not id!)
      :type role_name: str
      :returns: Keycloak server response
      :rtype: bytes



   .. py:method:: assign_client_role(user_id: str, client_id: str, roles: str | list) -> bytes

      Assign a client role to a user.

      :param user_id: id of user
      :type user_id: str
      :param client_id: id of client (not client-id)
      :type client_id: str
      :param roles: roles list or role (use RoleRepresentation)
      :type roles: list
      :return: Keycloak server response
      :rtype: bytes



   .. py:method:: get_client_role_members(client_id: str, role_name: str, **query: dict) -> list

      Get members by client role.

      :param client_id: The client id
      :type client_id: str
      :param role_name: the name of role to be queried.
      :type role_name: str
      :param query: Additional query parameters
          (see https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_clients_resource)
      :type query: dict
      :return: Keycloak server response (UserRepresentation)
      :rtype: list



   .. py:method:: get_client_role_groups(client_id: str, role_name: str, **query: dict) -> list

      Get group members by client role.

      :param client_id: The client id
      :type client_id: str
      :param role_name: the name of role to be queried.
      :type role_name: str
      :param query: Additional query parameters
          (see https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_clients_resource)
      :type query: dict
      :return: Keycloak server response
      :rtype: list



   .. py:method:: get_role_by_id(role_id: str) -> dict

      Get a specific role's representation.

      RoleRepresentation
      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_rolerepresentation

      :param role_id: id of role
      :type role_id: str
      :return: Keycloak server response (RoleRepresentation)
      :rtype: dict



   .. py:method:: update_role_by_id(role_id: str, payload: dict) -> bytes

      Update the role.

      RoleRepresentation
      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_rolerepresentation

      :param payload: RoleRepresentation
      :type payload: dict
      :param role_id: id of role
      :type role_id: str
      :returns: Keycloak server response
      :rtype: bytes



   .. py:method:: delete_role_by_id(role_id: str) -> bytes

      Delete a role by its id.

      RoleRepresentation
      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_rolerepresentation

      :param role_id: id of role
      :type role_id: str
      :returns: Keycloak server response
      :rtype: bytes



   .. py:method:: get_role_composites_by_id(role_id: str, query: dict | None = None) -> list

      Get all composite roles by role id.

      :param role_id: id of role
      :type role_id: str
      :param query: Query parameters (optional). Supported keys: 'first', 'max', 'search'
      :type query: dict
      :return: Keycloak server response (RoleRepresentation)
      :rtype: list



   .. py:method:: create_realm_role(payload: dict, skip_exists: bool = False) -> str

      Create a new role for the realm or client.

      :param payload: The role (use RoleRepresentation)
      :type payload: dict
      :param skip_exists: If true then do not raise an error if realm role already exists
      :type skip_exists: bool
      :return: Realm role name
      :rtype: str



   .. py:method:: get_realm_role(role_name: str) -> dict

      Get realm role by role name.

      RoleRepresentation
      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_rolerepresentation

      :param role_name: role's name, not id!
      :type role_name: str
      :return: role
      :rtype: dict



   .. py:method:: get_realm_role_by_id(role_id: str) -> dict

      Get realm role by role id.

      RoleRepresentation
      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_rolerepresentation

      :param role_id: role's id, not name!
      :type role_id: str
      :return: role
      :rtype: dict



   .. py:method:: update_realm_role(role_name: str, payload: dict) -> bytes

      Update a role for the realm by name.

      :param role_name: The name of the role to be updated
      :type role_name: str
      :param payload: The role (use RoleRepresentation)
      :type payload: dict
      :return: Keycloak server response
      :rtype: bytes



   .. py:method:: update_realm_users_profile(payload: dict) -> dict

      Update realm users profile for the current realm.

      :param up_config: List of attributes, groups, unmamagedAttributePolicy

      Related documentation:
      https://www.keycloak.org/docs-api/26.0.0/rest-api/index.html#UPConfig



   .. py:method:: delete_realm_role(role_name: str) -> bytes

      Delete a role for the realm by name.

      :param role_name: The role name
      :type role_name: str
      :return: Keycloak server response
      :rtype: bytes



   .. py:method:: add_composite_realm_roles_to_role(role_name: str, roles: str | list) -> bytes

      Add composite roles to the role.

      :param role_name: The name of the role
      :type role_name: str
      :param roles: roles list or role (use RoleRepresentation) to be updated
      :type roles: list
      :return: Keycloak server response
      :rtype: bytes



   .. py:method:: remove_composite_realm_roles_to_role(role_name: str, roles: str | list) -> bytes

      Remove composite roles from the role.

      :param role_name: The name of the role
      :type role_name: str
      :param roles: roles list or role (use RoleRepresentation) to be removed
      :type roles: list
      :return: Keycloak server response
      :rtype: bytes



   .. py:method:: get_composite_realm_roles_of_role(role_name: str) -> list

      Get composite roles of the role.

      :param role_name: The name of the role
      :type role_name: str
      :return: Keycloak server response (array RoleRepresentation)
      :rtype: list



   .. py:method:: get_composite_client_roles_of_role(client_id: str, role_name: str) -> list

      Get composite roles of the client role.

      :param client_id: The id of the client
      :type client_id: str
      :param role_name: The name of the role
      :type role_name: str
      :return: Keycloak server response (array RoleRepresentation)
      :rtype: list



   .. py:method:: assign_realm_roles_to_client_scope(client_id: str, roles: str | list) -> bytes

      Assign realm roles to a client's scope.

      :param client_id: id of client (not client-id)
      :type client_id: str
      :param roles: roles list or role (use RoleRepresentation)
      :type roles: list
      :return: Keycloak server response
      :rtype: bytes



   .. py:method:: delete_realm_roles_of_client_scope(client_id: str, roles: str | list) -> bytes

      Delete realm roles of a client's scope.

      :param client_id: id of client (not client-id)
      :type client_id: str
      :param roles: roles list or role (use RoleRepresentation)
      :type roles: list
      :return: Keycloak server response
      :rtype: dict



   .. py:method:: get_realm_roles_of_client_scope(client_id: str) -> list

      Get all realm roles for a client's scope.

      :param client_id: id of client (not client-id)
      :type client_id: str
      :return: Keycloak server response (array RoleRepresentation)
      :rtype: list



   .. py:method:: assign_client_roles_to_client_scope(client_id: str, client_roles_owner_id: str, roles: str | list) -> bytes

      Assign client roles to a client's dedicated scope.

      To assign roles to a client scope, use add_client_specific_roles_to_client_scope.

      :param client_id: id of client (not client-id) who is assigned the roles
      :type client_id: str
      :param client_roles_owner_id: id of client (not client-id) who has the roles
      :type client_roles_owner_id: str
      :param roles: roles list or role (use RoleRepresentation)
      :type roles: list
      :return: Keycloak server response
      :rtype: bytes



   .. py:method:: delete_client_roles_of_client_scope(client_id: str, client_roles_owner_id: str, roles: str | list) -> bytes

      Delete client roles of a client's dedicated scope.

      To delete roles from a client scope, use remove_client_specific_roles_of_client_scope.

      :param client_id: id of client (not client-id) who is assigned the roles
      :type client_id: str
      :param client_roles_owner_id: id of client (not client-id) who has the roles
      :type client_roles_owner_id: str
      :param roles: roles list or role (use RoleRepresentation)
      :type roles: list
      :return: Keycloak server response
      :rtype: bytes



   .. py:method:: get_client_roles_of_client_scope(client_id: str, client_roles_owner_id: str) -> list

      Get all client roles for a client's dedicated scope.

      To get roles for a client scope, use get_client_specific_roles_of_client_scope.

      :param client_id: id of client (not client-id)
      :type client_id: str
      :param client_roles_owner_id: id of client (not client-id) who has the roles
      :type client_roles_owner_id: str
      :return: Keycloak server response (array RoleRepresentation)
      :rtype: list



   .. py:method:: assign_realm_roles(user_id: str, roles: str | list) -> bytes

      Assign realm roles to a user.

      :param user_id: id of user
      :type user_id: str
      :param roles: roles list or role (use RoleRepresentation)
      :type roles: list
      :return: Keycloak server response
      :rtype: bytes



   .. py:method:: delete_realm_roles_of_user(user_id: str, roles: str | list) -> bytes

      Delete realm roles of a user.

      :param user_id: id of user
      :type user_id: str
      :param roles: roles list or role (use RoleRepresentation)
      :type roles: list
      :return: Keycloak server response
      :rtype: bytes



   .. py:method:: get_realm_roles_of_user(user_id: str) -> list

      Get all realm roles for a user.

      :param user_id: id of user
      :type user_id: str
      :return: Keycloak server response (array RoleRepresentation)
      :rtype: list



   .. py:method:: get_available_realm_roles_of_user(user_id: str) -> list

      Get all available (i.e. unassigned) realm roles for a user.

      :param user_id: id of user
      :type user_id: str
      :return: Keycloak server response (array RoleRepresentation)
      :rtype: list



   .. py:method:: get_composite_realm_roles_of_user(user_id: str, brief_representation: bool = True) -> list

      Get all composite (i.e. implicit) realm roles for a user.

      :param user_id: id of user
      :type user_id: str
      :param brief_representation: whether to omit role attributes in the response
      :type brief_representation: bool
      :return: Keycloak server response (array RoleRepresentation)
      :rtype: list



   .. py:method:: assign_group_realm_roles(group_id: str, roles: str | list) -> bytes

      Assign realm roles to a group.

      :param group_id: id of group
      :type group_id: str
      :param roles: roles list or role (use GroupRoleRepresentation)
      :type roles: list
      :return: Keycloak server response
      :rtype: bytes



   .. py:method:: delete_group_realm_roles(group_id: str, roles: str | list) -> bytes

      Delete realm roles of a group.

      :param group_id: id of group
      :type group_id: str
      :param roles: roles list or role (use GroupRoleRepresentation)
      :type roles: list
      :return: Keycloak server response
      :rtype: bytes



   .. py:method:: get_group_realm_roles(group_id: str, brief_representation: bool = True) -> list

      Get all realm roles for a group.

      :param group_id: id of the group
      :type group_id: str
      :param brief_representation: whether to omit role attributes in the response
      :type brief_representation: bool
      :return: Keycloak server response (array RoleRepresentation)
      :rtype: list



   .. py:method:: assign_group_client_roles(group_id: str, client_id: str, roles: str | list) -> bytes

      Assign client roles to a group.

      :param group_id: id of group
      :type group_id: str
      :param client_id: id of client (not client-id)
      :type client_id: str
      :param roles: roles list or role (use GroupRoleRepresentation)
      :type roles: list
      :return: Keycloak server response
      :rtype: bytes



   .. py:method:: get_group_client_roles(group_id: str, client_id: str) -> list

      Get client roles of a group.

      :param group_id: id of group
      :type group_id: str
      :param client_id: id of client (not client-id)
      :type client_id: str
      :return: Keycloak server response
      :rtype: list



   .. py:method:: delete_group_client_roles(group_id: str, client_id: str, roles: str | list) -> bytes

      Delete client roles of a group.

      :param group_id: id of group
      :type group_id: str
      :param client_id: id of client (not client-id)
      :type client_id: str
      :param roles: roles list or role (use GroupRoleRepresentation)
      :type roles: list
      :return: Keycloak server response (array RoleRepresentation)
      :rtype: bytes



   .. py:method:: get_all_roles_of_user(user_id: str) -> dict

      Get all level roles for a user.

      :param user_id: id of user
      :type user_id: str
      :return: Keycloak server response (MappingsRepresentation)
      :rtype: dict



   .. py:method:: get_client_roles_of_user(user_id: str, client_id: str) -> list

      Get all client roles for a user.

      :param user_id: id of user
      :type user_id: str
      :param client_id: id of client (not client-id)
      :type client_id: str
      :return: Keycloak server response (array RoleRepresentation)
      :rtype: list



   .. py:method:: get_available_client_roles_of_user(user_id: str, client_id: str) -> list

      Get available client role-mappings for a user.

      :param user_id: id of user
      :type user_id: str
      :param client_id: id of client (not client-id)
      :type client_id: str
      :return: Keycloak server response (array RoleRepresentation)
      :rtype: list



   .. py:method:: get_composite_client_roles_of_user(user_id: str, client_id: str, brief_representation: bool = False) -> list

      Get composite client role-mappings for a user.

      :param user_id: id of user
      :type user_id: str
      :param client_id: id of client (not client-id)
      :type client_id: str
      :param brief_representation: whether to omit attributes in the response
      :type brief_representation: bool
      :return: Keycloak server response (array RoleRepresentation)
      :rtype: list



   .. py:method:: _get_client_roles_of_user(client_level_role_mapping_url: str, user_id: str, client_id: str, **params: dict) -> list

      Get client roles of a single user helper.

      :param client_level_role_mapping_url: Url for the client role mapping
      :type client_level_role_mapping_url: str
      :param user_id: User id
      :type user_id: str
      :param client_id: Client id
      :type client_id: str
      :param params: Additional parameters
      :type params: dict
      :returns: Client roles of a user
      :rtype: list



   .. py:method:: delete_client_roles_of_user(user_id: str, client_id: str, roles: str | list) -> bytes

      Delete client roles from a user.

      :param user_id: id of user
      :type user_id: str
      :param client_id: id of client containing role (not client-id)
      :type client_id: str
      :param roles: roles list or role to delete (use RoleRepresentation)
      :type roles: list
      :return: Keycloak server response
      :rtype: bytes



   .. py:method:: get_authentication_flows() -> list

      Get authentication flows.

      Returns all flow details

      AuthenticationFlowRepresentation
      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_authenticationflowrepresentation

      :return: Keycloak server response (AuthenticationFlowRepresentation)
      :rtype: list



   .. py:method:: get_authentication_flow_for_id(flow_id: str) -> dict

      Get one authentication flow by it's id.

      Returns all flow details

      AuthenticationFlowRepresentation
      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_authenticationflowrepresentation

      :param flow_id: the id of a flow NOT it's alias
      :type flow_id: str
      :return: Keycloak server response (AuthenticationFlowRepresentation)
      :rtype: dict



   .. py:method:: create_authentication_flow(payload: dict, skip_exists: bool = False) -> bytes

      Create a new authentication flow.

      AuthenticationFlowRepresentation
      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_authenticationflowrepresentation

      :param payload: AuthenticationFlowRepresentation
      :type payload: dict
      :param skip_exists: Do not raise an error if authentication flow already exists
      :type skip_exists: bool
      :return: Keycloak server response (RoleRepresentation)
      :rtype: bytes



   .. py:method:: update_authentication_flow(flow_id: str, payload: dict) -> bytes

      Update an authentication flow.

      AuthenticationFlowRepresentation
      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_authenticationflowrepresentation

      :param flow_id: The id of the flow
      :type flow_id: str
      :param payload: AuthenticationFlowRepresentation
      :type payload: dict
      :return: Keycloak server response
      :rtype: bytes



   .. py:method:: copy_authentication_flow(payload: dict, flow_alias: str) -> bytes

      Copy existing authentication flow under a new name.

      The new name is given as 'newName' attribute of the passed payload.

      :param payload: JSON containing 'newName' attribute
      :type payload: dict
      :param flow_alias: the flow alias
      :type flow_alias: str
      :return: Keycloak server response (RoleRepresentation)
      :rtype: bytes



   .. py:method:: delete_authentication_flow(flow_id: str) -> bytes

      Delete authentication flow.

      AuthenticationInfoRepresentation
      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_authenticationinforepresentation

      :param flow_id: authentication flow id
      :type flow_id: str
      :return: Keycloak server response
      :rtype: bytes



   .. py:method:: get_authentication_flow_executions(flow_alias: str) -> list

      Get authentication flow executions.

      Returns all execution steps

      :param flow_alias: the flow alias
      :type flow_alias: str
      :return: Response(json)
      :rtype: list



   .. py:method:: update_authentication_flow_executions(payload: dict, flow_alias: str) -> bytes

      Update an authentication flow execution.

      AuthenticationExecutionInfoRepresentation
      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_authenticationexecutioninforepresentation

      :param payload: AuthenticationExecutionInfoRepresentation
      :type payload: dict
      :param flow_alias: The flow alias
      :type flow_alias: str
      :return: Keycloak server response
      :rtype: bytes



   .. py:method:: get_authentication_flow_execution(execution_id: str) -> list

      Get authentication flow execution.

      AuthenticationExecutionInfoRepresentation
      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_authenticationexecutioninforepresentation

      :param execution_id: the execution ID
      :type execution_id: str
      :return: Response(json)
      :rtype: dict



   .. py:method:: create_authentication_flow_execution(payload: dict, flow_alias: str) -> bytes

      Create an authentication flow execution.

      AuthenticationExecutionInfoRepresentation
      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_authenticationexecutioninforepresentation

      :param payload: AuthenticationExecutionInfoRepresentation
      :type payload: dict
      :param flow_alias: The flow alias
      :type flow_alias: str
      :return: Keycloak server response
      :rtype: bytes



   .. py:method:: delete_authentication_flow_execution(execution_id: str) -> bytes

      Delete authentication flow execution.

      AuthenticationExecutionInfoRepresentation
      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_authenticationexecutioninforepresentation

      :param execution_id: keycloak client id (not oauth client-id)
      :type execution_id: str
      :return: Keycloak server response (json)
      :rtype: bytes



   .. py:method:: change_execution_priority(execution_id: str, diff: int) -> None

      Raise or lower execution priority of diff time.

      :param execution_id: The ID of the execution
      :type execution_id: str
      :param diff: The difference in priority, positive to raise, negative to lower, the value
          is the number of times
      :type diff: int
      :raises KeycloakPostError: when post requests are failed



   .. py:method:: create_authentication_flow_subflow(payload: dict, flow_alias: str, skip_exists: bool = False) -> bytes

      Create a new sub authentication flow for a given authentication flow.

      AuthenticationFlowRepresentation
      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_authenticationflowrepresentation

      :param payload: AuthenticationFlowRepresentation
      :type payload: dict
      :param flow_alias: The flow alias
      :type flow_alias: str
      :param skip_exists: Do not raise an error if authentication flow already exists
      :type skip_exists: bool
      :return: Keycloak server response (RoleRepresentation)
      :rtype: bytes



   .. py:method:: get_authenticator_providers() -> list

      Get authenticator providers list.

      :return: Authenticator providers
      :rtype: list



   .. py:method:: get_authenticator_provider_config_description(provider_id: str) -> dict

      Get authenticator's provider configuration description.

      AuthenticatorConfigInfoRepresentation
      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_authenticatorconfiginforepresentation

      :param provider_id: Provider Id
      :type provider_id: str
      :return: AuthenticatorConfigInfoRepresentation
      :rtype: dict



   .. py:method:: get_authenticator_config(config_id: str) -> dict

      Get authenticator configuration.

      Returns all configuration details.

      :param config_id: Authenticator config id
      :type config_id: str
      :return: Response(json)
      :rtype: dict



   .. py:method:: create_execution_config(execution_id: str, payload: dict) -> bytes

      Update execution with new configuration.

      AuthenticatorConfigRepresentation
      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_authenticatorconfigrepresentation

      :param execution_id: The ID of the execution
      :type execution_id: str
      :param payload: Configuration to add to the execution
      :type payload: dir
      :return: Response(json)
      :rtype: dict



   .. py:method:: update_authenticator_config(payload: dict, config_id: str) -> bytes

      Update an authenticator configuration.

      AuthenticatorConfigRepresentation
      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_authenticatorconfigrepresentation

      :param payload: AuthenticatorConfigRepresentation
      :type payload: dict
      :param config_id: Authenticator config id
      :type config_id: str
      :return: Response(json)
      :rtype: bytes



   .. py:method:: delete_authenticator_config(config_id: str) -> bytes

      Delete a authenticator configuration.

      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_authentication_management_resource

      :param config_id: Authenticator config id
      :type config_id: str
      :return: Keycloak server Response
      :rtype: bytes



   .. py:method:: sync_users(storage_id: str, action: str) -> bytes

      Trigger user sync from provider.

      :param storage_id: The id of the user storage provider
      :type storage_id: str
      :param action: Action can be "triggerFullSync" or "triggerChangedUsersSync"
      :type action: str
      :return: Keycloak server response
      :rtype: bytes



   .. py:method:: get_client_scopes() -> list

      Get client scopes.

      Get representation of the client scopes for the realm where we are connected to
      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_getclientscopes

      :return: Keycloak server response Array of (ClientScopeRepresentation)
      :rtype: list



   .. py:method:: get_client_scope(client_scope_id: str) -> dict

      Get client scope.

      Get representation of the client scopes for the realm where we are connected to
      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_getclientscopes

      :param client_scope_id: The id of the client scope
      :type client_scope_id: str
      :return: Keycloak server response (ClientScopeRepresentation)
      :rtype: dict



   .. py:method:: get_client_scope_by_name(client_scope_name: str) -> dict

      Get client scope by name.

      Get representation of the client scope identified by the client scope name.

      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_getclientscopes
      :param client_scope_name: (str) Name of the client scope
      :type client_scope_name: str
      :returns: ClientScopeRepresentation or None
      :rtype: dict



   .. py:method:: create_client_scope(payload: dict, skip_exists: bool = False) -> str

      Create a client scope.

      ClientScopeRepresentation:
      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_getclientscopes

      :param payload: ClientScopeRepresentation
      :type payload: dict
      :param skip_exists: If true then do not raise an error if client scope already exists
      :type skip_exists: bool
      :return: Client scope id
      :rtype: str



   .. py:method:: update_client_scope(client_scope_id: str, payload: dict) -> bytes

      Update a client scope.

      ClientScopeRepresentation:
      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_client_scopes_resource

      :param client_scope_id: The id of the client scope
      :type client_scope_id: str
      :param payload: ClientScopeRepresentation
      :type payload: dict
      :return: Keycloak server response (ClientScopeRepresentation)
      :rtype: bytes



   .. py:method:: delete_client_scope(client_scope_id: str) -> bytes

      Delete existing client scope.

      ClientScopeRepresentation:
      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_client_scopes_resource

      :param client_scope_id: The id of the client scope
      :type client_scope_id: str
      :return: Keycloak server response
      :rtype: bytes



   .. py:method:: get_mappers_from_client_scope(client_scope_id: str) -> list

      Get a list of all mappers connected to the client scope.

      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_protocol_mappers_resource
      :param client_scope_id: Client scope id
      :type client_scope_id: str
      :returns: Keycloak server response (ProtocolMapperRepresentation)
      :rtype: list



   .. py:method:: add_mapper_to_client_scope(client_scope_id: str, payload: dict) -> bytes

      Add a mapper to a client scope.

      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_create_mapper

      :param client_scope_id: The id of the client scope
      :type client_scope_id: str
      :param payload: ProtocolMapperRepresentation
      :type payload: dict
      :return: Keycloak server Response
      :rtype: bytes



   .. py:method:: delete_mapper_from_client_scope(client_scope_id: str, protocol_mapper_id: str) -> bytes

      Delete a mapper from a client scope.

      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_delete_mapper

      :param client_scope_id: The id of the client scope
      :type client_scope_id: str
      :param protocol_mapper_id: Protocol mapper id
      :type protocol_mapper_id: str
      :return: Keycloak server Response
      :rtype: bytes



   .. py:method:: update_mapper_in_client_scope(client_scope_id: str, protocol_mapper_id: str, payload: dict) -> bytes

      Update an existing protocol mapper in a client scope.

      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_protocol_mappers_resource

      :param client_scope_id: The id of the client scope
      :type client_scope_id: str
      :param protocol_mapper_id: The id of the protocol mapper which exists in the client scope
             and should to be updated
      :type protocol_mapper_id: str
      :param payload: ProtocolMapperRepresentation
      :type payload: dict
      :return: Keycloak server Response
      :rtype: bytes



   .. py:method:: get_default_default_client_scopes() -> list

      Get default default client scopes.

      Return list of default default client scopes

      :return: Keycloak server response
      :rtype: list



   .. py:method:: delete_default_default_client_scope(scope_id: str) -> bytes

      Delete default default client scope.

      :param scope_id: default default client scope id
      :type scope_id: str
      :return: Keycloak server response
      :rtype: list



   .. py:method:: add_default_default_client_scope(scope_id: str) -> bytes

      Add default default client scope.

      :param scope_id: default default client scope id
      :type scope_id: str
      :return: Keycloak server response
      :rtype: bytes



   .. py:method:: get_default_optional_client_scopes() -> list

      Get default optional client scopes.

      Return list of default optional client scopes

      :return: Keycloak server response
      :rtype: list



   .. py:method:: delete_default_optional_client_scope(scope_id: str) -> bytes

      Delete default optional client scope.

      :param scope_id: default optional client scope id
      :type scope_id: str
      :return: Keycloak server response
      :rtype: bytes



   .. py:method:: add_default_optional_client_scope(scope_id: str) -> bytes

      Add default optional client scope.

      :param scope_id: default optional client scope id
      :type scope_id: str
      :return: Keycloak server response
      :rtype: bytes



   .. py:method:: add_client_specific_roles_to_client_scope(client_scope_id: str, client_roles_owner_id: str, roles: str | list) -> bytes

      Assign client roles to a client scope.

      To assign roles to a client's dedicated scope, use assign_client_roles_to_client_scope.

      :param client_scope_id: client scope id
      :type client_scope_id: str
      :param client_roles_owner_id: id of client (not client-id) who has the roles
      :type client_roles_owner_id: str
      :param roles: roles list or role (use RoleRepresentation, must include id and name)
      :type roles: list
      :return: Keycloak server response
      :rtype: bytes



   .. py:method:: remove_client_specific_roles_of_client_scope(client_scope_id: str, client_roles_owner_id: str, roles: str | list) -> bytes

      Delete client roles of a client scope.

      To delete roles from a client's dedicated scope, use delete_client_roles_of_client_scope.

      :param client_scope_id: client scope id
      :type client_scope_id: str
      :param client_roles_owner_id: id of client (not client-id) who has the roles
      :type client_roles_owner_id: str
      :param roles: roles list or role (use RoleRepresentation, must include id and name)
      :type roles: list
      :return: Keycloak server response
      :rtype: bytes



   .. py:method:: get_client_specific_roles_of_client_scope(client_scope_id: str, client_roles_owner_id: str) -> list

      Get client roles for a client scope, for a specific client.

      To get roles for a client's dedicated scope, use get_client_roles_of_client_scope.

      :param client_scope_id: client scope id
      :type client_scope_id: str
      :param client_roles_owner_id: id of client (not client-id) who has the roles
      :type client_roles_owner_id: str
      :return: Keycloak server response (array RoleRepresentation)
      :rtype: list



   .. py:method:: get_all_roles_of_client_scope(client_scope_id: str) -> list

      Get all client roles for a client scope.

      To get roles for a client's dedicated scope,
      use get_client_roles_of_client_scope.

      :param client_scope_id: client scope id
      :type client_scope_id: str
      :return: Keycloak server response (array RoleRepresentation)
      :rtype: dict



   .. py:method:: get_mappers_from_client(client_id: str) -> list

      List of all client mappers.

      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_protocolmapperrepresentation

      :param client_id: Client id
      :type client_id: str
      :returns: KeycloakServerResponse (list of ProtocolMapperRepresentation)
      :rtype: list



   .. py:method:: add_mapper_to_client(client_id: str, payload: dict) -> bytes

      Add a mapper to a client.

      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_create_mapper

      :param client_id: The id of the client
      :type client_id: str
      :param payload: ProtocolMapperRepresentation
      :type payload: dict
      :return: Keycloak server Response
      :rtype: bytes



   .. py:method:: update_client_mapper(client_id: str, mapper_id: str, payload: dict) -> bytes

      Update client mapper.

      :param client_id: The id of the client
      :type client_id: str
      :param mapper_id: The id of the mapper to be deleted
      :type mapper_id: str
      :param payload: ProtocolMapperRepresentation
      :type payload: dict
      :return: Keycloak server response
      :rtype: bytes



   .. py:method:: remove_client_mapper(client_id: str, client_mapper_id: str) -> bytes

      Remove a mapper from the client.

      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_protocol_mappers_resource

      :param client_id: The id of the client
      :type client_id: str
      :param client_mapper_id: The id of the mapper to be deleted
      :type client_mapper_id: str
      :return: Keycloak server response
      :rtype: bytes



   .. py:method:: generate_client_secrets(client_id: str) -> bytes

      Generate a new secret for the client.

      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_regeneratesecret

      :param client_id:  id of client (not client-id)
      :type client_id: str
      :return: Keycloak server response (ClientRepresentation)
      :rtype: bytes



   .. py:method:: get_client_secrets(client_id: str) -> dict

      Get representation of the client secrets.

      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_getclientsecret

      :param client_id:  id of client (not client-id)
      :type client_id: str
      :return: Keycloak server response (ClientRepresentation)
      :rtype: dict



   .. py:method:: get_components(query: dict | None = None) -> list

      Get components.

      Return a list of components, filtered according to query parameters

      ComponentRepresentation
      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_componentrepresentation

      :param query: Query parameters (optional)
      :type query: dict
      :return: components list
      :rtype: list



   .. py:method:: create_component(payload: dict) -> str

      Create a new component.

      ComponentRepresentation
      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_componentrepresentation

      :param payload: ComponentRepresentation
      :type payload: dict
      :return: Component id
      :rtype: str



   .. py:method:: get_component(component_id: str) -> dict

      Get representation of the component.

      :param component_id: Component id

      ComponentRepresentation
      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_componentrepresentation

      :param component_id: Id of the component
      :type component_id: str
      :return: ComponentRepresentation
      :rtype: dict



   .. py:method:: update_component(component_id: str, payload: dict) -> bytes

      Update the component.

      :param component_id: Component id
      :type component_id: str
      :param payload: ComponentRepresentation
          https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_componentrepresentation
      :type payload: dict
      :return: Http response
      :rtype: bytes



   .. py:method:: delete_component(component_id: str) -> bytes

      Delete the component.

      :param component_id: Component id
      :type component_id: str
      :return: Http response
      :rtype: bytes



   .. py:method:: get_keys() -> list

      Get keys.

      Return a list of keys, filtered according to query parameters

      KeysMetadataRepresentation
      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_key_resource

      :return: keys list
      :rtype: list



   .. py:method:: get_admin_events(query: dict | None = None) -> list

      Get Administrative events.

      Return a list of events, filtered according to query parameters

      AdminEvents Representation array
      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_getevents
      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_get_adminrealmsrealmadmin_events

      :param query: Additional query parameters
      :type query: dict
      :return: events list
      :rtype: list



   .. py:method:: get_events(query: dict | None = None) -> list

      Get events.

      Return a list of events, filtered according to query parameters

      EventRepresentation array
      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_eventrepresentation

      :param query: Additional query parameters
      :type query: dict
      :return: events list
      :rtype: list



   .. py:method:: set_events(payload: dict) -> bytes

      Set realm events configuration.

      RealmEventsConfigRepresentation
      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_realmeventsconfigrepresentation

      :param payload: Payload object for the events configuration
      :type payload: dict
      :return: Http response
      :rtype: bytes



   .. py:method:: get_client_all_sessions(client_id: str, query: dict | None = None) -> list

      Get sessions associated with the client.

      UserSessionRepresentation
      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_usersessionrepresentation

      :param client_id: id of client
      :type client_id: str
      :param query: Additional query parameters
      :type query: dict
      :return: UserSessionRepresentation
      :rtype: list



   .. py:method:: get_client_sessions_stats() -> dict

      Get current session count for all clients with active sessions.

      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_getclientsessionstats

      :return: Dict of clients and session count
      :rtype: dict



   .. py:method:: get_client_management_permissions(client_id: str) -> list

      Get management permissions for a client.

      :param client_id: id in ClientRepresentation
          https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_clientrepresentation
      :type client_id: str
      :return: Keycloak server response
      :rtype: list



   .. py:method:: update_client_management_permissions(payload: dict, client_id: str) -> bytes

      Update management permissions for a client.

      ManagementPermissionReference
      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_managementpermissionreference

      Payload example::

          payload={
              "enabled": true
          }

      :param payload: ManagementPermissionReference
      :type payload: dict
      :param client_id: id in ClientRepresentation
          https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_clientrepresentation
      :type client_id: str
      :return: Keycloak server response
      :rtype: bytes



   .. py:method:: get_client_authz_policy_scopes(client_id: str, policy_id: str) -> list

      Get scopes for a given policy.

      :param client_id: id in ClientRepresentation
          https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_clientrepresentation
      :type client_id: str
      :param policy_id: No Document
      :type policy_id: str
      :return: Keycloak server response
      :rtype: list



   .. py:method:: get_client_authz_policy_resources(client_id: str, policy_id: str) -> list

      Get resources for a given policy.

      :param client_id: id in ClientRepresentation
          https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_clientrepresentation
      :type client_id: str
      :param policy_id: No Document
      :type policy_id: str
      :return: Keycloak server response
      :rtype: list



   .. py:method:: get_client_authz_scope_permission(client_id: str, scope_id: str) -> list

      Get permissions for a given scope.

      :param client_id: id in ClientRepresentation
          https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_clientrepresentation
      :type client_id: str
      :param scope_id: No Document
      :type scope_id: str
      :return: Keycloak server response
      :rtype: list



   .. py:method:: create_client_authz_scope_permission(payload: dict, client_id: str) -> bytes

      Create permissions for a authz scope.

      Payload example::

          payload={
              "name": "My Permission Name",
              "type": "scope",
              "logic": "POSITIVE",
              "decisionStrategy": "UNANIMOUS",
              "resources": [some_resource_id],
              "scopes": [some_scope_id],
              "policies": [some_policy_id],
          }

      :param payload: No Document
      :type payload: dict
      :param client_id: id in ClientRepresentation
          https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_clientrepresentation
      :type client_id: str
      :return: Keycloak server response
      :rtype: bytes



   .. py:method:: update_client_authz_scope_permission(payload: dict, client_id: str, scope_id: str) -> bytes

      Update permissions for a given scope.

      Payload example::

          payload={
              "id": scope_id,
              "name": "My Permission Name",
              "type": "scope",
              "logic": "POSITIVE",
              "decisionStrategy": "UNANIMOUS",
              "resources": [some_resource_id],
              "scopes": [some_scope_id],
              "policies": [some_policy_id],
          }

      :param payload: No Document
      :type payload: dict
      :param client_id: id in ClientRepresentation
          https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_clientrepresentation
      :type client_id: str
      :param scope_id: No Document
      :type scope_id: str
      :return: Keycloak server response
      :rtype: bytes



   .. py:method:: update_client_authz_resource_permission(payload: dict, client_id: str, resource_id: str) -> bytes

      Update permissions for a given resource.

      Payload example::

          payload={
              "id": resource_id,
              "name": "My Permission Name",
              "type": "resource",
              "logic": "POSITIVE",
              "decisionStrategy": "UNANIMOUS",
              "resources": [some_resource_id],
              "scopes": [],
              "policies": [some_policy_id],
          }

      :param payload: No Document
      :type payload: dict
      :param client_id: id in ClientRepresentation
          https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_clientrepresentation
      :type client_id: str
      :param resource_id: No Document
      :type resource_id: str
      :return: Keycloak server response
      :rtype: bytes



   .. py:method:: get_client_authz_client_policies(client_id: str) -> list

      Get policies for a given client.

      :param client_id: id in ClientRepresentation
          https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_clientrepresentation
      :type client_id: str
      :return: Keycloak server response (RoleRepresentation)
      :rtype: list



   .. py:method:: get_client_authz_permission_associated_policies(client_id: str, policy_id: str) -> list

      Get associated policies for a given client permission.

      :param client_id: id in ClientRepresentation
          https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_clientrepresentation
      :type client_id: str
      :param policy_id: id in PolicyRepresentation
          https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_policyrepresentation
      :type policy_id: str
      :return: Keycloak server response (RoleRepresentation)
      :rtype: list



   .. py:method:: create_client_authz_client_policy(payload: dict, client_id: str) -> bytes

      Create a new policy for a given client.

      Payload example::

          payload={
              "type": "client",
              "logic": "POSITIVE",
              "decisionStrategy": "UNANIMOUS",
              "name": "My Policy",
              "clients": [other_client_id],
          }

      :param payload: No Document
      :type payload: dict
      :param client_id: id in ClientRepresentation
          https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_clientrepresentation
      :type client_id: str
      :return: Keycloak server response (RoleRepresentation)
      :rtype: bytes



   .. py:method:: get_composite_client_roles_of_group(client_id: str, group_id: str, brief_representation: bool = True) -> list

      Get the composite client roles of the given group for the given client.

      :param client_id: id of the client.
      :type client_id: str
      :param group_id: id of the group.
      :type group_id: str
      :param brief_representation: whether to omit attributes in the response
      :type brief_representation: bool
      :return: the composite client roles of the group (list of RoleRepresentation).
      :rtype: list



   .. py:method:: get_role_client_level_children(client_id: str, role_id: str) -> list

      Get the child roles of which the given composite client role is composed of.

      :param client_id: id of the client.
      :type client_id: str
      :param role_id: id of the role.
      :type role_id: str
      :return: the child roles (list of RoleRepresentation).
      :rtype: list



   .. py:method:: upload_certificate(client_id: str, certcont: str) -> dict

      Upload a new certificate for the client.

      :param client_id: id of the client.
      :type client_id: str
      :param certcont: the content of the certificate.
      :type certcont: str
      :return: dictionary {"certificate": "<certcont>"},
               where <certcont> is the content of the uploaded certificate.
      :rtype: dict



   .. py:method:: get_required_action_by_alias(action_alias: str) -> dict | None

      Get a required action by its alias.

      :param action_alias: the alias of the required action.
      :type action_alias: str
      :return: the required action (RequiredActionProviderRepresentation).
      :rtype: dict



   .. py:method:: get_required_actions() -> list

      Get the required actions for the realms.

      :return: the required actions (list of RequiredActionProviderRepresentation).
      :rtype: list



   .. py:method:: update_required_action(action_alias: str, payload: dict) -> dict

      Update a required action.

      :param action_alias: the action alias.
      :type action_alias: str
      :param payload: the new required action (RequiredActionProviderRepresentation).
      :type payload: dict
      :return: empty dictionary.
      :rtype: dict



   .. py:method:: get_bruteforce_detection_status(user_id: str) -> dict

      Get bruteforce detection status for user.

      :param user_id: User id
      :type user_id: str
      :return: Bruteforce status.
      :rtype: dict



   .. py:method:: clear_bruteforce_attempts_for_user(user_id: str) -> dict

      Clear bruteforce attempts for user.

      :param user_id: User id
      :type user_id: str
      :return: empty dictionary.
      :rtype: dict



   .. py:method:: clear_all_bruteforce_attempts() -> dict

      Clear bruteforce attempts for all users in realm.

      :return: empty dictionary.
      :rtype: dict



   .. py:method:: clear_keys_cache() -> dict

      Clear keys cache.

      :return: empty dictionary.
      :rtype: dict



   .. py:method:: clear_realm_cache() -> dict

      Clear realm cache.

      :return: empty dictionary.
      :rtype: dict



   .. py:method:: clear_user_cache() -> dict

      Clear user cache.

      :return: empty dictionary.
      :rtype: dict



   .. py:method:: a___fetch_all(url: str, query: dict | None = None) -> list
      :async:


      Paginate asynchronously over get requests .

      Wrapper function to paginate GET requests.

      :param url: The url on which the query is executed
      :type url: str
      :param query: Existing query parameters (optional)
      :type query: dict

      :return: Combined results of paginated queries
      :rtype: list



   .. py:method:: a___fetch_paginated(url: str, query: dict | None = None) -> list
      :async:


      Make a specific paginated request asynchronously.

      :param url: The url on which the query is executed
      :type url: str
      :param query: Pagination settings
      :type query: dict
      :returns: Response
      :rtype: list



   .. py:method:: a_get_current_realm() -> str
      :async:


      Return the currently configured realm asynchronously.

      :returns: Currently configured realm name
      :rtype: str



   .. py:method:: a_change_current_realm(realm_name: str) -> None
      :async:


      Change the current realm asynchronously.

      :param realm_name: The name of the realm to be configured as current
      :type realm_name: str



   .. py:method:: a_import_realm(payload: dict) -> dict
      :async:


      Import a new realm asynchronously from a RealmRepresentation.

      Realm name must be unique.

      RealmRepresentation
      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_realmrepresentation

      :param payload: RealmRepresentation
      :type payload: dict
      :return: RealmRepresentation
      :rtype: dict



   .. py:method:: a_partial_import_realm(realm_name: str, payload: dict) -> dict
      :async:


      Partial import realm configuration asynchronously from PartialImportRepresentation.

      Realm partialImport is used for modifying configuration of existing realm.

      PartialImportRepresentation
      https://www.keycloak.org/docs-api/24.0.2/rest-api/#_partialimportrepresentation

      :param realm_name: Realm name (not the realm id)
      :type realm_name: str
      :param payload: PartialImportRepresentation
      :type payload: dict

      :return: PartialImportResponse
      :rtype: dict



   .. py:method:: a_export_realm(export_clients: bool = False, export_groups_and_role: bool = False) -> dict
      :async:


      Export the realm configurations asynchronously in the json format.

      RealmRepresentation
      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_partialexport

      :param export_clients: Skip if not want to export realm clients
      :type export_clients: bool
      :param export_groups_and_role: Skip if not want to export realm groups and roles
      :type export_groups_and_role: bool

      :return: realm configurations JSON
      :rtype: dict



   .. py:method:: a_get_realms() -> list
      :async:


      List all realms in asynchronouslyKeycloak deployment.

      :return: realms list
      :rtype: list



   .. py:method:: a_get_realm(realm_name: str) -> dict
      :async:


      Get a specific realm asynchronously.

      RealmRepresentation:
      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_realmrepresentation

      :param realm_name: Realm name (not the realm id)
      :type realm_name: str
      :return: RealmRepresentation
      :rtype: dict



   .. py:method:: a_create_realm(payload: dict, skip_exists: bool = False) -> dict
      :async:


      Create a realm asynchronously.

      RealmRepresentation:
      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_realmrepresentation

      :param payload: RealmRepresentation
      :type payload: dict
      :param skip_exists: Skip if Realm already exist.
      :type skip_exists: bool
      :return: Keycloak server response (RealmRepresentation)
      :rtype: dict



   .. py:method:: a_update_realm(realm_name: str, payload: dict) -> dict
      :async:


      Update a realm asynchronously.

      This will only update top level attributes and will ignore any user,
      role, or client information in the payload.

      RealmRepresentation:
      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_realmrepresentation

      :param realm_name: Realm name (not the realm id)
      :type realm_name: str
      :param payload: RealmRepresentation
      :type payload: dict
      :return: Http response
      :rtype: dict



   .. py:method:: a_update_realm_users_profile(payload: dict) -> dict
      :async:


      Update realm users profile for the current realm.

      :param up_config: List of attributes, groups, unmamagedAttributePolicy

      Related documentation:
      https://www.keycloak.org/docs-api/26.0.0/rest-api/index.html#UPConfig



   .. py:method:: a_delete_realm(realm_name: str) -> bytes
      :async:


      Delete a realm asynchronously.

      :param realm_name: Realm name (not the realm id)
      :type realm_name: str
      :return: Http response
      :rtype: bytes



   .. py:method:: a_get_users(query: dict | None = None) -> list
      :async:


      Get all users asynchronously.

      Return a list of users, filtered according to query parameters

      UserRepresentation
      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_userrepresentation

      :param query: Query parameters (optional)
      :type query: dict
      :return: users list
      :rtype: list



   .. py:method:: a_create_idp(payload: dict) -> dict
      :async:


      Create an ID Provider asynchronously.

      IdentityProviderRepresentation
      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_identityproviderrepresentation

      :param: payload: IdentityProviderRepresentation
      :type payload: dict
      :returns: Keycloak server response
      :rtype: dict



   .. py:method:: a_update_idp(idp_alias: str, payload: dict) -> bytes
      :async:


      Update an ID Provider asynchronously.

      IdentityProviderRepresentation
      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_identity_providers_resource

      :param: idp_alias: alias for IdP to update
      :type idp_alias: str
      :param: payload: The IdentityProviderRepresentation
      :type payload: dict
      :returns: Keycloak server response
      :rtype: bytes



   .. py:method:: a_add_mapper_to_idp(idp_alias: str, payload: dict) -> dict
      :async:


      Create an ID Provider asynchronously.

      IdentityProviderRepresentation
      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_identityprovidermapperrepresentation

      :param: idp_alias: alias for Idp to add mapper in
      :type idp_alias: str
      :param: payload: IdentityProviderMapperRepresentation
      :type payload: dict
      :returns: Keycloak server response
      :rtype: dict



   .. py:method:: a_update_mapper_in_idp(idp_alias: str, mapper_id: str, payload: dict) -> bytes
      :async:


      Update an IdP mapper asynchronously.

      IdentityProviderMapperRepresentation
      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_update

      :param: idp_alias: alias for Idp to fetch mappers
      :type idp_alias: str
      :param: mapper_id: Mapper Id to update
      :type mapper_id: str
      :param: payload: IdentityProviderMapperRepresentation
      :type payload: dict
      :return: Http response
      :rtype: bytes



   .. py:method:: a_get_idp_mappers(idp_alias: str) -> list
      :async:


      Get IDP mappers asynchronously.

      Returns a list of ID Providers mappers

      IdentityProviderMapperRepresentation
      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_getmappers

      :param: idp_alias: alias for Idp to fetch mappers
      :type idp_alias: str
      :return: array IdentityProviderMapperRepresentation
      :rtype: list



   .. py:method:: a_get_idps() -> list
      :async:


      Get IDPs asynchronously.

      Returns a list of ID Providers,

      IdentityProviderRepresentation
      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_identityproviderrepresentation

      :return: array IdentityProviderRepresentation
      :rtype: list



   .. py:method:: a_get_idp(idp_alias: str) -> dict
      :async:


      Get IDP provider asynchronously.

      Get the representation of a specific IDP Provider.

      IdentityProviderRepresentation
      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_identityproviderrepresentation

      :param: idp_alias: alias for IdP to get
      :type idp_alias: str
      :return: IdentityProviderRepresentation
      :rtype: dict



   .. py:method:: a_delete_idp(idp_alias: str) -> dict
      :async:


      Delete an ID Provider asynchronously.

      :param: idp_alias: idp alias name
      :type idp_alias: str
      :returns: Keycloak server response
      :rtype: dict



   .. py:method:: a_create_user(payload: dict, exist_ok: bool = False) -> str
      :async:


      Create a new user asynchronously.

      Username must be unique

      UserRepresentation
      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_userrepresentation

      :param payload: UserRepresentation
      :type payload: dict
      :param exist_ok: If False, raise KeycloakGetError if username already exists.
          Otherwise, return existing user ID.
      :type exist_ok: bool

      :return: user_id
      :rtype: str



   .. py:method:: a_users_count(query: dict | None = None) -> int
      :async:


      Count users asynchronously.

      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_users_resource

      :param query: (dict) Query parameters for users count
      :type query: dict

      :return: counter
      :rtype: int



   .. py:method:: a_get_user_id(username: str) -> str
      :async:


      Get internal keycloak user id from username asynchronously.

      This is required for further actions against this user.

      UserRepresentation
      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_userrepresentation

      :param username: id in UserRepresentation
      :type username: str

      :return: user_id
      :rtype: str



   .. py:method:: a_get_user(user_id: str, user_profile_metadata: bool = False) -> dict
      :async:


      Get representation of the user asynchronously.

      UserRepresentation
      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_userrepresentation

      :param user_id: User id
      :type user_id: str
      :param user_profile_metadata: whether to include user profile metadata in the response
      :type user_profile_metadata: bool
      :return: UserRepresentation



   .. py:method:: a_get_user_groups(user_id: str, query: dict | None = None, brief_representation: bool = True) -> list
      :async:


      Get user groups asynchronously.

      Returns a list of groups of which the user is a member

      :param user_id: User id
      :type user_id: str
      :param query: Additional query options
      :type query: dict
      :param brief_representation: whether to omit attributes in the response
      :type brief_representation: bool
      :return: user groups list
      :rtype: list



   .. py:method:: a_update_user(user_id: str, payload: dict) -> bytes
      :async:


      Update the user asynchronously.

      :param user_id: User id
      :type user_id: str
      :param payload: UserRepresentation
      :type payload: dict

      :return: Http response
      :rtype: bytes



   .. py:method:: a_disable_user(user_id: str) -> bytes
      :async:


      Disable the user asynchronously from the realm. Disabled users can not log in.

      :param user_id: User id
      :type user_id: str

      :return: Http response
      :rtype: bytes



   .. py:method:: a_enable_user(user_id: str) -> bytes
      :async:


      Enable the user from the realm asynchronously.

      :param user_id: User id
      :type user_id: str

      :return: Http response
      :rtype: bytes



   .. py:method:: a_disable_all_users() -> None
      :async:


      Disable all existing users asynchronously.



   .. py:method:: a_enable_all_users() -> None
      :async:


      Disable all existing users asynchronously.



   .. py:method:: a_delete_user(user_id: str) -> bytes
      :async:


      Delete the user asynchronously.

      :param user_id: User id
      :type user_id: str
      :return: Http response
      :rtype: bytes



   .. py:method:: a_set_user_password(user_id: str, password: str, temporary: bool = True) -> bytes
      :async:


      Set up a password for the user asynchronously.

      If temporary is True, the user will have to reset
      the temporary password next time they log in.

      https://www.keycloak.org/docs-api/24.0.2/rest-api/#_users_resource
      https://www.keycloak.org/docs-api/24.0.2/rest-api/#_credentialrepresentation

      :param user_id: User id
      :type user_id: str
      :param password: New password
      :type password: str
      :param temporary: True if password is temporary
      :type temporary: bool
      :returns: Response
      :rtype: bytes



   .. py:method:: a_get_credentials(user_id: str) -> list
      :async:


      Get user credentials asynchronously.

      Returns a list of credential belonging to the user.

      CredentialRepresentation
      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_credentialrepresentation

      :param: user_id: user id
      :type user_id: str
      :returns: Keycloak server response (CredentialRepresentation)
      :rtype: list



   .. py:method:: a_delete_credential(user_id: str, credential_id: str) -> bytes
      :async:


      Delete credential of the user asynchronously.

      CredentialRepresentation
      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_credentialrepresentation

      :param: user_id: user id
      :type user_id: str
      :param: credential_id: credential id
      :type credential_id: str
      :return: Keycloak server response (ClientRepresentation)
      :rtype: bytes



   .. py:method:: a_user_logout(user_id: str) -> bytes
      :async:


      Log out the user.

      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_logout

      :param user_id: User id
      :type user_id: str
      :returns: Keycloak server response
      :rtype: bytes



   .. py:method:: a_user_consents(user_id: str) -> list
      :async:


      Asynchronously get consents granted by the user.

      UserConsentRepresentation
      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_userconsentrepresentation

      :param user_id: User id
      :type user_id: str
      :returns: List of UserConsentRepresentations
      :rtype: list



   .. py:method:: a_revoke_consent(user_id: str, client_id: str) -> dict | bytes
      :async:


      Asynchronously revoke consent and offline tokens for particular client from user.

      :param user_id: User id
      :type user_id: str
      :param client_id: Client id
      :type client_id: str




   .. py:method:: a_get_user_social_logins(user_id: str) -> list
      :async:


      Get user social logins asynchronously.

      Returns a list of federated identities/social logins of which the user has been associated
      with
      :param user_id: User id
      :type user_id: str
      :returns: Federated identities list
      :rtype: list



   .. py:method:: a_add_user_social_login(user_id: str, provider_id: str, provider_userid: str, provider_username: str) -> bytes
      :async:


      Add a federated identity / social login provider asynchronously to the user.

      :param user_id: User id
      :type user_id: str
      :param provider_id: Social login provider id
      :type provider_id: str
      :param provider_userid: userid specified by the provider
      :type provider_userid: str
      :param provider_username: username specified by the provider
      :type provider_username: str
      :returns: Keycloak server response
      :rtype: bytes



   .. py:method:: a_delete_user_social_login(user_id: str, provider_id: str) -> bytes
      :async:


      Delete a federated identity / social login provider asynchronously from the user.

      :param user_id: User id
      :type user_id: str
      :param provider_id: Social login provider id
      :type provider_id: str
      :returns: Keycloak server response
      :rtype: bytes



   .. py:method:: a_send_update_account(user_id: str, payload: list, client_id: str | None = None, lifespan: int | None = None, redirect_uri: str | None = None) -> bytes
      :async:


      Send an update account email to the user asynchronously.

      An email contains a link the user can click to perform a set of required actions.

      :param user_id: User id
      :type user_id: str
      :param payload: A list of actions for the user to complete
      :type payload: list
      :param client_id: Client id (optional)
      :type client_id: str
      :param lifespan: Number of seconds after which the generated token expires (optional)
      :type lifespan: int
      :param redirect_uri: The redirect uri (optional)
      :type redirect_uri: str

      :returns: Keycloak server response
      :rtype: bytes



   .. py:method:: a_send_verify_email(user_id: str, client_id: str | None = None, redirect_uri: str | None = None) -> bytes
      :async:


      Send a update account email to the user asynchronously.

      An email contains a link the user can click to perform a set of required actions.

      :param user_id: User id
      :type user_id: str
      :param client_id: Client id (optional)
      :type client_id: str
      :param redirect_uri: Redirect uri (optional)
      :type redirect_uri: str

      :returns: Keycloak server response
      :rtype: bytes



   .. py:method:: a_get_sessions(user_id: str) -> list
      :async:


      Get sessions associated with the user asynchronously.

      UserSessionRepresentation
      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_usersessionrepresentation

      :param user_id: Id of user
      :type user_id: str
      :return: UserSessionRepresentation
      :rtype: list



   .. py:method:: a_get_server_info() -> dict
      :async:


      Get themes, social providers, etc. on this server asynchronously.

      ServerInfoRepresentation
      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_serverinforepresentation

      :return: ServerInfoRepresentation
      :rtype: dict



   .. py:method:: a_get_groups(query: dict | None = None, full_hierarchy: bool = False) -> list
      :async:


      Get groups asynchronously.

      Returns a list of groups belonging to the realm

      GroupRepresentation
      https://www.keycloak.org/docs-api/24.0.2/rest-api/#_grouprepresentation

      Notice that when using full_hierarchy=True, the response will be a nested structure
      containing all the children groups. If used with query parameters, the full_hierarchy
      will be applied to the received groups only.

      :param query: Additional query options
      :type query: dict
      :param full_hierarchy: If True, return all of the nested children groups, otherwise only
          the first level children are returned
      :type full_hierarchy: bool
      :return: array GroupRepresentation
      :rtype: list



   .. py:method:: a_get_group(group_id: str, full_hierarchy: bool = False) -> dict
      :async:


      Get group by id asynchronously.

      Returns full group details

      GroupRepresentation
      https://www.keycloak.org/docs-api/24.0.2/rest-api/#_grouprepresentation

      :param group_id: The group id
      :type group_id: str
      :param full_hierarchy: If True, return all of the nested children groups, otherwise only
          the first level children are returned
      :type full_hierarchy: bool
      :return: Keycloak server response (GroupRepresentation)
      :rtype: dict



   .. py:method:: a_get_subgroups(group: str, path: str) -> dict | None
      :async:


      Get subgroups asynchronously.

      Utility function to iterate through nested group structures

      GroupRepresentation
      https://www.keycloak.org/docs-api/24.0.2/rest-api/#_grouprepresentation

      :param group: group (GroupRepresentation)
      :type group: dict
      :param path: group path (string)
      :type path: str
      :return: Keycloak server response (GroupRepresentation)
      :rtype: dict



   .. py:method:: a_get_group_children(group_id: str, query: dict | None = None, full_hierarchy: bool = False) -> list
      :async:


      Get group children by parent id asynchronously.

      Returns full group children details

      :param group_id: The parent group id
      :type group_id: str
      :param query: Additional query options
      :type query: dict
      :param full_hierarchy: If True, return all of the nested children groups
      :type full_hierarchy: bool
      :return: Keycloak server response (GroupRepresentation)
      :rtype: list
      :raises ValueError: If both query and full_hierarchy parameters are used



   .. py:method:: a_get_group_members(group_id: str, query: dict | None = None) -> list
      :async:


      Get members by group id asynchronously.

      Returns group members

      GroupRepresentation
      https://www.keycloak.org/docs-api/24.0.2/rest-api/#_userrepresentation

      :param group_id: The group id
      :type group_id: str
      :param query: Additional query parameters
          (see https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_getmembers)
      :type query: dict
      :return: Keycloak server response (UserRepresentation)
      :rtype: list



   .. py:method:: a_get_group_by_path(path: str) -> dict
      :async:


      Get group id based on name or path asynchronously .

      Returns full group details for a group defined by path

      GroupRepresentation
      https://www.keycloak.org/docs-api/24.0.2/rest-api/#_grouprepresentation

      :param path: group path
      :type path: str
      :return: Keycloak server response (GroupRepresentation)
      :rtype: dict



   .. py:method:: a_create_group(payload: dict, parent: str | None = None, skip_exists: bool = False) -> str | None
      :async:


      Create a group in the Realm asynchronously.

      GroupRepresentation
      https://www.keycloak.org/docs-api/24.0.2/rest-api/#_grouprepresentation

      :param payload: GroupRepresentation
      :type payload: dict
      :param parent: parent group's id. Required to create a sub-group.
      :type parent: str
      :param skip_exists: If true then do not raise an error if it already exists
      :type skip_exists: bool

      :return: Group id for newly created group or None for an existing group
      :rtype: str



   .. py:method:: a_update_group(group_id: str, payload: dict) -> bytes
      :async:


      Update group, ignores subgroups asynchronously.

      GroupRepresentation
      https://www.keycloak.org/docs-api/24.0.2/rest-api/#_grouprepresentation

      :param group_id: id of group
      :type group_id: str
      :param payload: GroupRepresentation with updated information.
      :type payload: dict

      :return: Http response
      :rtype: bytes



   .. py:method:: a_groups_count(query: dict | None = None) -> dict
      :async:


      Count groups asynchronously.

      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_groups

      :param query: (dict) Query parameters for groups count
      :type query: dict

      :return: Keycloak Server Response
      :rtype: dict



   .. py:method:: a_group_set_permissions(group_id: str, enabled: bool = True) -> bytes
      :async:


      Enable/Disable permissions for a group asynchronously.

      Cannot delete group if disabled

      :param group_id: id of group
      :type group_id: str
      :param enabled: Enabled flag
      :type enabled: bool
      :return: Keycloak server response
      :rtype: bytes



   .. py:method:: a_group_user_add(user_id: str, group_id: str) -> bytes
      :async:


      Add user to group (user_id and group_id) asynchronously.

      :param user_id:  id of user
      :type user_id: str
      :param group_id:  id of group to add to
      :type group_id: str
      :return: Keycloak server response
      :rtype: bytes



   .. py:method:: a_group_user_remove(user_id: str, group_id: str) -> bytes
      :async:


      Remove user from group (user_id and group_id) asynchronously.

      :param user_id:  id of user
      :type user_id: str
      :param group_id:  id of group to remove from
      :type group_id: str
      :return: Keycloak server response
      :rtype: bytes



   .. py:method:: a_delete_group(group_id: str) -> bytes
      :async:


      Delete a group in the Realm asynchronously.

      :param group_id:  id of group to delete
      :type group_id: str
      :return: Keycloak server response
      :rtype: bytes



   .. py:method:: a_get_clients() -> list
      :async:


      Get clients asynchronously.

      Returns a list of clients belonging to the realm

      ClientRepresentation
      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_clientrepresentation

      :return: Keycloak server response (ClientRepresentation)
      :rtype: list



   .. py:method:: a_get_client(client_id: str) -> dict
      :async:


      Get representation of the client asynchronously.

      ClientRepresentation
      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_clientrepresentation

      :param client_id:  id of client (not client-id)
      :type client_id: str
      :return: Keycloak server response (ClientRepresentation)
      :rtype: dict



   .. py:method:: a_get_client_id(client_id: str) -> str | None
      :async:


      Get internal keycloak client id from client-id asynchronously.

      This is required for further actions against this client.

      :param client_id: clientId in ClientRepresentation
          https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_clientrepresentation
      :type client_id: str
      :return: client_id (uuid as string)
      :rtype: str



   .. py:method:: a_get_client_authz_settings(client_id: str) -> dict
      :async:


      Get authorization json from client asynchronously.

      :param client_id: id in ClientRepresentation
          https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_clientrepresentation
      :type client_id: str
      :return: Keycloak server response
      :rtype: dict



   .. py:method:: a_create_client_authz_resource(client_id: str, payload: dict, skip_exists: bool = False) -> bytes | dict
      :async:


      Create resources of client asynchronously.

      :param client_id: id in ClientRepresentation
          https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_clientrepresentation
      :type client_id: str
      :param payload: ResourceRepresentation
          https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_resourcerepresentation
      :type payload: dict
      :param skip_exists: Skip the creation in case the resource exists
      :type skip_exists: bool

      :return: Keycloak server response
      :rtype: bytes



   .. py:method:: a_update_client_authz_resource(client_id: str, resource_id: str, payload: dict) -> bytes
      :async:


      Update resource of client asynchronously.

      Any parameter missing from the ResourceRepresentation in the payload WILL be set
      to default by the Keycloak server.

      :param client_id: id in ClientRepresentation
          https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_clientrepresentation
      :type client_id: str
      :param payload: ResourceRepresentation
          https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_resourcerepresentation
      :type payload: dict
      :param client_id: id in ClientRepresentation
          https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_clientrepresentation
      :type client_id: str
      :param resource_id: id in ResourceRepresentation
          https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_resourcerepresentation
      :type resource_id: str

      :return: Keycloak server response
      :rtype: bytes



   .. py:method:: a_delete_client_authz_resource(client_id: str, resource_id: str) -> bytes
      :async:


      Delete a client resource asynchronously.

      :param client_id: id in ClientRepresentation
          https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_clientrepresentation
      :type client_id: str
      :param resource_id: id in ResourceRepresentation
          https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_resourcerepresentation
      :type resource_id: str

      :return: Keycloak server response
      :rtype: bytes



   .. py:method:: a_get_client_authz_resources(client_id: str) -> list
      :async:


      Get resources from client asynchronously.

      :param client_id: id in ClientRepresentation
          https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_clientrepresentation
      :type client_id: str
      :return: Keycloak server response (ResourceRepresentation)
      :rtype: list



   .. py:method:: a_get_client_authz_resource(client_id: str, resource_id: str) -> dict
      :async:


      Get a client resource asynchronously.

      :param client_id: id in ClientRepresentation
          https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_clientrepresentation
      :type client_id: str
      :param resource_id: id in ResourceRepresentation
          https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_resourcerepresentation
      :type resource_id: str

      :return: Keycloak server response (ResourceRepresentation)
      :rtype: dict



   .. py:method:: a_create_client_authz_role_based_policy(client_id: str, payload: dict, skip_exists: bool = False) -> bytes
      :async:


      Create role-based policy of client asynchronously.

      Payload example::

          payload={
              "type": "role",
              "logic": "POSITIVE",
              "decisionStrategy": "UNANIMOUS",
              "name": "Policy-1",
              "roles": [
                  {
                  "id": id
                  }
              ]
          }

      :param client_id: id in ClientRepresentation
          https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_clientrepresentation
      :type client_id: str
      :param payload: No Document
      :type payload: dict
      :param skip_exists: Skip creation in case the object exists
      :type skip_exists: bool
      :return: Keycloak server response
      :rtype: bytes



   .. py:method:: a_create_client_authz_policy(client_id: str, payload: dict, skip_exists: bool = False) -> bytes
      :async:


      Create an authz policy of client asynchronously.

      Payload example::

          payload={
              "name": "Policy-time-based",
              "type": "time",
              "logic": "POSITIVE",
              "decisionStrategy": "UNANIMOUS",
              "config": {
                  "hourEnd": "18",
                  "hour": "9"
              }
          }

      :param client_id: id in ClientRepresentation
          https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_clientrepresentation
      :type client_id: str
      :param payload: No Document
      :type payload: dict
      :param skip_exists: Skip creation in case the object exists
      :type skip_exists: bool
      :return: Keycloak server response
      :rtype: bytes



   .. py:method:: a_create_client_authz_resource_based_permission(client_id: str, payload: dict, skip_exists: bool = False) -> bytes
      :async:


      Create resource-based permission of client asynchronously.

      Payload example::

          payload={
              "type": "resource",
              "logic": "POSITIVE",
              "decisionStrategy": "UNANIMOUS",
              "name": "Permission-Name",
              "resources": [
                  resource_id
              ],
              "policies": [
                  policy_id
              ]

      :param client_id: id in ClientRepresentation
          https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_clientrepresentation
      :type client_id: str
      :param payload: PolicyRepresentation
          https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_policyrepresentation
      :type payload: dict
      :param skip_exists: Skip creation in case the object already exists
      :type skip_exists: bool
      :return: Keycloak server response
      :rtype: bytes



   .. py:method:: a_get_client_authz_scopes(client_id: str) -> list
      :async:


      Get scopes from client asynchronously.

      :param client_id: id in ClientRepresentation
          https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_clientrepresentation
      :type client_id: str
      :return: Keycloak server response
      :rtype: list



   .. py:method:: a_create_client_authz_scopes(client_id: str, payload: dict) -> bytes
      :async:


      Create scopes for client asynchronously.

      :param client_id: id in ClientRepresentation
          https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_clientrepresentation
      :param payload: ScopeRepresentation
          https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_ScopeRepresentation
      :type payload: dict
      :type client_id: str
      :return: Keycloak server response
      :rtype: bytes



   .. py:method:: a_get_client_authz_permissions(client_id: str) -> list
      :async:


      Get permissions from client asynchronously.

      :param client_id: id in ClientRepresentation
          https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_clientrepresentation
      :type client_id: str
      :return: Keycloak server response
      :rtype: list



   .. py:method:: a_get_client_authz_policies(client_id: str) -> list
      :async:


      Get policies from client asynchronously.

      :param client_id: id in ClientRepresentation
          https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_clientrepresentation
      :type client_id: str
      :return: Keycloak server response
      :rtype: list



   .. py:method:: a_delete_client_authz_policy(client_id: str, policy_id: str) -> bytes
      :async:


      Delete a policy from client asynchronously.

      :param client_id: id in ClientRepresentation
          https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_clientrepresentation
      :type client_id: str
      :param policy_id: id in PolicyRepresentation
          https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_policyrepresentation
      :type policy_id: str
      :return: Keycloak server response
      :rtype: dict



   .. py:method:: a_get_client_authz_policy(client_id: str, policy_id: str) -> dict
      :async:


      Get a policy from client asynchronously.

      :param client_id: id in ClientRepresentation
          https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_clientrepresentation
      :type client_id: str
      :param policy_id: id in PolicyRepresentation
          https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_policyrepresentation
      :type policy_id: str
      :return: Keycloak server response
      :rtype: dict



   .. py:method:: a_get_client_service_account_user(client_id: str) -> dict
      :async:


      Get service account user from client asynchronously.

      :param client_id: id in ClientRepresentation
          https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_clientrepresentation
      :type client_id: str
      :return: UserRepresentation
      :rtype: dict



   .. py:method:: a_get_client_default_client_scopes(client_id: str) -> list
      :async:


      Get all default client scopes from client asynchronously.

      :param client_id: id of the client in which the new default client scope should be added
      :type client_id: str

      :return: list of client scopes with id and name
      :rtype: list



   .. py:method:: a_add_client_default_client_scope(client_id: str, client_scope_id: str, payload: dict) -> bytes
      :async:


      Add a client scope to the default client scopes from client asynchronously.

      Payload example::

          payload={
              "realm":"testrealm",
              "client":"aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa",
              "clientScopeId":"bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb"
          }

      :param client_id: id of the client in which the new default client scope should be added
      :type client_id: str
      :param client_scope_id: id of the new client scope that should be added
      :type client_scope_id: str
      :param payload: dictionary with realm, client and clientScopeId
      :type payload: dict

      :return: Http response
      :rtype: bytes



   .. py:method:: a_delete_client_default_client_scope(client_id: str, client_scope_id: str) -> bytes
      :async:


      Delete a client scope from the default client scopes of the client asynchronously.

      :param client_id: id of the client in which the default client scope should be deleted
      :type client_id: str
      :param client_scope_id: id of the client scope that should be deleted
      :type client_scope_id: str

      :return: list of client scopes with id and name
      :rtype: list



   .. py:method:: a_get_client_optional_client_scopes(client_id: str) -> list
      :async:


      Get all optional client scopes from client asynchronously.

      :param client_id: id of the client in which the new optional client scope should be added
      :type client_id: str

      :return: list of client scopes with id and name
      :rtype: list



   .. py:method:: a_add_client_optional_client_scope(client_id: str, client_scope_id: str, payload: dict) -> bytes
      :async:


      Add a client scope to the optional client scopes from client asynchronously.

      Payload example::

          payload={
              "realm":"testrealm",
              "client":"aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa",
              "clientScopeId":"bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb"
          }

      :param client_id: id of the client in which the new optional client scope should be added
      :type client_id: str
      :param client_scope_id: id of the new client scope that should be added
      :type client_scope_id: str
      :param payload: dictionary with realm, client and clientScopeId
      :type payload: dict

      :return: Http response
      :rtype: bytes



   .. py:method:: a_delete_client_optional_client_scope(client_id: str, client_scope_id: str) -> bytes
      :async:


      Delete a client scope from the optional client scopes of the client asynchronously.

      :param client_id: id of the client in which the optional client scope should be deleted
      :type client_id: str
      :param client_scope_id: id of the client scope that should be deleted
      :type client_scope_id: str

      :return: list of client scopes with id and name
      :rtype: list



   .. py:method:: a_create_initial_access_token(count: int = 1, expiration: int = 1) -> dict | bytes
      :async:


      Create an initial access token asynchronously.

      :param count: Number of clients that can be registered
      :type count: int
      :param expiration: Days until expireation
      :type expiration: int
      :return: initial access token
      :rtype: dict



   .. py:method:: a_create_client(payload: dict, skip_exists: bool = False) -> str
      :async:


      Create a client asynchronously.

      ClientRepresentation:
      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_clientrepresentation

      :param skip_exists: If true then do not raise an error if client already exists
      :type skip_exists: bool
      :param payload: ClientRepresentation
      :type payload: dict
      :return: Client ID
      :rtype: str



   .. py:method:: a_update_client(client_id: str, payload: dict) -> bytes
      :async:


      Update a client asynchronously.

      :param client_id: Client id
      :type client_id: str
      :param payload: ClientRepresentation
      :type payload: dict

      :return: Http response
      :rtype: bytes



   .. py:method:: a_delete_client(client_id: str) -> bytes
      :async:


      Get representation of the client asynchronously.

      ClientRepresentation
      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_clientrepresentation

      :param client_id: keycloak client id (not oauth client-id)
      :type client_id: str
      :return: Keycloak server response (ClientRepresentation)
      :rtype: bytes



   .. py:method:: a_get_client_installation_provider(client_id: str, provider_id: str) -> list
      :async:


      Get content for given installation provider asynchronously.

      Related documentation:
      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_clients_resource

      Possible provider_id list available in the ServerInfoRepresentation#clientInstallations
      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_serverinforepresentation

      :param client_id: Client id
      :type client_id: str
      :param provider_id: provider id to specify response format
      :type provider_id: str
      :returns: Installation providers
      :rtype: list



   .. py:method:: a_get_realm_users_profile() -> dict
      :async:


      Get list of attributes and group for given realm.

      Related documentation:
      https://www.keycloak.org/docs-api/26.0.0/rest-api/index.html#_get_adminrealmsrealmusersprofile

      Return https://www.keycloak.org/docs-api/26.0.0/rest-api/index.html#UPConfig
      :returns: UPConfig




   .. py:method:: a_get_realm_roles(brief_representation: bool = True, search_text: str = '', query: dict | None = None) -> list
      :async:


      Get all roles for the realm or client asynchronously.

      RoleRepresentation
      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_rolerepresentation

      :param brief_representation: whether to omit role attributes in the response
      :type brief_representation: bool
      :param search_text: optional search text to limit the returned result.
      :type search_text: str
      :param query: Query parameters (optional)
      :type query: dict
      :return: Keycloak server response (RoleRepresentation)
      :rtype: list



   .. py:method:: a_get_realm_role_groups(role_name: str, query: dict | None = None, brief_representation: bool = True) -> list
      :async:


      Get role groups of realm by role name asynchronously.

      :param role_name: Name of the role.
      :type role_name: str
      :param query: Additional Query parameters
          (see https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_parameters_226)
      :type query: dict
      :param brief_representation: whether to omit role attributes in the response
      :type brief_representation: bool
      :return: Keycloak Server Response (GroupRepresentation)
      :rtype: list



   .. py:method:: a_get_realm_role_members(role_name: str, query: dict | None = None) -> list
      :async:


      Get role members of realm by role name asynchronously.

      :param role_name: Name of the role.
      :type role_name: str
      :param query: Additional Query parameters
          (see https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_roles_resource)
      :type query: dict
      :return: Keycloak Server Response (UserRepresentation)
      :rtype: list



   .. py:method:: a_get_default_realm_role_id() -> str
      :async:


      Get the ID of the default realm role asynchronously.

      :return: Realm role ID
      :rtype: str



   .. py:method:: a_get_realm_default_roles() -> list
      :async:


      Get all the default realm roles asyncho asynchronously.

      :return: Keycloak Server Response (UserRepresentation)
      :rtype: list



   .. py:method:: a_remove_realm_default_roles(payload: dict) -> bytes
      :async:


      Remove a set of default realm roles asynchronously.

      :param payload: List of RoleRepresentations
      :type payload: list
      :return: Keycloak Server Response
      :rtype: bytes



   .. py:method:: a_add_realm_default_roles(payload: dict) -> bytes
      :async:


      Add a set of default realm roles asynchronously.

      :param payload: List of RoleRepresentations
      :type payload: list
      :return: Keycloak Server Response
      :rtype: bytes



   .. py:method:: a_get_client_roles(client_id: str, brief_representation: bool = True) -> list
      :async:


      Get all roles for the client asynchronously.

      RoleRepresentation
      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_rolerepresentation

      :param client_id: id of client (not client-id)
      :type client_id: str
      :param brief_representation: whether to omit role attributes in the response
      :type brief_representation: bool
      :return: Keycloak server response (RoleRepresentation)
      :rtype: list



   .. py:method:: a_get_client_role(client_id: str, role_name: str) -> dict
      :async:


      Get client role by name asynchronously.

      :param client_id: id of client (not client-id)
      :type client_id: str
      :param role_name: role's name (not id!)
      :type role_name: str
      :return: Role object
      :rtype: dict



   .. py:method:: a_get_client_role_id(client_id: str, role_name: str) -> str
      :async:


      Get client role id by name asynchronously.

      This is required for further actions with this role.

      RoleRepresentation
      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_rolerepresentation

      :param client_id: id of client (not client-id)
      :type client_id: str
      :param role_name: role's name (not id!)
      :type role_name: str
      :return: role_id
      :rtype: str



   .. py:method:: a_create_client_role(client_role_id: str, payload: dict, skip_exists: bool = False) -> str
      :async:


      Create a client role asynchronously.

      RoleRepresentation
      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_rolerepresentation

      :param client_role_id: id of client (not client-id)
      :type client_role_id: str
      :param payload: RoleRepresentation
      :type payload: dict
      :param skip_exists: If true then do not raise an error if client role already exists
      :type skip_exists: bool
      :return: Client role name
      :rtype: str



   .. py:method:: a_add_composite_client_roles_to_role(client_role_id: str, role_name: str, roles: str | list) -> bytes
      :async:


      Add composite roles to client role asynchronously.

      :param client_role_id: id of client (not client-id)
      :type client_role_id: str
      :param role_name: The name of the role
      :type role_name: str
      :param roles: roles list or role (use RoleRepresentation) to be updated
      :type roles: list
      :return: Keycloak server response
      :rtype: bytes



   .. py:method:: a_remove_composite_client_roles_from_role(client_role_id: str, role_name: str, roles: str | list) -> bytes
      :async:


      Remove composite roles from a client role asynchronously.

      :param client_role_id: id of client (not client-id)
      :type client_role_id: str
      :param role_name: The name of the role
      :type role_name: str
      :param roles: roles list or role (use RoleRepresentation) to be removed
      :type roles: list
      :return: Keycloak server response
      :rtype: bytes



   .. py:method:: a_update_client_role(client_id: str, role_name: str, payload: dict) -> bytes
      :async:


      Update a client role asynchronously.

      RoleRepresentation
      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_rolerepresentation

      :param client_id: id of client (not client-id)
      :type client_id: str
      :param role_name: role's name (not id!)
      :type role_name: str
      :param payload: RoleRepresentation
      :type payload: dict
      :returns: Keycloak server response
      :rtype: bytes



   .. py:method:: a_delete_client_role(client_role_id: str, role_name: str) -> bytes
      :async:


      Delete a client role asynchronously.

      RoleRepresentation
      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_rolerepresentation

      :param client_role_id: id of client (not client-id)
      :type client_role_id: str
      :param role_name: role's name (not id!)
      :type role_name: str
      :returns: Keycloak server response
      :rtype: bytes



   .. py:method:: a_assign_client_role(user_id: str, client_id: str, roles: str | list) -> bytes
      :async:


      Assign a client role to a user asynchronously.

      :param user_id: id of user
      :type user_id: str
      :param client_id: id of client (not client-id)
      :type client_id: str
      :param roles: roles list or role (use RoleRepresentation)
      :type roles: list
      :return: Keycloak server response
      :rtype: bytes



   .. py:method:: a_get_client_role_members(client_id: str, role_name: str, **query: dict) -> list
      :async:


      Get members by client role asynchronously.

      :param client_id: The client id
      :type client_id: str
      :param role_name: the name of role to be queried.
      :type role_name: str
      :param query: Additional query parameters
          (see https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_clients_resource)
      :type query: dict
      :return: Keycloak server response (UserRepresentation)
      :rtype: list



   .. py:method:: a_get_client_role_groups(client_id: str, role_name: str, **query: dict) -> list
      :async:


      Get group members by client role asynchronously.

      :param client_id: The client id
      :type client_id: str
      :param role_name: the name of role to be queried.
      :type role_name: str
      :param query: Additional query parameters
          (see https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_clients_resource)
      :type query: dict
      :return: Keycloak server response
      :rtype: list



   .. py:method:: a_get_role_by_id(role_id: str) -> dict
      :async:


      Get a specific role's representation asynchronously.

      RoleRepresentation
      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_rolerepresentation

      :param role_id: id of role
      :type role_id: str
      :return: Keycloak server response (RoleRepresentation)
      :rtype: dict



   .. py:method:: a_update_role_by_id(role_id: str, payload: dict) -> bytes
      :async:


      Update the role asynchronously.

      RoleRepresentation
      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_rolerepresentation

      :param payload: RoleRepresentation
      :type payload: dict
      :param role_id: id of role
      :type role_id: str
      :returns: Keycloak server response
      :rtype: bytes



   .. py:method:: a_delete_role_by_id(role_id: str) -> bytes
      :async:


      Delete a role by its id asynchronously.

      RoleRepresentation
      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_rolerepresentation

      :param role_id: id of role
      :type role_id: str
      :returns: Keycloak server response
      :rtype: bytes



   .. py:method:: a_get_role_composites_by_id(role_id: str, query: dict | None = None) -> list
      :async:


      Get all composite roles by role id asynchronously.

      :param role_id: id of role
      :type role_id: str
      :param query: Query parameters (optional). Supported keys: 'first', 'max', 'search'
      :type query: dict
      :return: Keycloak server response (RoleRepresentation)
      :rtype: list



   .. py:method:: a_create_realm_role(payload: dict, skip_exists: bool = False) -> str
      :async:


      Create a new role for the realm or client asynchronously.

      :param payload: The role (use RoleRepresentation)
      :type payload: dict
      :param skip_exists: If true then do not raise an error if realm role already exists
      :type skip_exists: bool
      :return: Realm role name
      :rtype: str



   .. py:method:: a_get_realm_role(role_name: str) -> dict
      :async:


      Get realm role by role name asynchronously.

      RoleRepresentation
      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_rolerepresentation

      :param role_name: role's name, not id!
      :type role_name: str
      :return: role
      :rtype: dict



   .. py:method:: a_get_realm_role_by_id(role_id: str) -> dict
      :async:


      Get realm role by role id.

      RoleRepresentation
      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_rolerepresentation

      :param role_id: role's id, not name!
      :type role_id: str
      :return: role
      :rtype: dict



   .. py:method:: a_update_realm_role(role_name: str, payload: dict) -> bytes
      :async:


      Update a role for the realm by name asynchronously.

      :param role_name: The name of the role to be updated
      :type role_name: str
      :param payload: The role (use RoleRepresentation)
      :type payload: dict
      :return: Keycloak server response
      :rtype: bytes



   .. py:method:: a_delete_realm_role(role_name: str) -> bytes
      :async:


      Delete a role for the realm by name asynchronously.

      :param role_name: The role name
      :type role_name: str
      :return: Keycloak server response
      :rtype: bytes



   .. py:method:: a_add_composite_realm_roles_to_role(role_name: str, roles: str | list) -> bytes
      :async:


      Add composite roles to the role asynchronously.

      :param role_name: The name of the role
      :type role_name: str
      :param roles: roles list or role (use RoleRepresentation) to be updated
      :type roles: list
      :return: Keycloak server response
      :rtype: bytes



   .. py:method:: a_remove_composite_realm_roles_to_role(role_name: str, roles: str | list) -> bytes
      :async:


      Remove composite roles from the role asynchronously.

      :param role_name: The name of the role
      :type role_name: str
      :param roles: roles list or role (use RoleRepresentation) to be removed
      :type roles: list
      :return: Keycloak server response
      :rtype: bytes



   .. py:method:: a_get_composite_realm_roles_of_role(role_name: str) -> list
      :async:


      Get composite roles of the role asynchronously.

      :param role_name: The name of the role
      :type role_name: str
      :return: Keycloak server response (array RoleRepresentation)
      :rtype: list



   .. py:method:: a_get_composite_client_roles_of_role(client_id: str, role_name: str) -> list
      :async:


      Get composite roles of the client role.

      :param client_id: The id of the client
      :type client_id: str
      :param role_name: The name of the role
      :type role_name: str
      :return: Keycloak server response (array RoleRepresentation)
      :rtype: list



   .. py:method:: a_assign_realm_roles_to_client_scope(client_id: str, roles: str | list) -> dict | bytes
      :async:


      Assign realm roles to a client's scope asynchronously.

      :param client_id: id of client (not client-id)
      :type client_id: str
      :param roles: roles list or role (use RoleRepresentation)
      :type roles: list
      :return: Keycloak server response
      :rtype: dict



   .. py:method:: a_delete_realm_roles_of_client_scope(client_id: str, roles: str | list) -> bytes
      :async:


      Delete realm roles of a client's scope asynchronously.

      :param client_id: id of client (not client-id)
      :type client_id: str
      :param roles: roles list or role (use RoleRepresentation)
      :type roles: list
      :return: Keycloak server response
      :rtype: dict



   .. py:method:: a_get_realm_roles_of_client_scope(client_id: str) -> list
      :async:


      Get all realm roles for a client's scope.

      :param client_id: id of client (not client-id)
      :type client_id: str
      :return: Keycloak server response (array RoleRepresentation)
      :rtype: dict



   .. py:method:: a_assign_client_roles_to_client_scope(client_id: str, client_roles_owner_id: str, roles: str | list) -> dict | bytes
      :async:


      Assign client roles to a client's dedicated scope asynchronously.

      To assign roles to a client scope, use a_add_client_specific_roles_to_client_scope.

      :param client_id: id of client (not client-id) who is assigned the roles
      :type client_id: str
      :param client_roles_owner_id: id of client (not client-id) who has the roles
      :type client_roles_owner_id: str
      :param roles: roles list or role (use RoleRepresentation)
      :type roles: list
      :return: Keycloak server response
      :rtype: dict



   .. py:method:: a_delete_client_roles_of_client_scope(client_id: str, client_roles_owner_id: str, roles: str | list) -> bytes
      :async:


      Delete client roles of a client's dedicated scope asynchronously.

      To remove roles from a client scope, use a_remove_client_specific_roles_of_client_scope.

      :param client_id: id of client (not client-id) who is assigned the roles
      :type client_id: str
      :param client_roles_owner_id: id of client (not client-id) who has the roles
      :type client_roles_owner_id: str
      :param roles: roles list or role (use RoleRepresentation)
      :type roles: list
      :return: Keycloak server response
      :rtype: dict



   .. py:method:: a_get_client_roles_of_client_scope(client_id: str, client_roles_owner_id: str) -> list
      :async:


      Get all client roles for a client's scope asynchronously.

      To get roles from a client scope, use a_get_client_roles_of_client_scope.

      :param client_id: id of client (not client-id)
      :type client_id: str
      :param client_roles_owner_id: id of client (not client-id) who has the roles
      :type client_roles_owner_id: str
      :return: Keycloak server response (array RoleRepresentation)
      :rtype: dict



   .. py:method:: a_assign_realm_roles(user_id: str, roles: str | list) -> bytes
      :async:


      Assign realm roles to a user asynchronously.

      :param user_id: id of user
      :type user_id: str
      :param roles: roles list or role (use RoleRepresentation)
      :type roles: list
      :return: Keycloak server response
      :rtype: bytes



   .. py:method:: a_delete_realm_roles_of_user(user_id: str, roles: str | list) -> bytes
      :async:


      Delete realm roles of a user asynchronously.

      :param user_id: id of user
      :type user_id: str
      :param roles: roles list or role (use RoleRepresentation)
      :type roles: list
      :return: Keycloak server response
      :rtype: bytes



   .. py:method:: a_get_realm_roles_of_user(user_id: str) -> list
      :async:


      Get all realm roles for a user asynchronously.

      :param user_id: id of user
      :type user_id: str
      :return: Keycloak server response (array RoleRepresentation)
      :rtype: list



   .. py:method:: a_get_available_realm_roles_of_user(user_id: str) -> list
      :async:


      Get all available (i.e. unassigned) realm roles for a user asynchronously.

      :param user_id: id of user
      :type user_id: str
      :return: Keycloak server response (array RoleRepresentation)
      :rtype: list



   .. py:method:: a_get_composite_realm_roles_of_user(user_id: str, brief_representation: bool = True) -> list
      :async:


      Get all composite (i.e. implicit) realm roles for a user asynchronously.

      :param user_id: id of user
      :type user_id: str
      :param brief_representation: whether to omit role attributes in the response
      :type brief_representation: bool
      :return: Keycloak server response (array RoleRepresentation)
      :rtype: list



   .. py:method:: a_assign_group_realm_roles(group_id: str, roles: str | list) -> bytes
      :async:


      Assign realm roles to a group asynchronously.

      :param group_id: id of group
      :type group_id: str
      :param roles: roles list or role (use GroupRoleRepresentation)
      :type roles: list
      :return: Keycloak server response
      :rtype: bytes



   .. py:method:: a_delete_group_realm_roles(group_id: str, roles: str | list) -> bytes
      :async:


      Delete realm roles of a group asynchronously.

      :param group_id: id of group
      :type group_id: str
      :param roles: roles list or role (use GroupRoleRepresentation)
      :type roles: list
      :return: Keycloak server response
      :rtype: bytes



   .. py:method:: a_get_group_realm_roles(group_id: str, brief_representation: bool = True) -> list
      :async:


      Get all realm roles for a group asynchronously.

      :param group_id: id of the group
      :type group_id: str
      :param brief_representation: whether to omit role attributes in the response
      :type brief_representation: bool
      :return: Keycloak server response (array RoleRepresentation)
      :rtype: list



   .. py:method:: a_assign_group_client_roles(group_id: str, client_id: str, roles: str | list) -> bytes
      :async:


      Assign client roles to a group asynchronously.

      :param group_id: id of group
      :type group_id: str
      :param client_id: id of client (not client-id)
      :type client_id: str
      :param roles: roles list or role (use GroupRoleRepresentation)
      :type roles: list
      :return: Keycloak server response
      :rtype: bytes



   .. py:method:: a_get_group_client_roles(group_id: str, client_id: str) -> list
      :async:


      Get client roles of a group asynchronously.

      :param group_id: id of group
      :type group_id: str
      :param client_id: id of client (not client-id)
      :type client_id: str
      :return: Keycloak server response
      :rtype: list



   .. py:method:: a_delete_group_client_roles(group_id: str, client_id: str, roles: str | list) -> bytes
      :async:


      Delete client roles of a group asynchronously.

      :param group_id: id of group
      :type group_id: str
      :param client_id: id of client (not client-id)
      :type client_id: str
      :param roles: roles list or role (use GroupRoleRepresentation)
      :type roles: list
      :return: Keycloak server response (array RoleRepresentation)
      :rtype: bytes



   .. py:method:: a_get_all_roles_of_user(user_id: str) -> dict
      :async:


      Get all level roles for a user asynchronously.

      :param user_id: id of user
      :type user_id: str
      :return: Keycloak server response (MappingsRepresentation)
      :rtype: dict



   .. py:method:: a_get_client_roles_of_user(user_id: str, client_id: str) -> list
      :async:


      Get all client roles for a user asynchronously.

      :param user_id: id of user
      :type user_id: str
      :param client_id: id of client (not client-id)
      :type client_id: str
      :return: Keycloak server response (array RoleRepresentation)
      :rtype: list



   .. py:method:: a_get_available_client_roles_of_user(user_id: str, client_id: str) -> list
      :async:


      Get available client role-mappings for a user asynchronously.

      :param user_id: id of user
      :type user_id: str
      :param client_id: id of client (not client-id)
      :type client_id: str
      :return: Keycloak server response (array RoleRepresentation)
      :rtype: list



   .. py:method:: a_get_composite_client_roles_of_user(user_id: str, client_id: str, brief_representation: bool = False) -> list
      :async:


      Get composite client role-mappings for a user asynchronously.

      :param user_id: id of user
      :type user_id: str
      :param client_id: id of client (not client-id)
      :type client_id: str
      :param brief_representation: whether to omit attributes in the response
      :type brief_representation: bool
      :return: Keycloak server response (array RoleRepresentation)
      :rtype: list



   .. py:method:: a__get_client_roles_of_user(client_level_role_mapping_url: str, user_id: str, client_id: str, **params: dict) -> list
      :async:


      Get client roles of a single user helper asynchronously.

      :param client_level_role_mapping_url: Url for the client role mapping
      :type client_level_role_mapping_url: str
      :param user_id: User id
      :type user_id: str
      :param client_id: Client id
      :type client_id: str
      :param params: Additional parameters
      :type params: dict
      :returns: Client roles of a user
      :rtype: list



   .. py:method:: a_delete_client_roles_of_user(user_id: str, client_id: str, roles: str | list) -> bytes
      :async:


      Delete client roles from a user asynchronously.

      :param user_id: id of user
      :type user_id: str
      :param client_id: id of client containing role (not client-id)
      :type client_id: str
      :param roles: roles list or role to delete (use RoleRepresentation)
      :type roles: list
      :return: Keycloak server response
      :rtype: bytes



   .. py:method:: a_get_authentication_flows() -> list
      :async:


      Get authentication flows asynchronously.

      Returns all flow details

      AuthenticationFlowRepresentation
      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_authenticationflowrepresentation

      :return: Keycloak server response (AuthenticationFlowRepresentation)
      :rtype: list



   .. py:method:: a_get_authentication_flow_for_id(flow_id: str) -> dict
      :async:


      Get one authentication flow by it's id asynchronously.

      Returns all flow details

      AuthenticationFlowRepresentation
      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_authenticationflowrepresentation

      :param flow_id: the id of a flow NOT it's alias
      :type flow_id: str
      :return: Keycloak server response (AuthenticationFlowRepresentation)
      :rtype: dict



   .. py:method:: a_create_authentication_flow(payload: dict, skip_exists: bool = False) -> bytes
      :async:


      Create a new authentication flow asynchronously.

      AuthenticationFlowRepresentation
      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_authenticationflowrepresentation

      :param payload: AuthenticationFlowRepresentation
      :type payload: dict
      :param skip_exists: Do not raise an error if authentication flow already exists
      :type skip_exists: bool
      :return: Keycloak server response (RoleRepresentation)
      :rtype: bytes



   .. py:method:: a_copy_authentication_flow(payload: dict, flow_alias: str) -> bytes
      :async:


      Copy existing authentication flow under a new name asynchronously.

      The new name is given as 'newName' attribute of the passed payload.

      :param payload: JSON containing 'newName' attribute
      :type payload: dict
      :param flow_alias: the flow alias
      :type flow_alias: str
      :return: Keycloak server response (RoleRepresentation)
      :rtype: bytes



   .. py:method:: a_delete_authentication_flow(flow_id: str) -> bytes
      :async:


      Delete authentication flow asynchronously.

      AuthenticationInfoRepresentation
      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_authenticationinforepresentation

      :param flow_id: authentication flow id
      :type flow_id: str
      :return: Keycloak server response
      :rtype: bytes



   .. py:method:: a_get_authentication_flow_executions(flow_alias: str) -> list
      :async:


      Get authentication flow executions asynchronously.

      Returns all execution steps

      :param flow_alias: the flow alias
      :type flow_alias: str
      :return: Response(json)
      :rtype: list



   .. py:method:: a_update_authentication_flow_executions(payload: dict, flow_alias: str) -> bytes
      :async:


      Update an authentication flow execution asynchronously.

      AuthenticationExecutionInfoRepresentation
      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_authenticationexecutioninforepresentation

      :param payload: AuthenticationExecutionInfoRepresentation
      :type payload: dict
      :param flow_alias: The flow alias
      :type flow_alias: str
      :return: Keycloak server response
      :rtype: bytes



   .. py:method:: a_get_authentication_flow_execution(execution_id: str) -> dict
      :async:


      Get authentication flow execution asynchronously.

      AuthenticationExecutionInfoRepresentation
      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_authenticationexecutioninforepresentation

      :param execution_id: the execution ID
      :type execution_id: str
      :return: Response(json)
      :rtype: dict



   .. py:method:: a_create_authentication_flow_execution(payload: dict, flow_alias: str) -> bytes
      :async:


      Create an authentication flow execution asynchronously.

      AuthenticationExecutionInfoRepresentation
      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_authenticationexecutioninforepresentation

      :param payload: AuthenticationExecutionInfoRepresentation
      :type payload: dict
      :param flow_alias: The flow alias
      :type flow_alias: str
      :return: Keycloak server response
      :rtype: bytes



   .. py:method:: a_delete_authentication_flow_execution(execution_id: str) -> bytes
      :async:


      Delete authentication flow execution asynchronously.

      AuthenticationExecutionInfoRepresentation
      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_authenticationexecutioninforepresentation

      :param execution_id: keycloak client id (not oauth client-id)
      :type execution_id: str
      :return: Keycloak server response (json)
      :rtype: bytes



   .. py:method:: a_create_authentication_flow_subflow(payload: dict, flow_alias: str, skip_exists: bool = False) -> bytes
      :async:


      Create a new sub authentication flow for a given authentication flow asynchronously.

      AuthenticationFlowRepresentation
      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_authenticationflowrepresentation

      :param payload: AuthenticationFlowRepresentation
      :type payload: dict
      :param flow_alias: The flow alias
      :type flow_alias: str
      :param skip_exists: Do not raise an error if authentication flow already exists
      :type skip_exists: bool
      :return: Keycloak server response (RoleRepresentation)
      :rtype: bytes



   .. py:method:: a_get_authenticator_providers() -> list
      :async:


      Get authenticator providers list asynchronously.

      :return: Authenticator providers
      :rtype: list



   .. py:method:: a_get_authenticator_provider_config_description(provider_id: str) -> dict
      :async:


      Get authenticator's provider configuration description asynchronously.

      AuthenticatorConfigInfoRepresentation
      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_authenticatorconfiginforepresentation

      :param provider_id: Provider Id
      :type provider_id: str
      :return: AuthenticatorConfigInfoRepresentation
      :rtype: dict



   .. py:method:: a_get_authenticator_config(config_id: str) -> dict
      :async:


      Get authenticator configuration asynchronously.

      Returns all configuration details.

      :param config_id: Authenticator config id
      :type config_id: str
      :return: Response(json)
      :rtype: dict



   .. py:method:: a_update_authenticator_config(payload: dict, config_id: str) -> bytes
      :async:


      Update an authenticator configuration asynchronously.

      AuthenticatorConfigRepresentation
      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_authenticatorconfigrepresentation

      :param payload: AuthenticatorConfigRepresentation
      :type payload: dict
      :param config_id: Authenticator config id
      :type config_id: str
      :return: Response(json)
      :rtype: bytes



   .. py:method:: a_delete_authenticator_config(config_id: str) -> bytes
      :async:


      Delete a authenticator configuration asynchronously.

      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_authentication_management_resource

      :param config_id: Authenticator config id
      :type config_id: str
      :return: Keycloak server Response
      :rtype: bytes



   .. py:method:: a_sync_users(storage_id: str, action: str) -> bytes
      :async:


      Trigger user sync from provider asynchronously.

      :param storage_id: The id of the user storage provider
      :type storage_id: str
      :param action: Action can be "triggerFullSync" or "triggerChangedUsersSync"
      :type action: str
      :return: Keycloak server response
      :rtype: bytes



   .. py:method:: a_get_client_scopes() -> list
      :async:


      Get client scopes asynchronously.

      Get representation of the client scopes for the realm where we are connected to
      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_getclientscopes

      :return: Keycloak server response Array of (ClientScopeRepresentation)
      :rtype: list



   .. py:method:: a_get_client_scope(client_scope_id: str) -> dict
      :async:


      Get client scope asynchronously.

      Get representation of the client scopes for the realm where we are connected to
      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_getclientscopes

      :param client_scope_id: The id of the client scope
      :type client_scope_id: str
      :return: Keycloak server response (ClientScopeRepresentation)
      :rtype: dict



   .. py:method:: a_get_client_scope_by_name(client_scope_name: str) -> dict | None
      :async:


      Get client scope by name asynchronously.

      Get representation of the client scope identified by the client scope name.

      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_getclientscopes
      :param client_scope_name: (str) Name of the client scope
      :type client_scope_name: str
      :returns: ClientScopeRepresentation or None
      :rtype: dict



   .. py:method:: a_create_client_scope(payload: dict, skip_exists: bool = False) -> str
      :async:


      Create a client scope asynchronously.

      ClientScopeRepresentation:
      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_getclientscopes

      :param payload: ClientScopeRepresentation
      :type payload: dict
      :param skip_exists: If true then do not raise an error if client scope already exists
      :type skip_exists: bool
      :return: Client scope id
      :rtype: str



   .. py:method:: a_update_client_scope(client_scope_id: str, payload: dict) -> bytes
      :async:


      Update a client scope asynchronously.

      ClientScopeRepresentation:
      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_client_scopes_resource

      :param client_scope_id: The id of the client scope
      :type client_scope_id: str
      :param payload: ClientScopeRepresentation
      :type payload: dict
      :return: Keycloak server response (ClientScopeRepresentation)
      :rtype: bytes



   .. py:method:: a_delete_client_scope(client_scope_id: str) -> bytes
      :async:


      Delete existing client scope asynchronously.

      ClientScopeRepresentation:
      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_client_scopes_resource

      :param client_scope_id: The id of the client scope
      :type client_scope_id: str
      :return: Keycloak server response
      :rtype: bytes



   .. py:method:: a_get_mappers_from_client_scope(client_scope_id: str) -> list
      :async:


      Get a list of all mappers connected to the client scope asynchronously.

      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_protocol_mappers_resource
      :param client_scope_id: Client scope id
      :type client_scope_id: str
      :returns: Keycloak server response (ProtocolMapperRepresentation)
      :rtype: list



   .. py:method:: a_add_mapper_to_client_scope(client_scope_id: str, payload: dict) -> bytes
      :async:


      Add a mapper to a client scope asynchronously.

      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_create_mapper

      :param client_scope_id: The id of the client scope
      :type client_scope_id: str
      :param payload: ProtocolMapperRepresentation
      :type payload: dict
      :return: Keycloak server Response
      :rtype: bytes



   .. py:method:: a_delete_mapper_from_client_scope(client_scope_id: str, protocol_mapper_id: str) -> bytes
      :async:


      Delete a mapper from a client scope asynchronously.

      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_delete_mapper

      :param client_scope_id: The id of the client scope
      :type client_scope_id: str
      :param protocol_mapper_id: Protocol mapper id
      :type protocol_mapper_id: str
      :return: Keycloak server Response
      :rtype: bytes



   .. py:method:: a_update_mapper_in_client_scope(client_scope_id: str, protocol_mapper_id: str, payload: dict) -> bytes
      :async:


      Update an existing protocol mapper in a client scope asynchronously.

      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_protocol_mappers_resource

      :param client_scope_id: The id of the client scope
      :type client_scope_id: str
      :param protocol_mapper_id: The id of the protocol mapper which exists in the client scope
             and should to be updated
      :type protocol_mapper_id: str
      :param payload: ProtocolMapperRepresentation
      :type payload: dict
      :return: Keycloak server Response
      :rtype: bytes



   .. py:method:: a_get_default_default_client_scopes() -> list
      :async:


      Get default default client scopes asynchronously.

      Return list of default default client scopes

      :return: Keycloak server response
      :rtype: list



   .. py:method:: a_delete_default_default_client_scope(scope_id: str) -> bytes
      :async:


      Delete default default client scope asynchronously.

      :param scope_id: default default client scope id
      :type scope_id: str
      :return: Keycloak server response
      :rtype: list



   .. py:method:: a_add_default_default_client_scope(scope_id: str) -> bytes
      :async:


      Add default default client scope asynchronously.

      :param scope_id: default default client scope id
      :type scope_id: str
      :return: Keycloak server response
      :rtype: bytes



   .. py:method:: a_get_default_optional_client_scopes() -> list
      :async:


      Get default optional client scopes asynchronously.

      Return list of default optional client scopes

      :return: Keycloak server response
      :rtype: list



   .. py:method:: a_delete_default_optional_client_scope(scope_id: str) -> bytes
      :async:


      Delete default optional client scope asynchronously.

      :param scope_id: default optional client scope id
      :type scope_id: str
      :return: Keycloak server response
      :rtype: bytes



   .. py:method:: a_add_default_optional_client_scope(scope_id: str) -> bytes
      :async:


      Add default optional client scope asynchronously.

      :param scope_id: default optional client scope id
      :type scope_id: str
      :return: Keycloak server response
      :rtype: bytes



   .. py:method:: a_add_client_specific_roles_to_client_scope(client_scope_id: str, client_roles_owner_id: str, roles: str | list) -> bytes
      :async:


      Assign client roles to a client scope asynchronously.

      To assign roles to a client's dedicated scope, use
      a_assign_client_roles_to_client_scope.

      :param client_scope_id: client scope id
      :type client_scope_id: str
      :param client_roles_owner_id: id of client (not client-id) who has the roles
      :type client_roles_owner_id: str
      :param roles: roles list or role (use RoleRepresentation, must include id and name)
      :type roles: list
      :return: Keycloak server response
      :rtype: dict



   .. py:method:: a_remove_client_specific_roles_of_client_scope(client_scope_id: str, client_roles_owner_id: str, roles: str | list) -> bytes
      :async:


      Delete client roles of a client scope asynchronously.

      To delete roles from a client's dedicated scope,
      use a_delete_client_roles_of_client_scope.

      :param client_scope_id: client scope id
      :type client_scope_id: str
      :param client_roles_owner_id: id of client (not client-id) who has the roles
      :type client_roles_owner_id: str
      :param roles: roles list or role (use RoleRepresentation, must include id and name)
      :type roles: list
      :return: Keycloak server response
      :rtype: bytes



   .. py:method:: a_get_client_specific_roles_of_client_scope(client_scope_id: str, client_roles_owner_id: str) -> list
      :async:


      Get all client roles for a client scope asynchronously.

      To get roles for a client's dedicated scope,
      use a_get_client_roles_of_client_scope.

      :param client_scope_id: client scope id
      :type client_scope_id: str
      :param client_roles_owner_id: id of client (not client-id) who has the roles
      :type client_roles_owner_id: str
      :return: Keycloak server response (array RoleRepresentation)
      :rtype: list



   .. py:method:: a_get_all_roles_of_client_scope(client_scope_id: str) -> list
      :async:


      Get all client roles for a client scope.

      To get roles for a client's dedicated scope,
      use a_get_client_roles_of_client_scope.

      :param client_scope_id: client scope id
      :type client_scope_id: str
      :return: Keycloak server response (array RoleRepresentation)
      :rtype: dict



   .. py:method:: a_get_mappers_from_client(client_id: str) -> list
      :async:


      List of all client mappers asynchronously.

      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_protocolmapperrepresentation

      :param client_id: Client id
      :type client_id: str
      :returns: KeycloakServerResponse (list of ProtocolMapperRepresentation)
      :rtype: list



   .. py:method:: a_add_mapper_to_client(client_id: str, payload: dict) -> bytes
      :async:


      Add a mapper to a client asynchronously.

      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_create_mapper

      :param client_id: The id of the client
      :type client_id: str
      :param payload: ProtocolMapperRepresentation
      :type payload: dict
      :return: Keycloak server Response
      :rtype: bytes



   .. py:method:: a_update_client_mapper(client_id: str, mapper_id: str, payload: dict) -> bytes
      :async:


      Update client mapper asynchronously.

      :param client_id: The id of the client
      :type client_id: str
      :param mapper_id: The id of the mapper to be deleted
      :type mapper_id: str
      :param payload: ProtocolMapperRepresentation
      :type payload: dict
      :return: Keycloak server response
      :rtype: bytes



   .. py:method:: a_remove_client_mapper(client_id: str, client_mapper_id: str) -> bytes
      :async:


      Remove a mapper from the client asynchronously.

      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_protocol_mappers_resource

      :param client_id: The id of the client
      :type client_id: str
      :param client_mapper_id: The id of the mapper to be deleted
      :type client_mapper_id: str
      :return: Keycloak server response
      :rtype: bytes



   .. py:method:: a_generate_client_secrets(client_id: str) -> bytes
      :async:


      Generate a new secret for the client asynchronously.

      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_regeneratesecret

      :param client_id:  id of client (not client-id)
      :type client_id: str
      :return: Keycloak server response (ClientRepresentation)
      :rtype: bytes



   .. py:method:: a_get_client_secrets(client_id: str) -> dict
      :async:


      Get representation of the client secrets asynchronously.

      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_getclientsecret

      :param client_id:  id of client (not client-id)
      :type client_id: str
      :return: Keycloak server response (ClientRepresentation)
      :rtype: dict



   .. py:method:: a_get_components(query: dict | None = None) -> list
      :async:


      Get components asynchronously.

      Return a list of components, filtered according to query parameters

      ComponentRepresentation
      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_componentrepresentation

      :param query: Query parameters (optional)
      :type query: dict
      :return: components list
      :rtype: list



   .. py:method:: a_create_component(payload: dict) -> str
      :async:


      Create a new component asynchronously.

      ComponentRepresentation
      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_componentrepresentation

      :param payload: ComponentRepresentation
      :type payload: dict
      :return: Component id
      :rtype: str



   .. py:method:: a_get_component(component_id: str) -> dict | bytes
      :async:


      Get representation of the component asynchronously.

      :param component_id: Component id

      ComponentRepresentation
      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_componentrepresentation

      :param component_id: Id of the component
      :type component_id: str
      :return: ComponentRepresentation
      :rtype: dict



   .. py:method:: a_update_component(component_id: str, payload: dict) -> bytes
      :async:


      Update the component asynchronously.

      :param component_id: Component id
      :type component_id: str
      :param payload: ComponentRepresentation
          https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_componentrepresentation
      :type payload: dict
      :return: Http response
      :rtype: bytes



   .. py:method:: a_delete_component(component_id: str) -> bytes
      :async:


      Delete the component asynchronously.

      :param component_id: Component id
      :type component_id: str
      :return: Http response
      :rtype: bytes



   .. py:method:: a_get_keys() -> list
      :async:


      Get keys asynchronously.

      Return a list of keys, filtered according to query parameters

      KeysMetadataRepresentation
      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_key_resource

      :return: keys list
      :rtype: list



   .. py:method:: a_get_admin_events(query: dict | None = None) -> list
      :async:


      Get Administrative events asynchronously.

      Return a list of events, filtered according to query parameters

      AdminEvents Representation array
      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_getevents
      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_get_adminrealmsrealmadmin_events

      :param query: Additional query parameters
      :type query: dict
      :return: events list
      :rtype: list



   .. py:method:: a_get_events(query: dict | None = None) -> list
      :async:


      Get events asynchronously.

      Return a list of events, filtered according to query parameters

      EventRepresentation array
      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_eventrepresentation

      :param query: Additional query parameters
      :type query: dict
      :return: events list
      :rtype: list



   .. py:method:: a_set_events(payload: dict) -> bytes
      :async:


      Set realm events configuration asynchronously.

      RealmEventsConfigRepresentation
      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_realmeventsconfigrepresentation

      :param payload: Payload object for the events configuration
      :type payload: dict
      :return: Http response
      :rtype: bytes



   .. py:method:: a_get_client_all_sessions(client_id: str, query: dict | None = None) -> list
      :async:


      Get sessions associated with the client asynchronously.

      UserSessionRepresentation
      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_usersessionrepresentation

      :param client_id: id of client
      :type client_id: str
      :param query: Additional query parameters
      :type query: dict
      :return: UserSessionRepresentation
      :rtype: list



   .. py:method:: a_get_client_sessions_stats() -> dict
      :async:


      Get current session count for all clients with active sessions asynchronously.

      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_getclientsessionstats

      :return: Dict of clients and session count
      :rtype: dict



   .. py:method:: a_get_client_management_permissions(client_id: str) -> list
      :async:


      Get management permissions for a client asynchronously.

      :param client_id: id in ClientRepresentation
          https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_clientrepresentation
      :type client_id: str
      :return: Keycloak server response
      :rtype: list



   .. py:method:: a_update_client_management_permissions(payload: dict, client_id: str) -> bytes
      :async:


      Update management permissions for a client asynchronously.

      ManagementPermissionReference
      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_managementpermissionreference

      Payload example::

          payload={
              "enabled": true
          }

      :param payload: ManagementPermissionReference
      :type payload: dict
      :param client_id: id in ClientRepresentation
          https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_clientrepresentation
      :type client_id: str
      :return: Keycloak server response
      :rtype: bytes



   .. py:method:: a_get_client_authz_policy_scopes(client_id: str, policy_id: str) -> list
      :async:


      Get scopes for a given policy asynchronously.

      :param client_id: id in ClientRepresentation
          https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_clientrepresentation
      :type client_id: str
      :param policy_id: No Document
      :type policy_id: str
      :return: Keycloak server response
      :rtype: list



   .. py:method:: a_get_client_authz_policy_resources(client_id: str, policy_id: str) -> list
      :async:


      Get resources for a given policy asynchronously.

      :param client_id: id in ClientRepresentation
          https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_clientrepresentation
      :type client_id: str
      :param policy_id: No Document
      :type policy_id: str
      :return: Keycloak server response
      :rtype: list



   .. py:method:: a_get_client_authz_scope_permission(client_id: str, scope_id: str) -> list
      :async:


      Get permissions for a given scope asynchronously.

      :param client_id: id in ClientRepresentation
          https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_clientrepresentation
      :type client_id: str
      :param scope_id: No Document
      :type scope_id: str
      :return: Keycloak server response
      :rtype: list



   .. py:method:: a_create_client_authz_scope_permission(payload: dict, client_id: str) -> bytes
      :async:


      Create permissions for a authz scope asynchronously.

      Payload example::

          payload={
              "name": "My Permission Name",
              "type": "scope",
              "logic": "POSITIVE",
              "decisionStrategy": "UNANIMOUS",
              "resources": [some_resource_id],
              "scopes": [some_scope_id],
              "policies": [some_policy_id],
          }

      :param payload: No Document
      :type payload: dict
      :param client_id: id in ClientRepresentation
          https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_clientrepresentation
      :type client_id: str
      :return: Keycloak server response
      :rtype: bytes



   .. py:method:: a_update_client_authz_scope_permission(payload: dict, client_id: str, scope_id: str) -> bytes
      :async:


      Update permissions for a given scope asynchronously.

      Payload example::

          payload={
              "id": scope_id,
              "name": "My Permission Name",
              "type": "scope",
              "logic": "POSITIVE",
              "decisionStrategy": "UNANIMOUS",
              "resources": [some_resource_id],
              "scopes": [some_scope_id],
              "policies": [some_policy_id],
          }

      :param payload: No Document
      :type payload: dict
      :param client_id: id in ClientRepresentation
          https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_clientrepresentation
      :type client_id: str
      :param scope_id: No Document
      :type scope_id: str
      :return: Keycloak server response
      :rtype: bytes



   .. py:method:: a_update_client_authz_resource_permission(payload: dict, client_id: str, resource_id: str) -> bytes
      :async:


      Update permissions for a given resource asynchronously.

      Payload example::

          payload={
              "id": resource_id,
              "name": "My Permission Name",
              "type": "resource",
              "logic": "POSITIVE",
              "decisionStrategy": "UNANIMOUS",
              "resources": [some_resource_id],
              "scopes": [],
              "policies": [some_policy_id],
          }

      :param payload: No Document
      :type payload: dict
      :param client_id: id in ClientRepresentation
          https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_clientrepresentation
      :type client_id: str
      :param resource_id: No Document
      :type resource_id: str
      :return: Keycloak server response
      :rtype: bytes



   .. py:method:: a_get_client_authz_client_policies(client_id: str) -> list
      :async:


      Get policies for a given client asynchronously.

      :param client_id: id in ClientRepresentation
          https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_clientrepresentation
      :type client_id: str
      :return: Keycloak server response (RoleRepresentation)
      :rtype: list



   .. py:method:: a_get_client_authz_permission_associated_policies(client_id: str, policy_id: str) -> list
      :async:


      Get associated policies for a given client permission asynchronously.

      :param client_id: id in ClientRepresentation
          https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_clientrepresentation
      :type client_id: str
      :param policy_id: id in PolicyRepresentation
          https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_policyrepresentation
      :type policy_id: str
      :return: Keycloak server response (RoleRepresentation)
      :rtype: list



   .. py:method:: a_create_client_authz_client_policy(payload: dict, client_id: str) -> bytes
      :async:


      Create a new policy for a given client asynchronously.

      Payload example::

          payload={
              "type": "client",
              "logic": "POSITIVE",
              "decisionStrategy": "UNANIMOUS",
              "name": "My Policy",
              "clients": [other_client_id],
          }

      :param payload: No Document
      :type payload: dict
      :param client_id: id in ClientRepresentation
          https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_clientrepresentation
      :type client_id: str
      :return: Keycloak server response (RoleRepresentation)
      :rtype: bytes



   .. py:method:: a_get_composite_client_roles_of_group(client_id: str, group_id: str, brief_representation: bool = True) -> list
      :async:


      Get the composite client roles of the given group for the given client asynchronously.

      :param client_id: id of the client.
      :type client_id: str
      :param group_id: id of the group.
      :type group_id: str
      :param brief_representation: whether to omit attributes in the response
      :type brief_representation: bool
      :return: the composite client roles of the group (list of RoleRepresentation).
      :rtype: list



   .. py:method:: a_get_role_client_level_children(client_id: str, role_id: str) -> list
      :async:


      Get the child roles async of which the given composite client role is composed of.

      :param client_id: id of the client.
      :type client_id: str
      :param role_id: id of the role.
      :type role_id: str
      :return: the child roles (list of RoleRepresentation).
      :rtype: list



   .. py:method:: a_upload_certificate(client_id: str, certcont: str) -> dict
      :async:


      Upload a new certificate for the client asynchronously.

      :param client_id: id of the client.
      :type client_id: str
      :param certcont: the content of the certificate.
      :type certcont: str
      :return: dictionary {"certificate": "<certcont>"},
               where <certcont> is the content of the uploaded certificate.
      :rtype: dict



   .. py:method:: a_get_required_action_by_alias(action_alias: str) -> dict
      :async:


      Get a required action by its alias asynchronously.

      :param action_alias: the alias of the required action.
      :type action_alias: str
      :return: the required action (RequiredActionProviderRepresentation).
      :rtype: dict



   .. py:method:: a_get_required_actions() -> list
      :async:


      Get the required actions for the realms asynchronously.

      :return: the required actions (list of RequiredActionProviderRepresentation).
      :rtype: list



   .. py:method:: a_update_required_action(action_alias: str, payload: dict) -> bytes
      :async:


      Update a required action asynchronously.

      :param action_alias: the action alias.
      :type action_alias: str
      :param payload: the new required action (RequiredActionProviderRepresentation).
      :type payload: dict
      :return: empty dictionary.
      :rtype: bytes



   .. py:method:: a_get_bruteforce_detection_status(user_id: str) -> dict
      :async:


      Get bruteforce detection status for user asynchronously.

      :param user_id: User id
      :type user_id: str
      :return: Bruteforce status.
      :rtype: dict



   .. py:method:: a_clear_bruteforce_attempts_for_user(user_id: str) -> bytes
      :async:


      Clear bruteforce attempts for user asynchronously.

      :param user_id: User id
      :type user_id: str
      :return: empty dictionary.
      :rtype: bytes



   .. py:method:: a_clear_all_bruteforce_attempts() -> bytes
      :async:


      Clear bruteforce attempts for all users in realm asynchronously.

      :return: empty dictionary.
      :rtype: bytes



   .. py:method:: a_clear_keys_cache() -> bytes
      :async:


      Clear keys cache asynchronously.

      :return: empty dictionary.
      :rtype: bytes



   .. py:method:: a_clear_realm_cache() -> bytes
      :async:


      Clear realm cache asynchronously.

      :return: empty dictionary.
      :rtype: bytes



   .. py:method:: a_clear_user_cache() -> bytes
      :async:


      Clear user cache asynchronously.

      :return: empty dictionary.
      :rtype: bytes



   .. py:method:: a_change_execution_priority(execution_id: str, diff: int) -> None
      :async:


      Raise or lower execution priority of diff time.

      :param execution_id: The ID of the execution
      :type execution_id: str
      :param diff: The difference in priority, positive to raise, negative to lower, the value
          is the number of times
      :type diff: int
      :raises KeycloakPostError: when post requests are failed



   .. py:method:: a_create_execution_config(execution_id: str, payload: dict) -> bytes
      :async:


      Update execution with new configuration.

      AuthenticatorConfigRepresentation
      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_authenticatorconfigrepresentation

      :param execution_id: The ID of the execution
      :type execution_id: str
      :param payload: Configuration to add to the execution
      :type payload: dir
      :return: Response(json)
      :rtype: dict



   .. py:method:: a_update_authentication_flow(flow_id: str, payload: dict) -> bytes
      :async:


      Update an authentication flow.

      AuthenticationFlowRepresentation
      https://www.keycloak.org/docs-api/24.0.2/rest-api/index.html#_authenticationflowrepresentation

      :param flow_id: The id of the flow
      :type flow_id: str
      :param payload: AuthenticationFlowRepresentation
      :type payload: dict
      :return: Keycloak server response
      :rtype: bytes



