Skip to content

Global

QIX methods for version 12.251.0.

AbortAll

Sets an abort flag on all pending and ongoing requests in the current engine session.
- If an abort flag is set on a pending request, the request is aborted.
- If an abort flag is set on an ongoing request, the engine checks to see if it is possible to abort the request.

No parameters.

No return values.

AbortRequest

Sets an abort flag on a specific request in the current engine session.
- If an abort flag is set on a pending request, the request is aborted.
- If an abort flag is set on an ongoing request, the engine checks to see if it is possible to abort the request.

Parameters:

Name Type Mandatory Description
qRequestId integer Yes Identifier of request to abort.

No return values.

AllowCreateApp

Indicates whether or not a user is able to create an app.

No parameters.

Returns:

Name Type Description
qReturn boolean <true or false>
False means that the user cannot create an app.

CancelReload

Cancels an ongoing reload. The reload of the app is stopped. The indexation can be canceled and true is still the return value of the reload task.

Required permissions: reload

No parameters.

No return values.

CancelRequest

Cancels an ongoing request. The request is stopped.

Parameters:

Name Type Mandatory Description
qRequestId integer Yes Identifier of the request to stop.

No return values.

ConfigureReload

Configures the engine's behavior during a reload.
The ConfigureReload method should be run before the DoReload method.

Required permissions: reload

Parameters:

Name Type Mandatory Description
qCancelOnScriptError boolean Yes If set to true, the script execution is halted on error.
Otherwise, the engine continues the script execution.
This parameter is relevant only if the variable ErrorMode is set to 1.
qUseErrorData boolean Yes If set to true, any script execution error is returned in qErrorData by the GetProgress method.
qInteractOnError boolean Yes If set to true, the script execution is halted on error and the engine is waiting for an interaction to be performed. If the result from the interaction is 1 (qDef.qResult is 1), the engine continues the script execution otherwise the execution is halted.
This parameter is relevant only if the variable ErrorMode is set to 1 and the script is run in debug mode (qDebug is set to true when calling the DoReload method).

No return values.

CopyApp

Copies an app that is in the Qlik Sense repository.
The engine copies the app into an app entity that was previously created by the repository. See the Qlik Sense Repository Service API for more information.
This operation is possible only in Qlik Sense Enterprise.

Required permissions: duplicate

Parameters:

Name Type Mandatory Description
qTargetAppId string Yes Identifier (GUID) of the app entity in the Qlik Sense repository.
The app entity must have been previously created by the Qlik Sense Repository Service (QRS) API.
qSrcAppId string Yes Identifier (GUID) of the source app in the Qlik Sense repository.
qIds array Yes Array of QRS identifiers.
The list of all objects in the app to be copied must be given. This list must contain the GUIDs of all these objects.
If the list of the QRS identifiers is empty, the CopyApp method copies all objects to the target app.
Script-defined variables are automatically copied when copying an app. To be able to copy variables not created via script, the GUID of each variable must be provided in the list of QRS identifiers.
To get the QRS identifiers of the objects in an app, you can use the QRS API. The GET method (from the QRS API) returns the identifiers of the objects in the app.
The following example returns the QRS identifiers of all the objects in a specified app:
GET /qrs/app/9c3f8634-6191-4a34-a114-a39102058d13
Where
9c3f8634-6191-4a34-a114-a39102058d13 is the identifier of the app.

Returns:

Name Type Description
qSuccess boolean No description.

CreateApp

Creates an app.

The operation is successful if qSuccess is set to true.

Required permissions: create

Parameters:

Name Type Mandatory Description
qAppName string Yes Name of the app.
qLocalizedScriptMainSection string No Name of the first section in the script editor.
The default value is Main.

Returns:

Name Type Description
qSuccess boolean No description.
qAppId string One of:
- Path and name of the app (Qlik Sense Desktop)
- GUID (Qlik Sense Enterprise)

CreateDocEx

Creates an app and opens an engine session.
This operation is possible only in Qlik Sense Desktop.

Required permissions: create

Parameters:

Name Type Mandatory Description
qDocName string Yes Name of the app.
qUserName string No Name of the user.
qPassword string No Password of the user.
qSerial string No Current Qlik Sense serial number.
qLocalizedScriptMainSection string No Name of the first section in the script editor.
The default value is Main.

Returns:

Name Type Description
qDocId string <path and name of the app>
qReturn ObjectInterface { "qType": "Doc", "qHandle": <handle of the app> }

CreateSessionApp

