App API Module
- class qe_api_client.api_classes.engine_app_api.EngineAppApi(socket)[source]
Bases:
object
API class for interacting with Qlik Sense engine’s app-related functionalities, such as script management, reloading, and object creation.
- create_object(doc_handle, q_id, q_type, struct_name, ob_struct)[source]
Creates a new object in the app.
- clear_all(doc_handle: int, locked_also=False, alt_state='')[source]
Clear selections in fields for current state. Locked fields are not cleared by default.
- Parameters:
doc_handle (int) – The handle identifying the app document.
locked_also (bool) – When true, clears the selection for locked fields.
alt_state (str) – Alternate state name. When set, applies to alternate state instead of current.
- create_bookmark(doc_handle: int, prop: dict)[source]
Creates a bookmark.
- Parameters:
doc_handle (int) – The handle identifying the document.
prop (dict) – Bookmark properties.
- Returns:
The handle of the generic bookmark.
- Return type:
dict
- create_connection(doc_handle: int, connect_name, connect_string, connect_type, user_name, password, mod_date='', meta='', sso_passthrough='LOG_ON_SERVICE_USER')[source]
- create_object(doc_handle: int, prop)[source]
Creates a new object in the app identified by the document handle.
- Parameters:
doc_handle (int) – The handle identifying the app document.
prop (dict) – Information about the object.
- Returns:
The created object (qReturn). In case of an error, returns the error information.
- Return type:
dict
- create_session_variable(doc_handle: int, var_id='', var_name='', var_comment='', var_def='')[source]
- do_reload(doc_handle: int, param_list=[])[source]
Triggers a reload of the app identified by the document handle.
- Parameters:
doc_handle (int) – The handle identifying the app document.
param_list (list) – A list of parameters for the reload operation. Default is an empty list.
- Returns:
The result of the reload operation. In case of an error, returns the error information.
- Return type:
dict
- do_reload_ex(doc_handle: int, param_list={})[source]
Triggers an extended reload of the app identified by the document handle.
- Parameters:
doc_handle (int) – The handle identifying the app document.
param_list (list) – A list of parameters for the extended reload operation. Default is an empty list.
- Returns:
The result of the extended reload operation. In case of an error, returns the error information.
- Return type:
dict
- get_app_layout(doc_handle: int)[source]
Retrieves the layout structure of the app identified by the document handle.
- Parameters:
doc_handle (int) – The handle identifying the app document.
- Returns:
The layout structure of the app (qLayout). In case of an error, returns the error information.
- Return type:
dict
- get_bookmark(app_handle: int, bookmark_id: str)[source]
Retrieves a specific bookmark from the app identified by the document handle.
- Parameters:
app_handle (int) – The handle identifying the app document.
bookmark_id (str) – The ID of the bookmark to retrieve.
- Returns:
The retrieved object (qReturn). In case of an error, returns the error information.
- Return type:
dict
- get_bookmarks(doc_handle: int, options: dict)[source]
Returns all bookmarks compatible with options.
- Parameters:
doc_handle (int) – The handle identifying the document.
qOptions (dict) – Bookmark type filter and requested properties.
- Returns:
The resulting list.
- Return type:
list
- get_db_table_fields(doc_handle: int, connection_id, db_name='', db_owner='', table_name='')[source]
- get_db_table_preview(doc_handle: int, connection_id, db_name='', db_owner='', table_name='')[source]
- get_field(doc_handle: int, field_name, state_name='')[source]
Retrieves a specific field from the app identified by the document handle.
- Parameters:
doc_handle (int) – The handle identifying the app document.
field_name (str) – The name of the field to retrieve.
state_name (str) – The name of the alternate state. Default state is current selections.
- Returns:
Object interface.
- Return type:
dict
- get_file_table_fields(doc_handle: int, connection_id, rel_path='', data_fmt='', table_name='')[source]
- get_file_table_preview(doc_handle: int, connection_id, rel_path='', data_fmt='', table_name='')[source]
- get_lineage(doc_handle: int)[source]
Gets the lineage information of the app. The lineage information includes the LOAD and STORE statements from the data load script associated with this app.
- Parameters:
doc_handle (int) – The handle identifying the app document.
- Returns:
Information about the lineage of the data in the app.
- Return type:
list
- get_object(app_handle: int, object_id: str)[source]
Retrieves a specific object from the app identified by the document handle.
- Parameters:
app_handle (int) – The handle identifying the app document.
object_id (str) – The ID of the object to retrieve.
- Returns:
The retrieved object (qReturn). In case of an error, returns the error information.
- Return type:
dict
- get_objects(app_handle: int, options: dict)[source]
Retrieves a specific object from the app identified by the document handle.
- Parameters:
app_handle (int) – The handle identifying the app document.
object_id (str) – The ID of the object to retrieve.
- Returns:
The retrieved object (qReturn). In case of an error, returns the error information.
- Return type:
dict
- get_script(doc_handle: int)[source]
Retrieves the script of the app identified by the document handle.
- Parameters:
doc_handle (int) – The handle identifying the app document.
- Returns:
The script of the app (qScript). In case of an error, returns the error information.
- Return type:
str
- get_variable_by_id(doc_handle: int, variable_id)[source]
Gets the handle of a variable.
- Parameters:
doc_handle (int) – The handle identifying the document.
variable_id (str) – The id of the variable.
- Returns:
The handle of the generic variable.
- Return type:
dict
- set_script(doc_handle: int, script)[source]
Sets the script of the app identified by the document handle.
- Parameters:
doc_handle (int) – The handle identifying the app document.
script (str) – The script content to be set.
- Returns:
The result of setting the script. In case of an error, returns the error information.
- Return type:
dict