Qlik Sense Engine (qix)

Global

Global AbortAll

()

Sets an abort flag on all pending and ongoing requests in the current engine session.

  • If an abort flag is set on a pending request, the request is aborted.
  • If an abort flag is set on an ongoing request, the engine checks to see if it is possible to abort the request.

Response

object

Errors

array

AbortAll()

enigma.js
const result = await global.abortAll()

Request

{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "AbortAll"
}

Response

{
"jsonrpc": "2.0",
"id": 1,
"result": {}
}

Global AbortRequest

(qRequestId)

Sets an abort flag on a specific request in the current engine session.

  • If an abort flag is set on a pending request, the request is aborted.
  • If an abort flag is set on an ongoing request, the engine checks to see if it is possible to abort the request.

Parameters

  • qRequestId integer
    Required

    Identifier of request to abort.

Response

object

Errors

array

AbortRequest(qRequestId)

enigma.js
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": {}
}

Global AllowCreateApp

()

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

Response

  • qReturn boolean

Errors

array

AllowCreateApp()

enigma.js
const result = await global.allowCreateApp()

Request

{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "AllowCreateApp"
}

Response

{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qReturn": true
}
}

Global CancelReload

(qReason?)

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

object

Errors

array

CancelReload(qReason?)

enigma.js
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": {}
}

Global CancelRequest

(qRequestId)

Cancels an ongoing request. The request is stopped.

Parameters

  • qRequestId integer
    Required

    Identifier of the request to stop.

Response

object

Errors

array

CancelRequest(qRequestId)

enigma.js
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": {}
}

Global ConfigureReload

(qCancelOnScriptError, qUseErrorData, qInteractOnError)

Configures the engine's behavior during a reload.

The _ConfigureReload method_ should be run before the _DoReload method_.

Parameters

  • qCancelOnScriptError boolean
    Required

    If set to true, the script execution is halted on error. Otherwise, the engine continues the script execution. This parameter is relevant only if the variable ErrorMode is set to 1.

  • qUseErrorData boolean
    Required

    If set to true, any script execution error is returned in qErrorData by the GetProgress method.

  • qInteractOnError boolean
    Required

    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

object

Errors

array

ConfigureReload(qCancelOnScriptError, qUseErrorData, qInteractOnError)

enigma.js
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": {}
}

Global CopyApp

(qTargetAppId, qSrcAppId, qIds)

Copies an app that is in the Qlik Sense repository. The engine copies the app into an app entity that was previously created by the repository.

This operation is possible only in Qlik Sense Enterprise.

Parameters

  • qTargetAppId string
    Required

    Identifier (GUID) of the app entity in the Qlik Sense repository. The app entity must have been previously created by the Qlik Sense Repository Service (QRS) API.

  • qSrcAppId string
    Required

    Identifier (GUID) of the source app in the Qlik Sense repository.

  • qIds array of strings
    Required

    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

array

CopyApp(qTargetAppId, qSrcAppId, qIds)

enigma.js
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
}
}

Global CreateApp

(qAppName, qLocalizedScriptMainSection?, qLocale?)

Creates an app.

The operation is successful if **qSuccess** is set to true.

Logs

When this method is called, audit activity logs are produced to track the user activity. In the case of errors, both audit activity logs and system services logs are produced. The log files are named as follows:

Audit activity log System service log
<MachineName>_AuditActivity_Engine.txt in Qlik Sense Enterprise
<MachineName>_AuditActivity_Engine.log in Qlik Sense Desktop
<MachineName>_ServiceEngine.txt in Qlik Sense Enterprise
<MachineName>_ServiceEngine.log in Qlik Sense Desktop

Where to find the log files

The location of the log files depends on whether you have installed Qlik Sense Enterprise or Qlik Sense Desktop.

Qlik Sense Enterprise Qlik Sense Desktop
%ProgramData%/Qlik/Sense/Log/Engine %UserProfile%/Documents/Qlik/Sense/Log

Parameters

  • qAppName string
    Required

    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