Creates an empty session app.
The following applies:
- The name of a session app cannot be chosen. The engine automatically assigns a unique identifier to the session app.
- A session app is not persisted and cannot be saved. Everything created during a session app is non-persisted; for example: objects, data connections.

Required permissions: create

No parameters.

Returns:

Name Type Description
qSessionAppId string <Identifier of the session app>
qReturn ObjectInterface { "qType": "Doc", "qHandle": <Handle of the session app> }
The identifier of the session app is composed of the prefix _SessionApp__ and of a GUID.

CreateSessionAppFromApp

Creates a session app from a source app.
The following applies:
- The objects in the source app are copied into the session app but contain no data.
- The script of the session app can be edited and reloaded.
- The name of a session app cannot be chosen. The engine automatically assigns a unique identifier to the session app.
- A session app is not persisted and cannot be saved. Everything created during a session app is non-persisted; for example: objects, data connections.

Required permissions: create

Parameters:

Name Type Mandatory Description
qSrcAppId string Yes App identifier of the source app.
It corresponds to qAppId returned by the CreateApp method when creating the source app.

Returns:

Name Type Description
qSessionAppId string <Identifier of the session app>
qReturn ObjectInterface { "qType": "Doc", "qHandle": <Handle of the session app> }
The identifier of the session app is composed of the prefix _SessionApp__ and of a GUID.

DeleteApp

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

Required permissions: delete

Parameters:

Name Type Mandatory Description
qAppId string Yes Identifier of the app to delete.
In Qlik Sense Enterprise, the identifier of the app is a GUID in the Qlik Sense repository.
In Qlik Sense Desktop, the identifier of the app is the name of the app, as defined in the apps folder %userprofile%\Documents\Qlik\Sense\Apps.

Returns:

Name Type Description
qSuccess boolean true

EngineVersion

Returns the version number of the Qlik engine component.

No parameters.

Returns:

Name Type Description
qVersion NxEngineVersion {"qComponentVersion":"<Qlik engine component version>"}

ExportApp

Exports an app from the Qlik Sense repository to the file system.
This operation is possible only in Qlik Sense Enterprise.

The operation is successful if qSuccess is set to true.

Parameters:

Name Type Mandatory Description
qTargetPath string Yes Path and name of the target app.
qSrcAppId string Yes Identifier of the source app. The identifier is a GUID from the Qlik Sense repository.
qIds array Yes Array of identifiers.
The list of all the objects in the app to be exported must be given. This list must contain the GUIDs of all these objects.
qNoData boolean No Set this parameter to true if the data should be omitted in the exported app.

Returns:

Name Type Description
qSuccess boolean true

GetActiveDoc

Returns the handle of the current app.

No parameters.

Returns:

Name Type Description
qReturn ObjectInterface { "qType": "Doc", "qHandle": <handle of the app> }
If no app is opened, an error message is returned:
{ "jsonrpc": "2.0", "id": 2, "error": { "code": 1007, "parameter": "No active document", "message": "App invalid" } }

GetAppEntry

Retrieves the meta data of an app.

Parameters:

Name Type Mandatory Description
qAppID string Yes Identifier of the app, as returned by the CreateApp method.
One of:
- Path and name of the app (Qlik Sense Desktop)
- GUID (Qlik Sense Enterprise)

Returns:

Name Type Description
qEntry AppEntry Information about the app.

GetAuthenticatedUser

Retrieves information about the authenticated user.

No parameters.

Returns:

Name Type Description
qReturn string UserDirectory=<directory>; UserId=<identifier>

GetBNF

Deprecated

Use the GetBaseBNF method instead

Gets the current Backus-Naur Form (BNF) grammar of the Qlik engine scripting language. The BNF rules define the syntax for the script statements and the script or chart functions.
In the Qlik engine BNF grammar, a token is a string of one or more characters that is significant as a group. For example, a token could be a function name, a number, a letter, a parenthesis, and so on.

Parameters:

Name Type Mandatory Description
qBnfType string Yes Returns a set of rules defining the syntax for:
- The script statements and the script functions if qBnfType is set to S.
- The chart functions if qBnfType is set to E.

One of:
- S or SCRIPT_TEXT_SCRIPT
- E or SCRIPT_TEXT_EXPRESSION

Returns:

Name Type Description
qBnfDefs array<BNFDef> Description of the scripting language grammar.

GetBaseBNF

