Qix

The JSON-RPC API over websocket that enables you to interact with the Qlik Associative Engine.

Download specification

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()

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

  • qRequestIdinteger
    Required

    Identifier of request to abort.

Response

object

Errors

array

AbortRequest(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": {}
}

Global AllowCreateApp

()

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

Response

  • qReturnboolean

Errors

array

AllowCreateApp()

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

  • qReasonstring

    Reason for why the reload was cancelled. This will be echoed back to the user in the script log.

Response

object

Errors

array

CancelReload(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": {}
}

Global CancelRequest

(qRequestId)

Cancels an ongoing request. The request is stopped.

Parameters

  • qRequestIdinteger
    Required

    Identifier of the request to stop.

Response

object

Errors

array

CancelRequest(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": {}
}

Global ConfigureReload

(qCancelOnScriptError, qUseErrorData, qInteractOnError)

Configures the engine's behavior during a reload.

The _ConfigureReload method_ should be run before the _DoReload method_.

Parameters

  • qCancelOnScriptErrorboolean
    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.

  • qUseErrorDataboolean
    Required

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

  • qInteractOnErrorboolean
    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)

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

  • qTargetAppIdstring
    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.

  • qSrcAppIdstring
    Required

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

  • qIdsarray 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

  • qSuccessboolean

Errors

array

CopyApp(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
  }
}

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

  • qAppNamestring
    Required

    Name of the app.

  • qLocalizedScriptMainSectionstring

    Name of the first section in the script editor. The default value is Main.

  • qLocalestring

    Set custom locale for the app instead of system default.

Response

  • qSuccessboolean
  • qAppIdstring

Errors

array

CreateApp(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"
  }
}

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

  • qDocNamestring
    Required

    Name of the app.

  • qUserNamestring

    Name of the user.

  • qPasswordstring

    Password of the user.

  • qSerialstring

    Current Qlik Sense serial number.

  • qLocalizedScriptMainSectionstring

    Name of the first section in the script editor. The default value is Main.

Response

  • qDocIdstring
  • qReturnobject
    Show qReturn properties
    • qTypestring

      The native type of the object.

    • qHandleinteger

      The handle used to connect to object.

    • qGenericTypestring

      The type of the object.

    • qGenericIdstring

      Object ID.

Errors

array

CreateDocEx(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"
    }
  }
}

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

  • qSessionAppIdstring
  • qReturnobject
    Show qReturn properties
    • qTypestring

      The native type of the object.

    • qHandleinteger

      The handle used to connect to object.

    • qGenericTypestring

      The type of the object.

    • qGenericIdstring

      Object ID.

Errors

array

CreateSessionApp()

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.
  • There is no data in the session app, unless it is reloaded.
  • The script of the session app can be edited and reloaded.
  • The name of a session app cannot be chosen. The engine automatically assigns a unique identifier to the session app.
  • A session app is not persisted and cannot be saved. Everything created during a session app is non-persisted; for example: objects, data connections.

Parameters

  • qSrcAppIdstring
    Required

    App identifier of the source app. It corresponds to qAppId returned by the CreateApp method when creating the source app.

Response

  • qSessionAppIdstring
  • qReturnobject
    Show qReturn properties
    • qTypestring

      The native type of the object.

    • qHandleinteger

      The handle used to connect to object.

    • qGenericTypestring

      The type of the object.

    • qGenericIdstring

      Object ID.

Errors

array

CreateSessionAppFromApp(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"
    }
  }
}

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

  • qAppIdstring
    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

  • qSuccessboolean

Errors

array

DeleteApp(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
  }
}

Global EngineVersion

()

Returns the version number of the Qlik engine component.

Response

  • qVersionobject
    Show qVersion properties
    • qComponentVersionstring

      Version number of the Qlik engine component.

Errors

array