array

CreateApp(qAppName, qLocalizedScriptMainSection?, qLocale?)

enigma.js
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"
}
}

Global CreateDocEx

(qDocName, qUserName?, qPassword?, qSerial?, qLocalizedScriptMainSection?)

Creates an app and opens an engine session.

This operation is possible only in Qlik Sense Desktop.

Parameters

  • qDocName string
    Required

    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
    Show 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

array

CreateDocEx(qDocName, qUserName?, qPassword?, qSerial?, qLocalizedScriptMainSection?)

enigma.js
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"
}
}
}

Global CreateSessionApp

()

Creates an empty session app. The following applies:

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

Response

  • qSessionAppId string
  • qReturn object
    Show 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

array

CreateSessionApp()

enigma.js
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"
}
}
}

Global CreateSessionAppFromApp

(qSrcAppId)

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 string
    Required

    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
    Show 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

array

CreateSessionAppFromApp(qSrcAppId)

enigma.js
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"
}
}
}

Global DeleteApp

(qAppId)

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

Qlik Sense Enterprise

In addition to being removed from the repository, the app is removed from the directory as well: <installation_directory>\Qlik\Sense\Apps The default installation directory is ProgramData.

Qlik Sense Desktop

The app is deleted from the directory %userprofile%\Documents\Qlik\ \Apps.

The operation is successful if **qSuccess** is set to true.

Logs

When this method is called, audit activity logs are produced to track the user activity. In the case of errors, both audit activity logs and system services logs are produced. The log files are named as follows:

Audit activity log System service log
<MachineName>AuditActivityEngine.txt in Qlik Sense Enterprise <MachineName>AuditActivityEngine.log in Qlik Sense Desktop <MachineName>ServiceEngine.txt in Qlik Sense Enterprise <MachineName>ServiceEngine.log in Qlik Sense Desktop

Where to find the log files

The location of the log files depends on whether you have installed Qlik Sense Enterprise or Qlik Sense Desktop.

Qlik Sense Enterprise Qlik Sense Desktop
%ProgramData%/Qlik/Sense/Log/Engine %UserProfile%/Documents/Qlik/Sense/Log

Parameters

  • qAppId string
    Required

    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

array

DeleteApp(qAppId)

enigma.js
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
}
}

Global EngineVersion

()

Returns the version number of the Qlik engine component.

Response

  • qVersion object
    Show qVersion properties
    • qComponentVersion string

      Version number of the Qlik engine component.

Errors

array

EngineVersion()

enigma.js
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"
}
}
}

Global ExportApp

(qTargetPath, qSrcAppId, qIds, qNoData?)

Exports an app from the Qlik Sense repository to the file system.

This operation is possible only in Qlik Sense Enterprise.
The operation is successful if **qSuccess** is set to true.

Logs

When this method is called, audit activity logs are produced to track the user activity. In the case of errors, both audit activity logs and system services logs are produced. The log files are named as follows:

Audit activity log System service log
*<MachineName>_AuditActivityEngine.txt* *<MachineName>_ServiceEngine.txt*

The log files are located in: %ProgramData%/Qlik/Sense/Log/Engine

Parameters

  • qTargetPath string
    Required

    Path and name of the target app.

  • qSrcAppId string
    Required

    Identifier of the source app. The identifier is a GUID from the Qlik Sense repository.

  • qIds array of strings
    Required

    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

array

ExportApp(qTargetPath, qSrcAppId, qIds, qNoData?)

enigma.js
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
}
}

Global GetActiveDoc

()

Returns the handle of the current app.

Response

  • qReturn object
    Show 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

array

GetActiveDoc()

enigma.js
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"
}
}
}

Global GetAppEntry

(qAppID)

Retrieves the metadata of an app.

Parameters

  • qAppID string
    Required

    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
    Show 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.

      Show qMeta properties
      • qName string

        Name. This property is optional.

    • qThumbnail object
      In addition, this structure can return dynamic properties.
      Show qThumbnail properties
      • qUrl string

        Relative path of the thumbnail.

    • qFileSize integer
    • qHasSectionAccess boolean

      If true the app has section access configured.