Gets the current Backus-Naur Form (BNF) grammar of the Qlik engine scripting language, as well as a string hash calculated from that grammar. The BNF rules define the syntax for the script statements and the script or chart functions. If the hash changes between subsequent calls to this method, this indicates that the BNF has changed.
In the Qlik engine grammars, a token is a string of one or more characters that is significant as a group. For example, a token could be a function name, a number, a letter, a parenthesis, and so on.

Parameters:

Name Type Mandatory Description
qBnfType string Yes The type of grammar to return:
- The script statements and the script functions if qBnfType is set to S.
- The chart functions if qBnfType is set to E.

One of:
- S or SCRIPT_TEXT_SCRIPT
- E or SCRIPT_TEXT_EXPRESSION

Returns:

Name Type Description
qBnfDefs array<BNFDef> Description of the scripting language grammar.
qBnfHash string A string hash of the BNF definition.

GetBaseBNFHash

Gets a string hash calculated from the current Backus-Naur Form (BNF) grammar of the Qlik engine scripting language. If the hash changes between subsequent calls to this method, this indicates that the BNF grammar has changed.

Parameters:

Name Type Mandatory Description
qBnfType string Yes The type of grammar to return:
- The script statements and the script functions if qBnfType is set to S.
- The chart functions if qBnfType is set to E.

One of:
- S or SCRIPT_TEXT_SCRIPT
- E or SCRIPT_TEXT_EXPRESSION

Returns:

Name Type Description
qBnfHash string A string hash of the BNF definition.

GetBaseBNFString

Gets the current Backus-Naur Form (BNF) grammar of the Qlik engine scripting language, as well as a string hash calculated from that grammar. The BNF rules define the syntax for the script statements and the script or chart functions. If the hash changes between subsequent calls to this method, this indicates that the BNF has changed.
In the Qlik engine grammars, a token is a string of one or more characters that is significant as a group. For example, a token could be a function name, a number, a letter, a parenthesis, and so on.

Parameters:

Name Type Mandatory Description
qBnfType string Yes The type of grammar to return:
- S: returns the script statements and the script functions.
- E: returns the chart functions.

One of:
- S or SCRIPT_TEXT_SCRIPT
- E or SCRIPT_TEXT_EXPRESSION

Returns:

Name Type Description
qBnfStr string Description of the scripting language grammar.
qBnfHash string A string hash of the BNF definition.

GetCustomConnectors

List the custom connectors available in the system.

Required permissions: reload

Parameters:

Name Type Mandatory Description
qReloadList boolean No Sets if the list of custom connectors should be reloaded or not.
If set to false, only the connectors that were returned the previous time are returned. If new connectors have been added since the last call to the GetCustomConnectors method was made, the new connectors are not returned.
If set to true, the GetCustomConnectors method looks for new connectors in the file system.
The default value is false.

Returns:

Name Type Description
qConnectors array<CustomConnector> List of the custom connectors.

GetDatabasesFromConnectionString

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

Required permissions: reload

Parameters:

Name Type Mandatory Description
qConnection Connection Yes Information about the connection.

Returns:

Name Type Description
qDatabases array<Database> List of the databases in the connection.

GetDefaultAppFolder

Returns the folder where the apps are stored.
This method applies only if running Qlik Sense Desktop.

Required permissions: reload

No parameters.

Returns:

Name Type Description
qPath string Path of the folder where the apps are stored.

GetDocList

Returns the list of apps.

In Qlik Sense Enterprise:

The list is generated by the QRS. The GetDocList method only returns documents the current user is allowed to access.

In Qlik Sense Desktop:

The apps are located in C:\Users\<user name>\Documents\Qlik\Sense\Apps.

No parameters.

Returns:

Name Type Description
qDocList array<DocListEntry> List of app identifiers.
- In Qlik Sense Enterprise, the app identifier is a GUID.
- In Qlik Sense Desktop, the app identifier corresponds to the app path and name.

GetFolderItemsForPath

Returns the files and folders located at a specified path.

Required permissions: reload

Parameters:

Name Type Mandatory Description
qPath string Yes Absolute or relative path.
Relative paths are relative to the default Apps folder.

In Qlik Sense Enterprise:

The list is generated by the QRS. The GetDocList method only returns documents the current user is allowed to access.

In Qlik Sense Desktop:

The apps are located in C:\Users\<user name>\Documents\Qlik\Sense\Apps.

Returns:

Name Type Description
qFolderItems array<FolderItem> Path of the folder where the apps are stored.

GetFunctions

Gets the list of all the script functions.

Parameters:

