Qlik Sense Engine (qix)
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
- qRequestId integerRequired
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
- qReturn boolean
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
- qReason string
Reason for the cancellation of the reload. This information is 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
- qRequestId integerRequired
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
- qCancelOnScriptError booleanRequired
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 booleanRequired
If set to true, any script execution error is returned in qErrorData by the GetProgress method.
- qInteractOnError booleanRequired
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
- qTargetAppId stringRequired
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 stringRequired
Identifier (GUID) of the source app in the Qlik Sense repository.
- qIds array 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
- qSuccess boolean
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
- qAppName stringRequired
Name of the app.
- qLocalizedScriptMainSection string
Name of the first section in the script editor. The default value is Main.
- qLocale string
Set custom locale for the app instead of system default.
Response
- qSuccess boolean
- qAppId string
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
- qDocName stringRequired
Name of the app.
- qUserName string
Name of the user.
- qPassword string
Password of the user.
- qSerial string
Current Qlik Sense serial number.
- qLocalizedScriptMainSection string
Name of the first section in the script editor. The default value is Main.
Response
- qDocId string
- qReturn object
qReturn properties
- qType string
The native type of the object.
- qHandle integer
The handle used to connect to object.
- qGenericType string
The type of the object.
- qGenericId string
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
- qSessionAppId string
- qReturn object
qReturn properties
- qType string
The native type of the object.
- qHandle integer
The handle used to connect to object.
- qGenericType string
The type of the object.
- qGenericId string
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.
- The session app contains no data 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
- qSrcAppId stringRequired
App identifier of the source app. It corresponds to qAppId returned by the CreateApp method when creating the source app.
Response
- qSessionAppId string
- qReturn object
qReturn properties
- qType string
The native type of the object.
- qHandle integer
The handle used to connect to object.
- qGenericType string
The type of the object.
- qGenericId string
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
- qAppId stringRequired
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
- qSuccess boolean
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
- qVersion object
qVersion properties
- qComponentVersion string
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
- qTargetPath stringRequired
Path and name of the target app.
- qSrcAppId stringRequired
Identifier of the source app. The identifier is a GUID from the Qlik Sense repository.
- qIds array 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.
- qNoData boolean
Set this parameter to true if the data should be omitted in the exported app.
Response
- qSuccess boolean
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
- qReturn object
qReturn properties
- qType string
The native type of the object.
- qHandle integer
The handle used to connect to object.
- qGenericType string
The type of the object.
- qGenericId string
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 metadata of an app.
Parameters
- qAppID stringRequired
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
- qEntry object
qEntry properties
- qID string
Identifier of the app.
- qTitle string
Title of the app.
- qPath string
Path of the app.
- qLastReloadTime string
Last reload time of the app.
- qReadOnly boolean
Is set to true if the app is read-only.
- qMeta object
Layout for NxMetaDef.
qMeta properties
- qName string
Name. This property is optional.
-
- qThumbnail objectIn addition, this structure can return dynamic properties.
qThumbnail properties
- qUrl string
Relative path of the thumbnail.
-
- qFileSize integer
- qHasSectionAccess boolean
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
- qReturn string
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
- qBnfType stringRequired
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
- qBnfDefs array of objects
qBnfDefs properties
- qBnf array 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).
- qNbr integer
Number of the current token definition.
- qPNbr integer
Number of the parent rule definition.
- qHelpId integer
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.
- qName string
Token name. One of:
- A rule name
- An identifier
- A literal value
- qStr string
Literal string of the token. Examples: 'Round' and '('.
- qIsBnfRule boolean
If set to true, a list of related rule tokens is assigned to qBnf . This parameter is optional. The default value is false.
- qScriptStatement boolean
If set to true, the definition specifies a script statement. This parameter is optional. The default value is false.
- qControlStatement boolean
If set to true, the definition specifies a control statement. This parameter is optional. The default value is false.
- qBnfLiteral boolean
If set to true, the definition specifies a literal token. This parameter is optional. The default value is false.
- qQvFunc boolean
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.
- qAggrFunc boolean
If set to true, the definition is related to an aggregation function. This parameter is optional. The default value is false.
- qFG string
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"
- qFieldFlag boolean
If set to true, the definition is related to a field. This parameter is optional. The default value is false.
- qMT string
Can be one of: "N""D""R""V"
- qDepr boolean
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.
- qFGList array 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": false, "qScriptStatement": false, "qControlStatement": false, "qBnfLiteral": false, "qQvFunc": false, "qAggrFunc": false, "qFG": "ALL", "qFieldFlag": false, "qMT": "N", "qDepr": false, "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
- qBnfType stringRequired
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
- qBnfDefs array of objects
qBnfDefs properties
- qBnf array 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).
- qNbr integer
Number of the current token definition.
- qPNbr integer
Number of the parent rule definition.
- qHelpId integer
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.
- qName string
Token name. One of:
- A rule name
- An identifier
- A literal value
- qStr string
Literal string of the token. Examples: 'Round' and '('.
- qIsBnfRule boolean
If set to true, a list of related rule tokens is assigned to qBnf . This parameter is optional. The default value is false.
- qScriptStatement boolean
If set to true, the definition specifies a script statement. This parameter is optional. The default value is false.
- qControlStatement boolean
If set to true, the definition specifies a control statement. This parameter is optional. The default value is false.
- qBnfLiteral boolean
If set to true, the definition specifies a literal token. This parameter is optional. The default value is false.
- qQvFunc boolean
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.
- qAggrFunc boolean
If set to true, the definition is related to an aggregation function. This parameter is optional. The default value is false.
- qFG string
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"
- qFieldFlag boolean
If set to true, the definition is related to a field. This parameter is optional. The default value is false.
- qMT string
Can be one of: "N""D""R""V"
- qDepr boolean
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.
- qFGList array 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"
-
- qBnfHash string
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": false, "qScriptStatement": false, "qControlStatement": false, "qBnfLiteral": false, "qQvFunc": false, "qAggrFunc": false, "qFG": "ALL", "qFieldFlag": false, "qMT": "N", "qDepr": false, "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
- qBnfType stringRequired
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
- qBnfHash string
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
- qBnfType stringRequired
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
- qBnfStr string
- qBnfHash string
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
- qReloadList 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.
Response
- qConnectors array of objects
qConnectors properties
- qProvider string
Name of the custom connector file.
- qParent string
Name of the parent folder that contains the custom connector file.
- qDisplayName string
Name of the custom connector as displayed in the Qlik interface.
- qMachineMode string
Can be one of: "CONNECT_DEFAULT""CONNECT_64""CONNECT_32"
- qSupportFileStreaming boolean
-
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
- qConnection objectRequired
Information about the connection.
qConnection properties
- qId string
Identifier of the connection. Is generated by the engine and is unique.
- qName string
Name of the connection. This parameter is mandatory and must be set when creating or modifying a connection.
- qConnectionString string
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.
- qType string
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.
- qUserName string
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.
- qPassword string
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.
- qModifiedDate string
Is generated by the engine. Creation date of the connection or last modification date of the connection.
- qMeta object
Layout for NxMetaDef.
qMeta properties
- qName string
Name. This property is optional.
-
- qLogOn string
Can be one of: "LOG_ON_SERVICE_USER""LOG_ON_CURRENT_USER"
-
Response
- qDatabases array of objects
qDatabases properties
- qName string
Name of the database.
- qIsDefault boolean
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
- qPath string
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
- qDocList array of objects
qDocList properties
- qDocName string
Name of the app.
- qConnectedUsers integer
Not used.
- qFileTime number
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.
- qFileSize number
Size of remote app. This property is used only with Qlik Sense Desktop. It is set to 0 for Qlik Sense Enterprise.
- qDocId string
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.
- qMeta object
Layout for NxMetaDef.
qMeta properties
- qName string
Name. This property is optional.
-
- qLastReloadTime string
Last reload time of the app.
- qReadOnly boolean
If set to true, the app is read-only.
- qTitle string
Title of the app.
- qThumbnail objectIn addition, this structure can return dynamic properties.
qThumbnail properties
- qUrl string
Relative path of the thumbnail.
-
- qHasSectionAccess boolean
If true the app has section access configured.
- qIsDirectQueryMode boolean
Is the app a Direct Query app?
- qUsage string
Can be one of: "ANALYTICS""DATA_PREPARATION""DATAFLOW_PREP""SINGLE_TABLE_PREP""DIRECT_QUERY_MODE"
-
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
- qPath stringRequired
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
- qFolderItems array of objects
qFolderItems properties
- qName string
Name of the folder item.
- qType string
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
- qGroup string
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
- qFunctions array of objects
qFunctions properties
- qName string
Name of the script function.
- qGroup string
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"
- qSignature string
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
- qRequestId integerRequired
Identifier of the request. Corresponds to the identifier of the DoReload request.
Response
- qDef object
qDef properties
- qType string
Can be one of: "IT_MSGBOX""IT_SCRIPTLINE""IT_BREAK""IT_INPUT""IT_END""IT_PASSWD""IT_USERNAME"
- qTitle string
Title used in the message box dialog. This property is relevant if qType is IT_MSGBOX.
- qMsg string
Message used in the message box dialog. This property is relevant if qType is IT_MSGBOX.
- qButtons integer
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.
- qLine string
Next script statement to be executed. This property is used if the type of interaction is IT_SCRIPTLINE.
- qOldLineNr integer
First line number of the previously executed statement. This property is used if the type of interaction is IT_SCRIPTLINE.
- qNewLineNr integer
First line number of the next statement to be executed. This property is used if the type of interaction is IT_SCRIPTLINE.
- qPath string
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);
- qHidden boolean
This property is set to true if the returned statement is an hidden script statement.
- qResult integer
Not relevant for describing the requested user interaction.
- qInput string
Is not used in Qlik Sense.
-
- qReturn boolean
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
- qDrives array of objects
qDrives properties
- qDrive string
Value of the drive. Examples: C:\, E:\\
- qType string
Type of the drive. Fixed means physical drive.
- qName string
Name of the drive.
- qTypeIdentifier string
Can be one of: "REMOVABLE""FIXED""NETWORK""CD_ROM""RAM""UNKNOWN_TYPE"
- qUnnamedDrive boolean
-
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
- qOdbcDsns array of objects
qOdbcDsns properties
- qName string
Name of the ODBC connection.
- qDescription string
Description of the ODBC connection.
- qBit32 boolean
Is set to true if the version of ODBC is 32-bit. This parameter is optional. Default is false.
- qUserOnly boolean
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": false, "qUserOnly": false } ] }}Returns the list of the OLEDB providers installed on the system.
Response
- qOleDbProviders array of objects
qOleDbProviders properties
- qName string
Name of the OLEDB provider.
- qDescription string
Description of the OLEDB provider.
- qBit32 boolean
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": false } ] }}Gives information about the progress of the DoReload and DoSave calls.
Parameters
- qRequestId integerRequired
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
- qProgressData object
qProgressData properties
- qStarted boolean
True if the request is started.
- qFinished boolean
True if the request is finished.
- qCompleted integer
This property is not used.
- qTotal integer
This property is not used.
- qKB integer
This property is not used.
- qMillisecs integer
Request duration in milliseconds.
- qUserInteractionWanted boolean
True when the engine pauses the script execution and waits for a user interaction.
- qPersistentProgress string
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).
- qTransientProgress string
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).
- qErrorData array of objects
Information about the error messages that occur during the script execution.
qErrorData properties
- qErrorString string
Detailed information about the error message.
- qLineEnd string
Line termination characters.
- qLine string
Script statement where the error occurs.
- qErrorDataCode string
Can be one of: "EDC_ERROR""EDC_WARNING""EDC_CIRCULAR_REFERENCE"
- qMessage object
qMessage properties
- qMessageCode integer
Code number to the corresponding localized message string.
- qMessageParameters array of strings
Parameters to be inserted in the localized message string.
-
-
- qPersistentProgressMessages array of objects
List of persistent progress messages.
qPersistentProgressMessages properties
- qMessageCode integer
Code number to the corresponding localized message string.
- qMessageParameters array of strings
Parameters to be inserted in the localized message string.
-
- qTransientProgressMessage object
qTransientProgressMessage properties
- qMessageCode integer
Code number to the corresponding localized message string.
- qMessageParameters array 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
- qStreamList array of objects DeprecatedThis struct is deprecated (not recommended to use).
qStreamList properties
- qName string
Name of the stream.
- qId string
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
- qCodePages array of objects
qCodePages properties
- qNumber integer
Number of the code page.
- qName string
Name of the code page.
- qDescription string
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
- qUniqueID string
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
- qRequestId integerRequired
Identifier of the request. Corresponds to the identifier of the DoReload request.
- qDef objectRequired
User response to the current interaction.
qDef properties
- qType string
Can be one of: "IT_MSGBOX""IT_SCRIPTLINE""IT_BREAK""IT_INPUT""IT_END""IT_PASSWD""IT_USERNAME"
- qTitle string
Title used in the message box dialog. This property is relevant if qType is IT_MSGBOX.
- qMsg string
Message used in the message box dialog. This property is relevant if qType is IT_MSGBOX.
- qButtons integer
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.
- qLine string
Next script statement to be executed. This property is used if the type of interaction is IT_SCRIPTLINE.
- qOldLineNr integer
First line number of the previously executed statement. This property is used if the type of interaction is IT_SCRIPTLINE.
- qNewLineNr integer
First line number of the next statement to be executed. This property is used if the type of interaction is IT_SCRIPTLINE.
- qPath string
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);
- qHidden boolean
This property is set to true if the returned statement is an hidden script statement.
- qResult integer
Not relevant for describing the requested user interaction.
- qInput string
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
- qReturn boolean
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
- qReturn boolean
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
- qConnection objectRequired
Information about the connection.
qConnection properties
- qId string
Identifier of the connection. Is generated by the engine and is unique.
- qName string
Name of the connection. This parameter is mandatory and must be set when creating or modifying a connection.
- qConnectionString string
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.
- qType string
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.
- qUserName string
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.
- qPassword string
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.
- qModifiedDate string
Is generated by the engine. Creation date of the connection or last modification date of the connection.
- qMeta object
Layout for NxMetaDef.
qMeta properties
- qName string
Name. This property is optional.
-
- qLogOn string
Can be one of: "LOG_ON_SERVICE_USER""LOG_ON_CURRENT_USER"
-
Response
- qReturn boolean
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
- qReturn string
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
- qDocName stringRequired
The GUID (in Qlik Sense Enterprise) or Name (in Qlik Sense Desktop) of the app to retrieve.
- qUserName string
Name of the user that opens the app.
- qPassword string
Password of the user.
- qSerial string
Current Qlik Sense serial number.
- qNoData 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.
Response
- qReturn object
qReturn properties
- qType string
The native type of the object.
- qHandle integer
The handle used to connect to object.
- qGenericType string
The type of the object.
- qGenericId string
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
- qAppId stringRequired
The Id of the app to publish.
- qName stringRequired
The name of the app to publish.
- qStreamId stringRequired
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
- qTargetAppId stringRequired
Identifier (GUID) of the target app. The target app is the app to be replaced.
- qSrcAppID stringRequired
Identifier (GUID) of the source app. The objects in the source app will replace the objects in the target app.
- qIds array 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
- qSuccess boolean
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
- qNewAppName stringRequired
<Name of the saved app>
Response
- qNewAppId string
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": {}}