QIX
The JSON-RPC API over websocket that enables you to interact with the Qlik Associative Engine.
The QIX API is the primary API used for working with Qlik apps. It's based on the WebSocket protocol and requires some specific parameters to work correctly as seen below.
WebSockets
When you want to use the API, any websocket client implementation that follows the RFC specification should be supported. The URL format is:
wss://your-tenant.us.qlikcloud.com/app/<app id>
Browser example:
const websocket = new WebSocket('wss://your-tenant.us.qlikcloud.com/app/123e4567-e89b-12d3-a456-426655440000');
Headers
In a non-browser environment, most websocket client implementations support to add headers.
Use header Authorization: Bearer <token>
with
API key for authentication.
Session sharing
When using the QIX API you build up a state in what's called a session. A session is based on a tenant, a user, and the app. When opening a new websocket you'd either get a new unique session, or get attached to an existing session. When sharing a session, the state (like selections), is shared between all websocket connections.
The conditions for sharing a session is:
- The websocket URL needs to be identical (tenant URL and app id)
- The user needs to be the same:
- in a browser environment the same user needs to be signed in
- in a non-browser environment an API key from the same user and tenant needs to be used
JSON-RPC protocol
The QIX API leverages the JSON-RPC protocol. It implements a superset of this specification. All requests sent from the client should contain the following properties:
{
// Protocol descriptor:
"jsonrpc": "2.0",
// Session-unique numeric id, referred to in the response
// to connect the request and response:
"id": 6,
// The handle for the object to interact with:
"handle": 2,
// The object type of the handle above decides
// which API methods you may invoke:
"method": "ApiMethodName",
// Parameters for the invoked API method:
"params": {}
}
Request and response
Here is an example request/response pair. Note that there is only one static
handle in the QIX API, and that's -1
. This handle refers to the Global
API.
In this example request, an app is opened using OpenDoc. If successful, the response contains a reference to the app handle, which can be used to do further requests towards the Doc (app) API, and so forth.
{
"jsonrpc": "2.0",
"id": 1,
"handle": -1,
"method": "OpenDoc",
"params": {
"qDocName": "<app id>"
}
}
If that app exist, the response would look similar to this:
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qReturn": {
"qType": "Doc",
"qHandle": 1,
"qGenericId": "<app id>"
}
},
"change": [1]
}
Note that qHandle
contains the handle that might be used to make additional
requests to invoke API methods towards the app. A property called change
is also received on the response, an array that can be sent by QIX
Engine on any responses and contains all open handles in your session
that may have been invalidated and you should refetch data to ensure
your application in a valid state.
Session apps
Session apps are non-persisted Qlik Sense apps created on-the-fly in server memory by the Qlik Associative Engine. You have to define a load script and trigger a data reload before any data model is accessible for each user session. Similarly, if you create a session app from an existing app, you have to trigger a reload after retrieving objects from the template app.
Session apps are attached to the active Qlik Associative Engine session. When a session ends, for example, by the user logging out, the session app is terminated and all related resources are released from server memory. Standard Qlik security rules ensure that only authenticated users can access data and visualizations from a session app.
WebSocket URL for session apps
The WebSocket URL for creating a session app has the following format:
wss://my-tenant.us.qlikcloud.com/app/SessionApp_{appId}
You must append a unique app ID to SessionApp_
in the path. The app ID can
be a code-generated random number.
To create a session app from an app, you must add the template app ID as a query parameter to the URL:
wss://my-tenant.us.qlikcloud.com/app/SessionApp_{appId}?from={templateAppId}
Error Handling
When something happens unexpectedly, the WebSocket may be closed with an error code and message. The error code will be a 4-digit number and the message may or may not be empty. The code below should be used for monitoring this.
ws.on("close", (code, message) => {
console.log(code);
console.log(String(message));
});
4204
{"code":"QEP-104","traceId":"491a33e544de8dda40a9fc9b0cb53216"}
The following is a list of error codes and their causes:
- 4202 - the WebSocket request appears to be malformed
- 4203 - the request could not be fulfilled because of a permissions issue
- 4204 - the request failed because something could not be found, this may be because the app id in the URL is wrong or the app has been deleted
- 4205 - the request could not be fulfilled because the system is busy, consider sending the request again later
API references
For the API references, see the different classes listed in the left-side menu.
Global
GlobalAbortAll()
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.
Returns
Results for Global.AbortAll object | No description |
Errors
No description |
const result = await global.abortAll({});
// console.log(result);
undefined
GlobalAbortRequest(qRequestId)
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
qRequestId integer | Identifier of request to abort. |
Returns
Results for Global.AbortRequest object | No description |
Errors
No description |
const result = await global.abortRequest({
"qRequestId": 1
});
// console.log(result);
undefined
GlobalAllowCreateApp()
Indicates whether or not a user is able to create an app.
Returns
qReturn boolean | No description |
Errors
No description |
const result = await global.allowCreateApp({});
// console.log(result);
true
GlobalCancelReload()
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.
Returns
Results for Global.CancelReload object | No description |
Errors
No description |
const result = await global.cancelReload({});
// console.log(result);
undefined
GlobalCancelRequest(qRequestId)
Cancels an ongoing request. The request is stopped.
Parameters
qRequestId integer | Identifier of the request to stop. |
Returns
Results for Global.CancelRequest object | No description |
Errors
No description |
const result = await global.cancelRequest({
"qRequestId": 1
});
// console.log(result);
undefined
GlobalConfigureReload(qCancelOnScriptError, qUseErrorData, qInteractOnError)
Configures the engine's behavior during a reload.
Parameters
qCancelOnScriptError boolean | 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 | If set to true, any script execution error is returned in qErrorData by the GetProgress method. |
qInteractOnError boolean | 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). |
Returns
Results for Global.ConfigureReload object | No description |
Errors
No description |
const result = await global.configureReload({
"qCancelOnScriptError": true,
"qUseErrorData": true,
"qInteractOnError": true
});
// console.log(result);
undefined
GlobalCopyApp(qTargetAppId, qSrcAppId, qIds)
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.
Parameters
qTargetAppId string | 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 | Identifier (GUID) of the source app in the Qlik Sense repository. |
qIds Array<string> | 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
qSuccess boolean | No description |
Errors
No description |
const result = await global.copyApp({
"qTargetAppId": "value",
"qSrcAppId": "value",
"qIds": [
"value"
]
});
// console.log(result);
true
GlobalCreateApp(qAppName, qLocalizedScriptMainSection?, qLocale?)
Creates an app.
Logs
When this method is called, audit activity logs are produced to track the user activity. In the case of errors, both audit activity logs and system services logs are produced. The log files are named as follows:
Audit activity log | System service log |
---|---|
<MachineName>_AuditActivity_Engine.txt in Qlik Sense Enterprise <MachineName>_AuditActivity_Engine.log in Qlik Sense Desktop | <MachineName>_ServiceEngine.txt in Qlik Sense Enterprise <MachineName>_ServiceEngine.log in Qlik Sense Desktop |
Where to find the log files
The location of the log files depends on whether you have installed Qlik Sense Enterprise or Qlik Sense Desktop.
Qlik Sense Enterprise | Qlik Sense Desktop |
---|---|
%ProgramData%/Qlik/Sense/Log/Engine | %UserProfile%/Documents/Qlik/Sense/Log |
Parameters
qAppName string | Name of the app. |
qLocalizedScriptMainSection optional string | Name of the first section in the script editor. The default value is Main. |
qLocale optional string | Set custom locale for the app instead of system default. |
Returns
Results for Global.CreateApp | No description |
Errors
No description |
const result = await global.createApp({
"qAppName": "value",
"qLocalizedScriptMainSection": "value",
"qLocale": "value"
});
// console.log(result);
true
GlobalCreateDocEx(qDocName, qUserName?, qPassword?, qSerial?, qLocalizedScriptMainSection?)
Creates an app and opens an engine session.
Parameters
qDocName string | Name of the app. |
qUserName optional string | Name of the user. |
qPassword optional string | Password of the user. |
qSerial optional string | Current Qlik Sense serial number. |
qLocalizedScriptMainSection optional string | Name of the first section in the script editor. The default value is Main. |
Returns
Results for Global.CreateDocEx | No description |
Errors
No description |
const result = await global.createDocEx({
"qDocName": "value",
"qUserName": "value",
"qPassword": "value",
"qSerial": "value",
"qLocalizedScriptMainSection": "value"
});
// console.log(result);
// result is an enigma model, for example: result.getLayout()
{
id: 'xyz',
handle: 1,
getLayout: () => {},
setProperties: () => {},
}
GlobalCreateSessionApp()
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.
Returns
Results for Global.CreateSessionApp | No description |
Errors
No description |
const result = await global.createSessionApp({});
// console.log(result);
// result is an enigma model, for example: result.getLayout()
{
id: 'xyz',
handle: 1,
getLayout: () => {},
setProperties: () => {},
}
GlobalCreateSessionAppFromApp(qSrcAppId)
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.
Parameters
qSrcAppId string | App identifier of the source app. It corresponds to qAppId returned by the CreateApp method when creating the source app. |
Returns
Results for Global.CreateSessionAppFromApp | No description |
Errors
No description |
const result = await global.createSessionAppFromApp({
"qSrcAppId": "value"
});
// console.log(result);
// result is an enigma model, for example: result.getLayout()
{
id: 'xyz',
handle: 1,
getLayout: () => {},
setProperties: () => {},
}
GlobalDeleteApp(qAppId)
Deletes an app from the Qlik Sense repository or from the file system.
Qlik Sense Enterprise
In addition to being removed from the repository, the app is removed from the directory as well: <installation_directory>\Qlik\Sense\Apps The default installation directory is ProgramData.
Qlik Sense Desktop
The app is deleted from the directory %userprofile%\Documents\Qlik\ \Apps.
Logs
When this method is called, audit activity logs are produced to track the user activity. In the case of errors, both audit activity logs and system services logs are produced. The log files are named as follows:
Audit activity log | System service log |
---|---|
<MachineName>AuditActivityEngine.txt in Qlik Sense Enterprise <MachineName>AuditActivityEngine.log in Qlik Sense Desktop | <MachineName>ServiceEngine.txt in Qlik Sense Enterprise <MachineName>ServiceEngine.log in Qlik Sense Desktop |
Where to find the log files
The location of the log files depends on whether you have installed Qlik Sense Enterprise or Qlik Sense Desktop.
Qlik Sense Enterprise | Qlik Sense Desktop |
---|---|
%ProgramData%/Qlik/Sense/Log/Engine | %UserProfile%/Documents/Qlik/Sense/Log |
Parameters
qAppId string | 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
qSuccess boolean | No description |
Errors
No description |
const result = await global.deleteApp({
"qAppId": "value"
});
// console.log(result);
true
GlobalEngineVersion()
Returns the version number of the Qlik engine component.
Returns
qVersion | No description |
Errors
No description |
const result = await global.engineVersion({});
// console.log(result);
{
"qComponentVersion": "value"
}
GlobalExportApp(qTargetPath, qSrcAppId, qIds, qNoData?)
Exports an app from the Qlik Sense repository to the file system.
Logs
When this method is called, audit activity logs are produced to track the user activity. In the case of errors, both audit activity logs and system services logs are produced. The log files are named as follows:
Audit activity log | System service log |
---|---|
*<MachineName>_AuditActivityEngine.txt* | *<MachineName>_ServiceEngine.txt* |
The log files are located in: %ProgramData%/Qlik/Sense/Log/Engine
Parameters
qTargetPath string | Path and name of the target app. |
qSrcAppId string | Identifier of the source app. The identifier is a GUID from the Qlik Sense repository. |
qIds Array<string> | 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 optional boolean | Set this parameter to true if the data should be omitted in the exported app. |
Returns
qSuccess boolean | No description |
Errors
No description |
const result = await global.exportApp({
"qTargetPath": "value",
"qSrcAppId": "value",
"qIds": [
"value"
],
"qNoData": true
});
// console.log(result);
true
GlobalGetActiveDoc()
Returns the handle of the current app.
Returns
qReturn | No description |
Errors
No description |
const result = await global.getActiveDoc({});
// console.log(result);
// result is an enigma model, for example: result.getLayout()
{
id: 'xyz',
handle: 1,
getLayout: () => {},
setProperties: () => {},
}
GlobalGetAppEntry(qAppID)
Retrieves the meta data of an app.
Parameters
qAppID string | Identifier of the app, as returned by the CreateApp method. One of:
|
Returns
qEntry | No description |
Errors
No description |
const result = await global.getAppEntry({
"qAppID": "value"
});
// console.log(result);
{
"qID": "value",
"qTitle": "value",
"qPath": "value",
"qLastReloadTime": "value",
"qReadOnly": true,
"qMeta": {
"qName": "value"
},
"qThumbnail": {
"qUrl": "value"
},
"qFileSize": 1,
"qHasSectionAccess": true
}
GlobalGetAuthenticatedUser()
Retrieves information about the authenticated user.
Returns
qReturn string | No description |
Errors
No description |
const result = await global.getAuthenticatedUser({});
// console.log(result);
"value"
GlobalGetBNF(qBnfType)
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
qBnfType string | Returns a set of rules defining the syntax for:
One of:
|
Returns
qBnfDefs | No description |
Errors
No description |
const result = await global.getBNF({
"qBnfType": "value"
});
// console.log(result);
[
{
"qBnf": [
1
],
"qNbr": 1,
"qPNbr": 1,
"qHelpId": 1,
"qName": "value",
"qStr": "value",
"qIsBnfRule": true,
"qScriptStatement": true,
"qControlStatement": true,
"qBnfLiteral": true,
"qQvFunc": true,
"qAggrFunc": true,
"qFG": "value",
"qFieldFlag": true,
"qMT": "value",
"qDepr": true,
"qFGList": [
"value"
]
}
]
GlobalGetBaseBNF(qBnfType)
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
qBnfType string | The type of grammar to return:
One of:
|
Returns
Results for Global.GetBaseBNF | No description |
Errors
No description |
const result = await global.getBaseBNF({
"qBnfType": "value"
});
// console.log(result);
[
{
"qBnf": [
1
],
"qNbr": 1,
"qPNbr": 1,
"qHelpId": 1,
"qName": "value",
"qStr": "value",
"qIsBnfRule": true,
"qScriptStatement": true,
"qControlStatement": true,
"qBnfLiteral": true,
"qQvFunc": true,
"qAggrFunc": true,
"qFG": "value",
"qFieldFlag": true,
"qMT": "value",
"qDepr": true,
"qFGList": [
"value"
]
}
]
GlobalGetBaseBNFHash(qBnfType)
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
qBnfType string | The type of grammar to return:
One of:
|
Returns
qBnfHash string | No description |
Errors
No description |
const result = await global.getBaseBNFHash({
"qBnfType": "value"
});
// console.log(result);
"value"
GlobalGetBaseBNFString(qBnfType)
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
qBnfType string | The type of grammar to return:
One of:
|
Returns
Results for Global.GetBaseBNFString | No description |
Errors
No description |
const result = await global.getBaseBNFString({
"qBnfType": "value"
});
// console.log(result);
"value"
GlobalGetCustomConnectors(qReloadList?)
List the custom connectors available in the system.
Parameters
qReloadList optional boolean | 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
qConnectors | No description |
Errors
No description |
const result = await global.getCustomConnectors({
"qReloadList": true
});
// console.log(result);
[
{
"qProvider": "value",
"qParent": "value",
"qDisplayName": "value",
"qMachineMode": "value",
"qSupportFileStreaming": true
}
]
GlobalGetDatabasesFromConnectionString(qConnection)
Lists the databases in a ODBC, OLEDB or CUSTOM data source.
Parameters
qConnection | Information about the connection. |
Returns
qDatabases | No description |
Errors
No description |
const result = await global.getDatabasesFromConnectionString({
"qConnection": {
"qId": "value",
"qName": "value",
"qConnectionString": "value",
"qType": "value",
"qUserName": "value",
"qPassword": "value",
"qModifiedDate": "value",
"qMeta": {
"qName": "value"
},
"qLogOn": "value"
}
});
// console.log(result);
[
{
"qName": "value",
"qIsDefault": true
}
]
GlobalGetDefaultAppFolder()
Returns the folder where the apps are stored.
Returns
qPath string | No description |
Errors
No description |
const result = await global.getDefaultAppFolder({});
// console.log(result);
"value"
GlobalGetDocList()
Returns the list of apps.
In Qlik Sense Enterprise:
The list is generated by the QRS. The GetDocList 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
qDocList | No description |
Errors
No description |
const result = await global.getDocList({});
// console.log(result);
[
{
"qDocName": "value",
"qConnectedUsers": 1,
"qFileTime": 1,
"qFileSize": 1,
"qDocId": "value",
"qMeta": {
"qName": "value"
},
"qLastReloadTime": "value",
"qReadOnly": true,
"qTitle": "value",
"qThumbnail": {
"qUrl": "value"
},
"qHasSectionAccess": true,
"qIsDirectQueryMode": true
}
]
GlobalGetFolderItemsForPath(qPath)
Returns the files and folders located at a specified path.
Parameters
qPath string | 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
qFolderItems | No description |
Errors
No description |
const result = await global.getFolderItemsForPath({
"qPath": "value"
});
// console.log(result);
[
{
"qName": "value",
"qType": "value"
}
]
GlobalGetFunctions(qGroup?)
Gets the list of all the script functions.
Parameters
qGroup optional string | Name of the group. Default is all groups. One of:
|
Returns
qFunctions | No description |
Errors
No description |
const result = await global.getFunctions({
"qGroup": "value"
});
// console.log(result);
[
{
"qName": "value",
"qGroup": "value",
"qSignature": "value"
}
]
GlobalGetInteract(qRequestId)
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 should be used. The engine waits for a response if the property qUserInteractionWanted is set to true in the response of the GetProgress request.
Parameters
qRequestId integer | Identifier of the request. Corresponds to the identifier of the DoReload request. |
Returns
Results for Global.GetInteract | No description |
Errors
No description |
const result = await global.getInteract({
"qRequestId": 1
});
// console.log(result);
true
GlobalGetLogicalDriveStrings()
Lists the logical drives in the system.
Returns
qDrives | No description |
Errors
No description |
const result = await global.getLogicalDriveStrings({});
// console.log(result);
[
{
"qDrive": "value",
"qType": "value",
"qName": "value",
"qTypeIdentifier": "value",
"qUnnamedDrive": true
}
]
GlobalGetOdbcDsns()
Returns the list of the ODBC connectors that are installed in the system.
Returns
qOdbcDsns | No description |
Errors
No description |
const result = await global.getOdbcDsns({});
// console.log(result);
[
{
"qName": "value",
"qDescription": "value",
"qBit32": true,
"qUserOnly": true
}
]
GlobalGetOleDbProviders()
Returns the list of the OLEDB providers installed on the system.
Returns
qOleDbProviders | No description |
Errors
No description |
const result = await global.getOleDbProviders({});
// console.log(result);
[
{
"qName": "value",
"qDescription": "value",
"qBit32": true
}
]
GlobalGetProgress(qRequestId)
Gives information about the progress of the DoReload and DoSave calls.
Parameters
qRequestId integer | 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
qProgressData | No description |
Errors
No description |
const result = await global.getProgress({
"qRequestId": 1
});
// console.log(result);
{
"qStarted": true,
"qFinished": true,
"qCompleted": 1,
"qTotal": 1,
"qKB": 1,
"qMillisecs": 1,
"qUserInteractionWanted": true,
"qPersistentProgress": "value",
"qTransientProgress": "value",
"qErrorData": [
{
"qErrorString": "value",
"qLineEnd": "value",
"qLine": "value",
"qErrorDataCode": "value",
"qMessage": {
"qMessageCode": 1,
"qMessageParameters": [
"value"
]
}
}
],
"qPersistentProgressMessages": [
{
"qMessageCode": 1,
"qMessageParameters": [
"value"
]
}
],
"qTransientProgressMessage": {
"qMessageCode": 1,
"qMessageParameters": [
"value"
]
}
}
GlobalGetStreamList()
Lists the streams.
Returns
qStreamList | No description |
Errors
No description |
const result = await global.getStreamList({});
// console.log(result);
[
{
"qName": "value",
"qId": "value"
}
]
GlobalGetSupportedCodePages()
Lists the supported code pages.
Returns
qCodePages | No description |
Errors
No description |
const result = await global.getSupportedCodePages({});
// console.log(result);
[
{
"qNumber": 1,
"qName": "value",
"qDescription": "value"
}
]
GlobalGetUniqueID()
Returns the unique identifier of the endpoint for the current user in the current app.
Returns
qUniqueID string | No description |
Errors
No description |
const result = await global.getUniqueID({});
// console.log(result);
"value"
GlobalInteractDone(qRequestId, qDef)
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.
Parameters
qRequestId integer | Identifier of the request. Corresponds to the identifier of the DoReload request. |
qDef | User response to the current interaction. |
Returns
Results for Global.InteractDone object | No description |
Errors
No description |
const result = await global.interactDone({
"qRequestId": 1,
"qDef": {
"qType": "value",
"qTitle": "value",
"qMsg": "value",
"qButtons": 1,
"qLine": "value",
"qOldLineNr": 1,
"qNewLineNr": 1,
"qPath": "value",
"qHidden": true,
"qResult": 1,
"qInput": "value"
}
});
// console.log(result);
undefined
GlobalIsDesktopMode()
Indicates whether the user is working in Qlik Sense Desktop.
Returns
qReturn boolean | No description |
Errors
No description |
const result = await global.isDesktopMode({});
// console.log(result);
true
GlobalIsPersonalMode()
Indicates whether or not the user is working in personal mode (Qlik Sense Desktop).
Returns
qReturn boolean | No description |
Errors
No description |
const result = await global.isPersonalMode({});
// console.log(result);
true
GlobalIsValidConnectionString(qConnection)
Checks if a connection string is valid.
Parameters
qConnection | Information about the connection. |
Returns
qReturn boolean | No description |
Errors
No description |
const result = await global.isValidConnectionString({
"qConnection": {
"qId": "value",
"qName": "value",
"qConnectionString": "value",
"qType": "value",
"qUserName": "value",
"qPassword": "value",
"qModifiedDate": "value",
"qMeta": {
"qName": "value"
},
"qLogOn": "value"
}
});
// console.log(result);
true
GlobalOSName()
Returns the name of the operating system.
Returns
qReturn string | No description |
Errors
No description |
const result = await global.oSName({});
// console.log(result);
"value"
GlobalOSVersion()
Returns the version number of the operating system.
Returns
qReturn string | No description |
Errors
No description |
const result = await global.oSVersion({});
// console.log(result);
"value"
GlobalOpenDoc(qDocName, qUserName?, qPassword?, qSerial?, qNoData?)
Opens an app and checks if the app needs to be migrated (if the app is deprecated). The OpenDoc 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.
Backups
In Qlik Sense Desktop, apps are automatically backed up before a migration. The backup files are located in %userprofile%\Documents\Qlik\Sense\AppsBackup<Qlik Sense Desktop version>. In Qlik Sense Enterprise, no automatic back up is run. The back up should be done manually.
Parameters
qDocName string | The GUID (in Qlik Sense Enterprise) or Name (in Qlik Sense Desktop) of the app to retrieve. |
qUserName optional string | Name of the user that opens the app. |
qPassword optional string | Password of the user. |
qSerial optional string | Current Qlik Sense serial number. |
qNoData optional boolean | 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
qReturn | No description |
Errors
No description |
const result = await global.openDoc({
"qDocName": "value",
"qUserName": "value",
"qPassword": "value",
"qSerial": "value",
"qNoData": true
});
// console.log(result);
// result is an enigma model, for example: result.getLayout()
{
id: 'xyz',
handle: 1,
getLayout: () => {},
setProperties: () => {},
}
GlobalProductVersion()
Returns the Qlik Sense version number.
Returns
qReturn string | No description |
Errors
No description |
const result = await global.productVersion({});
// console.log(result);
"value"
GlobalPublishApp(qAppId, qName, qStreamId)
Publishes an app to the supplied stream.
Parameters
qAppId string | The Id of the app to publish. |
qName string | The name of the app to publish. |
qStreamId string | The stream Id of the app to publish. |
Returns
Results for Global.PublishApp object | No description |
Errors
No description |
const result = await global.publishApp({
"qAppId": "value",
"qName": "value",
"qStreamId": "value"
});
// console.log(result);
undefined
GlobalQTProduct()
Returns the Qlik product name.
Returns
qReturn string | No description |
Errors
No description |
const result = await global.qTProduct({});
// console.log(result);
"value"
GlobalQvVersion()
Returns the Qlik Sense version number.
Returns
qReturn string | No description |
Errors
No description |
const result = await global.qvVersion({});
// console.log(result);
"value"
GlobalReloadExtensionList()
Reloads the list of extensions.
Returns
Results for Global.ReloadExtensionList object | No description |
Errors
No description |
const result = await global.reloadExtensionList({});
// console.log(result);
undefined
GlobalReplaceAppFromID(qTargetAppId, qSrcAppID, qIds)
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.
Parameters
qTargetAppId string | Identifier (GUID) of the target app. The target app is the app to be replaced. |
qSrcAppID string | Identifier (GUID) of the source app. The objects in the source app will replace the objects in the target app. |
qIds Array<string> | 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
qSuccess boolean | No description |
Errors
No description |
const result = await global.replaceAppFromID({
"qTargetAppId": "value",
"qSrcAppID": "value",
"qIds": [
"value"
]
});
// console.log(result);
true
GlobalSaveAs(qNewAppName)
Save a copy of an app with a different name. Can be used to save a session app as an ordinary app.
Parameters
qNewAppName string | <Name of the saved app> |
Returns
qNewAppId string | No description |
Errors
No description |
const result = await global.saveAs({
"qNewAppName": "value"
});
// console.log(result);
"value"
GlobalShutdownProcess()
Shuts down the Qlik engine.
Returns
Results for Global.ShutdownProcess object | No description |
Errors
No description |
const result = await global.shutdownProcess({});
// console.log(result);
undefined