Name Type Mandatory Description
qGroup string No Name of the group.
Default is all groups.

One of:
- ALL or FUNC_GROUP_ALL
- U or FUNC_GROUP_UNKNOWN
- NONE or FUNC_GROUP_NONE
- AGGR or FUNC_GROUP_AGGR
- NUM or FUNC_GROUP_NUMERIC
- RNG or FUNC_GROUP_RANGE
- EXP or FUNC_GROUP_EXPONENTIAL_AND_LOGARITHMIC
- TRIG or FUNC_GROUP_TRIGONOMETRIC_AND_HYPERBOLIC
- FIN or FUNC_GROUP_FINANCIAL
- MATH or FUNC_GROUP_MATH_CONSTANT_AND_PARAM_FREE
- COUNT or FUNC_GROUP_COUNTER
- STR or FUNC_GROUP_STRING
- MAPP or FUNC_GROUP_MAPPING
- RCRD or FUNC_GROUP_INTER_RECORD
- CND or FUNC_GROUP_CONDITIONAL
- LOG or FUNC_GROUP_LOGICAL
- NULL or FUNC_GROUP_NULL
- SYS or FUNC_GROUP_SYSTEM
- FILE or FUNC_GROUP_FILE
- TBL or FUNC_GROUP_TABLE
- DATE or FUNC_GROUP_DATE_AND_TIME
- NUMI or FUNC_GROUP_NUMBER_INTERPRET
- FRMT or FUNC_GROUP_FORMATTING
- CLR or FUNC_GROUP_COLOR
- RNK or FUNC_GROUP_RANKING
- GEO or FUNC_GROUP_GEO
- EXT or FUNC_GROUP_EXTERNAL
- PROB or FUNC_GROUP_PROBABILITY
- ARRAY or FUNC_GROUP_ARRAY
- LEG or FUNC_GROUP_LEGACY

Returns:

Name Type Description
qFunctions array<Function> Name of the group
Default is all groups.

GetInteract

Retrieves information on the user interaction that is requested by the engine.
Engine can request user interactions only during script reload and when the reload is performed in debug mode ( qDebug is set to true when using the DoReload method ).
When running reload in debug mode, the engine pauses the script execution to receive data about user interaction. The engine can pause:
- Before executing a new script statement.
- When an error occurs while executing the script.
- When the script execution is finished.

To know if the engine is paused and waits for a response to an interaction request, the GetProgress method should be used. The engine waits for a response if the property qUserInteractionWanted is set to true in the response of the GetProgress request.

Required permissions: reload

Parameters:

Name Type Mandatory Description
qRequestId integer Yes Identifier of the request.
Corresponds to the identifier of the DoReload request.

Returns:

Name Type Description
qDef InteractDef Information to set up the user interaction.
Indicates which kind of interaction is wanted.
qReturn boolean No description.

GetLogicalDriveStrings

Lists the logical drives in the system.
This method applies only if running Qlik Sense Desktop.

Required permissions: reload

No parameters.

Returns:

Name Type Description
qDrives array<DriveInfo> List of drives.

GetOdbcDsns

Returns the list of the ODBC connectors that are installed in the system.

Required permissions: reload

No parameters.

Returns:

Name Type Description
qOdbcDsns array<OdbcDsn> List of the ODBC connectors.

GetOleDbProviders

Returns the list of the OLEDB providers installed on the system.

Required permissions: reload

No parameters.

Returns:

Name Type Description
qOleDbProviders array<OleDbProvider> List of the OLEDB providers.

GetProgress

Gives information about the progress of the DoReload and DoSave calls.
For more information on DoReload and DoSave, see the DoReload Method and DoSave Method.

Parameters:

Name Type Mandatory Description
qRequestId integer Yes Identifier of the DoReload or DoSave request or 0.
Complete information is returned if the identifier of the request is given.
If the identifier is 0, less information is given. Progress messages and error messages are returned but information like when the request started and finished is not returned.

Returns:

Name Type Description
qProgressData ProgressData Information about the progress of the request.

GetSupportedCodePages

Lists the supported code pages.

Required permissions: reload

No parameters.

Returns:

Name Type Description
qCodePages array<CodePage> List of the code pages

GetUniqueID

Returns the unique identifier of the endpoint for the current user in the current app.
This unique identifier can be used for logging purposes.

No parameters.

Returns:

Name Type Description
qUniqueID string Unique identifier of the endpoint.

InteractDone

Informs the engine that a user interaction (which was earlier requested by the engine) was performed and indicates to the engine what to do next.

