Qlik Sense Engine (qix)
The JSON-RPC API over WebSocket API that enables you to interact with the Qlik Associative Engine for Qlik Sense applications.
Global
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.
Response
objectErrors
arrayAbortAll()
const result = await global.AbortAll({})
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "AbortAll"
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {}
}
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
- qRequestIdintegerRequired
Identifier of request to abort.
Response
objectErrors
arrayAbortRequest(qRequestId)
const result = await global.AbortRequest([
123
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "AbortRequest",
"params": {
"qRequestId": 123
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {}
}
Indicates whether or not a user is able to create an app.
Response
- qReturnboolean
Errors
arrayAllowCreateApp()
const result = await global.AllowCreateApp({})
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "AllowCreateApp"
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qReturn": true
}
}
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.
Parameters
- qReasonstring
Reason for why the reload was cancelled. This will be echoed back to the user in the script log.
Response
objectErrors
arrayCancelReload(qReason?)
const result = await global.CancelReload([
"value"
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "CancelReload",
"params": {
"qReason": "value"
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {}
}
Cancels an ongoing request. The request is stopped.
Parameters
- qRequestIdintegerRequired
Identifier of the request to stop.
Response
objectErrors
arrayCancelRequest(qRequestId)
const result = await global.CancelRequest([
123
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "CancelRequest",
"params": {
"qRequestId": 123
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {}
}
Configures the engine's behavior during a reload.
Parameters
- qCancelOnScriptErrorbooleanRequired
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.
- qUseErrorDatabooleanRequired
If set to true, any script execution error is returned in qErrorData by the GetProgress method.
- qInteractOnErrorbooleanRequired
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).
Response
objectErrors
arrayConfigureReload(qCancelOnScriptError, qUseErrorData, qInteractOnError)
const result = await global.ConfigureReload([
true,
true,
true
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "ConfigureReload",
"params": {
"qCancelOnScriptError": true,
"qUseErrorData": true,
"qInteractOnError": true
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {}
}
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
- qTargetAppIdstringRequired
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.
- qSrcAppIdstringRequired
Identifier (GUID) of the source app in the Qlik Sense repository.
- qIdsarray of stringsRequired
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.
Response
- qSuccessboolean
Errors
arrayCopyApp(qTargetAppId, qSrcAppId, qIds)
const result = await global.CopyApp([
"value",
"value",
[
"value"
]
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "CopyApp",
"params": {
"qTargetAppId": "value",
"qSrcAppId": "value",
"qIds": [
"value"
]
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qSuccess": true
}
}
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
- qAppNamestringRequired
Name of the app.
- qLocalizedScriptMainSectionstring
Name of the first section in the script editor. The default value is Main.
- qLocalestring
Set custom locale for the app instead of system default.
Response
- qSuccessboolean
- qAppIdstring
Errors
arrayCreateApp(qAppName, qLocalizedScriptMainSection?, qLocale?)
const result = await global.CreateApp([
"value",
"value",
"value"
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "CreateApp",
"params": {
"qAppName": "value",
"qLocalizedScriptMainSection": "value",
"qLocale": "value"
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qSuccess": true,
"qAppId": "value"
}
}
Creates an app and opens an engine session.
Parameters
- qDocNamestringRequired
Name of the app.
- qUserNamestring
Name of the user.
- qPasswordstring
Password of the user.
- qSerialstring
Current Qlik Sense serial number.
- qLocalizedScriptMainSectionstring
Name of the first section in the script editor. The default value is Main.
Response
- qDocIdstring
- qReturnobject
qReturn properties
- qTypestring
The native type of the object.
- qHandleinteger
The handle used to connect to object.
- qGenericTypestring
The type of the object.
- qGenericIdstring
Object ID.
-
Errors
arrayCreateDocEx(qDocName, qUserName?, qPassword?, qSerial?, qLocalizedScriptMainSection?)
const result = await global.CreateDocEx([
"value",
"value",
"value",
"value",
"value"
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "CreateDocEx",
"params": {
"qDocName": "value",
"qUserName": "value",
"qPassword": "value",
"qSerial": "value",
"qLocalizedScriptMainSection": "value"
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qDocId": "value",
"qReturn": {
"qType": "value",
"qHandle": 123,
"qGenericType": "value",
"qGenericId": "value"
}
}
}
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.
Response
- qSessionAppIdstring
- qReturnobject
qReturn properties
- qTypestring
The native type of the object.
- qHandleinteger
The handle used to connect to object.
- qGenericTypestring
The type of the object.
- qGenericIdstring
Object ID.
-
Errors
arrayCreateSessionApp()
const result = await global.CreateSessionApp({})
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "CreateSessionApp"
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qSessionAppId": "value",
"qReturn": {
"qType": "value",
"qHandle": 123,
"qGenericType": "value",
"qGenericId": "value"
}
}
}
Creates a session app from a source app. The following applies:
- The objects in the source app are copied into the session app.
- There is no data in the session app, unless it is reloaded.
- 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
- qSrcAppIdstringRequired
App identifier of the source app. It corresponds to qAppId returned by the CreateApp method when creating the source app.
Response
- qSessionAppIdstring
- qReturnobject
qReturn properties
- qTypestring
The native type of the object.
- qHandleinteger
The handle used to connect to object.
- qGenericTypestring
The type of the object.
- qGenericIdstring
Object ID.
-
Errors
arrayCreateSessionAppFromApp(qSrcAppId)
const result = await global.CreateSessionAppFromApp([
"value"
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "CreateSessionAppFromApp",
"params": {
"qSrcAppId": "value"
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qSessionAppId": "value",
"qReturn": {
"qType": "value",
"qHandle": 123,
"qGenericType": "value",
"qGenericId": "value"
}
}
}
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
- qAppIdstringRequired
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.
Response
- qSuccessboolean
Errors
arrayDeleteApp(qAppId)
const result = await global.DeleteApp([
"value"
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "DeleteApp",
"params": {
"qAppId": "value"
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qSuccess": true
}
}
Returns the version number of the Qlik engine component.
Response
- qVersionobject
qVersion properties
- qComponentVersionstring
Version number of the Qlik engine component.
-
Errors
arrayEngineVersion()
const result = await global.EngineVersion({})
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "EngineVersion"
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qVersion": {
"qComponentVersion": "value"
}
}
}
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
- qTargetPathstringRequired
Path and name of the target app.
- qSrcAppIdstringRequired
Identifier of the source app. The identifier is a GUID from the Qlik Sense repository.
- qIdsarray of stringsRequired
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.
- qNoDataboolean
Set this parameter to true if the data should be omitted in the exported app.
Response
- qSuccessboolean
Errors
arrayExportApp(qTargetPath, qSrcAppId, qIds, qNoData?)
const result = await global.ExportApp([
"value",
"value",
[
"value"
],
true
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "ExportApp",
"params": {
"qTargetPath": "value",
"qSrcAppId": "value",
"qIds": [
"value"
],
"qNoData": true
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qSuccess": true
}
}
Returns the handle of the current app.
Response
- qReturnobject
qReturn properties
- qTypestring
The native type of the object.
- qHandleinteger
The handle used to connect to object.
- qGenericTypestring
The type of the object.
- qGenericIdstring
Object ID.
-
Errors
arrayGetActiveDoc()
const result = await global.GetActiveDoc({})
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "GetActiveDoc"
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qReturn": {
"qType": "value",
"qHandle": 123,
"qGenericType": "value",
"qGenericId": "value"
}
}
}
Retrieves the meta data of an app.
Parameters
- qAppIDstringRequired
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)
Response
- qEntryobject
qEntry properties
- qIDstring
Identifier of the app.
- qTitlestring
Title of the app.
- qPathstring
Path of the app.
- qLastReloadTimestring
Last reload time of the app.
- qReadOnlyboolean
Is set to true if the app is read-only.
- qMetaobject
Layout for NxMetaDef.
qMeta properties
- qNamestring
Name. This property is optional.
-
- qThumbnailobjectIn addition, this structure can return dynamic properties.
qThumbnail properties
- qUrlstring
Relative path of the thumbnail.
-
- qFileSizeinteger
- qHasSectionAccessboolean
If true the app has section access configured.
-
Errors
arrayGetAppEntry(qAppID)
const result = await global.GetAppEntry([
"value"
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "GetAppEntry",
"params": {
"qAppID": "value"
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qEntry": {
"qID": "value",
"qTitle": "value",
"qPath": "value",
"qLastReloadTime": "value",
"qReadOnly": true,
"qMeta": {
"qName": "value"
},
"qThumbnail": {
"qUrl": "value"
},
"qFileSize": 123,
"qHasSectionAccess": true
}
}
}
Retrieves information about the authenticated user.
Response
- qReturnstring
Errors
arrayGetAuthenticatedUser()
const result = await global.GetAuthenticatedUser({})
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "GetAuthenticatedUser"
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qReturn": "value"
}
}
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
- qBnfTypestringRequired
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
Response
- qBnfDefsarray of objects
qBnfDefs properties
- qBnfarray of integers
Array of token references that all together build up the definition of the current token. Generally, if the array is not empty, the definition is a BNF rule (qIsBnfRule is set to true). However, some BNF rules do have an empty array (qIsBnfRule is set to true, but qBnf is empty).
- qNbrinteger
Number of the current token definition.
- qPNbrinteger
Number of the parent rule definition.
- qHelpIdinteger
Reference identifier to a function described in the documentation. The identifier is stored in the definition of the token containing the function name. Is not used in Qlik Sense.
- qNamestring
Token name. One of:
- A rule name
- An identifier
- A literal value
- qStrstring
Literal string of the token. Examples: 'Round' and '('.
- qIsBnfRuleboolean
If set to true, a list of related rule tokens is assigned to qBnf . This parameter is optional. The default value is false.
- qScriptStatementboolean
If set to true, the definition specifies a script statement. This parameter is optional. The default value is false.
- qControlStatementboolean
If set to true, the definition specifies a control statement. This parameter is optional. The default value is false.
- qBnfLiteralboolean
If set to true, the definition specifies a literal token. This parameter is optional. The default value is false.
- qQvFuncboolean
If set to true, the definition is related to a Qlik Sense function. It cannot be an aggregation function. This parameter is optional. The default value is false.
- qAggrFuncboolean
If set to true, the definition is related to an aggregation function. This parameter is optional. The default value is false.
- qFGstring
Can be one of: "ALL""U""NONE""AGGR""NUM""RNG""EXP""TRIG""FIN""MATH""COUNT""STR""MAPP""RCRD""CND""LOG""NULL""SYS""FILE""TBL""DATE""NUMI""FRMT""CLR""RNK""GEO""EXT""PROB""ARRAY""LEG""DB""WINDOW"
- qFieldFlagboolean
If set to true, the definition is related to a field. This parameter is optional. The default value is false.
- qMTstring
Can be one of: "N""D""R""V"
- qDeprboolean
Indicates whether a script statement, a chart or a script function is deprecated (not recommended for use). If set to true, the script statement or the function is not recommended for use in Qlik Sense. This parameter is optional. The default value is false.
- qFGListarray of strings
List of groups the function belongs to.
Values may be any of: "ALL""U""NONE""AGGR""NUM""RNG""EXP""TRIG""FIN""MATH""COUNT""STR""MAPP""RCRD""CND""LOG""NULL""SYS""FILE""TBL""DATE""NUMI""FRMT""CLR""RNK""GEO""EXT""PROB""ARRAY""LEG""DB""WINDOW"
-
Errors
arrayGetBNF(qBnfType)
const result = await global.GetBNF([
"value"
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "GetBNF",
"params": {
"qBnfType": "value"
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qBnfDefs": [
{
"qBnf": [
123
],
"qNbr": 123,
"qPNbr": 123,
"qHelpId": 123,
"qName": "value",
"qStr": "value",
"qIsBnfRule": true,
"qScriptStatement": true,
"qControlStatement": true,
"qBnfLiteral": true,
"qQvFunc": true,
"qAggrFunc": true,
"qFG": "ALL",
"qFieldFlag": true,
"qMT": "N",
"qDepr": true,
"qFGList": [
"ALL"
]
}
]
}
}
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
- qBnfTypestringRequired
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
Response
- qBnfDefsarray of objects
qBnfDefs properties
- qBnfarray of integers
Array of token references that all together build up the definition of the current token. Generally, if the array is not empty, the definition is a BNF rule (qIsBnfRule is set to true). However, some BNF rules do have an empty array (qIsBnfRule is set to true, but qBnf is empty).
- qNbrinteger
Number of the current token definition.
- qPNbrinteger
Number of the parent rule definition.
- qHelpIdinteger
Reference identifier to a function described in the documentation. The identifier is stored in the definition of the token containing the function name. Is not used in Qlik Sense.
- qNamestring
Token name. One of:
- A rule name
- An identifier
- A literal value
- qStrstring
Literal string of the token. Examples: 'Round' and '('.
- qIsBnfRuleboolean
If set to true, a list of related rule tokens is assigned to qBnf . This parameter is optional. The default value is false.
- qScriptStatementboolean
If set to true, the definition specifies a script statement. This parameter is optional. The default value is false.
- qControlStatementboolean
If set to true, the definition specifies a control statement. This parameter is optional. The default value is false.
- qBnfLiteralboolean
If set to true, the definition specifies a literal token. This parameter is optional. The default value is false.
- qQvFuncboolean
If set to true, the definition is related to a Qlik Sense function. It cannot be an aggregation function. This parameter is optional. The default value is false.
- qAggrFuncboolean
If set to true, the definition is related to an aggregation function. This parameter is optional. The default value is false.
- qFGstring
Can be one of: "ALL""U""NONE""AGGR""NUM""RNG""EXP""TRIG""FIN""MATH""COUNT""STR""MAPP""RCRD""CND""LOG""NULL""SYS""FILE""TBL""DATE""NUMI""FRMT""CLR""RNK""GEO""EXT""PROB""ARRAY""LEG""DB""WINDOW"
- qFieldFlagboolean
If set to true, the definition is related to a field. This parameter is optional. The default value is false.
- qMTstring
Can be one of: "N""D""R""V"
- qDeprboolean
Indicates whether a script statement, a chart or a script function is deprecated (not recommended for use). If set to true, the script statement or the function is not recommended for use in Qlik Sense. This parameter is optional. The default value is false.
- qFGListarray of strings
List of groups the function belongs to.
Values may be any of: "ALL""U""NONE""AGGR""NUM""RNG""EXP""TRIG""FIN""MATH""COUNT""STR""MAPP""RCRD""CND""LOG""NULL""SYS""FILE""TBL""DATE""NUMI""FRMT""CLR""RNK""GEO""EXT""PROB""ARRAY""LEG""DB""WINDOW"
-
- qBnfHashstring
Errors
arrayGetBaseBNF(qBnfType)
const result = await global.GetBaseBNF([
"value"
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "GetBaseBNF",
"params": {
"qBnfType": "value"
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qBnfDefs": [
{
"qBnf": [
123
],
"qNbr": 123,
"qPNbr": 123,
"qHelpId": 123,
"qName": "value",
"qStr": "value",
"qIsBnfRule": true,
"qScriptStatement": true,
"qControlStatement": true,
"qBnfLiteral": true,
"qQvFunc": true,
"qAggrFunc": true,
"qFG": "ALL",
"qFieldFlag": true,
"qMT": "N",
"qDepr": true,
"qFGList": [
"ALL"
]
}
],
"qBnfHash": "value"
}
}
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
- qBnfTypestringRequired
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
Response
- qBnfHashstring
Errors
arrayGetBaseBNFHash(qBnfType)
const result = await global.GetBaseBNFHash([
"value"
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "GetBaseBNFHash",
"params": {
"qBnfType": "value"
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qBnfHash": "value"
}
}
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
- qBnfTypestringRequired
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
Response
- qBnfStrstring
- qBnfHashstring
Errors
arrayGetBaseBNFString(qBnfType)
const result = await global.GetBaseBNFString([
"value"
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "GetBaseBNFString",
"params": {
"qBnfType": "value"
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qBnfStr": "value",
"qBnfHash": "value"
}
}
List the custom connectors available in the system.
Parameters
- qReloadListboolean
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.
Response
- qConnectorsarray of objects
qConnectors properties
- qProviderstring
Name of the custom connector file.
- qParentstring
Name of the parent folder that contains the custom connector file.
- qDisplayNamestring
Name of the custom connector as displayed in the Qlik interface.
- qMachineModestring
Can be one of: "CONNECT_DEFAULT""CONNECT_64""CONNECT_32"
- qSupportFileStreamingboolean
-
Errors
arrayGetCustomConnectors(qReloadList?)
const result = await global.GetCustomConnectors([
true
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "GetCustomConnectors",
"params": {
"qReloadList": true
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qConnectors": [
{
"qProvider": "value",
"qParent": "value",
"qDisplayName": "value",
"qMachineMode": "CONNECT_DEFAULT",
"qSupportFileStreaming": true
}
]
}
}
Lists the databases in a ODBC, OLEDB or CUSTOM data source.
Parameters
- qConnectionobjectRequired
Information about the connection.
qConnection properties
- qIdstring
Identifier of the connection. Is generated by the engine and is unique.
- qNamestring
Name of the connection. This parameter is mandatory and must be set when creating or modifying a connection.
- qConnectionStringstring
One of:
- ODBC CONNECT TO [<provider name>]
- OLEDB CONNECT TO [<provider name>]
- CUSTOM CONNECT TO [<provider name>]
- "<local absolute or relative path, UNC path>"
- "<URL>"
Connection string. This parameter is mandatory and must be set when creating or modifying a connection.
- qTypestring
One of:
- ODBC
- OLEDB
- <Name of the custom connection file>
- folder
- internet
Type of the connection. This parameter is mandatory and must be set when creating or modifying a connection. For ODBC, OLEDB and custom connections, the engine checks that the connection type matches the connection string. The type is not case sensitive.
- qUserNamestring
Name of the user who creates the connection. This parameter is optional; it is only used for OLEDB, ODBC and CUSTOM connections. A call to GetConnection Method does not return the user name.
- qPasswordstring
Password of the user who creates the connection. This parameter is optional; it is only used for OLEDB, ODBC and CUSTOM connections. A call to GetConnection Method does not return the password.
- qModifiedDatestring
Is generated by the engine. Creation date of the connection or last modification date of the connection.
- qMetaobject
Layout for NxMetaDef.
qMeta properties
- qNamestring
Name. This property is optional.
-
- qLogOnstring
Can be one of: "LOG_ON_SERVICE_USER""LOG_ON_CURRENT_USER"
-
Response
- qDatabasesarray of objects
qDatabases properties
- qNamestring
Name of the database.
- qIsDefaultboolean
Is set to true if the database is set by default.
-
Errors
arrayGetDatabasesFromConnectionString(qConnection)
const result = await global.GetDatabasesFromConnectionString([
{
"qId": "value",
"qName": "value",
"qConnectionString": "value",
"qType": "value",
"qUserName": "value",
"qPassword": "value",
"qModifiedDate": "value",
"qMeta": {
"qName": "value"
},
"qLogOn": "LOG_ON_SERVICE_USER"
}
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "GetDatabasesFromConnectionString",
"params": {
"qConnection": {
"qId": "value",
"qName": "value",
"qConnectionString": "value",
"qType": "value",
"qUserName": "value",
"qPassword": "value",
"qModifiedDate": "value",
"qMeta": {
"qName": "value"
},
"qLogOn": "LOG_ON_SERVICE_USER"
}
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qDatabases": [
{
"qName": "value",
"qIsDefault": true
}
]
}
}
Returns the folder where the apps are stored.
Response
- qPathstring
Errors
arrayGetDefaultAppFolder()
const result = await global.GetDefaultAppFolder({})
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "GetDefaultAppFolder"
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qPath": "value"
}
}
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.
Response
- qDocListarray of objects
qDocList properties
- qDocNamestring
Name of the app.
- qConnectedUsersinteger
Not used.
- qFileTimenumber
Last modified time stamp of the app. This property is used only with Qlik Sense Desktop. It is set to 0 for Qlik Sense Enterprise.
- qFileSizenumber
Size of remote app. This property is used only with Qlik Sense Desktop. It is set to 0 for Qlik Sense Enterprise.
- qDocIdstring
Identifier of the app.
- In Qlik Sense Desktop, the identifier is the path and name of the app.
- In Qlik Sense Enterprise, the identifier is the app's GUID.
- qMetaobject
Layout for NxMetaDef.
qMeta properties
- qNamestring
Name. This property is optional.
-
- qLastReloadTimestring
Last reload time of the app.
- qReadOnlyboolean
If set to true, the app is read-only.
- qTitlestring
Title of the app.
- qThumbnailobjectIn addition, this structure can return dynamic properties.
qThumbnail properties
- qUrlstring
Relative path of the thumbnail.
-
- qHasSectionAccessboolean
If true the app has section access configured.
- qIsDirectQueryModeboolean
Is the app a Direct Query app?
- qUsagestring
Can be one of: "ANALYTICS""DATA_PREPARATION""DATAFLOW_PREP""SINGLE_TABLE_PREP"
-
Errors
arrayGetDocList()
const result = await global.GetDocList({})
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "GetDocList"
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qDocList": [
{
"qDocName": "value",
"qConnectedUsers": 123,
"qFileTime": 123,
"qFileSize": 123,
"qDocId": "value",
"qMeta": {
"qName": "value"
},
"qLastReloadTime": "value",
"qReadOnly": true,
"qTitle": "value",
"qThumbnail": {
"qUrl": "value"
},
"qHasSectionAccess": true,
"qIsDirectQueryMode": true,
"qUsage": "ANALYTICS"
}
]
}
}
Returns the files and folders located at a specified path.
Parameters
- qPathstringRequired
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.
Response
- qFolderItemsarray of objects
qFolderItems properties
- qNamestring
Name of the folder item.
- qTypestring
Can be one of: "FOLDER""FILE""OTHER"
-
Errors
arrayGetFolderItemsForPath(qPath)
const result = await global.GetFolderItemsForPath([
"value"
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "GetFolderItemsForPath",
"params": {
"qPath": "value"
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qFolderItems": [
{
"qName": "value",
"qType": "FOLDER"
}
]
}
}
Gets the list of all the script functions.
Parameters
- qGroupstring
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
- DB or FUNC_GROUP_DB_NATIVE
- WINDOW or FUNC_GROUP_WINDOW
Response
- qFunctionsarray of objects
qFunctions properties
- qNamestring
Name of the script function.
- qGroupstring
Can be one of: "ALL""U""NONE""AGGR""NUM""RNG""EXP""TRIG""FIN""MATH""COUNT""STR""MAPP""RCRD""CND""LOG""NULL""SYS""FILE""TBL""DATE""NUMI""FRMT""CLR""RNK""GEO""EXT""PROB""ARRAY""LEG""DB""WINDOW"
- qSignaturestring
Signature of the script function. Gives general information about the function.
-
Errors
arrayGetFunctions(qGroup?)
const result = await global.GetFunctions([
"value"
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "GetFunctions",
"params": {
"qGroup": "value"
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qFunctions": [
{
"qName": "value",
"qGroup": "ALL",
"qSignature": "value"
}
]
}
}
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.
Parameters
- qRequestIdintegerRequired
Identifier of the request. Corresponds to the identifier of the DoReload request.
Response
- qDefobject
qDef properties
- qTypestring
Can be one of: "IT_MSGBOX""IT_SCRIPTLINE""IT_BREAK""IT_INPUT""IT_END""IT_PASSWD""IT_USERNAME"
- qTitlestring
Title used in the message box dialog. This property is relevant if qType is IT_MSGBOX.
- qMsgstring
Message used in the message box dialog. This property is relevant if qType is IT_MSGBOX.
- qButtonsinteger
Buttons displayed in the message box dialog. This property is relevant if qType is IT_MSGBOX. One of:
- 0 means that the qButtons property is not relevant.
- 17 means that the message box contains the OK and Cancel buttons or the stop -sign icon.
- qLinestring
Next script statement to be executed. This property is used if the type of interaction is IT_SCRIPTLINE.
- qOldLineNrinteger
First line number of the previously executed statement. This property is used if the type of interaction is IT_SCRIPTLINE.
- qNewLineNrinteger
First line number of the next statement to be executed. This property is used if the type of interaction is IT_SCRIPTLINE.
- qPathstring
Path specified by the Include script variable. This property is used if the type of interaction is IT_SCRIPTLINE. Example of an Include variable: $(Include=lib:\\MyDataFiles\abc.txt);
- qHiddenboolean
This property is set to true if the returned statement is an hidden script statement.
- qResultinteger
Not relevant for describing the requested user interaction.
- qInputstring
Is not used in Qlik Sense.
-
- qReturnboolean
Errors
arrayGetInteract(qRequestId)
const result = await global.GetInteract([
123
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "GetInteract",
"params": {
"qRequestId": 123
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qDef": {
"qType": "IT_MSGBOX",
"qTitle": "value",
"qMsg": "value",
"qButtons": 123,
"qLine": "value",
"qOldLineNr": 123,
"qNewLineNr": 123,
"qPath": "value",
"qHidden": true,
"qResult": 123,
"qInput": "value"
},
"qReturn": true
}
}
Lists the logical drives in the system.
Response
- qDrivesarray of objects
qDrives properties
- qDrivestring
Value of the drive. Examples: C:\, E:\\
- qTypestring
Type of the drive. Fixed means physical drive.
- qNamestring
Name of the drive.
- qTypeIdentifierstring
Can be one of: "REMOVABLE""FIXED""NETWORK""CD_ROM""RAM""UNKNOWN_TYPE"
- qUnnamedDriveboolean
-
Errors
arrayGetLogicalDriveStrings()
const result = await global.GetLogicalDriveStrings({})
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "GetLogicalDriveStrings"
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qDrives": [
{
"qDrive": "value",
"qType": "value",
"qName": "value",
"qTypeIdentifier": "REMOVABLE",
"qUnnamedDrive": true
}
]
}
}
Returns the list of the ODBC connectors that are installed in the system.
Response
- qOdbcDsnsarray of objects
qOdbcDsns properties
- qNamestring
Name of the ODBC connection.
- qDescriptionstring
Description of the ODBC connection.
- qBit32boolean
Is set to true if the version of ODBC is 32-bit. This parameter is optional. Default is false.
- qUserOnlyboolean
Is set to true if the connection is User DSN. The connection works only for a specific user. Default is false. This parameter is optional.
-
Errors
arrayGetOdbcDsns()
const result = await global.GetOdbcDsns({})
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "GetOdbcDsns"
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qOdbcDsns": [
{
"qName": "value",
"qDescription": "value",
"qBit32": true,
"qUserOnly": true
}
]
}
}
Returns the list of the OLEDB providers installed on the system.
Response
- qOleDbProvidersarray of objects
qOleDbProviders properties
- qNamestring
Name of the OLEDB provider.
- qDescriptionstring
Description of the OLEDB provider.
- qBit32boolean
Is set to true if the version of the OLEDB provider is 32-bit. Default is false. This parameter is optional.
-
Errors
arrayGetOleDbProviders()
const result = await global.GetOleDbProviders({})
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "GetOleDbProviders"
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qOleDbProviders": [
{
"qName": "value",
"qDescription": "value",
"qBit32": true
}
]
}
}
Gives information about the progress of the DoReload and DoSave calls.
Parameters
- qRequestIdintegerRequired
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.
Response
- qProgressDataobject
qProgressData properties
- qStartedboolean
True if the request is started.
- qFinishedboolean
True if the request is finished.
- qCompletedinteger
This property is not used.
- qTotalinteger
This property is not used.
- qKBinteger
This property is not used.
- qMillisecsinteger
Request duration in milliseconds.
- qUserInteractionWantedboolean
True when the engine pauses the script execution and waits for a user interaction.
- qPersistentProgressstring
A progress message is persistent when it informs about the start or end of a statement. For example, it can inform about the total number of lines fetched from a data source or tell that the app was saved. All persistent progress messages between two GetProgress calls are summarized in this string. Contrarily to qPersistentProgressMessages, the content of the localized message string is displayed (not its message code).
- qTransientProgressstring
A progress message is transient when it informs about the progress of an ongoing statement. For example, it can tell how many lines are currently fetched from a data source. All transient progress messages between two GetProgress calls are summarized in this string. Contrarily to qTransientProgressMessage, the content of the localized message string is displayed (not its message code).
- qErrorDataarray of objects
Information about the error messages that occur during the script execution.
qErrorData properties
- qErrorStringstring
Detailed information about the error message.
- qLineEndstring
Line termination characters.
- qLinestring
Script statement where the error occurs.
- qErrorDataCodestring
Can be one of: "EDC_ERROR""EDC_WARNING""EDC_CIRCULAR_REFERENCE"
- qMessageobject
qMessage properties
- qMessageCodeinteger
Code number to the corresponding localized message string.
- qMessageParametersarray of strings
Parameters to be inserted in the localized message string.
-
-
- qPersistentProgressMessagesarray of objects
List of persistent progress messages.
qPersistentProgressMessages properties
- qMessageCodeinteger
Code number to the corresponding localized message string.
- qMessageParametersarray of strings
Parameters to be inserted in the localized message string.
-
- qTransientProgressMessageobject
qTransientProgressMessage properties
- qMessageCodeinteger
Code number to the corresponding localized message string.
- qMessageParametersarray of strings
Parameters to be inserted in the localized message string.
-
-
Errors
arrayGetProgress(qRequestId)
const result = await global.GetProgress([
123
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "GetProgress",
"params": {
"qRequestId": 123
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qProgressData": {
"qStarted": true,
"qFinished": true,
"qCompleted": 123,
"qTotal": 123,
"qKB": 123,
"qMillisecs": 123,
"qUserInteractionWanted": true,
"qPersistentProgress": "value",
"qTransientProgress": "value",
"qErrorData": [
{
"qErrorString": "value",
"qLineEnd": "value",
"qLine": "value",
"qErrorDataCode": "EDC_ERROR",
"qMessage": {
"qMessageCode": 123,
"qMessageParameters": [
"value"
]
}
}
],
"qPersistentProgressMessages": [
{
"qMessageCode": 123,
"qMessageParameters": [
"value"
]
}
],
"qTransientProgressMessage": {
"qMessageCode": 123,
"qMessageParameters": [
"value"
]
}
}
}
}
Lists the streams.
Response
- qStreamListarray of objectsDeprecatedThis struct is deprecated (not recommended to use).
qStreamList properties
- qNamestring
Name of the stream.
- qIdstring
Identifier of the stream.
-
Errors
arrayGetStreamList()
const result = await global.GetStreamList({})
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "GetStreamList"
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qStreamList": [
{
"qName": "value",
"qId": "value"
}
]
}
}
Lists the supported code pages.
Response
- qCodePagesarray of objects
qCodePages properties
- qNumberinteger
Number of the code page.
- qNamestring
Name of the code page.
- qDescriptionstring
Description of the code page.
-
Errors
arrayGetSupportedCodePages()
const result = await global.GetSupportedCodePages({})
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "GetSupportedCodePages"
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qCodePages": [
{
"qNumber": 123,
"qName": "value",
"qDescription": "value"
}
]
}
}
Returns the unique identifier of the endpoint for the current user in the current app.
Response
- qUniqueIDstring
Errors
arrayGetUniqueID()
const result = await global.GetUniqueID({})
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "GetUniqueID"
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qUniqueID": "value"
}
}
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
- qRequestIdintegerRequired
Identifier of the request. Corresponds to the identifier of the DoReload request.
- qDefobjectRequired
User response to the current interaction.
qDef properties
- qTypestring
Can be one of: "IT_MSGBOX""IT_SCRIPTLINE""IT_BREAK""IT_INPUT""IT_END""IT_PASSWD""IT_USERNAME"
- qTitlestring
Title used in the message box dialog. This property is relevant if qType is IT_MSGBOX.
- qMsgstring
Message used in the message box dialog. This property is relevant if qType is IT_MSGBOX.
- qButtonsinteger
Buttons displayed in the message box dialog. This property is relevant if qType is IT_MSGBOX. One of:
- 0 means that the qButtons property is not relevant.
- 17 means that the message box contains the OK and Cancel buttons or the stop -sign icon.
- qLinestring
Next script statement to be executed. This property is used if the type of interaction is IT_SCRIPTLINE.
- qOldLineNrinteger
First line number of the previously executed statement. This property is used if the type of interaction is IT_SCRIPTLINE.
- qNewLineNrinteger
First line number of the next statement to be executed. This property is used if the type of interaction is IT_SCRIPTLINE.
- qPathstring
Path specified by the Include script variable. This property is used if the type of interaction is IT_SCRIPTLINE. Example of an Include variable: $(Include=lib:\\MyDataFiles\abc.txt);
- qHiddenboolean
This property is set to true if the returned statement is an hidden script statement.
- qResultinteger
Not relevant for describing the requested user interaction.
- qInputstring
Is not used in Qlik Sense.
-
Response
objectErrors
arrayInteractDone(qRequestId, qDef)
const result = await global.InteractDone([
123,
{
"qType": "IT_MSGBOX",
"qTitle": "value",
"qMsg": "value",
"qButtons": 123,
"qLine": "value",
"qOldLineNr": 123,
"qNewLineNr": 123,
"qPath": "value",
"qHidden": true,
"qResult": 123,
"qInput": "value"
}
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "InteractDone",
"params": {
"qRequestId": 123,
"qDef": {
"qType": "IT_MSGBOX",
"qTitle": "value",
"qMsg": "value",
"qButtons": 123,
"qLine": "value",
"qOldLineNr": 123,
"qNewLineNr": 123,
"qPath": "value",
"qHidden": true,
"qResult": 123,
"qInput": "value"
}
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {}
}
Indicates whether the user is working in Qlik Sense Desktop.
Response
- qReturnboolean
Errors
arrayIsDesktopMode()
const result = await global.IsDesktopMode({})
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "IsDesktopMode"
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qReturn": true
}
}
Indicates whether or not the user is working in personal mode (Qlik Sense Desktop).
Response
- qReturnboolean
Errors
arrayIsPersonalMode()
const result = await global.IsPersonalMode({})
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "IsPersonalMode"
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qReturn": true
}
}
Checks if a connection string is valid.
Parameters
- qConnectionobjectRequired
Information about the connection.
qConnection properties
- qIdstring
Identifier of the connection. Is generated by the engine and is unique.
- qNamestring
Name of the connection. This parameter is mandatory and must be set when creating or modifying a connection.
- qConnectionStringstring
One of:
- ODBC CONNECT TO [<provider name>]
- OLEDB CONNECT TO [<provider name>]
- CUSTOM CONNECT TO [<provider name>]
- "<local absolute or relative path, UNC path>"
- "<URL>"
Connection string. This parameter is mandatory and must be set when creating or modifying a connection.
- qTypestring
One of:
- ODBC
- OLEDB
- <Name of the custom connection file>
- folder
- internet
Type of the connection. This parameter is mandatory and must be set when creating or modifying a connection. For ODBC, OLEDB and custom connections, the engine checks that the connection type matches the connection string. The type is not case sensitive.
- qUserNamestring
Name of the user who creates the connection. This parameter is optional; it is only used for OLEDB, ODBC and CUSTOM connections. A call to GetConnection Method does not return the user name.
- qPasswordstring
Password of the user who creates the connection. This parameter is optional; it is only used for OLEDB, ODBC and CUSTOM connections. A call to GetConnection Method does not return the password.
- qModifiedDatestring
Is generated by the engine. Creation date of the connection or last modification date of the connection.
- qMetaobject
Layout for NxMetaDef.
qMeta properties
- qNamestring
Name. This property is optional.
-
- qLogOnstring
Can be one of: "LOG_ON_SERVICE_USER""LOG_ON_CURRENT_USER"
-
Response
- qReturnboolean
Errors
arrayIsValidConnectionString(qConnection)
const result = await global.IsValidConnectionString([
{
"qId": "value",
"qName": "value",
"qConnectionString": "value",
"qType": "value",
"qUserName": "value",
"qPassword": "value",
"qModifiedDate": "value",
"qMeta": {
"qName": "value"
},
"qLogOn": "LOG_ON_SERVICE_USER"
}
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "IsValidConnectionString",
"params": {
"qConnection": {
"qId": "value",
"qName": "value",
"qConnectionString": "value",
"qType": "value",
"qUserName": "value",
"qPassword": "value",
"qModifiedDate": "value",
"qMeta": {
"qName": "value"
},
"qLogOn": "LOG_ON_SERVICE_USER"
}
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qReturn": true
}
}
OSName()
const result = await global.OSName({})
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "OSName"
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qReturn": "value"
}
}
Returns the version number of the operating system.
Response
- qReturnstring
Errors
arrayOSVersion()
const result = await global.OSVersion({})
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "OSVersion"
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qReturn": "value"
}
}
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.
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
- qDocNamestringRequired
The GUID (in Qlik Sense Enterprise) or Name (in Qlik Sense Desktop) of the app to retrieve.
- qUserNamestring
Name of the user that opens the app.
- qPasswordstring
Password of the user.
- qSerialstring
Current Qlik Sense serial number.
- qNoDataboolean
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.
Response
- qReturnobject
qReturn properties
- qTypestring
The native type of the object.
- qHandleinteger
The handle used to connect to object.
- qGenericTypestring
The type of the object.
- qGenericIdstring
Object ID.
-
Errors
arrayOpenDoc(qDocName, qUserName?, qPassword?, qSerial?, qNoData?)
const result = await global.OpenDoc([
"value",
"value",
"value",
"value",
true
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "OpenDoc",
"params": {
"qDocName": "value",
"qUserName": "value",
"qPassword": "value",
"qSerial": "value",
"qNoData": true
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qReturn": {
"qType": "value",
"qHandle": 123,
"qGenericType": "value",
"qGenericId": "value"
}
}
}
ProductVersion()
const result = await global.ProductVersion({})
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "ProductVersion"
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qReturn": "value"
}
}
Publishes an app to the supplied stream.
Parameters
- qAppIdstringRequired
The Id of the app to publish.
- qNamestringRequired
The name of the app to publish.
- qStreamIdstringRequired
The stream Id of the app to publish.
Response
objectErrors
arrayPublishApp(qAppId, qName, qStreamId)
const result = await global.PublishApp([
"value",
"value",
"value"
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "PublishApp",
"params": {
"qAppId": "value",
"qName": "value",
"qStreamId": "value"
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {}
}
QTProduct()
const result = await global.QTProduct({})
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "QTProduct"
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qReturn": "value"
}
}
QvVersion()
const result = await global.QvVersion({})
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "QvVersion"
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qReturn": "value"
}
}
ReloadExtensionList()
const result = await global.ReloadExtensionList({})
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "ReloadExtensionList"
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {}
}
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
- qTargetAppIdstringRequired
Identifier (GUID) of the target app. The target app is the app to be replaced.
- qSrcAppIDstringRequired
Identifier (GUID) of the source app. The objects in the source app will replace the objects in the target app.
- qIdsarray of stringsRequired
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.
Response
- qSuccessboolean
Errors
arrayReplaceAppFromID(qTargetAppId, qSrcAppID, qIds)
const result = await global.ReplaceAppFromID([
"value",
"value",
[
"value"
]
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "ReplaceAppFromID",
"params": {
"qTargetAppId": "value",
"qSrcAppID": "value",
"qIds": [
"value"
]
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qSuccess": true
}
}
Save a copy of an app with a different name. Can be used to save a session app as an ordinary app.
Parameters
- qNewAppNamestringRequired
<Name of the saved app>
Response
- qNewAppIdstring
Errors
arraySaveAs(qNewAppName)
const result = await global.SaveAs([
"value"
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "SaveAs",
"params": {
"qNewAppName": "value"
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qNewAppId": "value"
}
}
Shuts down the Qlik engine.
Response
objectErrors
arrayShutdownProcess()
const result = await global.ShutdownProcess({})
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "ShutdownProcess"
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {}
}