EngineVersion()

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

  • qTargetPathstring
    Required

    Path and name of the target app.

  • qSrcAppIdstring
    Required

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

  • qIdsarray 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.

  • qNoDataboolean

    Set this parameter to true if the data should be omitted in the exported app.

Response

  • qSuccessboolean

Errors

array

ExportApp(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
  }
}

Global GetActiveDoc

()

Returns the handle of the current app.

Response

  • qReturnobject
    Show qReturn properties
    • qTypestring

      The native type of the object.

    • qHandleinteger

      The handle used to connect to object.

    • qGenericTypestring

      The type of the object.

    • qGenericIdstring

      Object ID.

Errors

array

GetActiveDoc()

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 meta data of an app.

Parameters

  • qAppIDstring
    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

  • qEntryobject
    Show qEntry properties
    • qIDstring

      Identifier of the app.

    • qTitlestring

      Title of the app.

    • qPathstring

      Path of the app.

    • qLastReloadTimestring

      Last reload time of the app.

    • qReadOnlyboolean

      Is set to true if the app is read-only.

    • qMetaobject

      Layout for NxMetaDef.

      Show qMeta properties
      • qNamestring

        Name. This property is optional.

    • qThumbnailobject
      In addition, this structure can return dynamic properties.
      Show qThumbnail properties
      • qUrlstring

        Relative path of the thumbnail.

    • qFileSizeinteger
    • qHasSectionAccessboolean

      If true the app has section access configured.

Errors

array

GetAppEntry(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
    }
  }
}

Global GetAuthenticatedUser

()

Retrieves information about the authenticated user.

Response

  • qReturnstring

Errors

array

GetAuthenticatedUser()

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

  • qBnfTypestring
    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

  • qBnfDefsarray of objects
    Show qBnfDefs properties
    • qBnfarray of integers

      Array of token references that all together build up the definition of the current token. Generally, if the array is not empty, the definition is a BNF rule (qIsBnfRule is set to true). However, some BNF  rules do have an empty array (qIsBnfRule is set to true, but qBnf is empty).

    • qNbrinteger

      Number of the current token definition.

    • qPNbrinteger

      Number of the parent rule definition.

    • qHelpIdinteger

      Reference identifier to a function described in the documentation. The identifier is stored in the definition of the token containing the function name. Is not used in Qlik Sense.

    • qNamestring

      Token name. One of:

      • A rule name
      • An identifier
      • A literal value
    • qStrstring

      Literal string of the token. Examples: 'Round' and '('.

    • qIsBnfRuleboolean

      If set to true, a list of related rule tokens is assigned to qBnf . This parameter is optional. The default value is false.

    • qScriptStatementboolean

      If set to true, the definition specifies a script statement. This parameter is optional. The default value is false.

    • qControlStatementboolean

      If set to true, the definition specifies a control statement. This parameter is optional. The default value is false.

    • qBnfLiteralboolean

      If set to true, the definition specifies a literal token. This parameter is optional. The default value is false.

    • qQvFuncboolean

      If set to true, the definition is related to a Qlik Sense function. It cannot be an aggregation function. This parameter is optional. The default value is false.

    • qAggrFuncboolean

      If set to true, the definition is related to an aggregation function. This parameter is optional. The default value is false.

    • qFGstring

      Can be one of: "ALL""U""NONE""AGGR""NUM""RNG""EXP""TRIG""FIN""MATH""COUNT""STR""MAPP""RCRD""CND""LOG""NULL""SYS""FILE""TBL""DATE""NUMI""FRMT""CLR""RNK""GEO""EXT""PROB""ARRAY""LEG""DB""WINDOW"

    • qFieldFlagboolean

      If set to true, the definition is related to a field. This parameter is optional. The default value is false.

    • qMTstring

      Can be one of: "N""D""R""V"

    • qDeprboolean

      Indicates whether a script statement, a chart or a script function is deprecated (not recommended for use). If set to true, the script statement or the function is not recommended for use in Qlik Sense. This parameter is optional. The default value is false.

    • qFGListarray of strings

      List of groups the function belongs to.

      Values may be any of: "ALL""U""NONE""AGGR""NUM""RNG""EXP""TRIG""FIN""MATH""COUNT""STR""MAPP""RCRD""CND""LOG""NULL""SYS""FILE""TBL""DATE""NUMI""FRMT""CLR""RNK""GEO""EXT""PROB""ARRAY""LEG""DB""WINDOW"