Errors

array

GetAppEntry(qAppID)

enigma.js
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
}
}
}

Global GetAuthenticatedUser

()

Retrieves information about the authenticated user.

Response

  • qReturn string

Errors

array

GetAuthenticatedUser()

enigma.js
const result = await global.getAuthenticatedUser()

Request

{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "GetAuthenticatedUser"
}

Response

{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qReturn": "value"
}
}

Global GetBNF

(qBnfType)
Deprecated
Use the GetBaseBNF method instead

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

Parameters

  • qBnfType string
    Required

    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
    Show 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

array

GetBNF(qBnfType)

enigma.js
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"
]
}
]
}
}

Global GetBaseBNF

(qBnfType)

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

Parameters

  • qBnfType string
    Required

    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
    Show 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

array

GetBaseBNF(qBnfType)

enigma.js
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"
}
}

Global GetBaseBNFHash

(qBnfType)

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

Parameters

  • qBnfType string
    Required

    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

array

GetBaseBNFHash(qBnfType)

enigma.js
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"
}
}

Global GetBaseBNFString

(qBnfType)

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

Parameters

  • qBnfType string
    Required

    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

array

GetBaseBNFString(qBnfType)

enigma.js
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"
}
}

Global GetCustomConnectors

(qReloadList?)

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
    Show 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

array

GetCustomConnectors(qReloadList?)

enigma.js
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
}
]
}
}

Global GetDatabasesFromConnectionString

(qConnection)

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

Parameters

  • qConnection object
    Required

    Information about the connection.

    Show 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.

      Show 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
    Show qDatabases properties
    • qName string

      Name of the database.

    • qIsDefault boolean

      Is set to true if the database is set by default.

Errors

array

GetDatabasesFromConnectionString(qConnection)

enigma.js
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
}
]
}
}

Global GetDefaultAppFolder

()

Returns the folder where the apps are stored.

This method applies only if running Qlik Sense Desktop.

Response

  • qPath string

Errors

array

GetDefaultAppFolder()

enigma.js
const result = await global.getDefaultAppFolder()

Request

{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "GetDefaultAppFolder"
}

Response

{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qPath": "value"
}
}

Global GetDocList

()

Returns the list of apps.

In Qlik Sense Enterprise:

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

In Qlik Sense Desktop:

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

Response

  • qDocList array of objects
    Show 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.

      Show 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 object
      In addition, this structure can return dynamic properties.
      Show 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

array

GetDocList()

enigma.js
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"
}
]
}
}

Global GetFolderItemsForPath

(qPath)

Returns the files and folders located at a specified path.

Parameters

  • qPath string
    Required

    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&lt;user name>\Documents\Qlik\Sense\Apps.

Response

  • qFolderItems array of objects
    Show qFolderItems properties
    • qName string

      Name of the folder item.

    • qType string

      Can be one of: "FOLDER""FILE""OTHER"

Errors

array

GetFolderItemsForPath(qPath)

enigma.js
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"
}
]
}
}

Global GetFunctions

(qGroup?)

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
    Show 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

array

GetFunctions(qGroup?)

enigma.js
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"
}
]
}
}

Global GetInteract

(qRequestId)

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

  • Before executing a new script statement.
  • When an error occurs while executing the script.
  • When the script execution is finished.

To know if the engine is paused and waits for a response to an interaction request, the GetProgress 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 integer
    Required

    Identifier of the request. Corresponds to the identifier of the DoReload request.

Response

  • qDef object
    Show 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

array

GetInteract(qRequestId)

enigma.js
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
}
}

Global GetLogicalDriveStrings

()

Lists the logical drives in the system.

This method applies only if running Qlik Sense Desktop.

Response

  • qDrives array of objects
    Show 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

array

GetLogicalDriveStrings()

enigma.js
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
}
]
}
}