Required permissions: reload

Parameters:

Name Type Mandatory Description
qRequestId integer Yes Identifier of the request.
Corresponds to the identifier of the DoReload request.
qDef InteractDef Yes User response to the current interaction.

No return values.

IsDesktopMode

Indicates whether the user is working in Qlik Sense Desktop.

No parameters.

Returns:

Name Type Description
qReturn boolean <true or false>
The engine returns true if the user is working with Qlik Sense Desktop.

IsPersonalMode

Deprecated

Use IsDesktopMode method instead

Indicates whether or not the user is working in personal mode (Qlik Sense Desktop).

No parameters.

Returns:

Name Type Description
qReturn boolean <true or false>
The engine returns true if the user is working with Qlik Sense Desktop.

IsValidConnectionString

Checks if a connection string is valid.

Required permissions: reload

Parameters:

Name Type Mandatory Description
qConnection Connection Yes Information about the connection.

Returns:

Name Type Description
qReturn boolean <true or false>
True means that the connection string is correct.

OSName

Returns the name of the operating system.

No parameters.

Returns:

Name Type Description
qReturn string <operating system name>

OSVersion

Returns the version number of the operating system.

No parameters.

Returns:

Name Type Description
qReturn string <operating system version>

OpenDoc

Opens an app and checks if the app needs to be migrated (if the app is deprecated).
The OpenDoc method compares the version of the app with the version of Qlik Sense and migrates the app to the current version of Qlik Sense if necessary. Once the migration is done, the app is opened.
If no migration is needed, the app is opened immediately.
The following applies:
- The app version is lower than 0.95: no migration is done. Apps older than the version 0.95 are not supported.
- The app version is at least 0.95 and less than the Qlik Sense version: the app is migrated and then opened.
- Qlik Sense and the app have the same version: the app is opened, no migration is needed.

If the app is read-only, the app migration cannot occur. An error message is sent.

Parameters:

Name Type Mandatory Description
qDocName string Yes The GUID (in Qlik Sense Enterprise) or Name (in Qlik Sense Desktop) of the app to retrieve.
qUserName string No Name of the user that opens the app.
qPassword string No Password of the user.
qSerial string No Current Qlik Sense serial number.
qNoData boolean No Set this parameter to true to be able to open an app without loading its data.
When this parameter is set to true, the objects in the app are present but contain no data. The script can be edited and reloaded.
The default value is false.

Returns:

Name Type Description
qReturn ObjectInterface No description.

ProductVersion

Deprecated

Use EngineVersion method instead

Returns the Qlik Sense version number.

No parameters.

Returns:

Name Type Description
qReturn string <Qlik Sense version>

PublishApp

Publishes an app to the supplied stream.

Required permissions: publish

Parameters:

Name Type Mandatory Description
qAppId string Yes The Id of the app to publish.
qName string Yes The name of the app to publish.
qStreamId string Yes The stream Id of the app to publish.

No return values.

QTProduct

Returns the Qlik product name.

No parameters.

Returns:

Name Type Description
qReturn string <Qlik product name>

QvVersion

Deprecated

Use the EngineVersion method instead

Returns the Qlik Sense version number.

No parameters.

Returns:

Name Type Description
qReturn string <Qlik Sense version>

ReloadExtensionList

Reloads the list of extensions.

No parameters.

No return values.

ReplaceAppFromID

Replaces objects of a target app with the objects from a source app.
The list of objects in the app to be replaced must be defined in qIds.
The data model of the app cannot be updated. This operation is possible only in Qlik Sense Enterprise.

The operation is successful if qSuccess is set to true.

Required permissions: update

Parameters:

Name Type Mandatory Description
qTargetAppId string Yes Identifier (GUID) of the target app.
The target app is the app to be replaced.
qSrcAppID string Yes Identifier (GUID) of the source app.
The objects in the source app will replace the objects in the target app.
qIds array Yes QRS identifiers (GUID) of the objects in the target app to be replaced. Only QRS-approved GUIDs are applicable.
An object that is QRS-approved, is for example an object that has been published (for example, not private anymore).
If an object is private, it should not be included in this list.
If the array of identifiers contains objects that are not present in the source app, the objects related to these identifiers are removed from the target app.
If qIds is empty, no objects are deleted in the target app.

Returns:

Name Type Description
qSuccess boolean <true or false>

ShutdownProcess

Shuts down the Qlik engine.
This operation is possible only in Qlik Sense Desktop.

No parameters.

No return values.