Errors

array

GetBNF(qBnfType)

const result = await global.GetBNF([
  "value"
])

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "handle": 3,
  "method": "GetBNF",
  "params": {
    "qBnfType": "value"
  }
}

Response

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "qBnfDefs": [
      {
        "qBnf": [
          123
        ],
        "qNbr": 123,
        "qPNbr": 123,
        "qHelpId": 123,
        "qName": "value",
        "qStr": "value",
        "qIsBnfRule": true,
        "qScriptStatement": true,
        "qControlStatement": true,
        "qBnfLiteral": true,
        "qQvFunc": true,
        "qAggrFunc": true,
        "qFG": "ALL",
        "qFieldFlag": true,
        "qMT": "N",
        "qDepr": true,
        "qFGList": [
          "ALL"
        ]
      }
    ]
  }
}

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

  • qBnfTypestring
    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

  • qBnfDefsarray of objects
    Show qBnfDefs properties
    • qBnfarray of integers

      Array of token references that all together build up the definition of the current token. Generally, if the array is not empty, the definition is a BNF rule (qIsBnfRule is set to true). However, some BNF  rules do have an empty array (qIsBnfRule is set to true, but qBnf is empty).

    • qNbrinteger

      Number of the current token definition.

    • qPNbrinteger

      Number of the parent rule definition.

    • qHelpIdinteger

      Reference identifier to a function described in the documentation. The identifier is stored in the definition of the token containing the function name. Is not used in Qlik Sense.

    • qNamestring

      Token name. One of:

      • A rule name
      • An identifier
      • A literal value
    • qStrstring

      Literal string of the token. Examples: 'Round' and '('.

    • qIsBnfRuleboolean

      If set to true, a list of related rule tokens is assigned to qBnf . This parameter is optional. The default value is false.

    • qScriptStatementboolean

      If set to true, the definition specifies a script statement. This parameter is optional. The default value is false.

    • qControlStatementboolean

      If set to true, the definition specifies a control statement. This parameter is optional. The default value is false.

    • qBnfLiteralboolean

      If set to true, the definition specifies a literal token. This parameter is optional. The default value is false.

    • qQvFuncboolean

      If set to true, the definition is related to a Qlik Sense function. It cannot be an aggregation function. This parameter is optional. The default value is false.

    • qAggrFuncboolean

      If set to true, the definition is related to an aggregation function. This parameter is optional. The default value is false.

    • qFGstring

      Can be one of: "ALL""U""NONE""AGGR""NUM""RNG""EXP""TRIG""FIN""MATH""COUNT""STR""MAPP""RCRD""CND""LOG""NULL""SYS""FILE""TBL""DATE""NUMI""FRMT""CLR""RNK""GEO""EXT""PROB""ARRAY""LEG""DB""WINDOW"

    • qFieldFlagboolean

      If set to true, the definition is related to a field. This parameter is optional. The default value is false.

    • qMTstring

      Can be one of: "N""D""R""V"

    • qDeprboolean

      Indicates whether a script statement, a chart or a script function is deprecated (not recommended for use). If set to true, the script statement or the function is not recommended for use in Qlik Sense. This parameter is optional. The default value is false.

    • qFGListarray of strings

      List of groups the function belongs to.

      Values may be any of: "ALL""U""NONE""AGGR""NUM""RNG""EXP""TRIG""FIN""MATH""COUNT""STR""MAPP""RCRD""CND""LOG""NULL""SYS""FILE""TBL""DATE""NUMI""FRMT""CLR""RNK""GEO""EXT""PROB""ARRAY""LEG""DB""WINDOW"

  • qBnfHashstring

