Global API Module

class qe_api_client.api_classes.engine_global_api.EngineGlobalApi(socket)[source]

Bases: object

A class to interact with the Qlik Engine Global API using a provided socket interface.

Attributes: engine_socket : object

The socket object used to communicate with the Qlik Engine.

abort_all()[source]

Aborts all ongoing commands in Qlik Sense.

Returns: dict: Information about the abort result.

abort_request(request_id)[source]

Aborts a specific request in Qlik Sense.

Parameters: request_id : str

The identifier of the request to abort.

Returns: dict: Information about the abort result.

configure_reload(cancel_on_error=False, use_error_data=True, interact_on_error=False)[source]

Configures the reload settings for a Qlik Sense application.

Parameters: cancel_on_error : bool, optional

If True, the script execution is halted on error (default is False).

use_error_databool, optional

If True, any script execution error is returned in qErrorData (default is True).

interact_on_errorbool, optional

If True, script execution is halted on error and awaits interaction (default is False).

Returns: dict: Information about the configuration result.

copy_app(target_app_id, src_app_id, qIds=[''])[source]

Copies an app in Qlik Sense from a source app ID to a target app ID.

Parameters: target_app_id : str

The identifier (GUID) of the target app.

src_app_idstr

The identifier (GUID) of the source app.

qIdslist, optional

List of object identifiers to copy. If empty, all objects are copied (default is [“”]).

Returns: dict: Information about the copy result.

create_app(app_name)[source]

Creates a new application in Qlik Sense.

Parameters: app_name : str

The name of the application to be created.

Returns: dict: Information about the created app, including its ID.

create_session_app()[source]

Creates an empty session app in Qlik Sense.

Returns: dict: Information about the created session app.

create_session_app_from_app(src_app_id)[source]

Creates a session app in Qlik Sense from an existing app.

Parameters: src_app_id : str

The identifier (GUID) of the source app.

Returns: dict: Information about the created session app.

delete_app(app_name)[source]

Deletes an application from the Qlik Sense repository or file system.

Parameters: app_name : str

The name or identifier of the app to delete.

Returns: dict: Information about the deletion result.

export_app(target_path, src_app_id, qIds=[''])[source]

Exports an app from the Qlik Sense repository to the file system.

This operation is available only in Qlik Sense Enterprise.

Parameters:
  • target_path (str) – The path and name of the target app file to export to.

  • src_app_id (str) – The GUID of the source app in the Qlik Sense repository.

  • qIds (list of str) – An array of identifiers (GUIDs) for the objects in the app to be exported. The list must contain the GUIDs of all these objects.

Returns:

The result of the export operation. In case of an error, returns the error information.

Return type:

dict

get_active_doc()[source]

Retrieves the currently active document in Qlik Sense.

Returns: dict: Information about the active document.

get_auth_user()[source]

Retrieves information about the authenticated user.

Returns:

The result containing information about the authenticated user.

In case of an error, returns the error information.

Return type:

dict

get_doc_list()[source]

Retrieves a list of documents available in the Qlik Sense environment.

Returns: list of dict: An array of document objects containing details such as doc name, size, and file time.

get_odbc_dsns()[source]

Retrieves a list of all ODBC connectors installed on the Qlik Sense server.

Returns:

A dictionary containing the details of the ODBC connectors installed.

In case of an error, returns the error information.

Return type:

dict

get_ole_dbs()[source]

Retrieves a list of all OLEDB providers installed on the Qlik Sense server.

Returns:

A dictionary containing the details of the OLEDB providers installed.

In case of an error, returns the error information.

Return type:

dict

get_os_name()[source]

Retrieves the operating system name where the Qlik Sense Engine is running.

Returns: str: The OS name, typically “windowsNT”.

get_progress(request_id)[source]

Provides information about the progress of DoReload and DoSave calls.

Parameters:

request_id (int) – Identifier of the DoReload or DoSave request. If set to 0, only limited information is provided.

Returns:

A dictionary containing progress messages and error messages.

If request_id is 0, detailed information like start and end times is not provided.

Return type:

dict

is_desktop_mode(request_id)[source]

Checks if the user is working in Qlik Sense Desktop mode.

Returns:

A dictionary indicating whether the user is in desktop mode.

In case of an error, returns the error information.

Return type:

dict

is_valid_connect_string(connect_name, connect_string, connect_type, user_name, password, mod_date='', meta='', sso_passthrough='LOG_ON_SERVICE_USER')[source]

Checks if a connection string is valid.

Parameters:
  • connect_name (str) – Name of the connection.

  • connect_string (str) – Connection string (e.g., ODBC CONNECT TO [<provider name>]).

  • connect_type (str) – Type of the connection (ODBC, OLEDB, CUSTOM, etc.).

  • user_name (str) – Name of the user creating the connection.

  • password (str) – Password of the user creating the connection.

  • mod_date (str, optional) – Modification date of the connection.

  • meta (str, optional) – Metadata information about the connection.

  • sso_passthrough (str, optional) – User credentials to use (LOG_ON_SERVICE_USER, LOG_ON_CURRENT_USER).

Returns:

A dictionary containing validation information.

In case of an error, returns the error information.

Return type:

dict

list_databases_from_odbc(connect_name, connect_string, connect_type, user_name, password, mod_date='', meta='', sso_passthrough='LOG_ON_SERVICE_USER')[source]

Lists the databases available in an ODBC, OLEDB, or CUSTOM data source.

Parameters:
  • connect_name (str) – Name of the connection.

  • connect_string (str) – Connection string (e.g., ODBC CONNECT TO [<provider name>]).

  • connect_type (str) – Type of the connection (ODBC, OLEDB, CUSTOM, etc.).

  • user_name (str) – Name of the user creating the connection.

  • password (str) – Password of the user creating the connection.

  • mod_date (str, optional) – Modification date of the connection.

  • meta (str, optional) – Metadata information about the connection.

  • sso_passthrough (str, optional) – User credentials to use (LOG_ON_SERVICE_USER, LOG_ON_CURRENT_USER).

Returns:

A dictionary containing the list of databases.

In case of an error, returns the error information.

Return type:

dict

open_doc(app_name, user_name='', password='', serial='', no_data=False)[source]

Opens a document (app) in Qlik Sense and returns details about it.

Parameters: app_name : str

The name of the app to open.

user_namestr, optional

The username for authentication (default is ‘’).

passwordstr, optional

The password for authentication (default is ‘’).

serialstr, optional

The serial key for authentication (default is ‘’).

no_databool, optional

If True, opens the app without data (default is False).

Returns: dict: Information about the opened document, including handle, generic ID, and type.

replace_app_from_id(target_path, src_app_id, qIds=[''])[source]

Replaces an app with the objects from a source app.

The list of objects in the app to be replaced must be defined in qIds. This operation is available only in Qlik Sense Enterprise.

Parameters:
  • target_app_id (str) – The GUID of the target app to be replaced.

  • src_app_id (str) – The GUID of the source app in the Qlik Sense repository.

  • qIds (list of str) – An array of GUIDs for the objects in the target app to be replaced. Only QRS-approved GUIDs are applicable. If qIds is empty, the engine automatically creates a list containing all QRS-approved objects. If the array contains objects not present in the source app, those objects are removed from the target app.

Returns:

The result of the replace operation. In case of an error, returns the error information.

Return type:

dict