Skip to main content

Getting started - Login

This section describes how to get started with the Enterprise Manager Python SDK. To help you better understand how to implement the available methods, a code sample and a readme file that describes the code are located in the <Enterprise Manager_Installation_Folder>/clients/python folder.

  1. Import the Qlik Enterprise Manager-Client by adding the following code:

    from aem_client import *

  2. Create an aem_client object using the following constructors: (self, b64_username_password, machine_name, port=443, url="https://{0}/attunityenterprisemanager", verify_certificate=True,authentication_method=AuthenticationMethod.ACTIVE_DIRECTORY|SAML):

    • b64_username_password
      For authentication using Active Directory:
      You need to create a base64 encoding of “domain\\user:password”:
      • domain_username = '{0}\\{1}'.format(domain, username)
      • username_password_str = str.encode('{0}:{1}'.format(username, password))
      • b64_username_password = b64.b64encode(username_password_ str).decode('ascii')

      For authentication using SAML:

      • The SAML assertion from an IDP. This should be a string in the following format:

        'SAMLResponse=<long_base_64_string>'

        Where <long_base_64_string> is the SAML assertion from a SAML IDP. This must be a URL encoded string containing the SAMLResponse parameter with a base64 encoded SAML assertion as its value. The string may also contain other parameters (e.g. RelayState), but these parameters are ignored.

    • machine_name - The machine on which Qlik Enterprise Manager is installed.

    • port – The Qlik Enterprise Manager server port (usually 443).

    • url – The URL to the Qlik Enterprise Manager server. If not set then https://{0}/attunityenterprisemanager is used where {0} is the machine name.

    • verify_certificate – When verify_certificate is set to true, there must be a valid certificate in the Qlik Enterprise Manager machine. When set to false, Qlik Enterprise Manager client will not validate the server certificate. The default is true.

      Example:

      aem_client = AemClient(b64_username_password, machine_name, verify_certificate=False)

    • authentication_method – The authentication method used by the Enterprise Manager server.

      For Active Directory, specify AuthenticationMethod.ACTIVE_DIRECTORY

      For SAML, specify AuthenticationMethod.SAML

    The user can now use the client methods to get/set data from Qlik Enterprise Manager using the public APIs. For example:

    • aem_client. get_server_list()
    • aem_client. get_server_list()
    • aem_client. export_task(server_name, task_name)