Errors

array

GetBaseBNF(qBnfType)

const result = await global.GetBaseBNF([
  "value"
])

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "handle": 3,
  "method": "GetBaseBNF",
  "params": {
    "qBnfType": "value"
  }
}

Response

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "qBnfDefs": [
      {
        "qBnf": [
          123
        ],
        "qNbr": 123,
        "qPNbr": 123,
        "qHelpId": 123,
        "qName": "value",
        "qStr": "value",
        "qIsBnfRule": true,
        "qScriptStatement": true,
        "qControlStatement": true,
        "qBnfLiteral": true,
        "qQvFunc": true,
        "qAggrFunc": true,
        "qFG": "ALL",
        "qFieldFlag": true,
        "qMT": "N",
        "qDepr": true,
        "qFGList": [
          "ALL"
        ]
      }
    ],
    "qBnfHash": "value"
  }
}

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

  • qBnfTypestring
    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

  • qBnfHashstring

Errors

array

GetBaseBNFHash(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"
  }
}

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

  • qBnfTypestring
    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

  • qBnfStrstring
  • qBnfHashstring

Errors

array

GetBaseBNFString(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"
  }
}

Global GetCustomConnectors

(qReloadList?)

List the custom connectors available in the system.

Parameters

  • qReloadListboolean

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

Response

  • qConnectorsarray of objects
    Show qConnectors properties
    • qProviderstring

      Name of the custom connector file.

    • qParentstring

      Name of the parent folder that contains the custom connector file.

    • qDisplayNamestring

      Name of the custom connector as displayed in the Qlik interface.

    • qMachineModestring

      Can be one of: "CONNECT_DEFAULT""CONNECT_64""CONNECT_32"

    • qSupportFileStreamingboolean

Errors

array

GetCustomConnectors(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
      }
    ]
  }
}

Global GetDatabasesFromConnectionString

(qConnection)

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

Parameters

  • qConnectionobject
    Required

    Information about the connection.

    Show qConnection properties
    • qIdstring

      Identifier of the connection. Is generated by the engine and is unique.

    • qNamestring

      Name of the connection. This parameter is mandatory and must be set when creating or modifying a connection.

    • qConnectionStringstring

      One of:

      • ODBC CONNECT TO [<provider name>]
      • OLEDB CONNECT TO [<provider name>]
      • CUSTOM CONNECT TO [<provider name>]
      • "<local absolute or relative path, UNC path>"
      • "<URL>"

      Connection string. This parameter is mandatory and must be set when creating or modifying a connection.

    • qTypestring

      One of:

      • ODBC
      • OLEDB
      • <Name of the custom connection file>
      • folder
      • internet

      Type of the connection. This parameter is mandatory and must be set when creating or modifying a connection. For ODBC, OLEDB and custom connections, the engine checks that the connection type matches the connection string. The type is not case sensitive.

    • qUserNamestring

      Name of the user who creates the connection. This parameter is optional; it is only used for OLEDB, ODBC and CUSTOM connections. A call to GetConnection Method does not return the user name.

    • qPasswordstring

      Password of the user who creates the connection. This parameter is optional; it is only used for OLEDB, ODBC and CUSTOM connections. A call to GetConnection Method does not return the password.

    • qModifiedDatestring

      Is generated by the engine. Creation date of the connection or last modification date of the connection.

    • qMetaobject

      Layout for NxMetaDef.

      Show qMeta properties
      • qNamestring

        Name. This property is optional.

    • qLogOnstring

      Can be one of: "LOG_ON_SERVICE_USER""LOG_ON_CURRENT_USER"

Response

  • qDatabasesarray of objects
    Show qDatabases properties
    • qNamestring

      Name of the database.

    • qIsDefaultboolean

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

Errors

array

