Generic Object API Module
- class qe_api_client.api_classes.engine_generic_object_api.EngineGenericObjectApi(socket)[source]
Bases:
object
API class for interacting with Qlik Sense engine’s generic objects, such as hypercubes, lists, and other data visualization objects.
- create_child(handle, params)[source]
Creates a generic object that is a child of another generic object.
- apply_patches(handle: int, patches: list, soft_patch: bool = False)[source]
Applies a patch to the properties of an object. Allows an update to some of the properties. It is possible to apply a patch to the properties of a generic object, that is not persistent. Such a patch is called a soft patch. In that case, the result of the operation on the properties (add, remove or delete) is not shown when doing GetProperties, and only a GetLayout call shows the result of the operation. Properties that are not persistent are called soft properties. Once the engine session is over, soft properties are cleared. It should not be possible to patch “/qInfo/qId”, and it will be forbidden in the near future.
- Parameters:
handle (int) – The handle identifying the generic object.
patches (list) – List of patches.
soft_patch (bool, optional) – If set to true, it means that the properties to be applied are not persistent.
false. (The patch is a soft patch. The default value is)
- Returns:
Operation succeeded.
- Return type:
dict
- create_child(handle: int, prop: dict, prop_for_this: dict = None)[source]
Creates a generic object that is a child of another generic object.
- Parameters:
handle (int) – The handle identifying the generic object.
prop (dict) – Information about the child. It is possible to create a child that is linked to another object.
prop_for_this (dict, optional) – Identifier of the parent’s object. Should be set to update the properties of
created. (the parent's object at the same time the child is)
- Returns:
The layout structure of the generic object (qLayout). In case of an error, returns the error information.
- Return type:
dict
- embed_snapshot_object(handle: int, snapshot_id: str)[source]
Adds a snapshot to a generic object. Only one snapshot can be embedded in a generic object. If you embed a snapshot in an object that already contains a snapshot, the new snapshot overwrites the previous one.
- Parameters:
handle (int) – The handle identifying the generic object.
snapshot_id (str) – The id of the snapshot to be embeded.
- Returns:
update
- get_effective_properties(handle)[source]
Retrieves the effective properties of a specific generic object.
- Parameters:
handle (int) – The handle identifying the generic object.
- Returns:
The effective properties of the generic object (qProp). In case of an error, returns the error information.
- Return type:
dict
- get_full_property_tree(handle)[source]
Retrieves the full property tree of a specific generic object.
- Parameters:
handle (int) – The handle identifying the generic object.
- Returns:
The full property tree of the generic object (qPropEntry). In case of an error, returns the error information.
- Return type:
dict
- get_hypercube_data(handle: int, path: str, pages: list)[source]
Retrieves the data from a specific hypercube in a generic object.
- Parameters:
handle (int) – The handle identifying the generic object containing the hypercube.
path (str) – The path to the hypercube definition within the object. Default is “/qHyperCubeDef”.
pages (list) – A list of pages to retrieve from the hypercube data.
- Returns:
The data from the hypercube. In case of an error, returns the error information.
- Return type:
dict
- get_hypercube_pivot_data(handle: int, path: str, pages: list)[source]
Retrieves the pivot data from a specific hypercube in a generic object.
- Parameters:
handle (int) – The handle identifying the generic object containing the hypercube.
path (str) – The path to the hypercube definition within the object. Default is “/qHyperCubeDef”.
pages (list) – A list of pages to retrieve from the hypercube pivot data.
- Returns:
The pivot data from the hypercube. In case of an error, returns the error information.
- Return type:
dict
- get_hypercube_stack_data(handle: int, path: str, pages: list, max_no_cells: int = 10000)[source]
Retrieves the values of a stacked pivot table. It is possible to retrieve specific pages of data.
- Parameters:
handle (int) – The handle identifying the generic object containing the hypercube.
path (str) – The path to the hypercube definition within the object. Default is “/qHyperCubeDef”.
pages (list) – A list of pages to retrieve from the hypercube pivot data.
max_no_cells (int) – Maximum number of cells at outer level. The default value is 10 000.
- Returns:
The pivot data from the hypercube. In case of an error, returns the error information.
- Return type:
dict
- get_layout(handle)[source]
Retrieves the layout structure of a specific generic object.
- Parameters:
handle (int) – The handle identifying the generic object.
- Returns:
The layout structure of the generic object (qLayout). In case of an error, returns the error information.
- Return type:
dict
- get_list_object_data(handle, path='/qListObjectDef', pages=[])[source]
Retrieves the data from a specific list object in a generic object.
- Parameters:
handle (int) – The handle identifying the generic object containing the list object.
path (str) – The path to the list object definition within the object. Default is “/qListObjectDef”.
pages (list) – A list of pages to retrieve from the list object data.
- Returns:
The data from the list object. In case of an error, returns the error information.
- Return type:
dict