Global GetOdbcDsns

()

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

Response

  • qOdbcDsns array of objects
    Show 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

array

GetOdbcDsns()

enigma.js
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
}
]
}
}

Global GetOleDbProviders

()

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

Response

  • qOleDbProviders array of objects
    Show 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

array

GetOleDbProviders()

enigma.js
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
}
]
}
}

Global GetProgress

(qRequestId)

Gives information about the progress of the DoReload and DoSave calls.

For more information on DoReload and DoSave, see the _DoReload Method_ and _DoSave Method_.

Parameters

  • qRequestId integer
    Required

    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
    Show 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.

      Show 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
        Show 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.

      Show 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
      Show 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

array

GetProgress(qRequestId)

enigma.js
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"
]
}
}
}
}

Global GetStreamList

()
Deprecated
Use general purpose endpoint in [QRS API: GET qrs/stream/](/Subsystems/RepositoryServiceAPI/Content/Sense_RepositoryServiceAPI/RepositoryServiceAPI-Get.htm) instead.

Lists the streams.

Response

  • qStreamList array of objects Deprecated
    This struct is deprecated (not recommended to use).
    Show qStreamList properties
    • qName string

      Name of the stream.

    • qId string

      Identifier of the stream.

Errors

array

GetStreamList()

enigma.js
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"
}
]
}
}

Global GetSupportedCodePages

()

Lists the supported code pages.

Response

  • qCodePages array of objects
    Show qCodePages properties
    • qNumber integer

      Number of the code page.

    • qName string

      Name of the code page.

    • qDescription string

      Description of the code page.

Errors

array

GetSupportedCodePages()

enigma.js
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"
}
]
}
}

Global GetUniqueID

()

Returns the unique identifier of the endpoint for the current user in the current app.

This unique identifier can be used for logging purposes.

Response

  • qUniqueID string

Errors

array

GetUniqueID()

enigma.js
const result = await global.getUniqueID()

Request

{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "GetUniqueID"
}

Response

{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qUniqueID": "value"
}
}

Global InteractDone

(qRequestId, qDef)

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

Parameters

  • qRequestId integer
    Required

    Identifier of the request. Corresponds to the identifier of the DoReload request.

  • qDef object
    Required

    User response to the current interaction.

    Show 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

object

Errors

array

InteractDone(qRequestId, qDef)

enigma.js
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": {}
}

Global IsDesktopMode

()

Indicates whether the user is working in Qlik Sense Desktop.

Response

  • qReturn boolean

Errors

array

IsDesktopMode()

enigma.js
const result = await global.isDesktopMode()

Request

{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "IsDesktopMode"
}

Response

{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qReturn": true
}
}

Global IsPersonalMode

()
Deprecated
Use IsDesktopMode method instead

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

Response

  • qReturn boolean

Errors

array

IsPersonalMode()

enigma.js
const result = await global.isPersonalMode()

Request

{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "IsPersonalMode"
}

Response

{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qReturn": true
}
}

Global IsValidConnectionString

(qConnection)

Checks if a connection string is valid.

Parameters

  • qConnection object
    Required

    Information about the connection.

    Show 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.

      Show 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

array

IsValidConnectionString(qConnection)

enigma.js
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
}
}

Global OSName

()

Returns the name of the operating system.

Response

  • qReturn string

Errors

array

OSName()

enigma.js
const result = await global.oSName()

Request

{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "OSName"
}

Response

{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qReturn": "value"
}
}

Global OSVersion

()

Returns the version number of the operating system.

Response

  • qReturn string

Errors

array

OSVersion()

enigma.js
const result = await global.oSVersion()

Request

{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "OSVersion"
}

Response

{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qReturn": "value"
}
}

Global OpenDoc

(qDocName, qUserName?, qPassword?, qSerial?, qNoData?)