GetDatabasesFromConnectionString(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
      }
    ]
  }
}

Global GetDefaultAppFolder

()

Returns the folder where the apps are stored.

This method applies only if running Qlik Sense Desktop.

Response

  • qPathstring

Errors

array

GetDefaultAppFolder()

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

  • qDocListarray of objects
    Show qDocList properties
    • qDocNamestring

      Name of the app.

    • qConnectedUsersinteger

      Not used.

    • qFileTimenumber

      Last modified time stamp of the app. This property is used only with Qlik Sense Desktop. It is set to 0 for Qlik Sense Enterprise.

    • qFileSizenumber

      Size of remote app. This property is used only with Qlik Sense Desktop. It is set to 0 for Qlik Sense Enterprise.

    • qDocIdstring

      Identifier of the app.

      • In Qlik Sense Desktop, the identifier is the path and name of the app.
      • In Qlik Sense Enterprise, the identifier is the app's GUID.
    • qMetaobject

      Layout for NxMetaDef.

      Show qMeta properties
      • qNamestring

        Name. This property is optional.

    • qLastReloadTimestring

      Last reload time of the app.

    • qReadOnlyboolean

      If set to true, the app is read-only.

    • qTitlestring

      Title of the app.

    • qThumbnailobject
      In addition, this structure can return dynamic properties.
      Show qThumbnail properties
      • qUrlstring

        Relative path of the thumbnail.

    • qHasSectionAccessboolean

      If true the app has section access configured.

    • qIsDirectQueryModeboolean

      Is the app a Direct Query app?

    • qUsagestring

      Can be one of: "ANALYTICS""DATA_PREPARATION""DATAFLOW_PREP"

Errors

array

GetDocList()

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

  • qPathstring
    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

  • qFolderItemsarray of objects
    Show qFolderItems properties
    • qNamestring

      Name of the folder item.

    • qTypestring

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

Errors

array

GetFolderItemsForPath(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"
      }
    ]
  }
}

Global GetFunctions

(qGroup?)

Gets the list of all the script functions.

Parameters

  • qGroupstring

    Name of the group. Default is all groups.

    One of:

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

Response

  • qFunctionsarray of objects
    Show qFunctions properties
    • qNamestring

      Name of the script function.

    • qGroupstring

      Can be one of: "ALL""U""NONE""AGGR""NUM""RNG""EXP""TRIG""FIN""MATH""COUNT""STR""MAPP""RCRD""CND""LOG""NULL""SYS""FILE""TBL""DATE""NUMI""FRMT""CLR""RNK""GEO""EXT""PROB""ARRAY""LEG""DB""WINDOW"

    • qSignaturestring

      Signature of the script function. Gives general information about the function.

Errors

array

GetFunctions(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"
      }
    ]
  }
}

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

  • qRequestIdinteger
    Required

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

Response

  • qDefobject
    Show qDef properties
    • qTypestring

      Can be one of: "IT_MSGBOX""IT_SCRIPTLINE""IT_BREAK""IT_INPUT""IT_END""IT_PASSWD""IT_USERNAME"

    • qTitlestring

      Title used in the message box dialog. This property is relevant if qType is IT_MSGBOX.

    • qMsgstring

      Message used in the message box dialog. This property is relevant if qType is IT_MSGBOX.

    • qButtonsinteger

      Buttons displayed in the message box dialog. This property is relevant if qType is IT_MSGBOX. One of:

      • 0 means that the qButtons property is not relevant.
      • 17 means that the message box contains the OK and Cancel buttons or the stop -sign icon.
    • qLinestring

      Next script statement to be executed. This property is used if the type of interaction is IT_SCRIPTLINE.

    • qOldLineNrinteger

      First line number of the previously executed statement. This property is used if the type of interaction is IT_SCRIPTLINE.

    • qNewLineNrinteger

      First line number of the next statement to be executed. This property is used if the type of interaction is IT_SCRIPTLINE.

    • qPathstring

      Path specified by the Include script variable. This property is used if the type of interaction is IT_SCRIPTLINE. Example of an Include variable: $(Include=lib:\\MyDataFiles\abc.txt);

    • qHiddenboolean

      This property is set to true if the returned statement is an hidden script statement.

    • qResultinteger

      Not relevant for describing the requested user interaction.

    • qInputstring

      Is not used in Qlik Sense.

  • qReturnboolean

Errors

array

GetInteract(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
  }
}

Global GetLogicalDriveStrings

()

Lists the logical drives in the system.

This method applies only if running Qlik Sense Desktop.

Response

  • qDrivesarray of objects
    Show qDrives properties
    • qDrivestring

      Value of the drive. Examples: C:\, E:\\

    • qTypestring

      Type of the drive. Fixed means physical drive.

    • qNamestring

      Name of the drive.

    • qTypeIdentifierstring

      Can be one of: "REMOVABLE""FIXED""NETWORK""CD_ROM""RAM""UNKNOWN_TYPE"

    • qUnnamedDriveboolean

Errors

array

GetLogicalDriveStrings()

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

  • qOdbcDsnsarray of objects
    Show qOdbcDsns properties
    • qNamestring

      Name of the ODBC connection.

    • qDescriptionstring

      Description of the ODBC connection.

    • qBit32boolean

      Is set to true if the version of ODBC is 32-bit. This parameter is optional. Default is false.

    • qUserOnlyboolean

      Is set to true if the connection is User DSN. The connection works only for a specific user. Default is false. This parameter is optional.

Errors

array

GetOdbcDsns()

const result = await global.GetOdbcDsns({})

Request

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

Response

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "qOdbcDsns": [
      {
        "qName": "value",
        "qDescription": "value",
        "qBit32": true,
        "qUserOnly": true
      }
    ]
  }
}

Global GetOleDbProviders

()

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

Response

  • qOleDbProvidersarray of objects
    Show qOleDbProviders properties
    • qNamestring

      Name of the OLEDB provider.

    • qDescriptionstring

      Description of the OLEDB provider.

    • qBit32boolean

      Is set to true if the version of the OLEDB provider is 32-bit. Default is false. This parameter is optional.

Errors

array

GetOleDbProviders()

const result = await global.GetOleDbProviders({})

Request

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

Response

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "qOleDbProviders": [
      {
        "qName": "value",
        "qDescription": "value",
        "qBit32": true
      }
    ]
  }
}

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

  • qRequestIdinteger
    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

  • qProgressDataobject
    Show qProgressData properties
    • qStartedboolean

      True if the request is started.

    • qFinishedboolean

      True if the request is finished.

    • qCompletedinteger

      This property is not used.

    • qTotalinteger

      This property is not used.

    • qKBinteger

      This property is not used.

    • qMillisecsinteger

      Request duration in milliseconds.

    • qUserInteractionWantedboolean

      True when the engine pauses the script execution and waits for a user interaction.

    • qPersistentProgressstring

      A progress message is persistent when it informs about the start or end of a statement. For example, it can inform about the total number of lines fetched from a data source or tell that the app was saved. All persistent progress messages between two GetProgress calls are summarized in this string. Contrarily to qPersistentProgressMessages, the content of the localized message string is displayed (not its message code).

    • qTransientProgressstring

      A progress message is transient when it informs about the progress of an ongoing statement. For example, it can tell how many lines are currently fetched from a data source. All transient progress messages between two GetProgress calls are summarized in this string. Contrarily to qTransientProgressMessage, the content of the localized message string is displayed (not its message code).

    • qErrorDataarray of objects

      Information about the error messages that occur during the script execution.

      Show qErrorData properties
      • qErrorStringstring

        Detailed information about the error message.

      • qLineEndstring

        Line termination characters.

      • qLinestring

        Script statement where the error occurs.

      • qErrorDataCodestring

        Can be one of: "EDC_ERROR""EDC_WARNING""EDC_CIRCULAR_REFERENCE"

      • qMessageobject
        Show qMessage properties
        • qMessageCodeinteger

          Code number to the corresponding localized message string.

        • qMessageParametersarray of strings

          Parameters to be inserted in the localized message string.

    • qPersistentProgressMessagesarray of objects

      List of persistent progress messages.

      Show qPersistentProgressMessages properties
      • qMessageCodeinteger

        Code number to the corresponding localized message string.

      • qMessageParametersarray of strings

        Parameters to be inserted in the localized message string.

    • qTransientProgressMessageobject
      Show qTransientProgressMessage properties
      • qMessageCodeinteger

        Code number to the corresponding localized message string.

      • qMessageParametersarray of strings

        Parameters to be inserted in the localized message string.