Opens an app and checks if the app needs to be migrated (if the app is deprecated). The OpenDoc method compares the version of the app with the version of Qlik Sense and migrates the app to the current version of Qlik Sense if necessary. Once the migration is done, the app is opened. If no migration is needed, the app is opened immediately. The following applies:

  • The app version is lower than 0.95: no migration is done. Apps older than the version 0.95 are not supported.
  • The app version is at least 0.95 and less than the Qlik Sense version: the app is migrated and then opened.
  • Qlik Sense and the app have the same version: the app is opened, no migration is needed.
If the app is read-only, the app migration cannot occur. An error message is sent.

Backups

In Qlik Sense Desktop, apps are automatically backed up before a migration. The backup files are located in %userprofile%\Documents\Qlik\Sense\AppsBackup&lt;Qlik Sense Desktop version>. In Qlik Sense Enterprise, no automatic back up is run. The back up should be done manually.

Parameters

  • qDocName string
    Required

    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
    Show 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

array

OpenDoc(qDocName, qUserName?, qPassword?, qSerial?, qNoData?)

enigma.js
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"
}
}
}

Global ProductVersion

()
Deprecated
Use EngineVersion method instead

Returns the Qlik Sense version number.

Response

  • qReturn string

Errors

array

ProductVersion()

enigma.js
const result = await global.productVersion()

Request

{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "ProductVersion"
}

Response

{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qReturn": "value"
}
}

Global PublishApp

(qAppId, qName, qStreamId)

Publishes an app to the supplied stream.

Parameters

  • qAppId string
    Required

    The Id of the app to publish.

  • qName string
    Required

    The name of the app to publish.

  • qStreamId string
    Required

    The stream Id of the app to publish.

Response

object

Errors

array

PublishApp(qAppId, qName, qStreamId)

enigma.js
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": {}
}

Global QTProduct

()

Returns the Qlik product name.

Response

  • qReturn string

Errors

array

QTProduct()

enigma.js
const result = await global.qTProduct()

Request

{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "QTProduct"
}

Response

{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qReturn": "value"
}
}

Global QvVersion

()
Deprecated
Use the EngineVersion method instead

Returns the Qlik Sense version number.

Response

  • qReturn string

Errors

array

QvVersion()

enigma.js
const result = await global.qvVersion()

Request

{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "QvVersion"
}

Response

{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qReturn": "value"
}
}

Global ReloadExtensionList

()

Reloads the list of extensions.

Response

object

Errors

array

ReloadExtensionList()

enigma.js
const result = await global.reloadExtensionList()

Request

{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "ReloadExtensionList"
}

Response

{
"jsonrpc": "2.0",
"id": 1,
"result": {}
}

Global ReplaceAppFromID

(qTargetAppId, qSrcAppID, qIds)

Replaces objects of a target app with the objects from a source app. The list of objects in the app to be replaced must be defined in qIds.

The data model of the app cannot be updated.
This operation is possible only in Qlik Sense Enterprise.
The operation is successful if **qSuccess** is set to true.

Parameters

  • qTargetAppId string
    Required

    Identifier (GUID) of the target app. The target app is the app to be replaced.

  • qSrcAppID string
    Required

    Identifier (GUID) of the source app. The objects in the source app will replace the objects in the target app.

  • qIds array of strings
    Required

    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

array

ReplaceAppFromID(qTargetAppId, qSrcAppID, qIds)

enigma.js
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
}
}

Global SaveAs

(qNewAppName)
Deprecated
Use Document SaveAs method instead

Save a copy of an app with a different name. Can be used to save a session app as an ordinary app.

Parameters

  • qNewAppName string
    Required

    <Name of the saved app>

Response

  • qNewAppId string

Errors

array

SaveAs(qNewAppName)

enigma.js
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"
}
}

Global ShutdownProcess

()

Shuts down the Qlik engine.

This operation is possible only in Qlik Sense Desktop.

Response

object

Errors

array

ShutdownProcess()

enigma.js
const result = await global.shutdownProcess()

Request

{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "ShutdownProcess"
}

Response

{
"jsonrpc": "2.0",
"id": 1,
"result": {}
}