Errors

array

GetProgress(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"
        ]
      }
    }
  }
}

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

  • qStreamListarray of objectsDeprecated
    This struct is deprecated (not recommended to use).
    Show qStreamList properties
    • qNamestring

      Name of the stream.

    • qIdstring

      Identifier of the stream.

Errors

array

GetStreamList()

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

  • qCodePagesarray of objects
    Show qCodePages properties
    • qNumberinteger

      Number of the code page.

    • qNamestring

      Name of the code page.

    • qDescriptionstring

      Description of the code page.

Errors

array

GetSupportedCodePages()

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

  • qUniqueIDstring

Errors

array

GetUniqueID()

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

  • qRequestIdinteger
    Required

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

  • qDefobject
    Required

    User response to the current interaction.

    Show qDef properties
    • qTypestring

      Can be one of: "IT_MSGBOX""IT_SCRIPTLINE""IT_BREAK""IT_INPUT""IT_END""IT_PASSWD""IT_USERNAME"

    • qTitlestring

      Title used in the message box dialog. This property is relevant if qType is IT_MSGBOX.

    • qMsgstring

      Message used in the message box dialog. This property is relevant if qType is IT_MSGBOX.

    • qButtonsinteger

      Buttons displayed in the message box dialog. This property is relevant if qType is IT_MSGBOX. One of:

      • 0 means that the qButtons property is not relevant.
      • 17 means that the message box contains the OK and Cancel buttons or the stop -sign icon.
    • qLinestring

      Next script statement to be executed. This property is used if the type of interaction is IT_SCRIPTLINE.

    • qOldLineNrinteger

      First line number of the previously executed statement. This property is used if the type of interaction is IT_SCRIPTLINE.

    • qNewLineNrinteger

      First line number of the next statement to be executed. This property is used if the type of interaction is IT_SCRIPTLINE.

    • qPathstring

      Path specified by the Include script variable. This property is used if the type of interaction is IT_SCRIPTLINE. Example of an Include variable: $(Include=lib:\\MyDataFiles\abc.txt);

    • qHiddenboolean

      This property is set to true if the returned statement is an hidden script statement.

    • qResultinteger

      Not relevant for describing the requested user interaction.

    • qInputstring

      Is not used in Qlik Sense.

Response

object

Errors

array

InteractDone(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": {}
}

Global IsDesktopMode

()

Indicates whether the user is working in Qlik Sense Desktop.

Response

  • qReturnboolean

Errors

array

IsDesktopMode()

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

  • qReturnboolean

Errors

array

IsPersonalMode()

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

  • qConnectionobject
    Required

    Information about the connection.

    Show qConnection properties
    • qIdstring

      Identifier of the connection. Is generated by the engine and is unique.

    • qNamestring

      Name of the connection. This parameter is mandatory and must be set when creating or modifying a connection.

    • qConnectionStringstring

      One of:

      • ODBC CONNECT TO [<provider name>]
      • OLEDB CONNECT TO [<provider name>]
      • CUSTOM CONNECT TO [<provider name>]
      • "<local absolute or relative path, UNC path>"
      • "<URL>"

      Connection string. This parameter is mandatory and must be set when creating or modifying a connection.

    • qTypestring

      One of:

      • ODBC
      • OLEDB
      • <Name of the custom connection file>
      • folder
      • internet

      Type of the connection. This parameter is mandatory and must be set when creating or modifying a connection. For ODBC, OLEDB and custom connections, the engine checks that the connection type matches the connection string. The type is not case sensitive.

    • qUserNamestring

      Name of the user who creates the connection. This parameter is optional; it is only used for OLEDB, ODBC and CUSTOM connections. A call to GetConnection Method does not return the user name.

    • qPasswordstring

      Password of the user who creates the connection. This parameter is optional; it is only used for OLEDB, ODBC and CUSTOM connections. A call to GetConnection Method does not return the password.

    • qModifiedDatestring

      Is generated by the engine. Creation date of the connection or last modification date of the connection.

    • qMetaobject

      Layout for NxMetaDef.

      Show qMeta properties
      • qNamestring

        Name. This property is optional.

    • qLogOnstring

      Can be one of: "LOG_ON_SERVICE_USER""LOG_ON_CURRENT_USER"

Response

  • qReturnboolean

Errors

array

IsValidConnectionString(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
  }
}

Global OSName

()

Returns the name of the operating system.

Response

  • qReturnstring

Errors

array

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"
  }
}

Global OSVersion

()

Returns the version number of the operating system.

Response

  • qReturnstring

Errors

array

OSVersion()

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

  • qDocNamestring
    Required

    The GUID (in Qlik Sense Enterprise) or Name (in Qlik Sense Desktop) of the app to retrieve.

  • qUserNamestring

    Name of the user that opens the app.

  • qPasswordstring

    Password of the user.

  • qSerialstring

    Current Qlik Sense serial number.

  • qNoDataboolean

    Set this parameter to true to be able to open an app without loading its data. When this parameter is set to true, the objects in the app are present but contain no data. The script can be edited and reloaded. The default value is false.

Response

  • qReturnobject
    Show qReturn properties
    • qTypestring

      The native type of the object.

    • qHandleinteger

      The handle used to connect to object.

    • qGenericTypestring

      The type of the object.

    • qGenericIdstring

      Object ID.

Errors

array

OpenDoc(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"
    }
  }
}

Global ProductVersion

()
Deprecated
Use EngineVersion method instead

Returns the Qlik Sense version number.

Response

  • qReturnstring

Errors

array

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"
  }
}

Global PublishApp

(qAppId, qName, qStreamId)

Publishes an app to the supplied stream.

Parameters

  • qAppIdstring
    Required

    The Id of the app to publish.

  • qNamestring
    Required

    The name of the app to publish.

  • qStreamIdstring
    Required

    The stream Id of the app to publish.

Response

object

Errors

array

PublishApp(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": {}
}

Global QTProduct

()

Returns the Qlik product name.

Response

  • qReturnstring

Errors

array

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"
  }
}

Global QvVersion

()
Deprecated
Use the EngineVersion method instead

Returns the Qlik Sense version number.

Response

  • qReturnstring

Errors

array

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"
  }
}

Global ReloadExtensionList

()

Reloads the list of extensions.

Response

object

Errors

array

ReloadExtensionList()

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

  • qTargetAppIdstring
    Required

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

  • qSrcAppIDstring
    Required

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

  • qIdsarray 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

  • qSuccessboolean

Errors

array

ReplaceAppFromID(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
  }
}

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

  • qNewAppNamestring
    Required

    <Name of the saved app>

Response

  • qNewAppIdstring

Errors

array

SaveAs(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"
  }
}

Global ShutdownProcess

()

Shuts down the Qlik engine.

This operation is possible only in Qlik Sense Desktop.

Response

object

Errors

array

ShutdownProcess()

const result = await global.ShutdownProcess({})

Request

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

Response

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