Qlik Sense Engine (qix)

The JSON-RPC API over WebSocket API that enables you to interact with the Qlik Associative Engine for Qlik Sense applications.

Download specification

Doc

Doc AbortModal

(qAccept)

Aborts any selection mode in an app. For more information about selection mode, see BeginSelections method.

Parameters

  • qAcceptboolean
    Required

    Set this parameter to true to accept the selections before exiting the selection mode.

Response

object

Errors

array

AbortModal(qAccept)

const result = await doc.AbortModal([
  true
])

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "handle": 3,
  "method": "AbortModal",
  "params": {
    "qAccept": true
  }
}

Response

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

Doc AddAlternateState

(qStateName)

Adds an alternate state in the app. You can create multiple states within a Qlik Sense app and apply these states to specific objects within the app. Objects in a given state are not affected by user selections in the other states.

Parameters

  • qStateNamestring
    Required

    Name of the alternate state.

Response

object

Errors

array

AddAlternateState(qStateName)

const result = await doc.AddAlternateState([
  "value"
])

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "handle": 3,
  "method": "AddAlternateState",
  "params": {
    "qStateName": "value"
  }
}

Response

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

Doc AddFieldFromExpression

(qName, qExpr)

Adds a field on the fly.

The expression of a field on the fly is persisted but not its values.
The operation is successful if **qSuccess** is set to true.

Parameters

  • qNamestring
    Required

    Name of the field.

  • qExprstring
    Required

    Expression value. It is not possible to use all aggregation functions. For example, you cannot add a field on the fly with an expression that uses the Sum or Count aggregation functions.

Response

  • qSuccessboolean

Errors

array

AddFieldFromExpression(qName, qExpr)

const result = await doc.AddFieldFromExpression([
  "value",
  "value"
])

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "handle": 3,
  "method": "AddFieldFromExpression",
  "params": {
    "qName": "value",
    "qExpr": "value"
  }
}

Response

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

Doc AddSessionAlternateState

(qStateName, qSourceStateName?)

Adds an session alternate state in the app. You can create multiple states within a Qlik Sense app and apply these states to specific objects within the app. Objects in a given state are not affected by user selections in the other states. A session alternate state is not persisted and is not included in the StateNames array in the AppLayout. You can use the optional second parameter to choose any other state to get the initial selection on the new state from

Parameters

  • qStateNamestring
    Required

    Name of the alternate state.

  • qSourceStateNamestring

    Name of existing state to copy the initial selections from

Response

object

Errors

array

AddSessionAlternateState(qStateName, qSourceStateName?)

const result = await doc.AddSessionAlternateState([
  "value",
  "value"
])

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "handle": 3,
  "method": "AddSessionAlternateState",
  "params": {
    "qStateName": "value",
    "qSourceStateName": "value"
  }
}

Response

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

Doc ApplyAndVerifyBookmark

(qId)
Experimental

Applies a bookmark and verifies result dataset against originally selected values.

The operation is successful if **qApplySuccess** is set to true. **qWarnings** lists state and field with unmatching values

Parameters

  • qIdstring
    Required

    Identifier of the bookmark.

Response

  • qResultobject
    Experimental
    Show qResult properties
    • qApplySuccessboolean

      Apply successfully or not *

    • qWarningsarray of objects
      Experimental

      Field values verfication result *

      Show qWarnings properties
      • qStatestring

        Alternate State *

      • qFieldstring

        Field Name *

      • qVerifyResultstring

        Can be one of: "NOT_VERIFIED""FIELD_VALUE_MATCH_ALL""FIELD_MISSING""FIELD_VALUE_MISSING""STATE_MISSING"

      • qMissingValuesarray of strings
    • qGroupStateResultobject
      Experimental

      Result of applying GroupState to multiple cyclic groups.

      Show qGroupStateResult properties
      • qApplySuccessboolean

        When true, the operation was successful.

      • qWarningsarray of objects
        Experimental

        Lists which states failed to be applied and why.

        Show qWarnings properties
        • qStateobject
          Experimental
          Show qState properties
          • qInfoobject
            Show qInfo properties
            • qIdstring

              Identifier of the object. If the chosen identifier is already in use, the engine automatically sets another one. If an identifier is not set, the engine automatically sets one. This parameter is optional.

            • qTypestring

              Type of the object. This parameter is mandatory.

          • qActiveFieldDefstring

            String defining the active field.

        • qTypestring

          Can be one of: "group_missing""group_not_applicable""fielddef_missing"

Errors

array

ApplyAndVerifyBookmark(qId)

const result = await doc.ApplyAndVerifyBookmark([
  "value"
])

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "handle": 3,
  "method": "ApplyAndVerifyBookmark",
  "params": {
    "qId": "value"
  }
}

Response

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "qResult": {
      "qApplySuccess": true,
      "qWarnings": [
        {
          "qState": "value",
          "qField": "value",
          "qVerifyResult": "NOT_VERIFIED",
          "qMissingValues": [
            "value"
          ]
        }
      ],
      "qGroupStateResult": {
        "qApplySuccess": true,
        "qWarnings": [
          {
            "qState": {
              "qInfo": {
                "qId": "value",
                "qType": "value"
              },
              "qActiveFieldDef": "value"
            },
            "qType": "group_missing"
          }
        ]
      }
    }
  }
}

Doc ApplyBookmark

(qId)

Applies a bookmark.

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

Parameters

  • qIdstring
    Required

    Identifier of the bookmark.

Response

  • qSuccessboolean

Errors

array

ApplyBookmark(qId)

const result = await doc.ApplyBookmark([
  "value"
])

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "handle": 3,
  "method": "ApplyBookmark",
  "params": {
    "qId": "value"
  }
}

Response

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

Doc ApplyGroupStates

(qGroupStates)
Experimental

Parameters

  • qGroupStatesarray of objects
    RequiredExperimental
    Show qGroupStates properties
    • qInfoobject
      Show qInfo properties
      • qIdstring

        Identifier of the object. If the chosen identifier is already in use, the engine automatically sets another one. If an identifier is not set, the engine automatically sets one. This parameter is optional.

      • qTypestring

        Type of the object. This parameter is mandatory.

    • qActiveFieldDefstring

      String defining the active field.

Response

  • qResultobject
    Experimental

    Result of applying GroupState to multiple cyclic groups.

    Show qResult properties
    • qApplySuccessboolean

      When true, the operation was successful.

    • qWarningsarray of objects
      Experimental

      Lists which states failed to be applied and why.

      Show qWarnings properties
      • qStateobject
        Experimental
        Show qState properties
        • qInfoobject
          Show qInfo properties
          • qIdstring

            Identifier of the object. If the chosen identifier is already in use, the engine automatically sets another one. If an identifier is not set, the engine automatically sets one. This parameter is optional.

          • qTypestring

            Type of the object. This parameter is mandatory.

        • qActiveFieldDefstring

          String defining the active field.

      • qTypestring

        Can be one of: "group_missing""group_not_applicable""fielddef_missing"

Errors

array

ApplyGroupStates(qGroupStates)

const result = await doc.ApplyGroupStates([
  [
    {
      "qInfo": {
        "qId": "value",
        "qType": "value"
      },
      "qActiveFieldDef": "value"
    }
  ]
])

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "handle": 3,
  "method": "ApplyGroupStates",
  "params": {
    "qGroupStates": [
      {
        "qInfo": {
          "qId": "value",
          "qType": "value"
        },
        "qActiveFieldDef": "value"
      }
    ]
  }
}

Response

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "qResult": {
      "qApplySuccess": true,
      "qWarnings": [
        {
          "qState": {
            "qInfo": {
              "qId": "value",
              "qType": "value"
            },
            "qActiveFieldDef": "value"
          },
          "qType": "group_missing"
        }
      ]
    }
  }
}

Doc ApplyTemporaryBookmark

(qId)

Apply temporary bookmark identified by Id.

ApplyTemporaryBookmark method is only supported in SaaS Editions of Qlik Sense.

Parameters

  • qIdstring
    Required

    Identifier of the temporary selection state

Response

  • qReturnboolean

Errors

array

ApplyTemporaryBookmark(qId)

const result = await doc.ApplyTemporaryBookmark([
  "value"
])

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "handle": 3,
  "method": "ApplyTemporaryBookmark",
  "params": {
    "qId": "value"
  }
}

Response

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

Doc Back

()

Loads the last logical operation (if any).

Response

object

Errors

array

Back()

const result = await doc.Back({})

Request

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

Response

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

Doc BackCount

()

Returns the number of entries on the back stack.

Response

  • qReturninteger

Errors

array

BackCount()

const result = await doc.BackCount({})

Request

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

Response

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

Doc ChangeSessionAppOwner

(qNewOwnerId)
Experimental

Change the owner of a session app.

Can be used by a privileged user when creating a session app to be consumed by another user. Only useful in environments where it is possible to reconnect to a session app, currently only in cloud deployments.

Parameters

  • qNewOwnerIdstring
    Required

    Identifier of the new app owner.

Response

  • qSuccessboolean

Errors

array

ChangeSessionAppOwner(qNewOwnerId)

const result = await doc.ChangeSessionAppOwner([
  "value"
])

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "handle": 3,
  "method": "ChangeSessionAppOwner",
  "params": {
    "qNewOwnerId": "value"
  }
}

Response

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

Doc ChangeSessionAppSpace

(qSpaceId)
Experimental

Add a session app to a space.

Can be used by a privileged user when creating a session app to be consumed by other users. Only useful in environments where it is possible to reconnect to a session app, currently only in cloud deployments.

Parameters

  • qSpaceIdstring
    Required

    Identifier of the new space.

Response

  • qSuccessboolean

Errors

array

ChangeSessionAppSpace(qSpaceId)

const result = await doc.ChangeSessionAppSpace([
  "value"
])

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "handle": 3,
  "method": "ChangeSessionAppSpace",
  "params": {
    "qSpaceId": "value"
  }
}

Response

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

Doc CheckExpression

(qExpr, qLabels?)

Checks if a given expression is valid.

The expression is correct if the parameters _qErrorMsg_ , _qBadFieldNames_ and _qDangerousFieldNames_ are empty.

Parameters

  • qExprstring
    Required

    Expression to check.

  • qLabelsarray of strings

    List of labels.

Response

  • qErrorMsgstring
  • qBadFieldNamesarray of objects
    Show qBadFieldNames properties
    • qFrominteger

      Position in the expression of the first character of the field name.

    • qCountinteger

      Number of characters in the field name.

  • qDangerousFieldNamesarray of objects
    Show qDangerousFieldNames properties
    • qFrominteger

      Position in the expression of the first character of the field name.

    • qCountinteger

      Number of characters in the field name.

Errors

array

CheckExpression(qExpr, qLabels?)

const result = await doc.CheckExpression([
  "value",
  [
    "value"
  ]
])

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "handle": 3,
  "method": "CheckExpression",
  "params": {
    "qExpr": "value",
    "qLabels": [
      "value"
    ]
  }
}

Response

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "qErrorMsg": "value",
    "qBadFieldNames": [
      {
        "qFrom": 123,
        "qCount": 123
      }
    ],
    "qDangerousFieldNames": [
      {
        "qFrom": 123,
        "qCount": 123
      }
    ]
  }
}

Doc CheckNumberOrExpression

(qExpr)

Checks if:

  • A given expression is valid.
  • A number is correct according to the locale.

Parameters

  • qExprstring
    Required

    Expression to check.

Response

  • qErrorMsgstring
  • qBadFieldNamesarray of objects
    Show qBadFieldNames properties
    • qFrominteger

      Position in the expression of the first character of the field name.

    • qCountinteger

      Number of characters in the field name.

Errors

array

CheckNumberOrExpression(qExpr)

const result = await doc.CheckNumberOrExpression([
  "value"
])

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "handle": 3,
  "method": "CheckNumberOrExpression",
  "params": {
    "qExpr": "value"
  }
}

Response

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "qErrorMsg": "value",
    "qBadFieldNames": [
      {
        "qFrom": 123,
        "qCount": 123
      }
    ]
  }
}

Doc CheckScriptSyntax

()

Checks the syntax of a script.

Example

"result": { "qErrors": [ { "qErrLen": 3, "qTabIx": 0, "qLineInTab": 0, "qColInLine": 0, "qTextPos": 0 }, { "qErrLen": 5, "qTabIx": 0, "qLineInTab": 0, "qColInLine": 1, "qTextPos": 4, "qSecondaryFailure": true } ] }

The first area is the primary error area, the second area is the secondary error area. The second area is optional and is shown only if qSecondaryFailure is set to true. The second area ends when the next statement in the script begins.
The list of syntax errors in the script. If there are no errors, the engine returns: If there are errors, the engine returns the following properties in the response:
Name Description Type
qErrLen Length of the word where the error is located. Integer
qTabIx Number of the faulty section. Integer
qLineInTab Line number in the section where the error is located. Integer
qColInLine Position of the erroneous text from the beginning of the line. Integer
qTextPos Position of the erroneous text from the beginning of the script. Integer
qSecondaryFailure The default value is false. Boolean

Response

  • qErrorsarray of objects
    Show qErrors properties
    • qErrLeninteger

      Length of the word where the error is located.

    • qTabIxinteger

      Number of the faulty section.

    • qLineInTabinteger

      Line number in the section where the error is located.

    • qColInLineinteger

      Position of the erroneous text from the beginning of the line.

    • qTextPosinteger

      Position of the erroneous text from the beginning of the script.

    • qSecondaryFailureboolean

      The default value is false.

Errors

array

CheckScriptSyntax()

const result = await doc.CheckScriptSyntax({})

Request

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

Response

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "qErrors": [
      {
        "qErrLen": 123,
        "qTabIx": 123,
        "qLineInTab": 123,
        "qColInLine": 123,
        "qTextPos": 123,
        "qSecondaryFailure": true
      }
    ]
  }
}

Doc ClearAll

(qLockedAlso?, qStateName?)

Clear selections in fields for current state. Locked fields are not cleared by default.

Parameters

  • qLockedAlsoboolean

    When true, clears the selection for locked fields.

  • qStateNamestring

    Alternate state name. When set, applies to alternate state instead of current

Response

object

Errors

array

ClearAll(qLockedAlso?, qStateName?)

const result = await doc.ClearAll([
  true,
  "value"
])

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "handle": 3,
  "method": "ClearAll",
  "params": {
    "qLockedAlso": true,
    "qStateName": "value"
  }
}

Response

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

Doc ClearAllSoftPatches

()
Experimental

Clear the soft properties of all generic objects in the app

Response

object

Errors

array

ClearAllSoftPatches()

const result = await doc.ClearAllSoftPatches({})

Request

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

Response

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

Doc ClearUndoBuffer

()

Clears entirely the undo and redo buffer.

Response

object

Errors

array

ClearUndoBuffer()

const result = await doc.ClearUndoBuffer({})

Request

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

Response

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

Doc CloneBookmark

(qId)

Clones a bookmark.

The identifier is set by the engine.

Parameters

  • qIdstring
    Required

    Identifier of the object to clone.

Response

  • qCloneIdstring

Errors

array

CloneBookmark(qId)

const result = await doc.CloneBookmark([
  "value"
])

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "handle": 3,
  "method": "CloneBookmark",
  "params": {
    "qId": "value"
  }
}

Response

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

Doc CloneDimension

(qId)

Clones a dimension.

The identifier is set by the engine.

Parameters

  • qIdstring
    Required

    Identifier of the object to clone.

Response

  • qCloneIdstring

Errors

array

CloneDimension(qId)

const result = await doc.CloneDimension([
  "value"
])

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "handle": 3,
  "method": "CloneDimension",
  "params": {
    "qId": "value"
  }
}

Response

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

Doc CloneMeasure

(qId)

Clones a measure.

The identifier is set by the engine.

Parameters

  • qIdstring
    Required

    Identifier of the object to clone.

Response

  • qCloneIdstring

Errors

array

CloneMeasure(qId)

const result = await doc.CloneMeasure([
  "value"
])

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "handle": 3,
  "method": "CloneMeasure",
  "params": {
    "qId": "value"
  }
}

Response

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

Doc CloneObject

(qId)

Clones root level objects, such as sheets and stories. The CloneObject method works for both app objects and child objects. When you clone an object that contains children, the children are cloned as well. If you for example want to clone a visualization, you must provide the qID of the root object, in this case the sheet since CloneObject clones root level objects.

It is not possible to clone a session object.
The identifier is set by the engine.

Parameters

  • qIdstring
    Required

    Identifier of the object to clone. The identifier must be a root object.

Response

  • qCloneIdstring

Errors

array

CloneObject(qId)

const result = await doc.CloneObject([
  "value"
])

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "handle": 3,
  "method": "CloneObject",
  "params": {
    "qId": "value"
  }
}

Response

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

Doc CommitDraft

(qId)
Deprecated

Commits the draft of an object that was previously created by invoking the CreateDraft method. Committing a draft replaces the corresponding published object.

Parameters

  • qIdstring
    Required

    Identifier of the draft to commit.

Response

object

Errors

array

CommitDraft(qId)

const result = await doc.CommitDraft([
  "value"
])

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "handle": 3,
  "method": "CommitDraft",
  "params": {
    "qId": "value"
  }
}

Response

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

Doc CommitScript

(qCommitMessage?)
Experimental

Commits the current script version so that any future changes will be part of a new version.

Parameters

  • qCommitMessagestring

    Name of the version.

    Only applicable to QCS.

Response

object

Errors

array

CommitScript(qCommitMessage?)

const result = await doc.CommitScript([
  "value"
])

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "handle": 3,
  "method": "CommitScript",
  "params": {
    "qCommitMessage": "value"
  }
}

Response

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

Doc CreateBookmark

(qProp)

Creates a bookmark.

Parameters

  • qPropobject
    Required

    Properties for the object.

    Show qProp properties
    • qInfoobject
      Show qInfo properties
      • qIdstring

        Identifier of the object. If the chosen identifier is already in use, the engine automatically sets another one. If an identifier is not set, the engine automatically sets one. This parameter is optional.

      • qTypestring

        Type of the object. This parameter is mandatory.

    • qMetaDefobject

      Used to collect meta data.

      Properties

      Semantic type with an empty structure.

    • qIncludeVariablesboolean
      Experimental

      If true all variables will be stored in the bookmark.

    • qDistinctValuesboolean
      Experimental

      If true all selected values will be stored distinct, i.e. searchstrings will not be kept.

Response

  • qInfoobject
    Show qInfo properties
    • qIdstring

      Identifier of the object. If the chosen identifier is already in use, the engine automatically sets another one. If an identifier is not set, the engine automatically sets one. This parameter is optional.

    • qTypestring

      Type of the object. This parameter is mandatory.

  • 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

CreateBookmark(qProp)

const result = await doc.CreateBookmark([
  {
    "qInfo": {
      "qId": "value",
      "qType": "value"
    },
    "qMetaDef": {},
    "qIncludeVariables": true,
    "qDistinctValues": true
  }
])

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "handle": 3,
  "method": "CreateBookmark",
  "params": {
    "qProp": {
      "qInfo": {
        "qId": "value",
        "qType": "value"
      },
      "qMetaDef": {},
      "qIncludeVariables": true,
      "qDistinctValues": true
    }
  }
}

Response

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "qInfo": {
      "qId": "value",
      "qType": "value"
    },
    "qReturn": {
      "qType": "value",
      "qHandle": 123,
      "qGenericType": "value",
      "qGenericId": "value"
    }
  }
}

Doc CreateBookmarkEx

(qProp, qObjectIdsToPatch?)
Experimental

Creates a bookmark with softpatches.

Parameters

  • qPropobject
    Required

    Properties for the object.

    Show qProp properties
    • qInfoobject
      Show qInfo properties
      • qIdstring

        Identifier of the object. If the chosen identifier is already in use, the engine automatically sets another one. If an identifier is not set, the engine automatically sets one. This parameter is optional.

      • qTypestring

        Type of the object. This parameter is mandatory.

    • qMetaDefobject

      Used to collect meta data.

      Properties

      Semantic type with an empty structure.

    • qIncludeVariablesboolean
      Experimental

      If true all variables will be stored in the bookmark.

    • qDistinctValuesboolean
      Experimental

      If true all selected values will be stored distinct, i.e. searchstrings will not be kept.

  • qObjectIdsToPatcharray of strings

    Add softpatches for this objects if available. If empty all softpatches are added to the bookmark.

Response

  • qInfoobject
    Show qInfo properties
    • qIdstring

      Identifier of the object. If the chosen identifier is already in use, the engine automatically sets another one. If an identifier is not set, the engine automatically sets one. This parameter is optional.

    • qTypestring

      Type of the object. This parameter is mandatory.

  • 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

CreateBookmarkEx(qProp, qObjectIdsToPatch?)

const result = await doc.CreateBookmarkEx([
  {
    "qInfo": {
      "qId": "value",
      "qType": "value"
    },
    "qMetaDef": {},
    "qIncludeVariables": true,
    "qDistinctValues": true
  },
  [
    "value"
  ]
])

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "handle": 3,
  "method": "CreateBookmarkEx",
  "params": {
    "qProp": {
      "qInfo": {
        "qId": "value",
        "qType": "value"
      },
      "qMetaDef": {},
      "qIncludeVariables": true,
      "qDistinctValues": true
    },
    "qObjectIdsToPatch": [
      "value"
    ]
  }
}

Response

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "qInfo": {
      "qId": "value",
      "qType": "value"
    },
    "qReturn": {
      "qType": "value",
      "qHandle": 123,
      "qGenericType": "value",
      "qGenericId": "value"
    }
  }
}

Doc CreateConnection

(qConnection)

Creates a connection. A connection indicates from which data source the data should be taken.

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

  • qConnectionIdstring

Errors

array

CreateConnection(qConnection)

const result = await doc.CreateConnection([
  {
    "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": "CreateConnection",
  "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": {
    "qConnectionId": "value"
  }
}

Doc CreateDimension

(qProp)

Creates a master dimension. A master dimension is stored in the library of an app and can be used in many objects. Several generic objects can contain the same dimension.

Parameters

  • qPropobject
    Required

    Information about the properties.

    Show qProp properties
    • qInfoobject
      Show qInfo properties
      • qIdstring

        Identifier of the object. If the chosen identifier is already in use, the engine automatically sets another one. If an identifier is not set, the engine automatically sets one. This parameter is optional.

      • qTypestring

        Type of the object. This parameter is mandatory.

    • qDimobject
      Show qDim properties
      • qGroupingstring

        Can be one of: "N""H""C"

      • qFieldDefsarray of strings

        Array of dimension names.

      • qFieldLabelsarray of strings

        Array of dimension labels.

      • qLabelExpressionstring
      • qAliasstring

        Alias of the dimension.

    • qMetaDefobject

      Used to collect meta data.

      Properties

      Semantic type with an empty structure.

Response

  • qInfoobject
    Show qInfo properties
    • qIdstring

      Identifier of the object. If the chosen identifier is already in use, the engine automatically sets another one. If an identifier is not set, the engine automatically sets one. This parameter is optional.

    • qTypestring

      Type of the object. This parameter is mandatory.

  • 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

CreateDimension(qProp)

const result = await doc.CreateDimension([
  {
    "qInfo": {
      "qId": "value",
      "qType": "value"
    },
    "qDim": {
      "qGrouping": "N",
      "qFieldDefs": [
        "value"
      ],
      "qFieldLabels": [
        "value"
      ],
      "qLabelExpression": "value",
      "qAlias": "value"
    },
    "qMetaDef": {}
  }
])

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "handle": 3,
  "method": "CreateDimension",
  "params": {
    "qProp": {
      "qInfo": {
        "qId": "value",
        "qType": "value"
      },
      "qDim": {
        "qGrouping": "N",
        "qFieldDefs": [
          "value"
        ],
        "qFieldLabels": [
          "value"
        ],
        "qLabelExpression": "value",
        "qAlias": "value"
      },
      "qMetaDef": {}
    }
  }
}

Response

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "qInfo": {
      "qId": "value",
      "qType": "value"
    },
    "qReturn": {
      "qType": "value",
      "qHandle": 123,
      "qGenericType": "value",
      "qGenericId": "value"
    }
  }
}

Doc CreateDraft

(qId)
Deprecated

Creates a draft of an object. This method can be used to create a draft of a sheet or a story that is published. This is a way to continue working on a sheet or a story that is published. Replace the published object by the content of the draft by invoking the CommitDraft method.

The identifier is set by the engine.

Parameters

  • qIdstring
    Required

    Identifier of the object to create a draft from.

Response

  • qDraftIdstring

Errors

array

CreateDraft(qId)

const result = await doc.CreateDraft([
  "value"
])

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "handle": 3,
  "method": "CreateDraft",
  "params": {
    "qId": "value"
  }
}

Response

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

Doc CreateMeasure

(qProp)

Creates a master measure. A master measure is stored in the library of an app and can be used in many objects. Several generic objects can contain the same measure.

Parameters

  • qPropobject
    Required

    Information about the properties.

    Show qProp properties
    • qInfoobject
      Show qInfo properties
      • qIdstring

        Identifier of the object. If the chosen identifier is already in use, the engine automatically sets another one. If an identifier is not set, the engine automatically sets one. This parameter is optional.

      • qTypestring

        Type of the object. This parameter is mandatory.

    • qMeasureobject
      Show qMeasure properties
      • qLabelstring

        Label of the measure.

      • qDefstring

        Definition of the measure.

      • qGroupingstring

        Can be one of: "N""H""C"

      • qExpressionsarray of strings

        Array of expressions.

      • qActiveExpressioninteger

        Index to the active expression in a measure.

      • qLabelExpressionstring

        Optional expression used for dynamic label.

      • qNumFormatobject

        Sets the formatting of a field. The properties of qFieldAttributes and the formatting mechanism are described below.

        Formatting mechanism

        The formatting mechanism depends on the type set in qType, as shown below:

        In case of inconsistencies between the type and the format pattern, the format pattern takes precedence over the type.

        Type is DATE, TIME, TIMESTAMP or INTERVAL

        The following applies:

        • If a format pattern is defined in qFmt , the formatting is as defined in qFmt .
        • If qFmt is empty, the formatting is defined by the number interpretation variables included at the top of the script ( TimeFormat , DateFormat , TimeStampFormat ).
        • The properties qDec , qThou , qnDec , qUseThou are not used.

        Type is INTEGER

        The following applies:

        • If a format pattern is defined in qFmt , the engine looks at the values set in qDec and qThou . If these properties are not defined, the formatting mechanism uses the number interpretation variables included at the top of the script ( DecimalSep and ThousandSep ).
        • If no format pattern is defined in qFmt , no formatting is applied. The properties qDec , qThou , qnDec , qUseThou and the number interpretation variables defined in the script are not used .

        Type is REAL

        The following applies:

        • If a format pattern is defined in qFmt , the engine looks at the values set in qDec and qThou . If these properties are not defined, the engine uses the number interpretation variables included at the top of the script ( DecimalSep and ThousandSep ).
        • If no format pattern is defined in qFmt , and if the value is almost an integer value (for example, 14,000012), the value is formatted as an integer. The properties qDec , qThou , qnDec , qUseThou are not used.
        • If no format pattern is defined in qFmt , and if qnDec is defined and not 0, the property qDec is used. If qDec is not defined, the variable DecimalSep defined at the top of the script is used.
        • If no format pattern is defined in qFmt , and if qnDec is 0, the number of decimals is 14 and the property qDec is used. If qDec is not defined, the variable DecimalSep defined at the top of the script is used.

        Type is FIX

        The following applies:

        • If a format pattern is defined in qFmt , the engine looks at the values set in qDec and qThou . If these properties are not defined, the engine uses the number interpretation variables included at the top of the script ( DecimalSep and ThousandSep ).
        • If no format pattern is defined in qFmt , the properties qDec and qnDec are used. If qDec is not defined, the variable DecimalSep defined at the top of the script is used.

        Type is MONEY

        The following applies:

        • If a format pattern is defined in qFmt , the engine looks at the values set in qDec and qThou . If these properties are not defined, the engine uses the number interpretation variables included at the top of any script ( MoneyDecimalSep and MoneyThousandSep ).
        • If no format pattern is defined in qFmt , the engine uses the number interpretation variables included at the top of the script ( MoneyDecimalSep and MoneyThousandSep ).

        Type is ASCII

        No formatting, qFmt is ignored.

        Show qNumFormat properties
        • qTypestring

          Can be one of: "U""A""I""R""F""M""D""T""TS""IV"

        • qnDecinteger

          Number of decimals. Default is 10.

        • qUseThouinteger

          Defines whether or not a thousands separator must be used. Default is 0.

        • qFmtstring

          Defines the format pattern that applies to qText . Is used in connection to the type of the field (parameter qType ). For more information, see Formatting mechanism. Example: YYYY-MM-DD for a date.

        • qDecstring

          Defines the decimal separator. Example: .

        • qThoustring

          Defines the thousand separator (if any). Is used if qUseThou is set to 1. Example: ,

    • qMetaDefobject

      Used to collect meta data.

      Properties

      Semantic type with an empty structure.

Response

  • qInfoobject
    Show qInfo properties
    • qIdstring

      Identifier of the object. If the chosen identifier is already in use, the engine automatically sets another one. If an identifier is not set, the engine automatically sets one. This parameter is optional.

    • qTypestring

      Type of the object. This parameter is mandatory.

  • 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

CreateMeasure(qProp)

const result = await doc.CreateMeasure([
  {
    "qInfo": {
      "qId": "value",
      "qType": "value"
    },
    "qMeasure": {
      "qLabel": "value",
      "qDef": "value",
      "qGrouping": "N",
      "qExpressions": [
        "value"
      ],
      "qActiveExpression": 123,
      "qLabelExpression": "value",
      "qNumFormat": {
        "qType": "U",
        "qnDec": 10,
        "qUseThou": 123,
        "qFmt": "value",
        "qDec": "value",
        "qThou": "value"
      }
    },
    "qMetaDef": {}
  }
])

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "handle": 3,
  "method": "CreateMeasure",
  "params": {
    "qProp": {
      "qInfo": {
        "qId": "value",
        "qType": "value"
      },
      "qMeasure": {
        "qLabel": "value",
        "qDef": "value",
        "qGrouping": "N",
        "qExpressions": [
          "value"
        ],
        "qActiveExpression": 123,
        "qLabelExpression": "value",
        "qNumFormat": {
          "qType": "U",
          "qnDec": 10,
          "qUseThou": 123,
          "qFmt": "value",
          "qDec": "value",
          "qThou": "value"
        }
      },
      "qMetaDef": {}
    }
  }
}

Response

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "qInfo": {
      "qId": "value",
      "qType": "value"
    },
    "qReturn": {
      "qType": "value",
      "qHandle": 123,
      "qGenericType": "value",
      "qGenericId": "value"
    }
  }
}

Doc CreateObject

(qProp)

Creates a generic object at app level. For more information on generic objects, see Generic object. It is possible to create a generic object that is linked to another object. A linked object is an object that points to a linking object. The linking object is defined in the properties of the linked object (in qExtendsId ). The linked object has the same properties as the linking object.

The linking object cannot be a transient object.

Parameters

  • qPropobject
    Required

    Information about the object.

    Show qProp properties
    • qInfoobject
      Show qInfo properties
      • qIdstring

        Identifier of the object. If the chosen identifier is already in use, the engine automatically sets another one. If an identifier is not set, the engine automatically sets one. This parameter is optional.

      • qTypestring

        Type of the object. This parameter is mandatory.

    • qExtendsIdstring

      Should be set to create an object that is linked to another object. Enter the identifier of the linking object (i.e the object you want to link to). If you do not want to link your object, set this parameter to an empty string.

    • qMetaDefobject

      Used to collect meta data.

      Properties

      Semantic type with an empty structure.

    • qStateNamestring

      Name of the alternate state. Default is current selections $ .

Response

  • qInfoobject
    Show qInfo properties
    • qIdstring

      Identifier of the object. If the chosen identifier is already in use, the engine automatically sets another one. If an identifier is not set, the engine automatically sets one. This parameter is optional.

    • qTypestring

      Type of the object. This parameter is mandatory.

  • 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

CreateObject(qProp)

const result = await doc.CreateObject([
  {
    "qInfo": {
      "qId": "value",
      "qType": "value"
    },
    "qExtendsId": "value",
    "qMetaDef": {},
    "qStateName": "value"
  }
])

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "handle": 3,
  "method": "CreateObject",
  "params": {
    "qProp": {
      "qInfo": {
        "qId": "value",
        "qType": "value"
      },
      "qExtendsId": "value",
      "qMetaDef": {},
      "qStateName": "value"
    }
  }
}

Response

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "qInfo": {
      "qId": "value",
      "qType": "value"
    },
    "qReturn": {
      "qType": "value",
      "qHandle": 123,
      "qGenericType": "value",
      "qGenericId": "value"
    }
  }
}

Doc CreateSessionObject

(qProp)

Creates a transient object. For example, you can use a transient object to create an app overview or a story overview. It is possible to create a transient object that is linked to another object. A linked object is an object that points to a linking object. The linking object is defined in the properties of the linked object (in qExtendsId ). The linked object has the same properties as the linking object.

The linking object cannot be a transient object.

Parameters

  • qPropobject
    Required

    Information about the object.

    Show qProp properties
    • qInfoobject
      Show qInfo properties
      • qIdstring

        Identifier of the object. If the chosen identifier is already in use, the engine automatically sets another one. If an identifier is not set, the engine automatically sets one. This parameter is optional.

      • qTypestring

        Type of the object. This parameter is mandatory.

    • qExtendsIdstring

      Should be set to create an object that is linked to another object. Enter the identifier of the linking object (i.e the object you want to link to). If you do not want to link your object, set this parameter to an empty string.

    • qMetaDefobject

      Used to collect meta data.

      Properties

      Semantic type with an empty structure.

    • qStateNamestring

      Name of the alternate state. Default is current selections $ .

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

CreateSessionObject(qProp)

const result = await doc.CreateSessionObject([
  {
    "qInfo": {
      "qId": "value",
      "qType": "value"
    },
    "qExtendsId": "value",
    "qMetaDef": {},
    "qStateName": "value"
  }
])

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "handle": 3,
  "method": "CreateSessionObject",
  "params": {
    "qProp": {
      "qInfo": {
        "qId": "value",
        "qType": "value"
      },
      "qExtendsId": "value",
      "qMetaDef": {},
      "qStateName": "value"
    }
  }
}

Response

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "qReturn": {
      "qType": "value",
      "qHandle": 123,
      "qGenericType": "value",
      "qGenericId": "value"
    }
  }
}

Doc CreateSessionVariable

(qProp)

Creates a transient variable.

To set some properties to the variable, use the _SetProperties method_.

Definition

A variable in Qlik Sense is a named entity, containing a data value. This value can be static or be the result of a calculation. A variable acquires its value at the same time that the variable is created or after when updating the properties of the variable. Variables can be used in bookmarks and can contain numeric or alphanumeric data. Any change made to the variable is applied everywhere the variable is used. When a variable is used in an expression, it is substituted by its value or the variable's definition.

Example

The variable x contains the text string Sum(Sales) . In a chart, you define the expression $(x)/12 . The effect is exactly the same as having the chart expression Sum(Sales)/12 . However, if you change the value of the variable x to Sum(Budget) , the data in the chart are immediately recalculated with the expression interpreted as Sum(Budget)/12 .

Parameters

  • qPropobject
    Required

    Name of the variable. Variable names are case sensitive.

    Show qProp properties
    • qInfoobject
      Show qInfo properties
      • qIdstring

        Identifier of the object. If the chosen identifier is already in use, the engine automatically sets another one. If an identifier is not set, the engine automatically sets one. This parameter is optional.

      • qTypestring

        Type of the object. This parameter is mandatory.

    • qMetaDefobject

      Used to collect meta data.

      Properties

      Semantic type with an empty structure.

    • qNamestring

      Name of the variable. The name must be unique. This parameter is mandatory.

    • qCommentstring

      Comment related to the variable. This parameter is optional.

    • qNumberPresentationobject

      Sets the formatting of a field. The properties of qFieldAttributes and the formatting mechanism are described below.

      Formatting mechanism

      The formatting mechanism depends on the type set in qType, as shown below:

      In case of inconsistencies between the type and the format pattern, the format pattern takes precedence over the type.

      Type is DATE, TIME, TIMESTAMP or INTERVAL

      The following applies:

      • If a format pattern is defined in qFmt , the formatting is as defined in qFmt .
      • If qFmt is empty, the formatting is defined by the number interpretation variables included at the top of the script ( TimeFormat , DateFormat , TimeStampFormat ).
      • The properties qDec , qThou , qnDec , qUseThou are not used.

      Type is INTEGER

      The following applies:

      • If a format pattern is defined in qFmt , the engine looks at the values set in qDec and qThou . If these properties are not defined, the formatting mechanism uses the number interpretation variables included at the top of the script ( DecimalSep and ThousandSep ).
      • If no format pattern is defined in qFmt , no formatting is applied. The properties qDec , qThou , qnDec , qUseThou and the number interpretation variables defined in the script are not used .

      Type is REAL

      The following applies:

      • If a format pattern is defined in qFmt , the engine looks at the values set in qDec and qThou . If these properties are not defined, the engine uses the number interpretation variables included at the top of the script ( DecimalSep and ThousandSep ).
      • If no format pattern is defined in qFmt , and if the value is almost an integer value (for example, 14,000012), the value is formatted as an integer. The properties qDec , qThou , qnDec , qUseThou are not used.
      • If no format pattern is defined in qFmt , and if qnDec is defined and not 0, the property qDec is used. If qDec is not defined, the variable DecimalSep defined at the top of the script is used.
      • If no format pattern is defined in qFmt , and if qnDec is 0, the number of decimals is 14 and the property qDec is used. If qDec is not defined, the variable DecimalSep defined at the top of the script is used.

      Type is FIX

      The following applies:

      • If a format pattern is defined in qFmt , the engine looks at the values set in qDec and qThou . If these properties are not defined, the engine uses the number interpretation variables included at the top of the script ( DecimalSep and ThousandSep ).
      • If no format pattern is defined in qFmt , the properties qDec and qnDec are used. If qDec is not defined, the variable DecimalSep defined at the top of the script is used.

      Type is MONEY

      The following applies:

      • If a format pattern is defined in qFmt , the engine looks at the values set in qDec and qThou . If these properties are not defined, the engine uses the number interpretation variables included at the top of any script ( MoneyDecimalSep and MoneyThousandSep ).
      • If no format pattern is defined in qFmt , the engine uses the number interpretation variables included at the top of the script ( MoneyDecimalSep and MoneyThousandSep ).

      Type is ASCII

      No formatting, qFmt is ignored.

      Show qNumberPresentation properties
      • qTypestring

        Can be one of: "U""A""I""R""F""M""D""T""TS""IV"

      • qnDecinteger

        Number of decimals. Default is 10.

      • qUseThouinteger

        Defines whether or not a thousands separator must be used. Default is 0.

      • qFmtstring

        Defines the format pattern that applies to qText . Is used in connection to the type of the field (parameter qType ). For more information, see Formatting mechanism. Example: YYYY-MM-DD for a date.

      • qDecstring

        Defines the decimal separator. Example: .

      • qThoustring

        Defines the thousand separator (if any). Is used if qUseThou is set to 1. Example: ,

    • qIncludeInBookmarkboolean

      Set this property to true to update the variable when applying a bookmark. The variable value will be persisted in the bookmark. The value of a variable can affect the state of the selections. Script variables cannot be persisted in the bookmark. The default value is false.

    • qDefinitionstring

      Definition of the variable.

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

CreateSessionVariable(qProp)

const result = await doc.CreateSessionVariable([
  {
    "qInfo": {
      "qId": "value",
      "qType": "value"
    },
    "qMetaDef": {},
    "qName": "value",
    "qComment": "value",
    "qNumberPresentation": {
      "qType": "U",
      "qnDec": 10,
      "qUseThou": 123,
      "qFmt": "value",
      "qDec": "value",
      "qThou": "value"
    },
    "qIncludeInBookmark": true,
    "qDefinition": "value"
  }
])

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "handle": 3,
  "method": "CreateSessionVariable",
  "params": {
    "qProp": {
      "qInfo": {
        "qId": "value",
        "qType": "value"
      },
      "qMetaDef": {},
      "qName": "value",
      "qComment": "value",
      "qNumberPresentation": {
        "qType": "U",
        "qnDec": 10,
        "qUseThou": 123,
        "qFmt": "value",
        "qDec": "value",
        "qThou": "value"
      },
      "qIncludeInBookmark": true,
      "qDefinition": "value"
    }
  }
}

Response

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "qReturn": {
      "qType": "value",
      "qHandle": 123,
      "qGenericType": "value",
      "qGenericId": "value"
    }
  }
}

Doc CreateTemporaryBookmark

(qOptions, qObjectIdsToPatch?)

Create temporary bookmark

CreateTemporaryBookmark method is only supported in SaaS Editions of Qlik Sense.

Parameters

  • qOptionsobject
    Required

    Options for the temporary bookmark

    Show qOptions properties
    • qIncludeVariablesboolean

      IncludeVariables If true all variables will be stored in the temporary bookmark

    • qIncludeAllPatchesboolean

      IncludeAllPatches If true all patches will be stored in the temporary bookmark, if false ObjectIdsToPatch will determine what patches to include

  • qObjectIdsToPatcharray of strings

    Add softpatches for these objects to the bookmark if available. If IncludePatches is true, softpatches are included for all objects. Any session objects included are also added to the bookmark. IncludePatches has no effect on the patching of session objects.

Response

  • qIdstring
  • qReturnboolean

Errors

array

CreateTemporaryBookmark(qOptions, qObjectIdsToPatch?)

const result = await doc.CreateTemporaryBookmark([
  {
    "qIncludeVariables": true,
    "qIncludeAllPatches": true
  },
  [
    "value"
  ]
])

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "handle": 3,
  "method": "CreateTemporaryBookmark",
  "params": {
    "qOptions": {
      "qIncludeVariables": true,
      "qIncludeAllPatches": true
    },
    "qObjectIdsToPatch": [
      "value"
    ]
  }
}

Response

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

Doc CreateVariable

(qName)
Deprecated
Use Doc::CreateVariableEx method instead

Creates a variable.

Parameters

  • qNamestring
    Required

    Name of the variable. Variable names are case sensitive.

Response

  • qReturnboolean

Errors

array

CreateVariable(qName)

const result = await doc.CreateVariable([
  "value"
])

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "handle": 3,
  "method": "CreateVariable",
  "params": {
    "qName": "value"
  }
}

Response

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

Doc CreateVariableEx

(qProp)

Creates a variable. To create a variable via a script, you need to use the SetScript method. For more information, see Create a variable.

To set some properties to the variable, use the _SetProperties method_.
In a published app, only transient variables can be created. See _CreateSessionVariable method_.

Definition

A variable in Qlik Sense is a named entity, containing a data value. This value can be static or be the result of a calculation. A variable acquires its value at the same time that the variable is created or after when updating the properties of the variable. Variables can be used in bookmarks and can contain numeric or alphanumeric data. Any change made to the variable is applied everywhere the variable is used. When a variable is used in an expression, it is substituted by its value or the variable's definition.

Example

The variable x contains the text string Sum(Sales) . In a chart, you define the expression $(x)/12 . The effect is exactly the same as having the chart expression Sum(Sales)/12 . However, if you change the value of the variable x to Sum(Budget) , the data in the chart are immediately recalculated with the expression interpreted as Sum(Budget)/12 .

Parameters

  • qPropobject
    Required

    Name of the variable. Variable names are case sensitive and must be unique.

    Show qProp properties
    • qInfoobject
      Show qInfo properties
      • qIdstring

        Identifier of the object. If the chosen identifier is already in use, the engine automatically sets another one. If an identifier is not set, the engine automatically sets one. This parameter is optional.

      • qTypestring

        Type of the object. This parameter is mandatory.

    • qMetaDefobject

      Used to collect meta data.

      Properties

      Semantic type with an empty structure.

    • qNamestring

      Name of the variable. The name must be unique. This parameter is mandatory.

    • qCommentstring

      Comment related to the variable. This parameter is optional.

    • qNumberPresentationobject

      Sets the formatting of a field. The properties of qFieldAttributes and the formatting mechanism are described below.

      Formatting mechanism

      The formatting mechanism depends on the type set in qType, as shown below:

      In case of inconsistencies between the type and the format pattern, the format pattern takes precedence over the type.

      Type is DATE, TIME, TIMESTAMP or INTERVAL

      The following applies:

      • If a format pattern is defined in qFmt , the formatting is as defined in qFmt .
      • If qFmt is empty, the formatting is defined by the number interpretation variables included at the top of the script ( TimeFormat , DateFormat , TimeStampFormat ).
      • The properties qDec , qThou , qnDec , qUseThou are not used.

      Type is INTEGER

      The following applies:

      • If a format pattern is defined in qFmt , the engine looks at the values set in qDec and qThou . If these properties are not defined, the formatting mechanism uses the number interpretation variables included at the top of the script ( DecimalSep and ThousandSep ).
      • If no format pattern is defined in qFmt , no formatting is applied. The properties qDec , qThou , qnDec , qUseThou and the number interpretation variables defined in the script are not used .

      Type is REAL

      The following applies:

      • If a format pattern is defined in qFmt , the engine looks at the values set in qDec and qThou . If these properties are not defined, the engine uses the number interpretation variables included at the top of the script ( DecimalSep and ThousandSep ).
      • If no format pattern is defined in qFmt , and if the value is almost an integer value (for example, 14,000012), the value is formatted as an integer. The properties qDec , qThou , qnDec , qUseThou are not used.
      • If no format pattern is defined in qFmt , and if qnDec is defined and not 0, the property qDec is used. If qDec is not defined, the variable DecimalSep defined at the top of the script is used.
      • If no format pattern is defined in qFmt , and if qnDec is 0, the number of decimals is 14 and the property qDec is used. If qDec is not defined, the variable DecimalSep defined at the top of the script is used.

      Type is FIX

      The following applies:

      • If a format pattern is defined in qFmt , the engine looks at the values set in qDec and qThou . If these properties are not defined, the engine uses the number interpretation variables included at the top of the script ( DecimalSep and ThousandSep ).
      • If no format pattern is defined in qFmt , the properties qDec and qnDec are used. If qDec is not defined, the variable DecimalSep defined at the top of the script is used.

      Type is MONEY

      The following applies:

      • If a format pattern is defined in qFmt , the engine looks at the values set in qDec and qThou . If these properties are not defined, the engine uses the number interpretation variables included at the top of any script ( MoneyDecimalSep and MoneyThousandSep ).
      • If no format pattern is defined in qFmt , the engine uses the number interpretation variables included at the top of the script ( MoneyDecimalSep and MoneyThousandSep ).

      Type is ASCII

      No formatting, qFmt is ignored.

      Show qNumberPresentation properties
      • qTypestring

        Can be one of: "U""A""I""R""F""M""D""T""TS""IV"

      • qnDecinteger

        Number of decimals. Default is 10.

      • qUseThouinteger

        Defines whether or not a thousands separator must be used. Default is 0.

      • qFmtstring

        Defines the format pattern that applies to qText . Is used in connection to the type of the field (parameter qType ). For more information, see Formatting mechanism. Example: YYYY-MM-DD for a date.

      • qDecstring

        Defines the decimal separator. Example: .

      • qThoustring

        Defines the thousand separator (if any). Is used if qUseThou is set to 1. Example: ,

    • qIncludeInBookmarkboolean

      Set this property to true to update the variable when applying a bookmark. The variable value will be persisted in the bookmark. The value of a variable can affect the state of the selections. Script variables cannot be persisted in the bookmark. The default value is false.

    • qDefinitionstring

      Definition of the variable.

Response

  • qInfoobject
    Show qInfo properties
    • qIdstring

      Identifier of the object. If the chosen identifier is already in use, the engine automatically sets another one. If an identifier is not set, the engine automatically sets one. This parameter is optional.

    • qTypestring

      Type of the object. This parameter is mandatory.

  • 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

CreateVariableEx(qProp)

const result = await doc.CreateVariableEx([
  {
    "qInfo": {
      "qId": "value",
      "qType": "value"
    },
    "qMetaDef": {},
    "qName": "value",
    "qComment": "value",
    "qNumberPresentation": {
      "qType": "U",
      "qnDec": 10,
      "qUseThou": 123,
      "qFmt": "value",
      "qDec": "value",
      "qThou": "value"
    },
    "qIncludeInBookmark": true,
    "qDefinition": "value"
  }
])

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "handle": 3,
  "method": "CreateVariableEx",
  "params": {
    "qProp": {
      "qInfo": {
        "qId": "value",
        "qType": "value"
      },
      "qMetaDef": {},
      "qName": "value",
      "qComment": "value",
      "qNumberPresentation": {
        "qType": "U",
        "qnDec": 10,
        "qUseThou": 123,
        "qFmt": "value",
        "qDec": "value",
        "qThou": "value"
      },
      "qIncludeInBookmark": true,
      "qDefinition": "value"
    }
  }
}

Response

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "qInfo": {
      "qId": "value",
      "qType": "value"
    },
    "qReturn": {
      "qType": "value",
      "qHandle": 123,
      "qGenericType": "value",
      "qGenericId": "value"
    }
  }
}

Doc DeleteConnection

(qConnectionId)

Deletes a connection.

In Qlik Sense Enterprise, there is an additional file connection named _AttachedFiles_ . The AttachedFiles connection can only be removed by the administrator of the system.

Parameters

  • qConnectionIdstring
    Required

    Identifier of the connection to remove.

Response

object

Errors

array

DeleteConnection(qConnectionId)

const result = await doc.DeleteConnection([
  "value"
])

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "handle": 3,
  "method": "DeleteConnection",
  "params": {
    "qConnectionId": "value"
  }
}

Response

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

Doc DestroyBookmark

(qId)

Removes a bookmark.

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

Parameters

  • qIdstring
    Required

    Identifier of the bookmark.

Response

  • qSuccessboolean

Errors

array

DestroyBookmark(qId)

const result = await doc.DestroyBookmark([
  "value"
])

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "handle": 3,
  "method": "DestroyBookmark",
  "params": {
    "qId": "value"
  }
}

Response

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

Doc DestroyDimension

(qId)

Removes a dimension.

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

Parameters

  • qIdstring
    Required

    Identifier of the dimension to remove.

Response

  • qSuccessboolean

Errors

array

DestroyDimension(qId)

const result = await doc.DestroyDimension([
  "value"
])

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "handle": 3,
  "method": "DestroyDimension",
  "params": {
    "qId": "value"
  }
}

Response

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

Doc DestroyDraft

(qId, qSourceId)
Deprecated

Removes the draft of an object. The children of the draft object (if any) are removed as well. This method can be used to cancel the work on the draft of an object. For example, if you had created a draft of a sheet that is published, you might not want anymore to replace the published sheet.

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

Parameters

  • qIdstring
    Required

    Identifier of the draft object to remove.

  • qSourceIdstring
    Required

    Identifier of the source object (the object from which a draft was created).

Response

  • qSuccessboolean

Errors

array

DestroyDraft(qId, qSourceId)

const result = await doc.DestroyDraft([
  "value",
  "value"
])

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "handle": 3,
  "method": "DestroyDraft",
  "params": {
    "qId": "value",
    "qSourceId": "value"
  }
}

Response

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

Doc DestroyMeasure

(qId)

Removes a generic measure.

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

Parameters

  • qIdstring
    Required

    Identifier of the measure to remove.

Response

  • qSuccessboolean

Errors

array

DestroyMeasure(qId)

const result = await doc.DestroyMeasure([
  "value"
])

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "handle": 3,
  "method": "DestroyMeasure",
  "params": {
    "qId": "value"
  }
}

Response

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

Doc DestroyObject

(qId)

Removes an app object. The children of the object (if any) are removed as well.

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

Parameters

  • qIdstring
    Required

    Identifier of the object to remove.

Response

  • qSuccessboolean

Errors

array

DestroyObject(qId)

const result = await doc.DestroyObject([
  "value"
])

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "handle": 3,
  "method": "DestroyObject",
  "params": {
    "qId": "value"
  }
}

Response

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

Doc DestroySessionObject

(qId)

Removes a transient object.

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

Parameters

  • qIdstring
    Required

    Identifier of the transient object to remove.

Response

  • qSuccessboolean

Errors

array

DestroySessionObject(qId)

const result = await doc.DestroySessionObject([
  "value"
])

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "handle": 3,
  "method": "DestroySessionObject",
  "params": {
    "qId": "value"
  }
}

Response

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

Doc DestroySessionVariable

(qId)

Removes a transient variable.

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

Parameters

  • qIdstring
    Required

    Identifier of the variable.

Response

  • qSuccessboolean

Errors

array

DestroySessionVariable(qId)

const result = await doc.DestroySessionVariable([
  "value"
])

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "handle": 3,
  "method": "DestroySessionVariable",
  "params": {
    "qId": "value"
  }
}

Response

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

Doc DestroySessionVariableById

(qId)

Removes a transient variable.

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

Parameters

  • qIdstring
    Required

    Identifier of the variable.

Response

  • qSuccessboolean

Errors

array

DestroySessionVariableById(qId)

const result = await doc.DestroySessionVariableById([
  "value"
])

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "handle": 3,
  "method": "DestroySessionVariableById",
  "params": {
    "qId": "value"
  }
}

Response

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

Doc DestroySessionVariableByName

(qName)

Removes a transient variable.

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

Parameters

  • qNamestring
    Required

    Name of the variable.

Response

  • qSuccessboolean

Errors

array

DestroySessionVariableByName(qName)

const result = await doc.DestroySessionVariableByName([
  "value"
])

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "handle": 3,
  "method": "DestroySessionVariableByName",
  "params": {
    "qName": "value"
  }
}

Response

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

Doc DestroyVariableById

(qId)

Removes a variable. Script-defined variables cannot be removed using the DestroyVariableById method or the DestroyVariableByName method. For more information, see Remove a variable.

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

Parameters

  • qIdstring
    Required

    Identifier of the variable.

Response

  • qSuccessboolean

Errors

array

DestroyVariableById(qId)

const result = await doc.DestroyVariableById([
  "value"
])

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "handle": 3,
  "method": "DestroyVariableById",
  "params": {
    "qId": "value"
  }
}

Response

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

Doc DestroyVariableByName

(qName)

Removes a variable. Script-defined variables cannot be removed using the DestroyVariableById method or the DestroyVariableByName method. For more information, see Remove a variable.

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

Parameters

  • qNamestring
    Required

    Name of the variable.

Response

  • qSuccessboolean

Errors

array

DestroyVariableByName(qName)

const result = await doc.DestroyVariableByName([
  "value"
])

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "handle": 3,
  "method": "DestroyVariableByName",
  "params": {
    "qName": "value"
  }
}

Response

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

Doc DoReload

(qMode?, qPartial?, qDebug?)

Reloads the script that is set in an app.

Logs

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

Audit activity log System service log
<MachineName>_AuditActivity_Engine.txt in Qlik Sense Enterprise
<MachineName>_AuditActivity_Engine.log in Qlik Sense Desktop
<MachineName>_Service_Engine.txt in Qlik Sense Enterprise
<MachineName>_Service_Engine.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

  • qModeinteger

    Error handling mode One of:

    • 0: for default mode.
    • 1: for ABEND; the reload of the script ends if an error occurs.
    • 2: for ignore; the reload of the script continues even if an error is detected in the script.
  • qPartialboolean

    Set to true for partial reload. The default value is false.

  • qDebugboolean

    Set to true if debug breakpoints are to be honored. The execution of the script will be in debug mode. The default value is false.

Response

  • qReturnboolean

Errors

array

DoReload(qMode?, qPartial?, qDebug?)

const result = await doc.DoReload([
  123,
  true,
  true
])

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "handle": 3,
  "method": "DoReload",
  "params": {
    "qMode": 123,
    "qPartial": true,
    "qDebug": true
  }
}

Response

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

Doc DoReloadEx

(qParams?)

Reloads the script that is set in an app and returns the path to the script log file.

A log file is created per reload.

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

DoReloadExParams

Name Description Type
qMode Error handling mode
One of:
  • 0: for default mode.
  • 1: for ABEND; the reload of the script ends if an error occurs.
  • 2: for ignore; the reload of the script continues even if an error is detected in the script.
Integer
qPartial Set to true for partial reload.
The default value is false.
Boolean
qDebug Set to true if debug breakpoints are to be honored. The execution of the script will be in debug mode.
The default value is false.
Boolean

DoReloadExResult

Name Description Type
qSuccess The operation is successful if qSuccess is set to True. Boolean
qScriptLogFile Path to the script log file. String

If the data load has successfully finished, no matter how the indexing behaves, true is returned. This happens even if there is a timeout, a memory limit is reached or any other error occurs during the indexing.

Parameters

  • qParamsobject
    Show qParams properties
    • qModeinteger
      1. : for default mode.
      2. : for ABEND; the reload of the script ends if an error occurs.
      3. : for ignore; the reload of the script continues even if an error is detected in the script.
    • qPartialboolean

      Set to true for partial reload. The default value is false.

    • qDebugboolean

      Set to true to debug reload. The default value is false.

    • qReloadIdstring

      Optional reload ID. ID will be automatically generated if not set.

    • qSkipStoreboolean

      Set to true to skip Store statements. The default value is false.

    • qRowLimitinteger

      If greater than or equal 0, defines max number of rows loaded from a data source.

Response

  • qResultobject

    The result and path to script log for a reload.

    Show qResult properties
    • qSuccessboolean

      The reload is successful if True.

    • qScriptLogFilestring

      Path to the script log file.

    • qEndedWithMemoryConstraintboolean

      true if memory limits were exhausted during reload.

Errors

array

DoReloadEx(qParams?)

const result = await doc.DoReloadEx([
  {
    "qMode": 123,
    "qPartial": true,
    "qDebug": true,
    "qReloadId": "value",
    "qSkipStore": true,
    "qRowLimit": -1
  }
])

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "handle": 3,
  "method": "DoReloadEx",
  "params": {
    "qParams": {
      "qMode": 123,
      "qPartial": true,
      "qDebug": true,
      "qReloadId": "value",
      "qSkipStore": true,
      "qRowLimit": -1
    }
  }
}

Response

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "qResult": {
      "qSuccess": true,
      "qScriptLogFile": "value",
      "qEndedWithMemoryConstraint": true
    }
  }
}

Doc DoSave

(qFileName?)

Saves an app. All objects and data in the data model are saved.

Parameters

  • qFileNamestring

    Name of the file to save.

Response

object

Errors

array

DoSave(qFileName?)

const result = await doc.DoSave([
  "value"
])

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "handle": 3,
  "method": "DoSave",
  "params": {
    "qFileName": "value"
  }
}

Response

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

Doc Evaluate

(qExpression)

Evaluates an expression and returns the result as a string.

Example

The client sends:

{
    "handle": 1,
    "method": "Evaluate",
    "params": {
        "qExpression": "Sum(Holes)"
    },
    "id": 6,
    "jsonrpc": "2.0"
}

The engine returns:

{
    "jsonrpc": "2.0",
    "id": 6,
    "result": {
        "qReturn": "361716"
    }
}

Parameters

  • qExpressionstring
    Required

    Expression to evaluate.

Response

  • qReturnstring

Errors

array

Evaluate(qExpression)

const result = await doc.Evaluate([
  "value"
])

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "handle": 3,
  "method": "Evaluate",
  "params": {
    "qExpression": "value"
  }
}

Response

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

Doc EvaluateEx

(qExpression)

Evaluates an expression and returns the result as a dual.

Example

The client sends:

{
    "handle": 1,
    "method": "EvaluateEx",
    "params": {
        "qExpression": "Sum(Holes)"
    },
    "id": 7,
    "jsonrpc": "2.0"
}

The engine returns:

{
    "jsonrpc": "2.0",
    "id": 7,
    "result": {
        "qReturn": "361716"
    }
}

Parameters

  • qExpressionstring
    Required

    Expression to evaluate.

Response

  • qValueobject
    Show qValue properties
    • qTextstring

      Text related to the field value. This parameter is optional.

    • qIsNumericboolean

      Is set to true if the value is a numeric. This parameter is optional. Default is false.

    • qNumbernumber

      Numeric value of the field. This parameter is displayed if qIsNumeric is set to true. This parameter is optional.

Errors

array

EvaluateEx(qExpression)

const result = await doc.EvaluateEx([
  "value"
])

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "handle": 3,
  "method": "EvaluateEx",
  "params": {
    "qExpression": "value"
  }
}

Response

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "qValue": {
      "qText": "value",
      "qIsNumeric": true,
      "qNumber": 123
    }
  }
}

Doc ExpandExpression

(qExpression)

Expands the expression.

Parameters

  • qExpressionstring
    Required

    The expression string to expand.

Response

  • qExpandedExpressionstring

Errors

array

ExpandExpression(qExpression)

const result = await doc.ExpandExpression([
  "value"
])

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "handle": 3,
  "method": "ExpandExpression",
  "params": {
    "qExpression": "value"
  }
}

Response

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

Doc ExportReducedData

(qOptions?)

Applies a bookmark to reduce (slice) the data on. Returns a url and file size to the reduced application. Section Access is always applied.

This API is only available on Sense Enterprise on Windows

Parameters

  • qOptionsobject

    BookmarkId used to reduced the app on and an expire time.

    Show qOptions properties
    • qBookmarkIdstring

      Bookmark Id to apply before reducing the application.

    • qExpiresinteger

      Time in seconds for how long the download link is valid.

    • qServeOnceboolean

Response

  • qDownloadInfoobject
    Show qDownloadInfo properties
    • qUrlstring

      URL to download the reduced app on.

    • qFileSizeinteger

      The filesize of the reduced app.

Errors

array

ExportReducedData(qOptions?)

const result = await doc.ExportReducedData([
  {
    "qBookmarkId": "value",
    "qExpires": 3600,
    "qServeOnce": true
  }
])

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "handle": 3,
  "method": "ExportReducedData",
  "params": {
    "qOptions": {
      "qBookmarkId": "value",
      "qExpires": 3600,
      "qServeOnce": true
    }
  }
}

Response

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "qDownloadInfo": {
      "qUrl": "value",
      "qFileSize": -1
    }
  }
}

Doc FindMatchingFields

(qFieldName, qTags)

Retrieves any fields that belong to the same archipelago as the specified field and that match at least one of the specified tags.

Tags set by Qlik Sense are prefixed by the _$_ sign.

Parameters

  • qFieldNamestring
    Required

    Name of the field. This method looks for fields that belong to the same archipelago as this specified field.

  • qTagsarray of strings
    Required

    List of tags. This method looks for fields that match at least one of the tags in this list.

Response

  • qFieldNamesarray of objects
    Show qFieldNames properties
    • qNamestring

      Name of the field.

    • qTagsarray of strings

      List of tags.

Errors

array

FindMatchingFields(qFieldName, qTags)

const result = await doc.FindMatchingFields([
  "value",
  [
    "value"
  ]
])

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "handle": 3,
  "method": "FindMatchingFields",
  "params": {
    "qFieldName": "value",
    "qTags": [
      "value"
    ]
  }
}

Response

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "qFieldNames": [
      {
        "qName": "value",
        "qTags": [
          "value"
        ]
      }
    ]
  }
}

Doc Forward

()

Loads the next logical operation (if any).

Response

object

Errors

array

Forward()

const result = await doc.Forward({})

Request

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

Response

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

Doc ForwardCount

()

Returns the number of entries on the Forward stack.

Response

  • qReturninteger

Errors

array

ForwardCount()

const result = await doc.ForwardCount({})

Request

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

Response

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

Doc GetAllInfos

()

Returns the identifier and the type of any generic object in the app.

Response

  • qInfosarray of objects
    Show qInfos properties
    • qIdstring

      Identifier of the object. If the chosen identifier is already in use, the engine automatically sets another one. If an identifier is not set, the engine automatically sets one. This parameter is optional.

    • qTypestring

      Type of the object. This parameter is mandatory.

Errors

array

GetAllInfos()

const result = await doc.GetAllInfos({})

Request

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

Response

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "qInfos": [
      {
        "qId": "value",
        "qType": "value"
      }
    ]
  }
}

Doc GetAppLayout

()

Evaluates an app. Returns dynamic properties (if any) in addition to the engine (fixed) properties. A data set is returned.

Response

  • qLayoutobject

    Qlik Sense Desktop

    In Qlik Sense Desktop, this structure can contain dynamic properties.

    Qlik Sense Enterprise

    In Qlik Sense Enterprise, only a few dynamic properties at the app level are persisted. The persisted dynamic properties are the following:

    • modifiedDate
    • published
    • publishTime
    • privileges
    • description
    • dynamicColor
    Show qLayout properties
    • qTitlestring

      Title of the app.

    • qFileNamestring

      In Qlik Sense Enterprise, this property corresponds to the app identifier (GUID). In Qlik Sense Desktop, this property corresponds to the full path of the app.

    • qLastReloadTimestring

      Date and time of the last reload of the app in ISO format.

    • qModifiedboolean

      Is set to true if the app has been updated since the last save.

    • qHasScriptboolean

      Is set to true if a script is defined in the app.

    • qStateNamesarray of strings

      Array of alternate states.

    • qMetaobject

      Layout for NxMetaDef.

      Show qMeta properties
      • qNamestring

        Name. This property is optional.

    • qLocaleInfoobject
      Show qLocaleInfo properties
      • qDecimalSepstring

        Decimal separator.

      • qThousandSepstring

        Thousand separator.

      • qListSepstring

        List separator.

      • qMoneyDecimalSepstring

        Money decimal separator.

      • qMoneyThousandSepstring

        Money thousand separator.

      • qCurrentYearinteger

        Current year.

      • qMoneyFmtstring

        Money format. Example: #.##0,00 kr;-#.##0,00 kr

      • qTimeFmtstring

        Time format. Example: hh:mm:ss

      • qDateFmtstring

        Date format. Example: YYYY-MM-DD

      • qTimestampFmtstring

        Time stamp format. Example: YYYY-MM-DD hh:mm:ss[.fff]

      • qCalendarStringsobject
        Show qCalendarStrings properties
        • qDayNamesarray of strings

          List of short day names.

        • qMonthNamesarray of strings

          List of short month names.

        • qLongDayNamesarray of strings

          List of long day names.

        • qLongMonthNamesarray of strings

          List of long month names.

      • qFirstWeekDayinteger

        First day of the week, starting from 0. According to ISO 8601, Monday is the first day of the week.

        • 0 = Monday
        • 1 = Tuesday
        • ...
        • 6 = Sunday

        If this property has not been set in a script, the returned value comes from the Windows operating system.

      • qBrokenWeeksboolean

        Is set to true if broken weeks are allowed in a year. According to ISO 8601, no broken weeks should be allowed. This property is not shown if set to false. If qBrokenWeeks is set to true, qReferenceDay is irrelevant. If this property has not been set in a script, the returned value comes from the Windows operating system.

      • qReferenceDayinteger

        Day in the year that is always in week 1. According to ISO 8601, January 4th should always be part of the first week of the year ( qReferenceDay =4). Recommended values are in the range 1 and 7. If this property has not been set in a script, the returned value comes from the Windows operating system. This property is not relevant if there are broken weeks in the year.

      • qFirstMonthOfYearinteger

        First month of the year, starting from 1. According to ISO 8601, January is the first month of the year.

        • 1 = January
        • 2 = February
        • 12 = January

        If this property has not been set in a script, the returned value comes from the Windows operating system.

      • qCollationstring

        Locale name (following language tagging convention RFC 4646): < language>-<REGION> Where:

        • language is a lowercase ISO  639 language code
        • REGION specifies an uppercase ISO 3166 country code.

        If this property has not been set in a script, the returned value comes from the Windows operating system.

      • qNumericalAbbreviationstring

        Number format. Example: 3:k;6:M;9:G;12:T;15:P;18:E;21:Z;24:Y;-3:m;-6:μ;-9:n;-12:p;-15:f;-18:a;-21:z;-24:y

    • qHasDataboolean

      Is set to true if the app contains data following a script reload.

    • qReadOnlyboolean

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

    • qIsOpenedWithoutDataboolean

      If set to true, it means that the app was opened without loading its data.

    • qIsSessionAppboolean

      If set to true, the app is a Session App, i.e. not persistent.

    • qProhibitBinaryLoadboolean

      If set to true, the persisted app cannot be used in a Binary load statement in Qlik load script.

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

        Relative path of the thumbnail.

    • qIsBDILiveModeboolean

      If set to true, the app is in BDI Direct Query Mode.

    • qIsDirectQueryModeboolean

      If set to true, the app is in Direct Query Mode.

    • qUnsupportedFeaturesarray of strings

      Array of features not supported by the app.

      Values may be any of: "binningData""bookmarks""calculatedFields""continuousData""invertedSelections""rangeSelections""reducingData""search""selectionCount""selectionInsights""tableMiniChart""trendlines""calculatedDimensions""includeZeroValues""includeNullValues""filterPanePaging""filterPaneCustomSorting""showFrequency""limitation""totals"

    • qUsagestring

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

Errors

array

GetAppLayout()

const result = await doc.GetAppLayout({})

Request

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

Response

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "qLayout": {
      "qTitle": "value",
      "qFileName": "value",
      "qLastReloadTime": "value",
      "qModified": true,
      "qHasScript": true,
      "qStateNames": [
        "value"
      ],
      "qMeta": {
        "qName": "value"
      },
      "qLocaleInfo": {
        "qDecimalSep": "value",
        "qThousandSep": "value",
        "qListSep": "value",
        "qMoneyDecimalSep": "value",
        "qMoneyThousandSep": "value",
        "qCurrentYear": 123,
        "qMoneyFmt": "value",
        "qTimeFmt": "value",
        "qDateFmt": "value",
        "qTimestampFmt": "value",
        "qCalendarStrings": {
          "qDayNames": [
            "value"
          ],
          "qMonthNames": [
            "value"
          ],
          "qLongDayNames": [
            "value"
          ],
          "qLongMonthNames": [
            "value"
          ]
        },
        "qFirstWeekDay": 123,
        "qBrokenWeeks": true,
        "qReferenceDay": 123,
        "qFirstMonthOfYear": 123,
        "qCollation": "value",
        "qNumericalAbbreviation": "value"
      },
      "qHasData": true,
      "qReadOnly": true,
      "qIsOpenedWithoutData": true,
      "qIsSessionApp": true,
      "qProhibitBinaryLoad": true,
      "qThumbnail": {
        "qUrl": "value"
      },
      "qIsBDILiveMode": true,
      "qIsDirectQueryMode": true,
      "qUnsupportedFeatures": [
        "binningData"
      ],
      "qUsage": "ANALYTICS"
    }
  }
}

Doc GetAppProperties

()

Gets the properties of an app.

Response

  • qPropobject

    Qlik Sense Desktop

    In Qlik Sense Desktop, this structure can contain dynamic properties.

    Qlik Sense Enterprise

    In Qlik Sense Enterprise, only a few dynamic properties at the app level are persisted. The persisted dynamic properties are the following:

    • modifiedDate
    • published
    • publishTime
    • privileges
    • description
    • dynamicColor
    Show qProp properties
    • qTitlestring

      App title.

    • qLastReloadTimestring

      Last reload time of the app.

    • qMigrationHashstring

      Internal property reserved for app migration. Patch version of the app. Do not update.

    • qSavedInProductVersionstring

      Internal property reserved for app migration. The app is saved in this version of the product. Do not update.

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

        Relative path of the thumbnail.

    • qHasSectionAccessboolean

      If true the app has section access configured.

    • qUsagestring

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

Errors

array

GetAppProperties()

const result = await doc.GetAppProperties({})

Request

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

Response

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "qProp": {
      "qTitle": "value",
      "qLastReloadTime": "value",
      "qMigrationHash": "value",
      "qSavedInProductVersion": "value",
      "qThumbnail": {
        "qUrl": "value"
      },
      "qHasSectionAccess": true,
      "qUsage": "ANALYTICS"
    }
  }
}

Doc GetAssociationScores

(qTable1, qTable2)

Computes a set of association scores for each pair of fields between two given tables that have been loaded in an app. When a table contains some synthetic keys, all fields in the synthetic key tables are analyzed against fields in other tables. To denote that a field is a synthetic key, the field name is prefixed by [Synthetic Key]: .

Parameters

  • qTable1string
    Required

    Name of the first table.

  • qTable2string
    Required

    Name of the second table.

Response

  • qScorearray of objects
    Show qScore properties
    • qFieldPairNamestring

      Pair of fields. < FieldName1> / < FieldName2> Where: < FieldName1 > is a field in the table 1 (defined in qTable1 ) < FieldName2 > is a field in the table 2 (defined in qTable2 ) If the field is a synthetic key, the name of the field is preceded by [Synthetic key]: .

    • qScoreSummaryinteger

      Flag used to interpret calculated scores. One of the following values or sum of values that apply:

      • 0: The cardinal ratio cannot be zero but the symbol score and the row score can be zero.
      • -1: The fields do not have the same type.
      • -2: The number of rows of the field FieldName1 is zero.
      • -4: The number of distinct values of the field FieldName1 is zero.
      • -8: The number of rows of the field FieldName2 is zero.
      • -16: The number of distinct values of the field FieldName2 is zero.

      Example: The number of rows of the field FieldName1 is zero, and the number of distinct values of the field FieldName2 is zero, then qScoreSummary is -18.

    • qField1Scoresobject
      Show qField1Scores properties
      • qFieldNamestring

        Field name. One of the field names defined in qFieldPairName.

      • qReadableNamestring
      • qCardinalRationumber

        Cardinality of a column/field divided by the number of rows in the table. If the cardinal ratio is 1, it means that the column is a candidate/primary key.

      • qSymbolScorenumber

        Number of distinct matches between the two fields defined in qFieldPairName divided by the number of distinct values in the field qFieldName . If 0, it means that there are no common values between the two fields defined in qFieldPairName .

      • qRowScorenumber

        Number of matches between the two fields defined in qFieldPairName divided by the number of values in the field qFieldName . If 0, it means that there are no common values between the two fields defined in qFieldPairName .

    • qField2Scoresobject
      Show qField2Scores properties
      • qFieldNamestring

        Field name. One of the field names defined in qFieldPairName.

      • qReadableNamestring
      • qCardinalRationumber

        Cardinality of a column/field divided by the number of rows in the table. If the cardinal ratio is 1, it means that the column is a candidate/primary key.

      • qSymbolScorenumber

        Number of distinct matches between the two fields defined in qFieldPairName divided by the number of distinct values in the field qFieldName . If 0, it means that there are no common values between the two fields defined in qFieldPairName .

      • qRowScorenumber

        Number of matches between the two fields defined in qFieldPairName divided by the number of values in the field qFieldName . If 0, it means that there are no common values between the two fields defined in qFieldPairName .

Errors

array

GetAssociationScores(qTable1, qTable2)

const result = await doc.GetAssociationScores([
  "value",
  "value"
])

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "handle": 3,
  "method": "GetAssociationScores",
  "params": {
    "qTable1": "value",
    "qTable2": "value"
  }
}

Response

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "qScore": [
      {
        "qFieldPairName": "value",
        "qScoreSummary": 123,
        "qField1Scores": {
          "qFieldName": "value",
          "qReadableName": "value",
          "qCardinalRatio": 123,
          "qSymbolScore": 123,
          "qRowScore": 123
        },
        "qField2Scores": {
          "qFieldName": "value",
          "qReadableName": "value",
          "qCardinalRatio": 123,
          "qSymbolScore": 123,
          "qRowScore": 123
        }
      }
    ]
  }
}

Doc GetBookmark

(qId)

Returns the handle of a bookmark.

Parameters

  • qIdstring
    Required

    Identifier of the bookmark.

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

GetBookmark(qId)

const result = await doc.GetBookmark([
  "value"
])

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "handle": 3,
  "method": "GetBookmark",
  "params": {
    "qId": "value"
  }
}

Response

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "qReturn": {
      "qType": "value",
      "qHandle": 123,
      "qGenericType": "value",
      "qGenericId": "value"
    }
  }
}

Doc GetBookmarks

(qOptions)

Returns all bookmarks compatible with options.

Parameters

  • qOptionsobject
    Required

    Bookmark type filter and requested properties.

    Show qOptions properties
    • qTypesarray of strings

      List of object types.

    • qDataobject

      Contains dynamic JSON data specified by the client.

    • qIncludePatchesboolean

      Include the bookmark patches. Patches can be very large and may make the list result unmanageable.

Response

  • qListarray of objects
    Show qList properties
    • qInfoobject
      Show qInfo properties
      • qIdstring

        Identifier of the object. If the chosen identifier is already in use, the engine automatically sets another one. If an identifier is not set, the engine automatically sets one. This parameter is optional.

      • qTypestring

        Type of the object. This parameter is mandatory.

    • qMetaobject

      Layout for NxMetaDef.

      Show qMeta properties
      • qNamestring

        Name. This property is optional.

    • qDataobject

      Contains dynamic JSON data specified by the client.

Errors

array

GetBookmarks(qOptions)

const result = await doc.GetBookmarks([
  {
    "qTypes": [
      "value"
    ],
    "qData": {},
    "qIncludePatches": true
  }
])

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "handle": 3,
  "method": "GetBookmarks",
  "params": {
    "qOptions": {
      "qTypes": [
        "value"
      ],
      "qData": {},
      "qIncludePatches": true
    }
  }
}

Response

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "qList": [
      {
        "qInfo": {
          "qId": "value",
          "qType": "value"
        },
        "qMeta": {
          "qName": "value"
        },
        "qData": {}
      }
    ]
  }
}

Doc GetConnection

(qConnectionId)

Retrieves a connection and returns:

  • The creation time of the connection.
  • The identifier of the connection.
  • The type of the connection.
  • The name of the connection.
  • The connection string.

Parameters

  • qConnectionIdstring
    Required

    Identifier of the connection.

Response

  • qConnectionobject
    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"

Errors

array

GetConnection(qConnectionId)

const result = await doc.GetConnection([
  "value"
])

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "handle": 3,
  "method": "GetConnection",
  "params": {
    "qConnectionId": "value"
  }
}

Response

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "qConnection": {
      "qId": "value",
      "qName": "value",
      "qConnectionString": "value",
      "qType": "value",
      "qUserName": "value",
      "qPassword": "value",
      "qModifiedDate": "value",
      "qMeta": {
        "qName": "value"
      },
      "qLogOn": "LOG_ON_SERVICE_USER"
    }
  }
}

Doc GetConnections

()

Lists the connections in an app.

In Qlik Sense Enterprise, there is an additional file connection named _AttachedFiles_ . This connection is stored in the Qlik Sense repository.

Response

  • qConnectionsarray of objects
    Show qConnections 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"

Errors

array

GetConnections()

const result = await doc.GetConnections({})

Request

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

Response

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "qConnections": [
      {
        "qId": "value",
        "qName": "value",
        "qConnectionString": "value",
        "qType": "value",
        "qUserName": "value",
        "qPassword": "value",
        "qModifiedDate": "value",
        "qMeta": {
          "qName": "value"
        },
        "qLogOn": "LOG_ON_SERVICE_USER"
      }
    ]
  }
}

Doc GetContentLibraries

()

Lists the content libraries. To differentiate a global content library from an app specific content library, you can check the property qAppSpecific . If this property is set to true, it means that the content library is app specific.

There is always one specific content library per app.

Qlik Sense

Returns the global content libraries and the app specific content library. When using Qlik Sense, you can have more than one global content library. The global content libraries are common to all apps in the Qlik Sense repository. By default, there is one global content library named Default .

Qlik Sense Desktop

Returns the global content library and the app specific content library from the disk.

Response

  • qListobject
    Show qList properties
    • qItemsarray of objects

      Information about the content library.

      Show qItems properties
      • qNamestring

        Name of the library.

      • qAppSpecificboolean

        Is set to true if the library is specific to the app (not a global content library).

      • qMetaobject

        Layout for NxMetaDef.

        Show qMeta properties
        • qNamestring

          Name. This property is optional.

Errors

array

GetContentLibraries()

const result = await doc.GetContentLibraries({})

Request

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

Response

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "qList": {
      "qItems": [
        {
          "qName": "value",
          "qAppSpecific": true,
          "qMeta": {
            "qName": "value"
          }
        }
      ]
    }
  }
}

Doc GetDatabaseInfo

(qConnectionId)

Gives information about an ODBC, OLEDB or CUSTOM connection. See Outputs for more details.

Parameters

  • qConnectionIdstring
    Required

    Name of the connection.

Response

  • qInfoobject
    Show qInfo properties
    • qDBMSNamestring

      Name of the product accessed by the provider.

    • qDBUsageboolean

      If set to true, it means that the data source contains some databases.

    • qOwnerUsageboolean

      If set to true, it means that the data source contains some owners.

    • qDBSeparatorstring

      Character string used after the database name. Example with separator " . ": FROM LinkedTablesData.dbo.Months Where:

      • LinkedTablesData is the database name
      • dbo is the owner name
      • Months is the table name
    • qOwnerSeparatorstring

      Character string used after the owner name. Example with separator " . ": FROM LinkedTablesData.dbo.Months Where:

      • LinkedTablesData is the database name
      • dbo is the owner name
      • Months is the table name
    • qDBFirstboolean

      If set to true, it means that the database is displayed first, before the owners and tables.

    • qQuotePreffixstring

      Prefix used with field, database or owner names that contain special characters or keywords.

    • qQuoteSuffixstring

      Suffix used with field, database or owner names that contain special characters or keywords.

    • qSpecialCharsstring

      List of the special characters.

    • qDefaultDatabasestring

      Name of the default database.

    • qKeywordsarray of strings

      List of the script keywords.

Errors

array

GetDatabaseInfo(qConnectionId)

const result = await doc.GetDatabaseInfo([
  "value"
])

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "handle": 3,
  "method": "GetDatabaseInfo",
  "params": {
    "qConnectionId": "value"
  }
}

Response

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "qInfo": {
      "qDBMSName": "value",
      "qDBUsage": true,
      "qOwnerUsage": true,
      "qDBSeparator": "value",
      "qOwnerSeparator": "value",
      "qDBFirst": true,
      "qQuotePreffix": "value",
      "qQuoteSuffix": "value",
      "qSpecialChars": "value",
      "qDefaultDatabase": "value",
      "qKeywords": [
        "value"
      ]
    }
  }
}

Doc GetDatabaseOwners

(qConnectionId, qDatabase?)

Lists the owners of a database for a ODBC, OLEDB or CUSTOM connection.

Parameters

  • qConnectionIdstring
    Required

    Identifier of the connection.

  • qDatabasestring

    Name of the database.

Response

  • qOwnersarray of objects
    Show qOwners properties
    • qNamestring

      Name of the owner.

Errors

array

GetDatabaseOwners(qConnectionId, qDatabase?)

const result = await doc.GetDatabaseOwners([
  "value",
  "value"
])

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "handle": 3,
  "method": "GetDatabaseOwners",
  "params": {
    "qConnectionId": "value",
    "qDatabase": "value"
  }
}

Response

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "qOwners": [
      {
        "qName": "value"
      }
    ]
  }
}

Doc GetDatabaseTableFields

(qConnectionId, qDatabase?, qOwner?, qTable)

Lists the fields inside a table of a database for a ODBC, OLEDB or CUSTOM connection.

Parameters

  • qConnectionIdstring
    Required

    Identifier of the connection.

  • qDatabasestring

    Name of the database. If qDatabase is not set then qOwner must be set.

  • qOwnerstring

    Owner of the database. If qOwner is not set then qDatabase must be set.

  • qTablestring
    Required

    Name of the table.

Response

  • qFieldsarray of objects
    Show qFields properties
    • qNamestring

      Name of the field.

    • qIsKeyboolean

      Is set to true if the field is a primary key.

    • qOriginalFieldNamestring

      Is shown for fixed records. qOriginalFieldName and qName are identical if no field names are used in the file. qOriginalFieldName differs from qName if embedded file names are used in the file.

Errors

array

GetDatabaseTableFields(qConnectionId, qDatabase?, qOwner?, qTable)

const result = await doc.GetDatabaseTableFields([
  "value",
  "value",
  "value",
  "value"
])

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "handle": 3,
  "method": "GetDatabaseTableFields",
  "params": {
    "qConnectionId": "value",
    "qDatabase": "value",
    "qOwner": "value",
    "qTable": "value"
  }
}

Response

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "qFields": [
      {
        "qName": "value",
        "qIsKey": true,
        "qOriginalFieldName": "value"
      }
    ]
  }
}

Doc GetDatabaseTablePreview

(qConnectionId, qDatabase?, qOwner?, qTable, qConditions?)

Retrieves the values of the specified table of a database for a ODBC, OLEDB or CUSTOM connection.

Parameters

  • qConnectionIdstring
    Required

    Identifier of the connection.

  • qDatabasestring

    Name of the database. If qDatabase is not set then qOwner must be set.

  • qOwnerstring

    Owner of the database. If qOwner is not set then qDatabase must be set.

  • qTablestring
    Required

    Name of the table.

  • qConditionsobject
    Show qConditions properties
    • qTypestring

      Can be one of: "NONE""RAW"

    • qWherePredicatestring

Response

  • qPreviewarray of objects
    Show qPreview properties
    • qValuesarray of strings

      List of values inside the table. The first values (in result/qPreview/0/qValues ) correspond to the field names in the table. The following values (from result/qPreview/1/qValues ) are the values of the fields in the table.

  • qRowCountinteger

Errors

array

GetDatabaseTablePreview(qConnectionId, qDatabase?, qOwner?, qTable, qConditions?)

const result = await doc.GetDatabaseTablePreview([
  "value",
  "value",
  "value",
  "value",
  {
    "qType": "NONE",
    "qWherePredicate": "value"
  }
])

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "handle": 3,
  "method": "GetDatabaseTablePreview",
  "params": {
    "qConnectionId": "value",
    "qDatabase": "value",
    "qOwner": "value",
    "qTable": "value",
    "qConditions": {
      "qType": "NONE",
      "qWherePredicate": "value"
    }
  }
}

Response

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "qPreview": [
      {
        "qValues": [
          "value"
        ]
      }
    ],
    "qRowCount": 123
  }
}

Doc GetDatabaseTables

(qConnectionId, qDatabase?, qOwner?)

Lists the tables inside a database for a ODBC, OLEDB or CUSTOM connection.

Parameters

  • qConnectionIdstring
    Required

    Identifier of the connection.

  • qDatabasestring

    Name of the database. If qDatabase is not set then qOwner must be set.

  • qOwnerstring

    Owner of the database. If qOwner is not set then qDatabase must be set.

Response

  • qTablesarray of objects
    Show qTables properties
    • qNamestring

      Name of the table.

    • qTypestring

      Type of the table. For example: Table or View.

Errors

array

GetDatabaseTables(qConnectionId, qDatabase?, qOwner?)

const result = await doc.GetDatabaseTables([
  "value",
  "value",
  "value"
])

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "handle": 3,
  "method": "GetDatabaseTables",
  "params": {
    "qConnectionId": "value",
    "qDatabase": "value",
    "qOwner": "value"
  }
}

Response

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "qTables": [
      {
        "qName": "value",
        "qType": "value"
      }
    ]
  }
}

Doc GetDatabases

(qConnectionId)

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

Parameters

  • qConnectionIdstring
    Required

    Identifier of the connection.

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

GetDatabases(qConnectionId)

const result = await doc.GetDatabases([
  "value"
])

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "handle": 3,
  "method": "GetDatabases",
  "params": {
    "qConnectionId": "value"
  }
}

Response

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "qDatabases": [
      {
        "qName": "value",
        "qIsDefault": true
      }
    ]
  }
}

Doc GetDimension

(qId)

Returns the handle of a dimension.

Parameters

  • qIdstring
    Required

    Identifier of the dimension.

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

GetDimension(qId)

const result = await doc.GetDimension([
  "value"
])

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "handle": 3,
  "method": "GetDimension",
  "params": {
    "qId": "value"
  }
}

Response

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "qReturn": {
      "qType": "value",
      "qHandle": 123,
      "qGenericType": "value",
      "qGenericId": "value"
    }
  }
}

Doc GetEmptyScript

(qLocalizedMainSection?)

Creates a script that contains one section. This section contains SET statements that give localized information from the regional settings of the computer.

The computer regional settings are retrieved when the engine starts.

Parameters

  • qLocalizedMainSectionstring

    Name of the script section. The default value is Main .

Response

  • qReturnstring

Errors

array

GetEmptyScript(qLocalizedMainSection?)

const result = await doc.GetEmptyScript([
  "value"
])

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "handle": 3,
  "method": "GetEmptyScript",
  "params": {
    "qLocalizedMainSection": "value"
  }
}

Response

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

Doc GetExpressionBNF

()
Experimental

Gets the current Backus-Naur Form (BNF) grammar of the Qlik chart expressions supported within a given App.

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

GetExpressionBNF()

const result = await doc.GetExpressionBNF({})

Request

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

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

Doc GetExpressionBNFHash

()
Experimental

Gets a string hash calculated from the current Backus-Naur Form (BNF) grammar of the Qlik chart expressions supported within a given App.

Response

  • qBnfHashstring

Errors

array

GetExpressionBNFHash()

const result = await doc.GetExpressionBNFHash({})

Request

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

Response

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

Doc GetFavoriteVariables

()

Retrieves the variables that are tagged as favorite.

Response

  • qNamesarray of strings

Errors

array

GetFavoriteVariables()

const result = await doc.GetFavoriteVariables({})

Request

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

Response

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "qNames": [
      "value"
    ]
  }
}

Doc GetField

(qFieldName, qStateName?)

Returns a handle to a field.

Parameters

  • qFieldNamestring
    Required

    Name of the field.

  • qStateNamestring

    Name of the alternate state. Default state is current selections.

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

GetField(qFieldName, qStateName?)

const result = await doc.GetField([
  "value",
  "value"
])

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "handle": 3,
  "method": "GetField",
  "params": {
    "qFieldName": "value",
    "qStateName": "value"
  }
}

Response

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "qReturn": {
      "qType": "value",
      "qHandle": 123,
      "qGenericType": "value",
      "qGenericId": "value"
    }
  }
}

Doc GetFieldAndColumnSamples

(qFieldsOrColumnsWithWildcards, qMaxNumberOfValues, qRandSeed?)

Get sample values from either a column in a table or from a field. Supports wildcard matches in tables or field names:

  • '*' for zero or more characters.
  • '?' for one character.

Parameters

  • qFieldsOrColumnsWithWildcardsarray of objects
    Required

    Pairs of table (optionally) and field names. Support wildcard matches.

    Show qFieldsOrColumnsWithWildcards properties
    • qFieldNamestring

      Name of the field or column to be matched.

    • qTableNamestring

      Name of the table to be matched on. This parameter is optional. If TableName is set, FieldName represent the Table column with that name. If TableName is not set, FieldName represents the the field with that name.

  • qMaxNumberOfValuesinteger
    Required

    Max number of sample values returned. Depending on the column or field size the number of returned samples can be less than MaxNumberOfValues. If MaxNumberOfValues is negative all sample values are returned.

  • qRandSeedinteger

    Optional. Sets the random number seed. Should only be set for test purposes.

Response

  • qResultarray of objects
    Show qResult properties
    • qFieldOrColumnobject
      Show qFieldOrColumn properties
      • qFieldNamestring

        Name of the field or column to be matched.

      • qTableNamestring

        Name of the table to be matched on. This parameter is optional. If TableName is set, FieldName represent the Table column with that name. If TableName is not set, FieldName represents the the field with that name.

    • qValuesarray of objects

      Matched values part of the sample.

      Show qValues properties
      • qTextstring

        Text related to the field value. This parameter is optional.

      • qIsNumericboolean

        Is set to true if the value is a numeric. This parameter is optional. Default is false.

      • qNumbernumber

        Numeric value of the field. This parameter is displayed if qIsNumeric is set to true. This parameter is optional.

Errors

array

GetFieldAndColumnSamples(qFieldsOrColumnsWithWildcards, qMaxNumberOfValues, qRandSeed?)

const result = await doc.GetFieldAndColumnSamples([
  [
    {
      "qFieldName": "value",
      "qTableName": "value"
    }
  ],
  123,
  123
])

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "handle": 3,
  "method": "GetFieldAndColumnSamples",
  "params": {
    "qFieldsOrColumnsWithWildcards": [
      {
        "qFieldName": "value",
        "qTableName": "value"
      }
    ],
    "qMaxNumberOfValues": 123,
    "qRandSeed": 123
  }
}

Response

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "qResult": [
      {
        "qFieldOrColumn": {
          "qFieldName": "value",
          "qTableName": "value"
        },
        "qValues": [
          {
            "qText": "value",
            "qIsNumeric": true,
            "qNumber": 123
          }
        ]
      }
    ]
  }
}

Doc GetFieldDescription

(qFieldName)

Returns the description of a field.

Parameters

  • qFieldNamestring
    Required

    Name of the field.

Response

  • qReturnobject
    Show qReturn properties
    • qInternalNumberinteger

      Internal number of the field.

    • qNamestring

      Name of the field.

    • qSrcTablesarray of strings

      List of table names.

    • qIsSystemboolean

      If set to true, it means that the field is a system field. The default value is false.

    • qIsHiddenboolean

      If set to true, it means that the field is hidden. The default value is false.

    • qIsSemanticboolean

      If set to true, it means that the field is a semantic. The default value is false.

    • qDistinctOnlyboolean

      If set to true, only distinct field values are shown. The default value is false.

    • qCardinalinteger

      Number of distinct field values.

    • qTotalCountinteger

      Total number of field values.

    • qPossibleCount_OBSOLETEinteger
    • qHasInfo_OBSOLETEboolean
    • qIsLockedboolean

      If set to true, it means that the field is locked. The default value is false.

    • qAlwaysOneSelectedboolean

      If set to true, it means that the field has one and only one selection (not 0 and not more than 1). If this property is set to true, the field cannot be cleared anymore and no more selections can be performed in that field. The default value is false.

    • qAndModeboolean

      If set to true a logical AND (instead of a logical OR) is used when making selections in a field. The default value is false.

    • qIsNumericboolean

      Is set to true if the value is a numeric. The default value is false.

    • qCommentstring

      Field comment.

    • qTagsarray of strings

      Gives information on a field. For example, it can return the type of the field. Examples: key, text, ASCII.

    • qIsDefinitionOnlyboolean

      If set to true, it means that the field is a field on the fly. The default value is false.

    • qByteSizeinteger

      Static RAM memory used in bytes.

Errors

array

GetFieldDescription(qFieldName)

const result = await doc.GetFieldDescription([
  "value"
])

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "handle": 3,
  "method": "GetFieldDescription",
  "params": {
    "qFieldName": "value"
  }
}

Response

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "qReturn": {
      "qInternalNumber": 123,
      "qName": "value",
      "qSrcTables": [
        "value"
      ],
      "qIsSystem": true,
      "qIsHidden": true,
      "qIsSemantic": true,
      "qDistinctOnly": true,
      "qCardinal": 123,
      "qTotalCount": 123,
      "qPossibleCount_OBSOLETE": 123,
      "qHasInfo_OBSOLETE": true,
      "qIsLocked": true,
      "qAlwaysOneSelected": true,
      "qAndMode": true,
      "qIsNumeric": true,
      "qComment": "value",
      "qTags": [
        "value"
      ],
      "qIsDefinitionOnly": true,
      "qByteSize": 123
    }
  }
}

Doc GetFieldOnTheFlyByName

(qReadableName)

Find the field-on-the-fly by passing its readable name.

Parameters

  • qReadableNamestring
    Required

    Readable name of the field-on-the-fly.

Response

  • qNamestring

Errors

array

GetFieldOnTheFlyByName(qReadableName)

const result = await doc.GetFieldOnTheFlyByName([
  "value"
])

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "handle": 3,
  "method": "GetFieldOnTheFlyByName",
  "params": {
    "qReadableName": "value"
  }
}

Response

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

Doc GetFieldsFromExpression

(qExpr)

Retrives any fields from an expression.

Parameters

  • qExprstring
    Required

    Expression to get fields from.

Response

  • qFieldNamesarray of strings

Errors

array

GetFieldsFromExpression(qExpr)

const result = await doc.GetFieldsFromExpression([
  "value"
])

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "handle": 3,
  "method": "GetFieldsFromExpression",
  "params": {
    "qExpr": "value"
  }
}

Response

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "qFieldNames": [
      "value"
    ]
  }
}

Doc GetFieldsResourceIds

(qFieldNames)

Returns a list of resource ids (QRI) for fields that belongs to the datamodel. Key fields (that belongs to multiple tables), returns one resource identifier per table.

GetFieldsResourceIds method is only supported in SaaS Editions of Qlik Sense.

Parameters

  • qFieldNamesarray of strings
    Required

    List of fields names that resource ids should be returned from.

Response

  • qFieldsarray of objects
    Show qFields properties
    • qNamestring

      Name of the field to get the resource id for.

    • qResourceIdsarray of objects

      Field level resource Id per table that the field is part of

      Show qResourceIds properties
      • qTablestring

        Name of the table that the field belongs to get the resource id for

      • qResourceIdstring

        Resource identifier for the field

Errors

array

GetFieldsResourceIds(qFieldNames)

const result = await doc.GetFieldsResourceIds([
  [
    "value"
  ]
])

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "handle": 3,
  "method": "GetFieldsResourceIds",
  "params": {
    "qFieldNames": [
      "value"
    ]
  }
}

Response

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "qFields": [
      {
        "qName": "value",
        "qResourceIds": [
          {
            "qTable": "value",
            "qResourceId": "value"
          }
        ]
      }
    ]
  }
}

Doc GetFileTableFields

(qConnectionId, qRelativePath?, qDataFormat, qTable)

Lists the fields of a table for a folder connection.

FileType

Recognized file formats are:

  • CSV for Delimited
  • FIX for Fixed Record
  • DIF for Data Interchange Format
  • EXCEL_BIFF for Microsoft Excel (XLS)
  • EXCEL_OOXML for Microsoft Excel (XLSX)
  • HTML for HTML
  • QVD for QVD file
  • XML for XML
  • QVX for QVX file
  • JSON for JSON format
  • KML for KML file
  • PARQUET for PARQUET file

Parameters

  • qConnectionIdstring
    Required

    Identifier of the connection.

  • qRelativePathstring

    Path of the connection file.

  • qDataFormatobject
    Required

    Type of the file.

    Show qDataFormat properties
    • qTypestring

      Can be one of: "CSV""FIX""DIF""EXCEL_BIFF""EXCEL_OOXML""HTML""QVD""XML""QVX""JSON""KML""PARQUET"

    • qLabelstring

      One of:

      • Embedded labels (field names are present in the file)
      • No labels
      • Explicit labels (for DIFfiles)
    • qQuotestring

      One of:

      • None (no quotes)
      • MSQ (Modern Style Quoting)
      • Standard (quotes " " or ' ' can be used, but only if they are the first and last non blank characters of a field value)

      This property is used for delimited files.

    • qCommentstring

      String that marks the beginning of the comment line. Example: “#” or “//” The engine ignores the commented lines during the data load. This property is only used for delimited files.

    • qDelimiterobject
      Show qDelimiter properties
      • qNamestring

        Name of the delimiter. Example: "Tab_DELIMITER"

      • qScriptCodestring

        Representation of the delimiter value that is used in the script. Example: "'\t'"

      • qNumberinteger

        Delimiter character number used by the engine to determine how to separate the values.

      • qIsMultipleboolean

        Is set to true if multiple spaces are used to separate the values.

    • qCodePageinteger

      Character set used in the file.

    • qHeaderSizeinteger

      Size of the header. Example: If the header size is 2, the first two rows in the file are considered as header and not as data. The header can contain the field names.

    • qRecordSizeinteger

      Record length. Each record (row of data) contains a number of columns with a fixed field size. This property is used for fixed record data files.

    • qTabSizeinteger

      Number of spaces that one tab character represents in the table file. This property is used for fixed record data files.

    • qIgnoreEOFboolean

      Is set to true, the end-of-file character is not taken into account during reload. This property is used for delimited files and fixed record data files.

    • qFixedWidthDelimitersstring

      Positions of the field breaks in the table. This property is used for fixed record data files.

  • qTablestring
    Required

    Name of the table. This parameter must be set for XLS , XLSX , _HTML  _ and XML files.

Response

  • qFieldsarray of objects
    Show qFields properties
    • qNamestring

      Name of the field.

    • qIsKeyboolean

      Is set to true if the field is a primary key.

    • qOriginalFieldNamestring

      Is shown for fixed records. qOriginalFieldName and qName are identical if no field names are used in the file. qOriginalFieldName differs from qName if embedded file names are used in the file.

  • qFormatSpecstring

Errors

array

GetFileTableFields(qConnectionId, qRelativePath?, qDataFormat, qTable)

const result = await doc.GetFileTableFields([
  "value",
  "value",
  {
    "qType": "CSV",
    "qLabel": "value",
    "qQuote": "value",
    "qComment": "value",
    "qDelimiter": {
      "qName": "value",
      "qScriptCode": "value",
      "qNumber": 123,
      "qIsMultiple": true
    },
    "qCodePage": 123,
    "qHeaderSize": 123,
    "qRecordSize": 123,
    "qTabSize": 123,
    "qIgnoreEOF": true,
    "qFixedWidthDelimiters": "value"
  },
  "value"
])

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "handle": 3,
  "method": "GetFileTableFields",
  "params": {
    "qConnectionId": "value",
    "qRelativePath": "value",
    "qDataFormat": {
      "qType": "CSV",
      "qLabel": "value",
      "qQuote": "value",
      "qComment": "value",
      "qDelimiter": {
        "qName": "value",
        "qScriptCode": "value",
        "qNumber": 123,
        "qIsMultiple": true
      },
      "qCodePage": 123,
      "qHeaderSize": 123,
      "qRecordSize": 123,
      "qTabSize": 123,
      "qIgnoreEOF": true,
      "qFixedWidthDelimiters": "value"
    },
    "qTable": "value"
  }
}

Response

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "qFields": [
      {
        "qName": "value",
        "qIsKey": true,
        "qOriginalFieldName": "value"
      }
    ],
    "qFormatSpec": "value"
  }
}

Doc GetFileTablePreview

(qConnectionId, qRelativePath?, qDataFormat, qTable)

Lists the values in a table for a folder connection.

FileType

Recognized file formats are:

  • CSV for Delimited
  • FIX for Fixed Record
  • DIF for Data Interchange Format
  • EXCEL_BIFF for Microsoft Excel (XLS)
  • EXCEL_OOXML for Microsoft Excel (XLSX)
  • HTML for HTML
  • QVD for QVD file
  • XML for XML
  • QVX for QVX file
  • JSON for JSON format
  • KML for KML file
  • PARQUET for PARQUET file

Parameters

  • qConnectionIdstring
    Required

    Identifier of the connection.

  • qRelativePathstring

    Path of the connection file.

  • qDataFormatobject
    Required

    Type of the file.

    Show qDataFormat properties
    • qTypestring

      Can be one of: "CSV""FIX""DIF""EXCEL_BIFF""EXCEL_OOXML""HTML""QVD""XML""QVX""JSON""KML""PARQUET"

    • qLabelstring

      One of:

      • Embedded labels (field names are present in the file)
      • No labels
      • Explicit labels (for DIFfiles)
    • qQuotestring

      One of:

      • None (no quotes)
      • MSQ (Modern Style Quoting)
      • Standard (quotes " " or ' ' can be used, but only if they are the first and last non blank characters of a field value)

      This property is used for delimited files.

    • qCommentstring

      String that marks the beginning of the comment line. Example: “#” or “//” The engine ignores the commented lines during the data load. This property is only used for delimited files.

    • qDelimiterobject
      Show qDelimiter properties
      • qNamestring

        Name of the delimiter. Example: "Tab_DELIMITER"

      • qScriptCodestring

        Representation of the delimiter value that is used in the script. Example: "'\t'"

      • qNumberinteger

        Delimiter character number used by the engine to determine how to separate the values.

      • qIsMultipleboolean

        Is set to true if multiple spaces are used to separate the values.

    • qCodePageinteger

      Character set used in the file.

    • qHeaderSizeinteger

      Size of the header. Example: If the header size is 2, the first two rows in the file are considered as header and not as data. The header can contain the field names.

    • qRecordSizeinteger

      Record length. Each record (row of data) contains a number of columns with a fixed field size. This property is used for fixed record data files.

    • qTabSizeinteger

      Number of spaces that one tab character represents in the table file. This property is used for fixed record data files.

    • qIgnoreEOFboolean

      Is set to true, the end-of-file character is not taken into account during reload. This property is used for delimited files and fixed record data files.

    • qFixedWidthDelimitersstring

      Positions of the field breaks in the table. This property is used for fixed record data files.

  • qTablestring
    Required

    Name of the table. This parameter must be set for XLS , XLSX , _HTML  _ and XML files.

Response

  • qPreviewarray of objects
    Show qPreview properties
    • qValuesarray of strings

      List of values inside the table. The first values (in result/qPreview/0/qValues ) correspond to the field names in the table. The following values (from result/qPreview/1/qValues ) are the values of the fields in the table.

  • qFormatSpecstring

Errors

array

GetFileTablePreview(qConnectionId, qRelativePath?, qDataFormat, qTable)

const result = await doc.GetFileTablePreview([
  "value",
  "value",
  {
    "qType": "CSV",
    "qLabel": "value",
    "qQuote": "value",
    "qComment": "value",
    "qDelimiter": {
      "qName": "value",
      "qScriptCode": "value",
      "qNumber": 123,
      "qIsMultiple": true
    },
    "qCodePage": 123,
    "qHeaderSize": 123,
    "qRecordSize": 123,
    "qTabSize": 123,
    "qIgnoreEOF": true,
    "qFixedWidthDelimiters": "value"
  },
  "value"
])

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "handle": 3,
  "method": "GetFileTablePreview",
  "params": {
    "qConnectionId": "value",
    "qRelativePath": "value",
    "qDataFormat": {
      "qType": "CSV",
      "qLabel": "value",
      "qQuote": "value",
      "qComment": "value",
      "qDelimiter": {
        "qName": "value",
        "qScriptCode": "value",
        "qNumber": 123,
        "qIsMultiple": true
      },
      "qCodePage": 123,
      "qHeaderSize": 123,
      "qRecordSize": 123,
      "qTabSize": 123,
      "qIgnoreEOF": true,
      "qFixedWidthDelimiters": "value"
    },
    "qTable": "value"
  }
}

Response

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "qPreview": [
      {
        "qValues": [
          "value"
        ]
      }
    ],
    "qFormatSpec": "value"
  }
}

Doc GetFileTables

(qConnectionId, qRelativePath?, qDataFormat)

Lists the tables for a folder connection.

FileType

Recognized file formats are:

  • CSV for Delimited
  • FIX for Fixed Record
  • DIF for Data Interchange Format
  • EXCEL_BIFF for Microsoft Excel (XLS)
  • EXCEL_OOXML for Microsoft Excel (XLSX)
  • HTML for HTML
  • QVD for QVD file
  • XML for XML
  • QVX for QVX file
  • JSON for JSON format
  • KML for KML file
  • PARQUET for PARQUET file

Parameters

  • qConnectionIdstring
    Required

    Identifier of the connection.

  • qRelativePathstring

    Path of the connection file.

  • qDataFormatobject
    Required

    Type of the file.

    Show qDataFormat properties
    • qTypestring

      Can be one of: "CSV""FIX""DIF""EXCEL_BIFF""EXCEL_OOXML""HTML""QVD""XML""QVX""JSON""KML""PARQUET"

    • qLabelstring

      One of:

      • Embedded labels (field names are present in the file)
      • No labels
      • Explicit labels (for DIFfiles)
    • qQuotestring

      One of:

      • None (no quotes)
      • MSQ (Modern Style Quoting)
      • Standard (quotes " " or ' ' can be used, but only if they are the first and last non blank characters of a field value)

      This property is used for delimited files.

    • qCommentstring

      String that marks the beginning of the comment line. Example: “#” or “//” The engine ignores the commented lines during the data load. This property is only used for delimited files.

    • qDelimiterobject
      Show qDelimiter properties
      • qNamestring

        Name of the delimiter. Example: "Tab_DELIMITER"

      • qScriptCodestring

        Representation of the delimiter value that is used in the script. Example: "'\t'"

      • qNumberinteger

        Delimiter character number used by the engine to determine how to separate the values.

      • qIsMultipleboolean

        Is set to true if multiple spaces are used to separate the values.

    • qCodePageinteger

      Character set used in the file.

    • qHeaderSizeinteger

      Size of the header. Example: If the header size is 2, the first two rows in the file are considered as header and not as data. The header can contain the field names.

    • qRecordSizeinteger

      Record length. Each record (row of data) contains a number of columns with a fixed field size. This property is used for fixed record data files.

    • qTabSizeinteger

      Number of spaces that one tab character represents in the table file. This property is used for fixed record data files.

    • qIgnoreEOFboolean

      Is set to true, the end-of-file character is not taken into account during reload. This property is used for delimited files and fixed record data files.

    • qFixedWidthDelimitersstring

      Positions of the field breaks in the table. This property is used for fixed record data files.

Response

  • qTablesarray of objects
    Show qTables properties
    • qNamestring

      Name of the table.

    • qTypestring

      Type of the table. For example: Table or View.

Errors

array

GetFileTables(qConnectionId, qRelativePath?, qDataFormat)

const result = await doc.GetFileTables([
  "value",
  "value",
  {
    "qType": "CSV",
    "qLabel": "value",
    "qQuote": "value",
    "qComment": "value",
    "qDelimiter": {
      "qName": "value",
      "qScriptCode": "value",
      "qNumber": 123,
      "qIsMultiple": true
    },
    "qCodePage": 123,
    "qHeaderSize": 123,
    "qRecordSize": 123,
    "qTabSize": 123,
    "qIgnoreEOF": true,
    "qFixedWidthDelimiters": "value"
  }
])

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "handle": 3,
  "method": "GetFileTables",
  "params": {
    "qConnectionId": "value",
    "qRelativePath": "value",
    "qDataFormat": {
      "qType": "CSV",
      "qLabel": "value",
      "qQuote": "value",
      "qComment": "value",
      "qDelimiter": {
        "qName": "value",
        "qScriptCode": "value",
        "qNumber": 123,
        "qIsMultiple": true
      },
      "qCodePage": 123,
      "qHeaderSize": 123,
      "qRecordSize": 123,
      "qTabSize": 123,
      "qIgnoreEOF": true,
      "qFixedWidthDelimiters": "value"
    }
  }
}

Response

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "qTables": [
      {
        "qName": "value",
        "qType": "value"
      }
    ]
  }
}

Doc GetFileTablesEx

(qConnectionId, qRelativePath?, qDataFormat)

Lists the tables and fields of a JSON or XML file for a folder connection.

Parameters

  • qConnectionIdstring
    Required

    Identifier of the connection.

  • qRelativePathstring

    Path of the connection file.

  • qDataFormatobject
    Required

    Type of the file.

    Show qDataFormat properties
    • qTypestring

      Can be one of: "CSV""FIX""DIF""EXCEL_BIFF""EXCEL_OOXML""HTML""QVD""XML""QVX""JSON""KML""PARQUET"

    • qLabelstring

      One of:

      • Embedded labels (field names are present in the file)
      • No labels
      • Explicit labels (for DIFfiles)
    • qQuotestring

      One of:

      • None (no quotes)
      • MSQ (Modern Style Quoting)
      • Standard (quotes " " or ' ' can be used, but only if they are the first and last non blank characters of a field value)

      This property is used for delimited files.

    • qCommentstring

      String that marks the beginning of the comment line. Example: “#” or “//” The engine ignores the commented lines during the data load. This property is only used for delimited files.

    • qDelimiterobject
      Show qDelimiter properties
      • qNamestring

        Name of the delimiter. Example: "Tab_DELIMITER"

      • qScriptCodestring

        Representation of the delimiter value that is used in the script. Example: "'\t'"

      • qNumberinteger

        Delimiter character number used by the engine to determine how to separate the values.

      • qIsMultipleboolean

        Is set to true if multiple spaces are used to separate the values.

    • qCodePageinteger

      Character set used in the file.

    • qHeaderSizeinteger

      Size of the header. Example: If the header size is 2, the first two rows in the file are considered as header and not as data. The header can contain the field names.

    • qRecordSizeinteger

      Record length. Each record (row of data) contains a number of columns with a fixed field size. This property is used for fixed record data files.

    • qTabSizeinteger

      Number of spaces that one tab character represents in the table file. This property is used for fixed record data files.

    • qIgnoreEOFboolean

      Is set to true, the end-of-file character is not taken into account during reload. This property is used for delimited files and fixed record data files.

    • qFixedWidthDelimitersstring

      Positions of the field breaks in the table. This property is used for fixed record data files.

Response

  • qTablesarray of objects
    Show qTables properties
    • qNamestring

      Name of the table.

    • qFieldsarray of objects

      List of the fields in the table.

      Show qFields properties
      • qNamestring

        Name of the field.

      • qIsKeyboolean

        Is set to true if the field is a primary key.

      • qOriginalFieldNamestring

        Is shown for fixed records. qOriginalFieldName and qName are identical if no field names are used in the file. qOriginalFieldName differs from qName if embedded file names are used in the file.

    • qFormatSpecstring

      List of format specification items, within brackets. Examples of specification items:

      • file type
      • embedded labels, no labels
      • table is <table name>

Errors

array

GetFileTablesEx(qConnectionId, qRelativePath?, qDataFormat)

const result = await doc.GetFileTablesEx([
  "value",
  "value",
  {
    "qType": "CSV",
    "qLabel": "value",
    "qQuote": "value",
    "qComment": "value",
    "qDelimiter": {
      "qName": "value",
      "qScriptCode": "value",
      "qNumber": 123,
      "qIsMultiple": true
    },
    "qCodePage": 123,
    "qHeaderSize": 123,
    "qRecordSize": 123,
    "qTabSize": 123,
    "qIgnoreEOF": true,
    "qFixedWidthDelimiters": "value"
  }
])

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "handle": 3,
  "method": "GetFileTablesEx",
  "params": {
    "qConnectionId": "value",
    "qRelativePath": "value",
    "qDataFormat": {
      "qType": "CSV",
      "qLabel": "value",
      "qQuote": "value",
      "qComment": "value",
      "qDelimiter": {
        "qName": "value",
        "qScriptCode": "value",
        "qNumber": 123,
        "qIsMultiple": true
      },
      "qCodePage": 123,
      "qHeaderSize": 123,
      "qRecordSize": 123,
      "qTabSize": 123,
      "qIgnoreEOF": true,
      "qFixedWidthDelimiters": "value"
    }
  }
}

Response

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "qTables": [
      {
        "qName": "value",
        "qFields": [
          {
            "qName": "value",
            "qIsKey": true,
            "qOriginalFieldName": "value"
          }
        ],
        "qFormatSpec": "value"
      }
    ]
  }
}

Doc GetFolderItemsForConnection

(qConnectionId, qRelativePath?)

Lists the items for a folder connection.

Parameters

  • qConnectionIdstring
    Required

    Identifier of the connection.

  • qRelativePathstring

    Relative path of the connection.

Response

  • qFolderItemsarray of objects
    Show qFolderItems properties
    • qNamestring

      Name of the folder item.

    • qTypestring

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

Errors

array

GetFolderItemsForConnection(qConnectionId, qRelativePath?)

const result = await doc.GetFolderItemsForConnection([
  "value",
  "value"
])

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "handle": 3,
  "method": "GetFolderItemsForConnection",
  "params": {
    "qConnectionId": "value",
    "qRelativePath": "value"
  }
}

Response

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "qFolderItems": [
      {
        "qName": "value",
        "qType": "FOLDER"
      }
    ]
  }
}

Doc GetGroupStates

()
Experimental

Response

  • qGroupStatesarray of objects
    Experimental
    Show qGroupStates properties
    • qInfoobject
      Show qInfo properties
      • qIdstring

        Identifier of the object. If the chosen identifier is already in use, the engine automatically sets another one. If an identifier is not set, the engine automatically sets one. This parameter is optional.

      • qTypestring

        Type of the object. This parameter is mandatory.

    • qActiveFieldDefstring

      String defining the active field.

Errors

array

GetGroupStates()

const result = await doc.GetGroupStates({})

Request

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

Response

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "qGroupStates": [
      {
        "qInfo": {
          "qId": "value",
          "qType": "value"
        },
        "qActiveFieldDef": "value"
      }
    ]
  }
}

Doc GetIncludeFileContent

(qPath)

Gets the content of a file.

Parameters

  • qPathstring
    Required

    ["lib://CONNECTION_NAME\&lt;the name of the file you want to use>.txt"] OR ["lib://Connection_Name\&lt;Folder under your connection>\&lt;the name of the file you want to use>.txt"] [ ] should be used when the first variable contains a lib reference.

Response

  • qContentstring

Errors

array

GetIncludeFileContent(qPath)

const result = await doc.GetIncludeFileContent([
  "value"
])

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "handle": 3,
  "method": "GetIncludeFileContent",
  "params": {
    "qPath": "value"
  }
}

Response

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

Doc GetLibraryContent

(qName)

Returns the content of a library.

Global content library

In Qlik Sense Desktop, the content files are retrieved from: %userprofile%\Documents\Qlik\Sense\Content\Default In Qlik Sense Enterprise, the content files are retrieved from the Qlik Sense repository.

App specific content library

The embedded files are returned.

Parameters

  • qNamestring
    Required

    Name of the content library. It corresponds to the property qContentLibraryListItem/qName returned by the GetContentLibraries method.

Response

  • qListobject
    Show qList properties
    • qItemsarray of objects

      Information about the list of content files.

      Show qItems properties
      • qUrlDefstring

        Relative path to the content file. The URL is static. In Qlik Sense Enterprise, content files located:

        • In the /content/ <content library name>/ folder are part of a global content library.
        • In the /appcontent/ folder are part of the app specific library. The content files are never embedded in the qvf file. In Qlik Sense Desktop, content files located:
        • In the /content/default/ folder are outside the qvf file.
        • In the /media/ folder are embedded in the qvf file.
      • qUrlstring

        Relative path to the content file. The URL is static. In Qlik Sense Enterprise, content files located:

        • In the /content/ <content library name>/ folder are part of a global content library.
        • In the /appcontent/ folder are part of the app specific library. The content files are never embedded in the qvf file. In Qlik Sense Desktop, content files located:
        • In the /content/default/ folder are outside the qvf file.
        • In the /media/ folder are embedded in the qvf file.

Errors

array

GetLibraryContent(qName)

const result = await doc.GetLibraryContent([
  "value"
])

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "handle": 3,
  "method": "GetLibraryContent",
  "params": {
    "qName": "value"
  }
}

Response

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "qList": {
      "qItems": [
        {
          "qUrlDef": "value",
          "qUrl": "value"
        }
      ]
    }
  }
}

Doc GetLineage

()

Gets the lineage information of the app. The lineage information includes the LOAD and STORE statements from the data load script associated with this app. An array of lineage information.

Response

  • qLineagearray of objects
    Show qLineage properties
    • qDiscriminatorstring

      A string indicating the origin of the data:

      • [filename]: the data comes from a local file.
      • INLINE: the data is entered inline in the load script.
      • RESIDENT: the data comes from a resident table. The table name is listed.
      • AUTOGENERATE: the data is generated from the load script (no external table of data source).
      • Provider: the data comes from a data connection. The connector source name is listed.
      • [webfile]: the data comes from a web-based file.
      • STORE: path to QVD or TXT file where data is stored.
      • EXTENSION: the data comes from a Server Side Extension (SSE).
    • qStatementstring

      The LOAD and SELECT script statements from the data load script.

Errors

array

GetLineage()

const result = await doc.GetLineage({})

Request

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

Response

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "qLineage": [
      {
        "qDiscriminator": "value",
        "qStatement": "value"
      }
    ]
  }
}

Doc GetLocaleInfo

()

Returns locale information.

Response

  • qReturnobject
    Show qReturn properties
    • qDecimalSepstring

      Decimal separator.

    • qThousandSepstring

      Thousand separator.

    • qListSepstring

      List separator.

    • qMoneyDecimalSepstring

      Money decimal separator.

    • qMoneyThousandSepstring

      Money thousand separator.

    • qCurrentYearinteger

      Current year.

    • qMoneyFmtstring

      Money format. Example: #.##0,00 kr;-#.##0,00 kr

    • qTimeFmtstring

      Time format. Example: hh:mm:ss

    • qDateFmtstring

      Date format. Example: YYYY-MM-DD

    • qTimestampFmtstring

      Time stamp format. Example: YYYY-MM-DD hh:mm:ss[.fff]

    • qCalendarStringsobject
      Show qCalendarStrings properties
      • qDayNamesarray of strings

        List of short day names.

      • qMonthNamesarray of strings

        List of short month names.

      • qLongDayNamesarray of strings

        List of long day names.

      • qLongMonthNamesarray of strings

        List of long month names.

    • qFirstWeekDayinteger

      First day of the week, starting from 0. According to ISO 8601, Monday is the first day of the week.

      • 0 = Monday
      • 1 = Tuesday
      • ...
      • 6 = Sunday

      If this property has not been set in a script, the returned value comes from the Windows operating system.

    • qBrokenWeeksboolean

      Is set to true if broken weeks are allowed in a year. According to ISO 8601, no broken weeks should be allowed. This property is not shown if set to false. If qBrokenWeeks is set to true, qReferenceDay is irrelevant. If this property has not been set in a script, the returned value comes from the Windows operating system.

    • qReferenceDayinteger

      Day in the year that is always in week 1. According to ISO 8601, January 4th should always be part of the first week of the year ( qReferenceDay =4). Recommended values are in the range 1 and 7. If this property has not been set in a script, the returned value comes from the Windows operating system. This property is not relevant if there are broken weeks in the year.

    • qFirstMonthOfYearinteger

      First month of the year, starting from 1. According to ISO 8601, January is the first month of the year.

      • 1 = January
      • 2 = February
      • 12 = January

      If this property has not been set in a script, the returned value comes from the Windows operating system.

    • qCollationstring

      Locale name (following language tagging convention RFC 4646): < language>-<REGION> Where:

      • language is a lowercase ISO  639 language code
      • REGION specifies an uppercase ISO 3166 country code.

      If this property has not been set in a script, the returned value comes from the Windows operating system.

    • qNumericalAbbreviationstring

      Number format. Example: 3:k;6:M;9:G;12:T;15:P;18:E;21:Z;24:Y;-3:m;-6:μ;-9:n;-12:p;-15:f;-18:a;-21:z;-24:y

Errors

array

GetLocaleInfo()

const result = await doc.GetLocaleInfo({})

Request

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

Response

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "qReturn": {
      "qDecimalSep": "value",
      "qThousandSep": "value",
      "qListSep": "value",
      "qMoneyDecimalSep": "value",
      "qMoneyThousandSep": "value",
      "qCurrentYear": 123,
      "qMoneyFmt": "value",
      "qTimeFmt": "value",
      "qDateFmt": "value",
      "qTimestampFmt": "value",
      "qCalendarStrings": {
        "qDayNames": [
          "value"
        ],
        "qMonthNames": [
          "value"
        ],
        "qLongDayNames": [
          "value"
        ],
        "qLongMonthNames": [
          "value"
        ]
      },
      "qFirstWeekDay": 123,
      "qBrokenWeeks": true,
      "qReferenceDay": 123,
      "qFirstMonthOfYear": 123,
      "qCollation": "value",
      "qNumericalAbbreviation": "value"
    }
  }
}

Doc GetLooselyCoupledVector

()

Returns a list of table states.

The following states apply:

  • 0 The table is not loosely coupled.
  • 1 The table is loosely coupled.
  • 2 The table is loosely coupled and cannot be changed to another state using the Qlik Engine API.
The last three values in the vector are for internal use.
In case of circular references, the engine automatically sets the table state to loosely coupled to avoid creating loops.

Response

  • qvarray of integers

Errors

array

GetLooselyCoupledVector()

const result = await doc.GetLooselyCoupledVector({})

Request

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

Response

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "qv": [
      123
    ]
  }
}

Doc GetMatchingFields

(qTags, qMatchingFieldMode?)

Retrieves any fields that match all of the specified tags or just one of them in the data model of an app.

Tags set by Qlik Sense are prefixed by the _$_ sign.

Parameters

  • qTagsarray of strings
    Required

    List of tags. The GetMatchingFields method looks for fields that match one or all of the tags in this list, depending on the value of qMatchingFieldMode .

  • qMatchingFieldModestring

    Matching field mode. The default value is MATCHINGFIELDMODE_MATCH_ALL.

    One of:

    • MATCHINGFIELDMODE_MATCH_ALL
    • MATCHINGFIELDMODE_MATCH_ONE

Response

  • qFieldNamesarray of objects
    Show qFieldNames properties
    • qNamestring

      Name of the field.

    • qTagsarray of strings

      List of tags.

Errors

array

GetMatchingFields(qTags, qMatchingFieldMode?)

const result = await doc.GetMatchingFields([
  [
    "value"
  ],
  "value"
])

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "handle": 3,
  "method": "GetMatchingFields",
  "params": {
    "qTags": [
      "value"
    ],
    "qMatchingFieldMode": "value"
  }
}

Response

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "qFieldNames": [
      {
        "qName": "value",
        "qTags": [
          "value"
        ]
      }
    ]
  }
}

Doc GetMeasure

(qId)

Returns the handle of a measure.

Parameters

  • qIdstring
    Required

    Identifier of the measure.

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

GetMeasure(qId)

const result = await doc.GetMeasure([
  "value"
])

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "handle": 3,
  "method": "GetMeasure",
  "params": {
    "qId": "value"
  }
}

Response

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "qReturn": {
      "qType": "value",
      "qHandle": 123,
      "qGenericType": "value",
      "qGenericId": "value"
    }
  }
}

Doc GetMeasureWithLabel

(qLabel)

Returns the handle of a measure with a label. If multiple measures has the same label the first is returned.

Parameters

  • qLabelstring
    Required

    is the label of the measure to be returned.

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

GetMeasureWithLabel(qLabel)

const result = await doc.GetMeasureWithLabel([
  "value"
])

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "handle": 3,
  "method": "GetMeasureWithLabel",
  "params": {
    "qLabel": "value"
  }
}

Response

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "qReturn": {
      "qType": "value",
      "qHandle": 123,
      "qGenericType": "value",
      "qGenericId": "value"
    }
  }
}

Doc GetMediaList

()
Deprecated
Use GetLibraryContent method instead

Lists the media files.

Response

  • qListobject

    Lists the media files. Is the layout for MediaListDef.

    This struct is deprecated.
    Show qList properties
    • qItemsarray of objects

      Information about the list of media files. In Qlik Sense Desktop, the media files are retrieved from: %userprofile%\Documents\Qlik\Sense\Content\Default In Qlik Sense Enterprise, the media files are retrieved from: <installation_directory>\Qlik\Sense\Repository\Content\Default The default installation directory is ProgramData .

      Show qItems properties
      • qUrlDefstring

        Relative path to the media file. The URL is static. Media files located:

        • in the /content/default/ folder are outside the qvf file.
        • in the /media/ folder are embedded in the qvf file.
      • qUrlstring

        Relative path to the media file. Media files located:

        • in the /content/default/ folder are outside the qvf file.
        • in the /media/ folder are embedded in the qvf file.
  • qReturnboolean

Errors

array

GetMediaList()

const result = await doc.GetMediaList({})

Request

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

Response

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "qList": {
      "qItems": [
        {
          "qUrlDef": "value",
          "qUrl": "value"
        }
      ]
    },
    "qReturn": true
  }
}

Doc GetObject

(qId)

Returns the type of the app object and the corresponding handle.

Parameters

  • qIdstring
    Required

    Identifier of the object to retrieve.

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

GetObject(qId)

const result = await doc.GetObject([
  "value"
])

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "handle": 3,
  "method": "GetObject",
  "params": {
    "qId": "value"
  }
}

Response

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "qReturn": {
      "qType": "value",
      "qHandle": 123,
      "qGenericType": "value",
      "qGenericId": "value"
    }
  }
}

Doc GetObjects

(qOptions)

Returns all objects compatible with options.

Parameters

  • qOptionsobject
    Required

    Object type filter and requested properties.

    Show qOptions properties
    • qTypesarray of strings

      List of object types.

    • qIncludeSessionObjectsboolean

      Set to true to include session objects. The default value is false.

    • qDataobject

      Contains dynamic JSON data specified by the client.

Response

  • qListarray of objects
    Show qList properties
    • qInfoobject
      Show qInfo properties
      • qIdstring

        Identifier of the object. If the chosen identifier is already in use, the engine automatically sets another one. If an identifier is not set, the engine automatically sets one. This parameter is optional.

      • qTypestring

        Type of the object. This parameter is mandatory.

    • qMetaobject

      Layout for NxMetaDef.

      Show qMeta properties
      • qNamestring

        Name. This property is optional.

    • qDataobject

      Contains dynamic JSON data specified by the client.

Errors

array

GetObjects(qOptions)

const result = await doc.GetObjects([
  {
    "qTypes": [
      "value"
    ],
    "qIncludeSessionObjects": true,
    "qData": {}
  }
])

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "handle": 3,
  "method": "GetObjects",
  "params": {
    "qOptions": {
      "qTypes": [
        "value"
      ],
      "qIncludeSessionObjects": true,
      "qData": {}
    }
  }
}

Response

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "qList": [
      {
        "qInfo": {
          "qId": "value",
          "qType": "value"
        },
        "qMeta": {
          "qName": "value"
        },
        "qData": {}
      }
    ]
  }
}

Doc GetScript

()

Gets values in script.

Response

  • qScriptstring

Errors

array

GetScript()

const result = await doc.GetScript({})

Request

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

Response

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

Doc GetScriptBreakpoints

()

Lists the breakpoints in the script of an app.

Response

  • qBreakpointsarray of objects
    Show qBreakpoints properties
    • qbufferNamestring

      Name of the breakpoint.

    • qlineIxinteger

      Line number in the script where the breakpoint is set.

    • qEnabledboolean

      If set to true then the breakpoint is enabled (in use).

Errors

array

GetScriptBreakpoints()

const result = await doc.GetScriptBreakpoints({})

Request

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

Response

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "qBreakpoints": [
      {
        "qbufferName": "value",
        "qlineIx": 123,
        "qEnabled": true
      }
    ]
  }
}

Doc GetScriptEx

()

Gets script and script meta-data.

Response

  • qScriptobject
    Show qScript properties
    • qScriptstring

      Script text.

    • qMetaobject

      Layout for NxMetaDef.

      Show qMeta properties
      • qNamestring

        Name. This property is optional.

    • qIsLockedboolean

      True if user is temporarily locked from modifying the script. Meta contains the ID of the last modifier. Only applicable to QCS.

Errors

array

GetScriptEx()

const result = await doc.GetScriptEx({})

Request

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

Response

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "qScript": {
      "qScript": "value",
      "qMeta": {
        "qName": "value"
      },
      "qIsLocked": true
    }
  }
}

Doc GetScriptMeta

()
Experimental

Gets script meta-data.

Response

  • qMetaobject
    Experimental
    Show qMeta properties
    • qMetaobject

      Layout for NxMetaDef.

      Show qMeta properties
      • qNamestring

        Name. This property is optional.

    • qIsLockedboolean

      True if user is temporarily locked from modifying the script. Meta contains the ID of the last modifier. Only applicable to QCS.

Errors

array

GetScriptMeta()

const result = await doc.GetScriptMeta({})

Request

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

Response

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "qMeta": {
      "qMeta": {
        "qName": "value"
      },
      "qIsLocked": true
    }
  }
}

Doc GetSetAnalysis

(qStateName?, qBookmarkId?)

Returns a set analysis expression from active selections or from a saved bookmark. Fields on the fly and Calculated dimensions will not be included in the generated expressions, instead a message indicating 'missing fields' will provided within the expression.

BookmarkId emptyBookmarkId set
StateName empty (or $)Default selections state is returned.Default state ($) in bookmark with id is returned.
StateName setState selections is returned.State in bookmark with id is returned.

Parameters

  • qStateNamestring

    Optional. The name of the state to get set analysis expression for. If left empty, the default state will be retrieved.

  • qBookmarkIdstring

    Optional. The Id of the bookmark to get the set analysis expression for. If left empty, the current selection will be retrieved.

Response

  • qSetExpressionstring

Errors

array

GetSetAnalysis(qStateName?, qBookmarkId?)

const result = await doc.GetSetAnalysis([
  "value",
  "value"
])

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "handle": 3,
  "method": "GetSetAnalysis",
  "params": {
    "qStateName": "value",
    "qBookmarkId": "value"
  }
}

Response

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

Doc GetTableData

(qOffset, qRows, qSyntheticMode, qTableName)

Retrieves the data of a specific table.

Parameters

  • qOffsetinteger
    Required

    Position from the top, starting from 0. If the offset is set to 0, the rows starting from the position/index 0 are shown.

  • qRowsinteger
    Required

    Number of rows to show.

  • qSyntheticModeboolean
    Required

    If this parameter is set to true, the internal data/table representation is shown. Synthetic fields are present (if any).

  • qTableNamestring
    Required

    Name of the table.

Response

  • qDataarray of objects
    Show qData properties
    • qValuearray of objects

      Array of field values.

      Show qValue properties
      • qTextstring

        Text related to the field value. This parameter is optional.

      • qIsNumericboolean

        Is set to true if the value is a numeric. This parameter is optional. Default is false.

      • qNumbernumber

        Numeric value of the field. This parameter is displayed if qIsNumeric is set to true. This parameter is optional.

Errors

array

GetTableData(qOffset, qRows, qSyntheticMode, qTableName)

const result = await doc.GetTableData([
  123,
  123,
  true,
  "value"
])

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "handle": 3,
  "method": "GetTableData",
  "params": {
    "qOffset": 123,
    "qRows": 123,
    "qSyntheticMode": true,
    "qTableName": "value"
  }
}

Response

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "qData": [
      {
        "qValue": [
          {
            "qText": "value",
            "qIsNumeric": true,
            "qNumber": 123
          }
        ]
      }
    ]
  }
}

Doc GetTableProfileData

(qTableName)
Experimental

Returns profile data for a given table.

Parameters

  • qTableNamestring
    Required

    Name of the table

Response

  • qProfilingobject
    Show qProfiling properties
    • qNoOfRowsinteger

      Number of rows in the table.

    • qFieldProfilingarray of objects

      Field values profiling info

      Show qFieldProfiling properties
      • qNamestring

        Name of the field.

      • qFieldTagsarray of strings

        List of tags related to the field.

      • qNumberFormatobject

        Sets the formatting of a field. The properties of qFieldAttributes and the formatting mechanism are described below.

        Formatting mechanism

        The formatting mechanism depends on the type set in qType, as shown below:

        In case of inconsistencies between the type and the format pattern, the format pattern takes precedence over the type.

        Type is DATE, TIME, TIMESTAMP or INTERVAL

        The following applies:

        • If a format pattern is defined in qFmt , the formatting is as defined in qFmt .
        • If qFmt is empty, the formatting is defined by the number interpretation variables included at the top of the script ( TimeFormat , DateFormat , TimeStampFormat ).
        • The properties qDec , qThou , qnDec , qUseThou are not used.

        Type is INTEGER

        The following applies:

        • If a format pattern is defined in qFmt , the engine looks at the values set in qDec and qThou . If these properties are not defined, the formatting mechanism uses the number interpretation variables included at the top of the script ( DecimalSep and ThousandSep ).
        • If no format pattern is defined in qFmt , no formatting is applied. The properties qDec , qThou , qnDec , qUseThou and the number interpretation variables defined in the script are not used .

        Type is REAL

        The following applies:

        • If a format pattern is defined in qFmt , the engine looks at the values set in qDec and qThou . If these properties are not defined, the engine uses the number interpretation variables included at the top of the script ( DecimalSep and ThousandSep ).
        • If no format pattern is defined in qFmt , and if the value is almost an integer value (for example, 14,000012), the value is formatted as an integer. The properties qDec , qThou , qnDec , qUseThou are not used.
        • If no format pattern is defined in qFmt , and if qnDec is defined and not 0, the property qDec is used. If qDec is not defined, the variable DecimalSep defined at the top of the script is used.
        • If no format pattern is defined in qFmt , and if qnDec is 0, the number of decimals is 14 and the property qDec is used. If qDec is not defined, the variable DecimalSep defined at the top of the script is used.

        Type is FIX

        The following applies:

        • If a format pattern is defined in qFmt , the engine looks at the values set in qDec and qThou . If these properties are not defined, the engine uses the number interpretation variables included at the top of the script ( DecimalSep and ThousandSep ).
        • If no format pattern is defined in qFmt , the properties qDec and qnDec are used. If qDec is not defined, the variable DecimalSep defined at the top of the script is used.

        Type is MONEY

        The following applies:

        • If a format pattern is defined in qFmt , the engine looks at the values set in qDec and qThou . If these properties are not defined, the engine uses the number interpretation variables included at the top of any script ( MoneyDecimalSep and MoneyThousandSep ).
        • If no format pattern is defined in qFmt , the engine uses the number interpretation variables included at the top of the script ( MoneyDecimalSep and MoneyThousandSep ).

        Type is ASCII

        No formatting, qFmt is ignored.

        Show qNumberFormat properties
        • qTypestring

          Can be one of: "U""A""I""R""F""M""D""T""TS""IV"

        • qnDecinteger

          Number of decimals. Default is 10.

        • qUseThouinteger

          Defines whether or not a thousands separator must be used. Default is 0.

        • qFmtstring

          Defines the format pattern that applies to qText . Is used in connection to the type of the field (parameter qType ). For more information, see Formatting mechanism. Example: YYYY-MM-DD for a date.

        • qDecstring

          Defines the decimal separator. Example: .

        • qThoustring

          Defines the thousand separator (if any). Is used if qUseThou is set to 1. Example: ,

      • qDistinctValuesinteger

        Number of distinct values

      • qDistinctNumericValuesinteger

        Number of distinct numeric values

      • qDistinctTextValuesinteger

        Number of distinct text values

      • qNumericValuesinteger

        Number of numeric values

      • qNullValuesinteger

        Number of null values

      • qTextValuesinteger

        Number of textual values

      • qNegValuesinteger

        Number of negative values

      • qPosValuesinteger

        Number of positive values

      • qZeroValuesinteger

        Number of zero values for numerical values

      • qSumnumber

        Sum of all numerical values. NaN otherwise.

      • qSum2number

        Squared sum of all numerical values. NaN otherwise.

      • qAveragenumber

        Average of all numerical values. NaN otherwise.

      • qMediannumber

        Median of all numerical values. NaN otherwise.

      • qStdnumber

        Standard deviation of numerical values. NaN otherwise.

      • qMinnumber

        Minimum value of numerical values. NaN otherwise.

      • qMaxnumber

        Maximum value of numerical values. NaN otherwise.

      • qSkewnessnumber

        Skewness of the numerical values. NaN otherwise.

      • qKurtosisnumber

        Kurtosis of the numerical values. NaN otherwise.

      • qFractilesarray of numbers

        The .01, .05, .1, .25, .5, .75, .9, .95, .99 fractiles. Array of NaN otherwise.

      • qEmptyStringsinteger

        Number of empty strings

      • qMaxStringLeninteger

        Maximum string length of textual values. 0 otherwise.

      • qMinStringLeninteger

        Minimum string length of textual values. 0 otherwise.

      • qSumStringLeninteger

        Sum of all characters in strings in the field

      • qAvgStringLennumber

        Average string length of textual values. 0 otherwise.

      • qFirstSortedstring

        For textual values the first sorted string.

      • qLastSortedstring

        For textual values the last sorted string.

      • qMostFrequentarray of objects

        Three most frequent values and their frequencies

        Show qMostFrequent properties
        • qSymbolobject
          Show qSymbol properties
          • qTextstring

            String value of the symbol. This parameter is optional and present only if Symbol is a string.

          • qNumbernumber

            Numeric value of the symbol. NaN otherwise.

        • qFrequencyinteger

          Frequency of the above symbol in the field

      • qFrequencyDistributionobject
        Show qFrequencyDistribution properties
        • qNumberOfBinsinteger

          Number of bins.

        • qBinsEdgesarray of numbers

          Bins edges.

        • qFrequenciesarray of integers

          Bins frequencies.

Errors

array

GetTableProfileData(qTableName)

const result = await doc.GetTableProfileData([
  "value"
])

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "handle": 3,
  "method": "GetTableProfileData",
  "params": {
    "qTableName": "value"
  }
}

Response

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "qProfiling": {
      "qNoOfRows": 123,
      "qFieldProfiling": [
        {
          "qName": "value",
          "qFieldTags": [
            "value"
          ],
          "qNumberFormat": {
            "qType": "U",
            "qnDec": 10,
            "qUseThou": 123,
            "qFmt": "value",
            "qDec": "value",
            "qThou": "value"
          },
          "qDistinctValues": 123,
          "qDistinctNumericValues": 123,
          "qDistinctTextValues": 123,
          "qNumericValues": 123,
          "qNullValues": 123,
          "qTextValues": 123,
          "qNegValues": 123,
          "qPosValues": 123,
          "qZeroValues": 123,
          "qSum": 123,
          "qSum2": 123,
          "qAverage": 123,
          "qMedian": 123,
          "qStd": 123,
          "qMin": 123,
          "qMax": 123,
          "qSkewness": 123,
          "qKurtosis": 123,
          "qFractiles": [
            123
          ],
          "qEmptyStrings": 123,
          "qMaxStringLen": 123,
          "qMinStringLen": 123,
          "qSumStringLen": 123,
          "qAvgStringLen": 123,
          "qFirstSorted": "value",
          "qLastSorted": "value",
          "qMostFrequent": [
            {
              "qSymbol": {
                "qText": "value",
                "qNumber": 123
              },
              "qFrequency": 123
            }
          ],
          "qFrequencyDistribution": {
            "qNumberOfBins": 123,
            "qBinsEdges": [
              123
            ],
            "qFrequencies": [
              123
            ]
          }
        }
      ]
    }
  }
}

Doc GetTablesAndKeys

(qWindowSize, qNullSize, qCellHeight, qSyntheticMode, qIncludeSysVars, qIncludeProfiling?)

Returns:

  • The list of tables in an app and the fields inside each table.
  • The list of derived fields.
  • The list of key fields.

Parameters

  • qWindowSizeobject
    Required

    Size of the window that is used to display the results.

    Show qWindowSize properties
    • qcxinteger

      Number of pixels on the x axis.

    • qcyinteger

      Number of pixels on the y axis.

  • qNullSizeobject
    Required
    Show qNullSize properties
    • qcxinteger

      Number of pixels on the x axis.

    • qcyinteger

      Number of pixels on the y axis.

  • qCellHeightinteger
    Required

    Height of a cell in a table in pixels.

  • qSyntheticModeboolean
    Required

    One of:

    • true for internal table viewer: Shows a more detailed view on how the Qlik engine defines the relations between fields and the quality of the keys.
    • false for source table viewer: Shows the natural relation between fields without reference to synthetic keys and resultant linking synthetic tables. Instead synthetic keys are represented by multiple connectors between tables.
  • qIncludeSysVarsboolean
    Required

    If set to true, the system variables are included.

  • qIncludeProfilingboolean

    If set to true, profiling information is included.

Response

  • qtrarray of objects
    Show qtr properties
    • qNamestring

      Name of the table.

    • qLooseboolean

      This property is set to true if the table is loose.

    • qNoOfRowsinteger

      Number of rows in the table.

    • qFieldsarray of objects

      Information about the fields in the table.

      Show qFields properties
      • qNamestring

        Name of the field.

      • qOriginalFieldsarray of strings

        Is shown for fixed records. qOriginalFieldName and qName are identical if no field names are used in the file. qOriginalFieldName differs from qName if embedded file names are used in the file.

      • qPresentboolean
      • qHasNullboolean

        This property is set to true if the field contains some Null values.

      • qHasWildboolean
      • qHasDuplicatesboolean

        This property is set to true if the field contains some duplicate values.

      • qIsSyntheticboolean

        This property is set to true if the field contains a synthetic key.

      • qInformationDensitynumber

        Number of records that have values (for example, not NULL) in the field as compared to the total number of records in the table.

      • qnNonNullsinteger

        Number of values that are non Null.

      • qnRowsinteger

        Number of rows in the field.

      • qSubsetRationumber

        Number of distinct values in the field (in the current table) as compared to the total number of distinct values of this field (in all tables).

      • qnTotalDistinctValuesinteger

        Number of distinct values in the field.

      • qnPresentDistinctValuesinteger
      • qKeyTypestring

        Can be one of: "NOT_KEY""ANY_KEY""PRIMARY_KEY""PERFECT_KEY"

      • qCommentstring

        Comment related to the field.

      • qTagsarray of strings

        List of tags related to the field.

      • qDerivedFieldsarray of objects

        List of the derived fields.

        Show qDerivedFields properties
        • qDefinitionNamestring

          Name of the derived definition.

        • qTagsarray of strings

          List of tags.

        • qActiveboolean

          Is set to true is the derived field is in use.

      • qIsFieldOnTheFlyboolean
      • qReadableNamestring
    • qPosobject
      Show qPos properties
      • qxinteger

        x-coordinate in pixels. The origin is the top left of the screen.

      • qyinteger

        y-coordinate in pixels. The origin is the top left of the screen.

    • qCommentstring

      Comment related to the table.

    • qIsDirectDiscoveryboolean

      If set to true, Direct Discovery is used. Direct Discovery fields are not loaded into memory and remain in the external database.

    • qIsSyntheticboolean

      This property is set to true if the table contains a synthetic key.

    • qTableTagsarray of strings

      List of tags related to the table.

    • qProfilingDataobject
      Show qProfilingData properties
      • qNoOfRowsinteger

        Number of rows in the table.

      • qFieldProfilingarray of objects

        Field values profiling info

        Show qFieldProfiling properties
        • qNamestring

          Name of the field.

        • qFieldTagsarray of strings

          List of tags related to the field.

        • qNumberFormatobject

          Sets the formatting of a field. The properties of qFieldAttributes and the formatting mechanism are described below.

          Formatting mechanism

          The formatting mechanism depends on the type set in qType, as shown below:

          In case of inconsistencies between the type and the format pattern, the format pattern takes precedence over the type.

          Type is DATE, TIME, TIMESTAMP or INTERVAL

          The following applies:

          • If a format pattern is defined in qFmt , the formatting is as defined in qFmt .
          • If qFmt is empty, the formatting is defined by the number interpretation variables included at the top of the script ( TimeFormat , DateFormat , TimeStampFormat ).
          • The properties qDec , qThou , qnDec , qUseThou are not used.

          Type is INTEGER

          The following applies:

          • If a format pattern is defined in qFmt , the engine looks at the values set in qDec and qThou . If these properties are not defined, the formatting mechanism uses the number interpretation variables included at the top of the script ( DecimalSep and ThousandSep ).
          • If no format pattern is defined in qFmt , no formatting is applied. The properties qDec , qThou , qnDec , qUseThou and the number interpretation variables defined in the script are not used .

          Type is REAL

          The following applies:

          • If a format pattern is defined in qFmt , the engine looks at the values set in qDec and qThou . If these properties are not defined, the engine uses the number interpretation variables included at the top of the script ( DecimalSep and ThousandSep ).
          • If no format pattern is defined in qFmt , and if the value is almost an integer value (for example, 14,000012), the value is formatted as an integer. The properties qDec , qThou , qnDec , qUseThou are not used.
          • If no format pattern is defined in qFmt , and if qnDec is defined and not 0, the property qDec is used. If qDec is not defined, the variable DecimalSep defined at the top of the script is used.
          • If no format pattern is defined in qFmt , and if qnDec is 0, the number of decimals is 14 and the property qDec is used. If qDec is not defined, the variable DecimalSep defined at the top of the script is used.

          Type is FIX

          The following applies:

          • If a format pattern is defined in qFmt , the engine looks at the values set in qDec and qThou . If these properties are not defined, the engine uses the number interpretation variables included at the top of the script ( DecimalSep and ThousandSep ).
          • If no format pattern is defined in qFmt , the properties qDec and qnDec are used. If qDec is not defined, the variable DecimalSep defined at the top of the script is used.

          Type is MONEY

          The following applies:

          • If a format pattern is defined in qFmt , the engine looks at the values set in qDec and qThou . If these properties are not defined, the engine uses the number interpretation variables included at the top of any script ( MoneyDecimalSep and MoneyThousandSep ).
          • If no format pattern is defined in qFmt , the engine uses the number interpretation variables included at the top of the script ( MoneyDecimalSep and MoneyThousandSep ).

          Type is ASCII

          No formatting, qFmt is ignored.

          Show qNumberFormat properties
          • qTypestring

            Can be one of: "U""A""I""R""F""M""D""T""TS""IV"

          • qnDecinteger

            Number of decimals. Default is 10.

          • qUseThouinteger

            Defines whether or not a thousands separator must be used. Default is 0.

          • qFmtstring

            Defines the format pattern that applies to qText . Is used in connection to the type of the field (parameter qType ). For more information, see Formatting mechanism. Example: YYYY-MM-DD for a date.

          • qDecstring

            Defines the decimal separator. Example: .

          • qThoustring

            Defines the thousand separator (if any). Is used if qUseThou is set to 1. Example: ,

        • qDistinctValuesinteger

          Number of distinct values

        • qDistinctNumericValuesinteger

          Number of distinct numeric values

        • qDistinctTextValuesinteger

          Number of distinct text values

        • qNumericValuesinteger

          Number of numeric values

        • qNullValuesinteger

          Number of null values

        • qTextValuesinteger

          Number of textual values

        • qNegValuesinteger

          Number of negative values

        • qPosValuesinteger

          Number of positive values

        • qZeroValuesinteger

          Number of zero values for numerical values

        • qSumnumber

          Sum of all numerical values. NaN otherwise.

        • qSum2number

          Squared sum of all numerical values. NaN otherwise.

        • qAveragenumber

          Average of all numerical values. NaN otherwise.

        • qMediannumber

          Median of all numerical values. NaN otherwise.

        • qStdnumber

          Standard deviation of numerical values. NaN otherwise.

        • qMinnumber

          Minimum value of numerical values. NaN otherwise.

        • qMaxnumber

          Maximum value of numerical values. NaN otherwise.

        • qSkewnessnumber

          Skewness of the numerical values. NaN otherwise.

        • qKurtosisnumber

          Kurtosis of the numerical values. NaN otherwise.

        • qFractilesarray of numbers

          The .01, .05, .1, .25, .5, .75, .9, .95, .99 fractiles. Array of NaN otherwise.

        • qEmptyStringsinteger

          Number of empty strings

        • qMaxStringLeninteger

          Maximum string length of textual values. 0 otherwise.

        • qMinStringLeninteger

          Minimum string length of textual values. 0 otherwise.

        • qSumStringLeninteger

          Sum of all characters in strings in the field

        • qAvgStringLennumber

          Average string length of textual values. 0 otherwise.

        • qFirstSortedstring

          For textual values the first sorted string.

        • qLastSortedstring

          For textual values the last sorted string.

        • qMostFrequentarray of objects

          Three most frequent values and their frequencies

          Show qMostFrequent properties
          • qSymbolobject
            Show qSymbol properties
            • qTextstring

              String value of the symbol. This parameter is optional and present only if Symbol is a string.

            • qNumbernumber

              Numeric value of the symbol. NaN otherwise.

          • qFrequencyinteger

            Frequency of the above symbol in the field

        • qFrequencyDistributionobject
          Show qFrequencyDistribution properties
          • qNumberOfBinsinteger

            Number of bins.

          • qBinsEdgesarray of numbers

            Bins edges.

          • qFrequenciesarray of integers

            Bins frequencies.

  • qkarray of objects
    Show qk properties
    • qKeyFieldsarray of strings

      Name of the key field.

    • qTablesarray of strings

      Table the key belongs to.

Errors

array

GetTablesAndKeys(qWindowSize, qNullSize, qCellHeight, qSyntheticMode, qIncludeSysVars, qIncludeProfiling?)

const result = await doc.GetTablesAndKeys([
  {
    "qcx": 123,
    "qcy": 123
  },
  {
    "qcx": 123,
    "qcy": 123
  },
  123,
  true,
  true,
  true
])

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "handle": 3,
  "method": "GetTablesAndKeys",
  "params": {
    "qWindowSize": {
      "qcx": 123,
      "qcy": 123
    },
    "qNullSize": {
      "qcx": 123,
      "qcy": 123
    },
    "qCellHeight": 123,
    "qSyntheticMode": true,
    "qIncludeSysVars": true,
    "qIncludeProfiling": true
  }
}

Response

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "qtr": [
      {
        "qName": "value",
        "qLoose": true,
        "qNoOfRows": 123,
        "qFields": [
          {
            "qName": "value",
            "qOriginalFields": [
              "value"
            ],
            "qPresent": true,
            "qHasNull": true,
            "qHasWild": true,
            "qHasDuplicates": true,
            "qIsSynthetic": true,
            "qInformationDensity": 123,
            "qnNonNulls": 123,
            "qnRows": 123,
            "qSubsetRatio": 123,
            "qnTotalDistinctValues": 123,
            "qnPresentDistinctValues": 123,
            "qKeyType": "NOT_KEY",
            "qComment": "value",
            "qTags": [
              "value"
            ],
            "qDerivedFields": [
              {
                "qDefinitionName": "value",
                "qTags": [
                  "value"
                ],
                "qActive": true
              }
            ],
            "qIsFieldOnTheFly": true,
            "qReadableName": "value"
          }
        ],
        "qPos": {
          "qx": 123,
          "qy": 123
        },
        "qComment": "value",
        "qIsDirectDiscovery": true,
        "qIsSynthetic": true,
        "qTableTags": [
          "value"
        ],
        "qProfilingData": {
          "qNoOfRows": 123,
          "qFieldProfiling": [
            {
              "qName": "value",
              "qFieldTags": [
                "value"
              ],
              "qNumberFormat": {
                "qType": "U",
                "qnDec": 10,
                "qUseThou": 123,
                "qFmt": "value",
                "qDec": "value",
                "qThou": "value"
              },
              "qDistinctValues": 123,
              "qDistinctNumericValues": 123,
              "qDistinctTextValues": 123,
              "qNumericValues": 123,
              "qNullValues": 123,
              "qTextValues": 123,
              "qNegValues": 123,
              "qPosValues": 123,
              "qZeroValues": 123,
              "qSum": 123,
              "qSum2": 123,
              "qAverage": 123,
              "qMedian": 123,
              "qStd": 123,
              "qMin": 123,
              "qMax": 123,
              "qSkewness": 123,
              "qKurtosis": 123,
              "qFractiles": [
                123
              ],
              "qEmptyStrings": 123,
              "qMaxStringLen": 123,
              "qMinStringLen": 123,
              "qSumStringLen": 123,
              "qAvgStringLen": 123,
              "qFirstSorted": "value",
              "qLastSorted": "value",
              "qMostFrequent": [
                {
                  "qSymbol": {
                    "qText": "value",
                    "qNumber": 123
                  },
                  "qFrequency": 123
                }
              ],
              "qFrequencyDistribution": {
                "qNumberOfBins": 123,
                "qBinsEdges": [
                  123
                ],
                "qFrequencies": [
                  123
                ]
              }
            }
          ]
        }
      }
    ],
    "qk": [
      {
        "qKeyFields": [
          "value"
        ],
        "qTables": [
          "value"
        ]
      }
    ]
  }
}

Doc GetTextMacros

()

Fetches updated variables after a statement execution.

If qRefSeqNo and qSetSeqNo are set to 0, it means that the variables were not updated.

Response

  • qMacrosarray of objects
    Show qMacros properties
    • qTagstring

      Name of the variable.

    • qRefSeqNointeger

      Order in which the variable was referenced during the script execution. The same number sequence is used for both qRefSeqNo and qSetSeqNo .

    • qSetSeqNointeger

      Order in which the variable was updated during the script execution. The same number sequence is used for both qRefSeqNo and qSetSeqNo .

    • qDisplayStringstring

      Variable value.

    • qIsSystemboolean

      Is set to true if the variable is a system variable.

    • qIsReservedboolean

      Is set to true if the variable is a reserved variable.

Errors

array

GetTextMacros()

const result = await doc.GetTextMacros({})

Request

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

Response

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "qMacros": [
      {
        "qTag": "value",
        "qRefSeqNo": 123,
        "qSetSeqNo": 123,
        "qDisplayString": "value",
        "qIsSystem": true,
        "qIsReserved": true
      }
    ]
  }
}

Doc GetVariable

(qName)
Deprecated
Use Doc::GetVariableById method or Doc::GetVariableByName method instead

Returns a handle to a variable.

Parameters

  • qNamestring
    Required

    Name of the variable.

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

GetVariable(qName)

const result = await doc.GetVariable([
  "value"
])

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "handle": 3,
  "method": "GetVariable",
  "params": {
    "qName": "value"
  }
}

Response

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "qReturn": {
      "qType": "value",
      "qHandle": 123,
      "qGenericType": "value",
      "qGenericId": "value"
    }
  }
}

Doc GetVariableById

(qId)

Gets the handle of a variable.

Parameters

  • qIdstring
    Required

    Identifier of the variable.

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

GetVariableById(qId)

const result = await doc.GetVariableById([
  "value"
])

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "handle": 3,
  "method": "GetVariableById",
  "params": {
    "qId": "value"
  }
}

Response

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "qReturn": {
      "qType": "value",
      "qHandle": 123,
      "qGenericType": "value",
      "qGenericId": "value"
    }
  }
}

Doc GetVariableByName

(qName)

Gets the handle of a variable.

Parameters

  • qNamestring
    Required

    Name of the variable.

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

GetVariableByName(qName)

const result = await doc.GetVariableByName([
  "value"
])

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "handle": 3,
  "method": "GetVariableByName",
  "params": {
    "qName": "value"
  }
}

Response

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "qReturn": {
      "qType": "value",
      "qHandle": 123,
      "qGenericType": "value",
      "qGenericId": "value"
    }
  }
}

Doc GetVariables

(qListDef)

Parameters

  • qListDefobject
    Required
    Show qListDef properties
    • qTypestring

      Type of variables to include in the list.

    • qShowReservedboolean

      Shows the reserved variables if set to true.

    • qShowConfigboolean

      Shows the system variables if set to true.

    • qDataobject

      Contains dynamic JSON data specified by the client.

    • qShowSessionboolean

      Shows the session variables if set to true.

Response

  • qListarray of objects
    Show qList properties
    • qNamestring

      Name of the variable.

    • qDescriptionstring

      Description of the variable.

    • qDefinitionstring

      Definition of the variable. It can be a value or an expression.

    • qIsConfigboolean

      If set to true, it means that the variable is a system variable. A system variable provides information about the system and is set by the engine. The content cannot be changed by the user. This parameter is optional. The default value is false.

    • qIsReservedboolean

      If set to true, it means that the variable is reserved. The default value is false. This parameter is optional. Examples:

      • ScriptError is a reserved variable, set by the engine.
      • DayNames is a reserved variable, set by the user.
    • qMetaobject

      Layout for NxMetaDef.

      Show qMeta properties
      • qNamestring

        Name. This property is optional.

    • qInfoobject
      Show qInfo properties
      • qIdstring

        Identifier of the object. If the chosen identifier is already in use, the engine automatically sets another one. If an identifier is not set, the engine automatically sets one. This parameter is optional.

      • qTypestring

        Type of the object. This parameter is mandatory.

    • qDataobject

      Contains dynamic JSON data specified by the client.

    • qIsScriptCreatedboolean

      If set to true, it means that the variable was defined via script.

Errors

array

GetVariables(qListDef)

const result = await doc.GetVariables([
  {
    "qType": "value",
    "qShowReserved": true,
    "qShowConfig": true,
    "qData": {},
    "qShowSession": true
  }
])

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "handle": 3,
  "method": "GetVariables",
  "params": {
    "qListDef": {
      "qType": "value",
      "qShowReserved": true,
      "qShowConfig": true,
      "qData": {},
      "qShowSession": true
    }
  }
}

Response

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "qList": [
      {
        "qName": "value",
        "qDescription": "value",
        "qDefinition": "value",
        "qIsConfig": true,
        "qIsReserved": true,
        "qMeta": {
          "qName": "value"
        },
        "qInfo": {
          "qId": "value",
          "qType": "value"
        },
        "qData": {},
        "qIsScriptCreated": true
      }
    ]
  }
}

Doc GetViewDlgSaveInfo

()

Returns information about the position of the tables in the data model viewer.

The position of the broom points and the position of the connection points cannot be retrieved in Qlik Sense.

Response

  • qReturnobject
    Show qReturn properties
    • qPosobject
      Show qPos properties
      • qLeftinteger

        Position from the left. Corresponds to the first column.

      • qTopinteger

        Position from the top. Corresponds to the first row.

      • qWidthinteger

        Number of columns in the page. The indexing of the columns may vary depending on whether the cells are expanded or not (parameter qAlwaysFullyExpanded in HyperCubeDef ).

      • qHeightinteger

        Number of rows or elements in the page. The indexing of the rows may vary depending on whether the cells are expanded or not (parameter qAlwaysFullyExpanded in HyperCubeDef ).

    • qCtlInfoobject
      Show qCtlInfo properties
      • qInternalViewobject
        Show qInternalView properties
        • qTablesarray of objects

          List of the tables in the database model viewer.

          Show qTables properties
          • qPosobject
            Show qPos properties
            • qLeftinteger

              Position from the left. Corresponds to the first column.

            • qTopinteger

              Position from the top. Corresponds to the first row.

            • qWidthinteger

              Number of columns in the page. The indexing of the columns may vary depending on whether the cells are expanded or not (parameter qAlwaysFullyExpanded in HyperCubeDef ).

            • qHeightinteger

              Number of rows or elements in the page. The indexing of the rows may vary depending on whether the cells are expanded or not (parameter qAlwaysFullyExpanded in HyperCubeDef ).

          • qCaptionstring

            Table name.

        • qBroomPointsarray of objects

          List of the broom points in the database model viewer. Not used in Qlik Sense.

          Show qBroomPoints properties
          • qPosobject
            Show qPos properties
            • qxinteger

              x-coordinate in pixels. The origin is the top left of the screen.

            • qyinteger

              y-coordinate in pixels. The origin is the top left of the screen.

          • qTablestring

            Name of the table.

          • qFieldsarray of strings

            List of fields in the table.

        • qConnectionPointsarray of objects

          List of connection points in the database model viewer. Not used in Qlik Sense.

          Show qConnectionPoints properties
          • qPosobject
            Show qPos properties
            • qxinteger

              x-coordinate in pixels. The origin is the top left of the screen.

            • qyinteger

              y-coordinate in pixels. The origin is the top left of the screen.

          • qFieldsarray of strings

            List of the fields in the table.

        • qZoomFactornumber

          Zoom factor in the database model viewer. The default value is 1.0.

      • qSourceViewobject
        Show qSourceView properties
        • qTablesarray of objects

          List of the tables in the database model viewer.

          Show qTables properties
          • qPosobject
            Show qPos properties
            • qLeftinteger

              Position from the left. Corresponds to the first column.

            • qTopinteger

              Position from the top. Corresponds to the first row.

            • qWidthinteger

              Number of columns in the page. The indexing of the columns may vary depending on whether the cells are expanded or not (parameter qAlwaysFullyExpanded in HyperCubeDef ).

            • qHeightinteger

              Number of rows or elements in the page. The indexing of the rows may vary depending on whether the cells are expanded or not (parameter qAlwaysFullyExpanded in HyperCubeDef ).

          • qCaptionstring

            Table name.

        • qBroomPointsarray of objects

          List of the broom points in the database model viewer. Not used in Qlik Sense.

          Show qBroomPoints properties
          • qPosobject
            Show qPos properties
            • qxinteger

              x-coordinate in pixels. The origin is the top left of the screen.

            • qyinteger

              y-coordinate in pixels. The origin is the top left of the screen.

          • qTablestring

            Name of the table.

          • qFieldsarray of strings

            List of fields in the table.

        • qConnectionPointsarray of objects

          List of connection points in the database model viewer. Not used in Qlik Sense.

          Show qConnectionPoints properties
          • qPosobject
            Show qPos properties
            • qxinteger

              x-coordinate in pixels. The origin is the top left of the screen.

            • qyinteger

              y-coordinate in pixels. The origin is the top left of the screen.

          • qFieldsarray of strings

            List of the fields in the table.

        • qZoomFactornumber

          Zoom factor in the database model viewer. The default value is 1.0.

    • qModeinteger

      View mode to display when opening Qlik Sense data model viewer. One of:

      • 0 for internal view mode.
      • 1 for source view mode.

Errors

array

GetViewDlgSaveInfo()

const result = await doc.GetViewDlgSaveInfo({})

Request

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

Response

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "qReturn": {
      "qPos": {
        "qLeft": 123,
        "qTop": 123,
        "qWidth": 123,
        "qHeight": 123
      },
      "qCtlInfo": {
        "qInternalView": {
          "qTables": [
            {
              "qPos": {
                "qLeft": 123,
                "qTop": 123,
                "qWidth": 123,
                "qHeight": 123
              },
              "qCaption": "value"
            }
          ],
          "qBroomPoints": [
            {
              "qPos": {
                "qx": 123,
                "qy": 123
              },
              "qTable": "value",
              "qFields": [
                "value"
              ]
            }
          ],
          "qConnectionPoints": [
            {
              "qPos": {
                "qx": 123,
                "qy": 123
              },
              "qFields": [
                "value"
              ]
            }
          ],
          "qZoomFactor": 1
        },
        "qSourceView": {
          "qTables": [
            {
              "qPos": {
                "qLeft": 123,
                "qTop": 123,
                "qWidth": 123,
                "qHeight": 123
              },
              "qCaption": "value"
            }
          ],
          "qBroomPoints": [
            {
              "qPos": {
                "qx": 123,
                "qy": 123
              },
              "qTable": "value",
              "qFields": [
                "value"
              ]
            }
          ],
          "qConnectionPoints": [
            {
              "qPos": {
                "qx": 123,
                "qy": 123
              },
              "qFields": [
                "value"
              ]
            }
          ],
          "qZoomFactor": 1
        }
      },
      "qMode": 123
    }
  }
}

Doc GuessFileType

(qConnectionId, qRelativePath?)

Guesses the data format for a given file. Recognized file formats are:

  • CSV for Delimited
  • FIX for Fixed Record
  • DIF for Data Interchange Format
  • EXCEL_BIFF for Microsoft Excel (XLS)
  • EXCEL_OOXML for Microsoft Excel (XLSX)
  • HTML for HTML
  • QVD for QVD file
  • XML for XML
  • QVX for QVX file
  • JSON for JSON format
  • KML for KML file
  • PARQUET for PARQUET file

FileType

Recognized file formats are:

  • CSV for Delimited
  • FIX for Fixed Record
  • DIF for Data Interchange Format
  • EXCEL_BIFF for Microsoft Excel (XLS)
  • EXCEL_OOXML for Microsoft Excel (XLSX)
  • HTML for HTML
  • QVD for QVD file
  • XML for XML
  • QVX for QVX file
  • JSON for JSON format
  • KML for KML file
  • PARQUET for PARQUET file

Parameters

  • qConnectionIdstring
    Required

    Identifier of the connection file.

  • qRelativePathstring

    Path of the connection file.

Response

  • qDataFormatobject

    FileType

    Recognized file formats are:

    • CSV for Delimited
    • FIX for Fixed Record
    • DIF for Data Interchange Format
    • EXCEL_BIFF for Microsoft Excel (XLS)
    • EXCEL_OOXML for Microsoft Excel (XLSX)
    • HTML for HTML
    • QVD for QVD file
    • XML for XML
    • QVX for QVX file
    • JSON for JSON format
    • KML for KML file
    • PARQUET for PARQUET file
    Show qDataFormat properties
    • qTypestring

      Can be one of: "CSV""FIX""DIF""EXCEL_BIFF""EXCEL_OOXML""HTML""QVD""XML""QVX""JSON""KML""PARQUET"

    • qLabelstring

      One of:

      • Embedded labels (field names are present in the file)
      • No labels
      • Explicit labels (for DIFfiles)
    • qQuotestring

      One of:

      • None (no quotes)
      • MSQ (Modern Style Quoting)
      • Standard (quotes " " or ' ' can be used, but only if they are the first and last non blank characters of a field value)

      This property is used for delimited files.

    • qCommentstring

      String that marks the beginning of the comment line. Example: “#” or “//” The engine ignores the commented lines during the data load. This property is only used for delimited files.

    • qDelimiterobject
      Show qDelimiter properties
      • qNamestring

        Name of the delimiter. Example: "Tab_DELIMITER"

      • qScriptCodestring

        Representation of the delimiter value that is used in the script. Example: "'\t'"

      • qNumberinteger

        Delimiter character number used by the engine to determine how to separate the values.

      • qIsMultipleboolean

        Is set to true if multiple spaces are used to separate the values.

    • qCodePageinteger

      Character set used in the file.

    • qHeaderSizeinteger

      Size of the header. Example: If the header size is 2, the first two rows in the file are considered as header and not as data. The header can contain the field names.

    • qRecordSizeinteger

      Record length. Each record (row of data) contains a number of columns with a fixed field size. This property is used for fixed record data files.

    • qTabSizeinteger

      Number of spaces that one tab character represents in the table file. This property is used for fixed record data files.

    • qIgnoreEOFboolean

      Is set to true, the end-of-file character is not taken into account during reload. This property is used for delimited files and fixed record data files.

    • qFixedWidthDelimitersstring

      Positions of the field breaks in the table. This property is used for fixed record data files.

Errors

array

GuessFileType(qConnectionId, qRelativePath?)

const result = await doc.GuessFileType([
  "value",
  "value"
])

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "handle": 3,
  "method": "GuessFileType",
  "params": {
    "qConnectionId": "value",
    "qRelativePath": "value"
  }
}

Response

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "qDataFormat": {
      "qType": "CSV",
      "qLabel": "value",
      "qQuote": "value",
      "qComment": "value",
      "qDelimiter": {
        "qName": "value",
        "qScriptCode": "value",
        "qNumber": 123,
        "qIsMultiple": true
      },
      "qCodePage": 123,
      "qHeaderSize": 123,
      "qRecordSize": 123,
      "qTabSize": 123,
      "qIgnoreEOF": true,
      "qFixedWidthDelimiters": "value"
    }
  }
}

Doc LockAll

(qStateName?)

Locks all selections in fields for current state.

Parameters

  • qStateNamestring

    Alternate state name. When set, applies to alternate state instead of current.

Response

object

Errors

array

LockAll(qStateName?)

const result = await doc.LockAll([
  "value"
])

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "handle": 3,
  "method": "LockAll",
  "params": {
    "qStateName": "value"
  }
}

Response

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

Doc ModifyConnection

(qConnectionId, qConnection, qOverrideCredentials?)

Updates a connection.

The identifier of a connection cannot be updated. qType cannot be modified with the ModifyConnection method.

Parameters

  • qConnectionIdstring
    Required

    Identifier of the connection.

  • qConnectionobject
    Required

    Information about the connection. Properties that can be updated.

    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"

  • qOverrideCredentialsboolean

    Set this parameter to true to override the user name and password.

Response

object

Errors

array

ModifyConnection(qConnectionId, qConnection, qOverrideCredentials?)

const result = await doc.ModifyConnection([
  "value",
  {
    "qId": "value",
    "qName": "value",
    "qConnectionString": "value",
    "qType": "value",
    "qUserName": "value",
    "qPassword": "value",
    "qModifiedDate": "value",
    "qMeta": {
      "qName": "value"
    },
    "qLogOn": "LOG_ON_SERVICE_USER"
  },
  true
])

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "handle": 3,
  "method": "ModifyConnection",
  "params": {
    "qConnectionId": "value",
    "qConnection": {
      "qId": "value",
      "qName": "value",
      "qConnectionString": "value",
      "qType": "value",
      "qUserName": "value",
      "qPassword": "value",
      "qModifiedDate": "value",
      "qMeta": {
        "qName": "value"
      },
      "qLogOn": "LOG_ON_SERVICE_USER"
    },
    "qOverrideCredentials": true
  }
}

Response

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

Doc Publish

(qStreamId, qName?)

Publishes an app. All app objects are published. Generic objects, bookmarks, dimensions and measures inside the app are published.

An app can only be published once and cannot be published to more than one stream.

Parameters

  • qStreamIdstring
    Required

    Identifier of the stream.

  • qNamestring

    Name of the published app. If this parameter is not set, the engine automatically gives a new name to the published app.

Response

object

Errors

array

Publish(qStreamId, qName?)

const result = await doc.Publish([
  "value",
  "value"
])

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "handle": 3,
  "method": "Publish",
  "params": {
    "qStreamId": "value",
    "qName": "value"
  }
}

Response

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

Doc Redo

()

Redoes the previous operation.

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

Response

  • qSuccessboolean

Errors

array

Redo()

const result = await doc.Redo({})

Request

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

Response

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

Doc RemoveAlternateState

(qStateName)

Removes an alternate state in the app.

Parameters

  • qStateNamestring
    Required

    Name of the alternate state.

Response

object

Errors

array

RemoveAlternateState(qStateName)

const result = await doc.RemoveAlternateState([
  "value"
])

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "handle": 3,
  "method": "RemoveAlternateState",
  "params": {
    "qStateName": "value"
  }
}

Response

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

Doc RemoveSessionAlternateState

(qStateName)

Removes an session alternate state in the app.

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

Parameters

  • qStateNamestring
    Required

    Name of the alternate state.

Response

  • qSuccessboolean

Errors

array

RemoveSessionAlternateState(qStateName)

const result = await doc.RemoveSessionAlternateState([
  "value"
])

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "handle": 3,
  "method": "RemoveSessionAlternateState",
  "params": {
    "qStateName": "value"
  }
}

Response

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

Doc RemoveVariable

(qName)
Deprecated
Use Doc::DestroyVariableById method or Doc::DestroyVariableByName method instead

Removes a variable.

Parameters

  • qNamestring
    Required

    Name of the variable. Variable names are case sensitive.

Response

  • qReturnboolean

Errors

array

RemoveVariable(qName)

const result = await doc.RemoveVariable([
  "value"
])

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "handle": 3,
  "method": "RemoveVariable",
  "params": {
    "qName": "value"
  }
}

Response

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

Doc ReplaceBookmark

(qId, qIgnorePatches?, qObjectIdsToPatch?)
Experimental

Replace a bookmark. Optional inparams to change the original bookmarks properties, original are kept if left out.

Parameters

  • qIdstring
    Required

    Identifier of the bookmark.

  • qIgnorePatchesboolean

    Set to true to exclude patches from the bookmark. Default is false.

  • qObjectIdsToPatcharray of strings

    Add softpatches for this objects if available. If empty all softpatches are added to the bookmark. Ignored if IgnorePatches is set to true.

Response

  • qInfoobject
    Show qInfo properties
    • qIdstring

      Identifier of the object. If the chosen identifier is already in use, the engine automatically sets another one. If an identifier is not set, the engine automatically sets one. This parameter is optional.

    • qTypestring

      Type of the object. This parameter is mandatory.

  • 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

ReplaceBookmark(qId, qIgnorePatches?, qObjectIdsToPatch?)

const result = await doc.ReplaceBookmark([
  "value",
  true,
  [
    "value"
  ]
])

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "handle": 3,
  "method": "ReplaceBookmark",
  "params": {
    "qId": "value",
    "qIgnorePatches": true,
    "qObjectIdsToPatch": [
      "value"
    ]
  }
}

Response

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "qInfo": {
      "qId": "value",
      "qType": "value"
    },
    "qReturn": {
      "qType": "value",
      "qHandle": 123,
      "qGenericType": "value",
      "qGenericId": "value"
    }
  }
}

Doc RestoreTempSelectionState

(qId)

Restore a temporary selection state identified by Id.

RestoreTempSelectionState method is only supported in SaaS Editions of Qlik Sense.

Parameters

  • qIdstring
    Required

    Identifier of the temporary selection state

Response

  • qReturnboolean

Errors

array

RestoreTempSelectionState(qId)

const result = await doc.RestoreTempSelectionState([
  "value"
])

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "handle": 3,
  "method": "RestoreTempSelectionState",
  "params": {
    "qId": "value"
  }
}

Response

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

Doc Resume

()

Resumes the app as the user left it.

Response

object

Errors

array

Resume()

const result = await doc.Resume({})

Request

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

Response

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

Doc SaveAs

(qNewAppName)

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 doc.SaveAs([
  "value"
])

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "handle": 3,
  "method": "SaveAs",
  "params": {
    "qNewAppName": "value"
  }
}

Response

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

Doc SaveObjects

()

Saves all objects that were modified in the app.

Data from the data model are not saved.
This operation is possible only in Qlik Sense Enterprise.

Response

object

Errors

array

SaveObjects()

const result = await doc.SaveObjects({})

Request

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

Response

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

Doc Scramble

(qFieldName)

Scrambles a field so the data is not recognizable. Some properties are retained to help debugging. For example, special characters are not changed, and small numbers are scrambled to another small number.

Update access is required to use the function in Qlik Sense Enterprise.

Parameters

  • qFieldNamestring
    Required

    Name of the field to scramble.

Response

object

Errors

array

Scramble(qFieldName)

const result = await doc.Scramble([
  "value"
])

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "handle": 3,
  "method": "Scramble",
  "params": {
    "qFieldName": "value"
  }
}

Response

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

Doc SearchAssociations

(qOptions, qTerms, qPage)
Deprecated
Use SearchResults method instead

Returns the search matches for one or more search terms. The search results depend on the search context. SearchCombinationOptions

SearchMatchCombinations

Name Description Type
qSearchMatchCombinations Array of search combinations. Array of SearchMatchCombination

Parameters

  • qOptionsobject
    Required

    Information about the search fields and the search context.

    Show qOptions properties
    • qSearchFieldsarray of strings

      List of the search fields. If empty, the search is performed in all fields of the app.

    • qContextstring

      Can be one of: "Cleared""LockedFieldsOnly""CurrentSelections"

    • qCharEncodingstring

      Can be one of: "Utf8""Utf16"

    • qAttributesarray of strings

      Optional.

      • For SearchSuggest method, this array is empty.
      • For SearchObjects method, this array is empty or contain qProperty .
      • For SearchResults method, this array is empty, or contains qNum and/or qElemNum . It allows the user to request details in the outputted SearchGroupItemMatch . For more information, see SearchGroupItemMatch.
  • qTermsarray of strings
    Required

    List of terms to search for.

  • qPageobject
    Required

    Array of pages to retrieve.

    Show qPage properties
    • qOffsetinteger

      Position from the top, starting from 0. If the offset is set to 0, the first search result to be returned is at position 0.

    • qCountinteger

      Number of search groups to return (in qSearchGroupArray ).

    • qMaxNbrFieldMatchesinteger

      Maximum number of matching values to return per search result. The default value is -1; all values are returned. This property is to be used with the SearchAssociations method.

    • qGroupOptionsarray of objects

      Options of the search groups. If this property is not set, all values are returned. This property is to be used with the SearchResults method or the SearchObjects method.

      Show qGroupOptions properties
      • qGroupTypestring

        Can be one of: "DatasetType""GenericObjectsType"

      • qOffsetinteger

        Position starting from 0. The default value is 0.

      • qCountinteger

        Maximum number of items per group (in qItems[ ] ). The default value is -1; all values are returned.

    • qGroupItemOptionsarray of objects

      Options of the search group items. If this property is not set, all values are returned. This property is to be used with the SearchResults method or the SearchObjects method.

      Show qGroupItemOptions properties
      • qGroupItemTypestring

        Can be one of: "Field""GenericObject"

      • qOffsetinteger

        Position starting from 0. The default value is 0.

      • qCountinteger

        Maximum number of matches per item (in qItemMatches[ ] ). The default value is -1: all values are returned.

Response

  • qResultsobjectDeprecated
    Show qResults properties
    • qFieldNamesarray of strings

      List of the fields that contains search associations.

    • qSearchTermsarray of strings

      List of the search terms.

    • qFieldDictionariesarray of objectsDeprecated

      Information about the fields containing search hits.

      Show qFieldDictionaries properties
      • qFieldinteger

        Position of the field in the list of fields, starting from 0. The list of fields is defined in qResults/qFieldNames and contains the search associations.

      • qResultarray of objectsDeprecated

        List of the matching values. The maximum number of values in this list is set by qMaxNbrFieldMatches .

        Show qResult properties
        • qTextstring

          Text of the associated value.

        • qElemNumberinteger

          Element number of the associated value.

        • qRangesarray of objects

          List of ranges. For example, if the user searches the term read and the associative value is Reading , then the corresponding range would be Read in Reading .

          Show qRanges properties
          • qCharPosinteger

            Starting position of the match in the search result, starting from 0.

          • qCharCountinteger

            Length of the match in the search result.

          • qTerminteger

            Position of the term in the list of search terms, starting from 0.

    • qSearchTermsMatchedarray of arraysDeprecated

      List of search results. The maximum number of search results in this list is set by qPage/qCount .

      Show qSearchTermsMatched properties
      • qIdinteger

        Index of the search result, starting from 0.

      • qFieldMatchesarray of objectsDeprecated

        Information about the search matches.

        Show qFieldMatches properties
        • qFieldinteger

          Position of the field in the list of fields, starting from 0. The list of fields is defined in qResults/qFieldNames and contains the search associations.

        • qValuesarray of integers

          Positions of the matching values in the search results. The maximum number of values in this list is defined by qMaxNbrFieldMatches .

        • qTermsarray of integers

          Positions of the search terms, starting from 0.

        • qNoOfMatchesinteger

          Number of search hits in the field. The number of values in qValues and the value of qNoOfMatches are equal if qMaxNbrFieldMatches is -1.

    • qTotalSearchResultsinteger

      Total number of search results. This number is not limited by qPage/qCount .

Errors

array

SearchAssociations(qOptions, qTerms, qPage)

const result = await doc.SearchAssociations([
  {
    "qSearchFields": [
      "value"
    ],
    "qContext": "Cleared",
    "qCharEncoding": "Utf8",
    "qAttributes": [
      "value"
    ]
  },
  [
    "value"
  ],
  {
    "qOffset": 123,
    "qCount": 123,
    "qMaxNbrFieldMatches": -1,
    "qGroupOptions": [
      {
        "qGroupType": "DatasetType",
        "qOffset": 123,
        "qCount": -1
      }
    ],
    "qGroupItemOptions": [
      {
        "qGroupItemType": "Field",
        "qOffset": 123,
        "qCount": -1
      }
    ]
  }
])

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "handle": 3,
  "method": "SearchAssociations",
  "params": {
    "qOptions": {
      "qSearchFields": [
        "value"
      ],
      "qContext": "Cleared",
      "qCharEncoding": "Utf8",
      "qAttributes": [
        "value"
      ]
    },
    "qTerms": [
      "value"
    ],
    "qPage": {
      "qOffset": 123,
      "qCount": 123,
      "qMaxNbrFieldMatches": -1,
      "qGroupOptions": [
        {
          "qGroupType": "DatasetType",
          "qOffset": 123,
          "qCount": -1
        }
      ],
      "qGroupItemOptions": [
        {
          "qGroupItemType": "Field",
          "qOffset": 123,
          "qCount": -1
        }
      ]
    }
  }
}

Response

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "qResults": {
      "qFieldNames": [
        "value"
      ],
      "qSearchTerms": [
        "value"
      ],
      "qFieldDictionaries": [
        {
          "qField": 123,
          "qResult": [
            {
              "qText": "value",
              "qElemNumber": 123,
              "qRanges": [
                {
                  "qCharPos": 123,
                  "qCharCount": 123,
                  "qTerm": 123
                }
              ]
            }
          ]
        }
      ],
      "qSearchTermsMatched": [
        [
          {
            "qId": 123,
            "qFieldMatches": [
              {
                "qField": 123,
                "qValues": [
                  123
                ],
                "qTerms": [
                  123
                ],
                "qNoOfMatches": 123
              }
            ]
          }
        ]
      ],
      "qTotalSearchResults": 123
    }
  }
}

Doc SearchObjects

(qOptions, qTerms, qPage)

Returns the generic objects corresponding to one or more search terms. The search is performed within the title, subtitle, footnote and type. In addition, associated dimension values are also searched in. For example, if the country “Japan” is selected and the object contains the dimension City, the object will appear in the results for “Osaka” but not for “Johannesburg”. The generic objects with the following types will never appear in the results: slideitem , sheet , story , slide , masterobject , snapshot , LoadModel , appprops and searchhistory .

Parameters

  • qOptionsobject
    Required

    Information about attributes.

    Show qOptions properties
    • qAttributesarray of strings

      This array is either empty or contains qProperty .

    • qCharEncodingstring

      Can be one of: "Utf8""Utf16"

  • qTermsarray of strings
    Required

    Terms to search for.

  • qPageobject
    Required

    Array of pages to retrieve.

    Show qPage properties
    • qOffsetinteger

      Position from the top, starting from 0. If the offset is set to 0, the first search result to be returned is at position 0.

    • qCountinteger

      Number of search groups to return (in qSearchGroupArray ).

    • qMaxNbrFieldMatchesinteger

      Maximum number of matching values to return per search result. The default value is -1; all values are returned. This property is to be used with the SearchAssociations method.

    • qGroupOptionsarray of objects

      Options of the search groups. If this property is not set, all values are returned. This property is to be used with the SearchResults method or the SearchObjects method.

      Show qGroupOptions properties
      • qGroupTypestring

        Can be one of: "DatasetType""GenericObjectsType"

      • qOffsetinteger

        Position starting from 0. The default value is 0.

      • qCountinteger

        Maximum number of items per group (in qItems[ ] ). The default value is -1; all values are returned.

    • qGroupItemOptionsarray of objects

      Options of the search group items. If this property is not set, all values are returned. This property is to be used with the SearchResults method or the SearchObjects method.

      Show qGroupItemOptions properties
      • qGroupItemTypestring

        Can be one of: "Field""GenericObject"

      • qOffsetinteger

        Position starting from 0. The default value is 0.

      • qCountinteger

        Maximum number of matches per item (in qItemMatches[ ] ). The default value is -1: all values are returned.

Response

  • qResultobject
    Show qResult properties
    • qSearchTermsarray of strings

      List of the search terms.

    • qTotalNumberOfGroupsinteger

      Total number of groups.

    • qSearchGroupArrayarray of objects

      List of search groups. The groups are numbered from the value of SearchPage.qOffset to the value of SearchPage.qOffset + SearchPage.qCount .

      Show qSearchGroupArray properties
      • qIdinteger

        Identifier of the search group.

      • qGroupTypestring

        Can be one of: "DatasetType""GenericObjectsType"

      • qSearchTermsMatchedarray of integers

        Indexes of the search terms that are included in the group. These search terms are related to the list of terms defined in SearchResult.qSearchTerms .

      • qTotalNumberOfItemsinteger

        Total number of distinct items in the search group.

      • qItemsarray of objects

        List of items in the search group. The group items are numbered from the value of SearchGroupOptions.qOffset to the value of SearchGroupOptions.qOffset + SearchGroupOptions.qCount

        Show qItems properties
        • qItemTypestring

          Can be one of: "Field""GenericObject"

        • qTotalNumberOfMatchesinteger

          Total number of distinct matches in the search group item.

        • qIdentifierstring

          Identifier of the item. It corresponds to:

          • The name of the field, if the type of the search group is data set.
          • The id of the generic object if the type of the search group is generic object.
        • qItemMatchesarray of objects

          List of matches in the search group item. The group item matches are numbered from the value of SearchGroupItemOptions.qOffset to the value of SearchGroupItemOptions.qOffset + SearchGroupItemOptions.qCount .

          Show qItemMatches properties
          • qTextstring

            Search match value. Value of the search group item. If the match is found in a field, it corresponds to the value of the field. If the match is found in a generic object property, it corresponds to the property value.

          • qFieldSelectionModestring

            Can be one of: "OneAndOnlyOne"

          • qRangesarray of objects

            List of ranges. For example, if the search terms are Price and Make, and the search group item value is Make by Price vs Mileage, then there are two ranges: one for Price and one for Make.

            Show qRanges properties
            • qCharPosinteger

              Starting position of the match in the search result, starting from 0.

            • qCharCountinteger

              Length of the match in the search result.

            • qTerminteger

              Position of the term in the list of search terms, starting from 0.

          • qAttributesarray of objects

            Provides detail of the match as requested by the user in SearchObjectsOptions.qAttributes or SearchCombinationOptions.qAttributes If the user requests SearchObjects or SearchResults with an empty qAttributes option, the outputted qAttributes is returned empty. For SearchObjects requested with qProperty , the SearchGroupItemMatch.qAttributes return value contains [“qProperty”, "qMetaDef/title”] if the match has been found in the title of the item. For dimension values, the returned qProperty will be “*” . For SearchResults requested with qNum , the SearchGroupItemMatch.qAttributes return value contains ["qNum", N] where N is the numeric value of the element or NaN if the value is not numeric. For SearchResults requested with qElemNum , the SearchGroupItemMatch.qAttributes return value contains ["qElemNum", N] where N is the value index of the element.

            Show qAttributes properties
            • qKeystring

              String corresponding to SearchObjectOptions.qAttributes. It will be qProperty for SearchObjectOptions.

            • qValuestring

              String corresponding to qKey for the current SearchGroupItemMatch. For example, if the match is Make by Price found in the title of a generic object, qValue will be qMetaDef/title.

        • qSearchTermsMatchedarray of integers

          Indexes of the search terms that are included in the group item. These search terms are related to the list of terms defined in SearchResult.qSearchTerms .

        • qMatchTypestring

          Can be one of: "FieldMatchNone""FieldMatchSubString""FieldMatchWord""FieldMatchExact""FieldMatchLast"

Errors

array

SearchObjects(qOptions, qTerms, qPage)

const result = await doc.SearchObjects([
  {
    "qAttributes": [
      "value"
    ],
    "qCharEncoding": "Utf8"
  },
  [
    "value"
  ],
  {
    "qOffset": 123,
    "qCount": 123,
    "qMaxNbrFieldMatches": -1,
    "qGroupOptions": [
      {
        "qGroupType": "DatasetType",
        "qOffset": 123,
        "qCount": -1
      }
    ],
    "qGroupItemOptions": [
      {
        "qGroupItemType": "Field",
        "qOffset": 123,
        "qCount": -1
      }
    ]
  }
])

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "handle": 3,
  "method": "SearchObjects",
  "params": {
    "qOptions": {
      "qAttributes": [
        "value"
      ],
      "qCharEncoding": "Utf8"
    },
    "qTerms": [
      "value"
    ],
    "qPage": {
      "qOffset": 123,
      "qCount": 123,
      "qMaxNbrFieldMatches": -1,
      "qGroupOptions": [
        {
          "qGroupType": "DatasetType",
          "qOffset": 123,
          "qCount": -1
        }
      ],
      "qGroupItemOptions": [
        {
          "qGroupItemType": "Field",
          "qOffset": 123,
          "qCount": -1
        }
      ]
    }
  }
}

Response

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "qResult": {
      "qSearchTerms": [
        "value"
      ],
      "qTotalNumberOfGroups": 123,
      "qSearchGroupArray": [
        {
          "qId": 123,
          "qGroupType": "DatasetType",
          "qSearchTermsMatched": [
            123
          ],
          "qTotalNumberOfItems": 123,
          "qItems": [
            {
              "qItemType": "Field",
              "qTotalNumberOfMatches": 123,
              "qIdentifier": "value",
              "qItemMatches": [
                {
                  "qText": "value",
                  "qFieldSelectionMode": "OneAndOnlyOne",
                  "qRanges": [
                    {
                      "qCharPos": 123,
                      "qCharCount": 123,
                      "qTerm": 123
                    }
                  ],
                  "qAttributes": [
                    {
                      "qKey": "value",
                      "qValue": "value"
                    }
                  ]
                }
              ],
              "qSearchTermsMatched": [
                123
              ],
              "qMatchType": "FieldMatchNone"
            }
          ]
        }
      ]
    }
  }
}

Doc SearchResults

(qOptions, qTerms, qPage)

Returns the search matches for one or more search terms. Search results are organized in search groups. The type of search group indicates where the search matches come from (from data for example). Each search group contains search results that correspond to a combination of search terms. For example, if the search terms are organic , pasta , and America , the possible combination of search groups are:

  • organic
  • pasta
  • America
  • organic, pasta, America
  • organic, pasta
  • organic, America
  • pasta, America

For every search group, there are one or more search group items. Each subgroup item contains results that correspond to an item type (for example a field). For every search group item, there are one or several search matches. The position of the match in each search result is given.

Parameters

  • qOptionsobject
    Required

    Information about the search combinations.

    Show qOptions properties
    • qSearchFieldsarray of strings

      List of the search fields. If empty, the search is performed in all fields of the app.

    • qContextstring

      Can be one of: "Cleared""LockedFieldsOnly""CurrentSelections"

    • qCharEncodingstring

      Can be one of: "Utf8""Utf16"

    • qAttributesarray of strings

      Optional.

      • For SearchSuggest method, this array is empty.
      • For SearchObjects method, this array is empty or contain qProperty .
      • For SearchResults method, this array is empty, or contains qNum and/or qElemNum . It allows the user to request details in the outputted SearchGroupItemMatch . For more information, see SearchGroupItemMatch.
  • qTermsarray of strings
    Required

    Terms to search for.

  • qPageobject
    Required

    Array of pages to retrieve.

    Show qPage properties
    • qOffsetinteger

      Position from the top, starting from 0. If the offset is set to 0, the first search result to be returned is at position 0.

    • qCountinteger

      Number of search groups to return (in qSearchGroupArray ).

    • qMaxNbrFieldMatchesinteger

      Maximum number of matching values to return per search result. The default value is -1; all values are returned. This property is to be used with the SearchAssociations method.

    • qGroupOptionsarray of objects

      Options of the search groups. If this property is not set, all values are returned. This property is to be used with the SearchResults method or the SearchObjects method.

      Show qGroupOptions properties
      • qGroupTypestring

        Can be one of: "DatasetType""GenericObjectsType"

      • qOffsetinteger

        Position starting from 0. The default value is 0.

      • qCountinteger

        Maximum number of items per group (in qItems[ ] ). The default value is -1; all values are returned.

    • qGroupItemOptionsarray of objects

      Options of the search group items. If this property is not set, all values are returned. This property is to be used with the SearchResults method or the SearchObjects method.

      Show qGroupItemOptions properties
      • qGroupItemTypestring

        Can be one of: "Field""GenericObject"

      • qOffsetinteger

        Position starting from 0. The default value is 0.

      • qCountinteger

        Maximum number of matches per item (in qItemMatches[ ] ). The default value is -1: all values are returned.

Response

  • qResultobject
    Show qResult properties
    • qSearchTermsarray of strings

      List of the search terms.

    • qTotalNumberOfGroupsinteger

      Total number of groups.

    • qSearchGroupArrayarray of objects

      List of search groups. The groups are numbered from the value of SearchPage.qOffset to the value of SearchPage.qOffset + SearchPage.qCount .

      Show qSearchGroupArray properties
      • qIdinteger

        Identifier of the search group.

      • qGroupTypestring

        Can be one of: "DatasetType""GenericObjectsType"

      • qSearchTermsMatchedarray of integers

        Indexes of the search terms that are included in the group. These search terms are related to the list of terms defined in SearchResult.qSearchTerms .

      • qTotalNumberOfItemsinteger

        Total number of distinct items in the search group.

      • qItemsarray of objects

        List of items in the search group. The group items are numbered from the value of SearchGroupOptions.qOffset to the value of SearchGroupOptions.qOffset + SearchGroupOptions.qCount

        Show qItems properties
        • qItemTypestring

          Can be one of: "Field""GenericObject"

        • qTotalNumberOfMatchesinteger

          Total number of distinct matches in the search group item.

        • qIdentifierstring

          Identifier of the item. It corresponds to:

          • The name of the field, if the type of the search group is data set.
          • The id of the generic object if the type of the search group is generic object.
        • qItemMatchesarray of objects

          List of matches in the search group item. The group item matches are numbered from the value of SearchGroupItemOptions.qOffset to the value of SearchGroupItemOptions.qOffset + SearchGroupItemOptions.qCount .

          Show qItemMatches properties
          • qTextstring

            Search match value. Value of the search group item. If the match is found in a field, it corresponds to the value of the field. If the match is found in a generic object property, it corresponds to the property value.

          • qFieldSelectionModestring

            Can be one of: "OneAndOnlyOne"

          • qRangesarray of objects

            List of ranges. For example, if the search terms are Price and Make, and the search group item value is Make by Price vs Mileage, then there are two ranges: one for Price and one for Make.

            Show qRanges properties
            • qCharPosinteger

              Starting position of the match in the search result, starting from 0.

            • qCharCountinteger

              Length of the match in the search result.

            • qTerminteger

              Position of the term in the list of search terms, starting from 0.

          • qAttributesarray of objects

            Provides detail of the match as requested by the user in SearchObjectsOptions.qAttributes or SearchCombinationOptions.qAttributes If the user requests SearchObjects or SearchResults with an empty qAttributes option, the outputted qAttributes is returned empty. For SearchObjects requested with qProperty , the SearchGroupItemMatch.qAttributes return value contains [“qProperty”, "qMetaDef/title”] if the match has been found in the title of the item. For dimension values, the returned qProperty will be “*” . For SearchResults requested with qNum , the SearchGroupItemMatch.qAttributes return value contains ["qNum", N] where N is the numeric value of the element or NaN if the value is not numeric. For SearchResults requested with qElemNum , the SearchGroupItemMatch.qAttributes return value contains ["qElemNum", N] where N is the value index of the element.

            Show qAttributes properties
            • qKeystring

              String corresponding to SearchObjectOptions.qAttributes. It will be qProperty for SearchObjectOptions.

            • qValuestring

              String corresponding to qKey for the current SearchGroupItemMatch. For example, if the match is Make by Price found in the title of a generic object, qValue will be qMetaDef/title.

        • qSearchTermsMatchedarray of integers

          Indexes of the search terms that are included in the group item. These search terms are related to the list of terms defined in SearchResult.qSearchTerms .

        • qMatchTypestring

          Can be one of: "FieldMatchNone""FieldMatchSubString""FieldMatchWord""FieldMatchExact""FieldMatchLast"

Errors

array

SearchResults(qOptions, qTerms, qPage)

const result = await doc.SearchResults([
  {
    "qSearchFields": [
      "value"
    ],
    "qContext": "Cleared",
    "qCharEncoding": "Utf8",
    "qAttributes": [
      "value"
    ]
  },
  [
    "value"
  ],
  {
    "qOffset": 123,
    "qCount": 123,
    "qMaxNbrFieldMatches": -1,
    "qGroupOptions": [
      {
        "qGroupType": "DatasetType",
        "qOffset": 123,
        "qCount": -1
      }
    ],
    "qGroupItemOptions": [
      {
        "qGroupItemType": "Field",
        "qOffset": 123,
        "qCount": -1
      }
    ]
  }
])

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "handle": 3,
  "method": "SearchResults",
  "params": {
    "qOptions": {
      "qSearchFields": [
        "value"
      ],
      "qContext": "Cleared",
      "qCharEncoding": "Utf8",
      "qAttributes": [
        "value"
      ]
    },
    "qTerms": [
      "value"
    ],
    "qPage": {
      "qOffset": 123,
      "qCount": 123,
      "qMaxNbrFieldMatches": -1,
      "qGroupOptions": [
        {
          "qGroupType": "DatasetType",
          "qOffset": 123,
          "qCount": -1
        }
      ],
      "qGroupItemOptions": [
        {
          "qGroupItemType": "Field",
          "qOffset": 123,
          "qCount": -1
        }
      ]
    }
  }
}

Response

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "qResult": {
      "qSearchTerms": [
        "value"
      ],
      "qTotalNumberOfGroups": 123,
      "qSearchGroupArray": [
        {
          "qId": 123,
          "qGroupType": "DatasetType",
          "qSearchTermsMatched": [
            123
          ],
          "qTotalNumberOfItems": 123,
          "qItems": [
            {
              "qItemType": "Field",
              "qTotalNumberOfMatches": 123,
              "qIdentifier": "value",
              "qItemMatches": [
                {
                  "qText": "value",
                  "qFieldSelectionMode": "OneAndOnlyOne",
                  "qRanges": [
                    {
                      "qCharPos": 123,
                      "qCharCount": 123,
                      "qTerm": 123
                    }
                  ],
                  "qAttributes": [
                    {
                      "qKey": "value",
                      "qValue": "value"
                    }
                  ]
                }
              ],
              "qSearchTermsMatched": [
                123
              ],
              "qMatchType": "FieldMatchNone"
            }
          ]
        }
      ]
    }
  }
}

Doc SearchSuggest

(qOptions, qTerms)

Returns search terms suggestions.

Parameters

  • qOptionsobject
    Required

    Information about the search combinations.

    Show qOptions properties
    • qSearchFieldsarray of strings

      List of the search fields. If empty, the search is performed in all fields of the app.

    • qContextstring

      Can be one of: "Cleared""LockedFieldsOnly""CurrentSelections"

    • qCharEncodingstring

      Can be one of: "Utf8""Utf16"

    • qAttributesarray of strings

      Optional.

      • For SearchSuggest method, this array is empty.
      • For SearchObjects method, this array is empty or contain qProperty .
      • For SearchResults method, this array is empty, or contains qNum and/or qElemNum . It allows the user to request details in the outputted SearchGroupItemMatch . For more information, see SearchGroupItemMatch.
  • qTermsarray of strings
    Required

    Terms to search for.

Response

  • qResultobject
    Show qResult properties
    • qSuggestionsarray of objects

      List of suggestions.

      Show qSuggestions properties
      • qValuestring

        Value of the suggestion.

      • qTerminteger

        Index of the suggestion value. The indexing starts from 0 and from the left.

    • qFieldNamesarray of strings

      List of field names that contain search hits.

Errors

array

SearchSuggest(qOptions, qTerms)

const result = await doc.SearchSuggest([
  {
    "qSearchFields": [
      "value"
    ],
    "qContext": "Cleared",
    "qCharEncoding": "Utf8",
    "qAttributes": [
      "value"
    ]
  },
  [
    "value"
  ]
])

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "handle": 3,
  "method": "SearchSuggest",
  "params": {
    "qOptions": {
      "qSearchFields": [
        "value"
      ],
      "qContext": "Cleared",
      "qCharEncoding": "Utf8",
      "qAttributes": [
        "value"
      ]
    },
    "qTerms": [
      "value"
    ]
  }
}

Response

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "qResult": {
      "qSuggestions": [
        {
          "qValue": "value",
          "qTerm": 123
        }
      ],
      "qFieldNames": [
        "value"
      ]
    }
  }
}

Doc SearchValues

(qOptions, qTerms, qPage)
Experimental

Parameters

  • qOptionsobject
    RequiredExperimental
    Show qOptions properties
    • qSearchFieldsarray of strings

      List of the search fields. If empty, the search is performed in all fields of the app.

  • qTermsarray of strings
    Required
  • qPageobject
    RequiredExperimental
    Show qPage properties
    • qOffsetinteger

      Position from the top, starting from 0. If the offset is set to 0, the first search result to be returned is at position 0.

    • qCountinteger

      Number of search fields to return

    • qMaxNbrFieldMatchesinteger

      Maximum number of matching values to return per search result.

Response

  • qResultobject
    Experimental
    Show qResult properties
    • qSearchTermsarray of strings

      List of the search terms.

    • qFieldMatchesarray of objects
      Experimental

      List of search groups. The groups are numbered from the value of SearchPage.qOffset to the value of SearchPage.qOffset + SearchPage.qCount .

      Show qFieldMatches properties
      • qFieldNamestring

        Field name of matches.

      • qValuesarray of objects
        Experimental

        List of search matches.

        Show qValues properties
        • qTextstring
        • qElemNointeger
        • qSearchTermsMatchedarray of integers

Errors

array

SearchValues(qOptions, qTerms, qPage)

const result = await doc.SearchValues([
  {
    "qSearchFields": [
      "value"
    ]
  },
  [
    "value"
  ],
  {
    "qOffset": 123,
    "qCount": 123,
    "qMaxNbrFieldMatches": -1
  }
])

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "handle": 3,
  "method": "SearchValues",
  "params": {
    "qOptions": {
      "qSearchFields": [
        "value"
      ]
    },
    "qTerms": [
      "value"
    ],
    "qPage": {
      "qOffset": 123,
      "qCount": 123,
      "qMaxNbrFieldMatches": -1
    }
  }
}

Response

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "qResult": {
      "qSearchTerms": [
        "value"
      ],
      "qFieldMatches": [
        {
          "qFieldName": "value",
          "qValues": [
            {
              "qText": "value",
              "qElemNo": 123,
              "qSearchTermsMatched": [
                123
              ]
            }
          ]
        }
      ]
    }
  }
}

Doc SelectAssociations

(qOptions, qTerms, qMatchIx, qSoftLock?)

Selects all search hits for a specified group. The results depend on the search context. SearchCombinationOptions.

Parameters

  • qOptionsobject
    Required

    Information about the search fields and the search context.

    Show qOptions properties
    • qSearchFieldsarray of strings

      List of the search fields. If empty, the search is performed in all fields of the app.

    • qContextstring

      Can be one of: "Cleared""LockedFieldsOnly""CurrentSelections"

    • qCharEncodingstring

      Can be one of: "Utf8""Utf16"

    • qAttributesarray of strings

      Optional.

      • For SearchSuggest method, this array is empty.
      • For SearchObjects method, this array is empty or contain qProperty .
      • For SearchResults method, this array is empty, or contains qNum and/or qElemNum . It allows the user to request details in the outputted SearchGroupItemMatch . For more information, see SearchGroupItemMatch.
  • qTermsarray of strings
    Required

    List of terms to search for.

  • qMatchIxinteger
    Required

    Index (value of qId ) of the search result to select.

  • qSoftLockboolean

    This parameter is deprecated and should not be set.

Response

object

Errors

array

SelectAssociations(qOptions, qTerms, qMatchIx, qSoftLock?)

const result = await doc.SelectAssociations([
  {
    "qSearchFields": [
      "value"
    ],
    "qContext": "Cleared",
    "qCharEncoding": "Utf8",
    "qAttributes": [
      "value"
    ]
  },
  [
    "value"
  ],
  123,
  true
])

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "handle": 3,
  "method": "SelectAssociations",
  "params": {
    "qOptions": {
      "qSearchFields": [
        "value"
      ],
      "qContext": "Cleared",
      "qCharEncoding": "Utf8",
      "qAttributes": [
        "value"
      ]
    },
    "qTerms": [
      "value"
    ],
    "qMatchIx": 123,
    "qSoftLock": true
  }
}

Response

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

Doc SendGenericCommandToCustomConnector

(qProvider, qCommand, qMethod, qParameters, qAppendConnection)

Sends a generic command to a custom connector. For more information on the commands that can be sent to a custom connector, see the QVX SDK help.

Parameters

  • qProviderstring
    Required

    Connector file name. Command to be executed by the connector.

  • qCommandstring
    Required

    One of:

    • JsonRequest
    • GetCustomCaption
    • IsConnected
    • DisableQlikViewSelectButton
    • HaveStarField
  • qMethodstring
    Required

    Method name to be used within the command. The available methods depend on the chosen connector.

  • qParametersarray of strings
    Required

    Parameters of the command. No parameters are required.

  • qAppendConnectionstring
    Required

    Name of the connection.

Response

  • qResultstring

Errors

array

SendGenericCommandToCustomConnector(qProvider, qCommand, qMethod, qParameters, qAppendConnection)

const result = await doc.SendGenericCommandToCustomConnector([
  "value",
  "value",
  "value",
  [
    "value"
  ],
  "value"
])

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "handle": 3,
  "method": "SendGenericCommandToCustomConnector",
  "params": {
    "qProvider": "value",
    "qCommand": "value",
    "qMethod": "value",
    "qParameters": [
      "value"
    ],
    "qAppendConnection": "value"
  }
}

Response

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

Doc SetAppProperties

(qProp)

Sets properties to an app.

The qLastReloadTime, qMigrationHash and qSavedInProductVersion properties does not need to be set but if they are, they should match the current values in the app layout.

Parameters

  • qPropobject
    Required

    Information about the properties of an app.

    Show qProp properties
    • qTitlestring

      App title.

    • qLastReloadTimestring

      Last reload time of the app.

    • qMigrationHashstring

      Internal property reserved for app migration. Patch version of the app. Do not update.

    • qSavedInProductVersionstring

      Internal property reserved for app migration. The app is saved in this version of the product. Do not update.

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

        Relative path of the thumbnail.

    • qHasSectionAccessboolean

      If true the app has section access configured.

    • qUsagestring

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

Response

object

Errors

array

SetAppProperties(qProp)

const result = await doc.SetAppProperties([
  {
    "qTitle": "value",
    "qLastReloadTime": "value",
    "qMigrationHash": "value",
    "qSavedInProductVersion": "value",
    "qThumbnail": {
      "qUrl": "value"
    },
    "qHasSectionAccess": true,
    "qUsage": "ANALYTICS"
  }
])

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "handle": 3,
  "method": "SetAppProperties",
  "params": {
    "qProp": {
      "qTitle": "value",
      "qLastReloadTime": "value",
      "qMigrationHash": "value",
      "qSavedInProductVersion": "value",
      "qThumbnail": {
        "qUrl": "value"
      },
      "qHasSectionAccess": true,
      "qUsage": "ANALYTICS"
    }
  }
}

Response

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

Doc SetFavoriteVariables

(qNames)

Set some variables as favorite.

Parameters

  • qNamesarray of strings
    Required

    Variables to set as favorite.

Response

object

Errors

array

SetFavoriteVariables(qNames)

const result = await doc.SetFavoriteVariables([
  [
    "value"
  ]
])

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "handle": 3,
  "method": "SetFavoriteVariables",
  "params": {
    "qNames": [
      "value"
    ]
  }
}

Response

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

Doc SetFetchLimit

(qLimit)

Limits the number of rows of data to load from a data source. This method works when reloading in debug mode.

Parameters

  • qLimitinteger
    Required

    Fetch limit. Number of rows to load.

Response

object

Errors

array

SetFetchLimit(qLimit)

const result = await doc.SetFetchLimit([
  123
])

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "handle": 3,
  "method": "SetFetchLimit",
  "params": {
    "qLimit": 123
  }
}

Response

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

Doc SetLooselyCoupledVector

(qv)

Sets a list of table states, one for each table.

The following states apply:

  • 0 The table is not loosely coupled.
  • 1 The table is loosely coupled.
  • 2 The table is loosely coupled and cannot be changed to another state using the Qlik Engine API.
The last three values in the vector are for internal use.

Parameters

  • qvarray of integers
    Required

    The list of table states to set. A state will not be changed if already set to 2.

Response

  • qReturnboolean

Errors

array

SetLooselyCoupledVector(qv)

const result = await doc.SetLooselyCoupledVector([
  [
    123
  ]
])

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "handle": 3,
  "method": "SetLooselyCoupledVector",
  "params": {
    "qv": [
      123
    ]
  }
}

Response

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

Doc SetProhibitBinaryLoad

(qProhibit)

Prohibit binary load of this app. An app with prohibit binary load set cannot be loaded binary. For the setting to have effect a save is required.

Parameters

  • qProhibitboolean
    Required

    True or false.

Response

object

Errors

array

SetProhibitBinaryLoad(qProhibit)

const result = await doc.SetProhibitBinaryLoad([
  true
])

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "handle": 3,
  "method": "SetProhibitBinaryLoad",
  "params": {
    "qProhibit": true
  }
}

Response

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

Doc SetScript

(qScript)

Sets values in script.

Parameters

  • qScriptstring
    Required

    Script content.

Response

object

Errors

array

SetScript(qScript)

const result = await doc.SetScript([
  "value"
])

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "handle": 3,
  "method": "SetScript",
  "params": {
    "qScript": "value"
  }
}

Response

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

Doc SetScriptBreakpoints

(qBreakpoints)

Set some breakpoints in the script of an app.

Parameters

  • qBreakpointsarray of objects
    Required

    Information about the breakpoints.

    Show qBreakpoints properties
    • qbufferNamestring

      Name of the breakpoint.

    • qlineIxinteger

      Line number in the script where the breakpoint is set.

    • qEnabledboolean

      If set to true then the breakpoint is enabled (in use).

Response

object

Errors

array

SetScriptBreakpoints(qBreakpoints)

const result = await doc.SetScriptBreakpoints([
  [
    {
      "qbufferName": "value",
      "qlineIx": 123,
      "qEnabled": true
    }
  ]
])

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "handle": 3,
  "method": "SetScriptBreakpoints",
  "params": {
    "qBreakpoints": [
      {
        "qbufferName": "value",
        "qlineIx": 123,
        "qEnabled": true
      }
    ]
  }
}

Response

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

Doc SetViewDlgSaveInfo

(qInfo)

Sets the positions of the tables in the data model viewer.

The position of the broom points and the position of the connection points cannot be set in Qlik Sense.

Parameters

  • qInfoobject
    Required

    Information about the table.

    Show qInfo properties
    • qPosobject
      Show qPos properties
      • qLeftinteger

        Position from the left. Corresponds to the first column.

      • qTopinteger

        Position from the top. Corresponds to the first row.

      • qWidthinteger

        Number of columns in the page. The indexing of the columns may vary depending on whether the cells are expanded or not (parameter qAlwaysFullyExpanded in HyperCubeDef ).

      • qHeightinteger

        Number of rows or elements in the page. The indexing of the rows may vary depending on whether the cells are expanded or not (parameter qAlwaysFullyExpanded in HyperCubeDef ).

    • qCtlInfoobject
      Show qCtlInfo properties
      • qInternalViewobject
        Show qInternalView properties
        • qTablesarray of objects

          List of the tables in the database model viewer.

          Show qTables properties
          • qPosobject
            Show qPos properties
            • qLeftinteger

              Position from the left. Corresponds to the first column.

            • qTopinteger

              Position from the top. Corresponds to the first row.

            • qWidthinteger

              Number of columns in the page. The indexing of the columns may vary depending on whether the cells are expanded or not (parameter qAlwaysFullyExpanded in HyperCubeDef ).

            • qHeightinteger

              Number of rows or elements in the page. The indexing of the rows may vary depending on whether the cells are expanded or not (parameter qAlwaysFullyExpanded in HyperCubeDef ).

          • qCaptionstring

            Table name.

        • qBroomPointsarray of objects

          List of the broom points in the database model viewer. Not used in Qlik Sense.

          Show qBroomPoints properties
          • qPosobject
            Show qPos properties
            • qxinteger

              x-coordinate in pixels. The origin is the top left of the screen.

            • qyinteger

              y-coordinate in pixels. The origin is the top left of the screen.

          • qTablestring

            Name of the table.

          • qFieldsarray of strings

            List of fields in the table.

        • qConnectionPointsarray of objects

          List of connection points in the database model viewer. Not used in Qlik Sense.

          Show qConnectionPoints properties
          • qPosobject
            Show qPos properties
            • qxinteger

              x-coordinate in pixels. The origin is the top left of the screen.

            • qyinteger

              y-coordinate in pixels. The origin is the top left of the screen.

          • qFieldsarray of strings

            List of the fields in the table.

        • qZoomFactornumber

          Zoom factor in the database model viewer. The default value is 1.0.

      • qSourceViewobject
        Show qSourceView properties
        • qTablesarray of objects

          List of the tables in the database model viewer.

          Show qTables properties
          • qPosobject
            Show qPos properties
            • qLeftinteger

              Position from the left. Corresponds to the first column.

            • qTopinteger

              Position from the top. Corresponds to the first row.

            • qWidthinteger

              Number of columns in the page. The indexing of the columns may vary depending on whether the cells are expanded or not (parameter qAlwaysFullyExpanded in HyperCubeDef ).

            • qHeightinteger

              Number of rows or elements in the page. The indexing of the rows may vary depending on whether the cells are expanded or not (parameter qAlwaysFullyExpanded in HyperCubeDef ).

          • qCaptionstring

            Table name.

        • qBroomPointsarray of objects

          List of the broom points in the database model viewer. Not used in Qlik Sense.

          Show qBroomPoints properties
          • qPosobject
            Show qPos properties
            • qxinteger

              x-coordinate in pixels. The origin is the top left of the screen.

            • qyinteger

              y-coordinate in pixels. The origin is the top left of the screen.

          • qTablestring

            Name of the table.

          • qFieldsarray of strings

            List of fields in the table.

        • qConnectionPointsarray of objects

          List of connection points in the database model viewer. Not used in Qlik Sense.

          Show qConnectionPoints properties
          • qPosobject
            Show qPos properties
            • qxinteger

              x-coordinate in pixels. The origin is the top left of the screen.

            • qyinteger

              y-coordinate in pixels. The origin is the top left of the screen.

          • qFieldsarray of strings

            List of the fields in the table.

        • qZoomFactornumber

          Zoom factor in the database model viewer. The default value is 1.0.

    • qModeinteger

      View mode to display when opening Qlik Sense data model viewer. One of:

      • 0 for internal view mode.
      • 1 for source view mode.

Response

object

Errors

array

SetViewDlgSaveInfo(qInfo)

const result = await doc.SetViewDlgSaveInfo([
  {
    "qPos": {
      "qLeft": 123,
      "qTop": 123,
      "qWidth": 123,
      "qHeight": 123
    },
    "qCtlInfo": {
      "qInternalView": {
        "qTables": [
          {
            "qPos": {
              "qLeft": 123,
              "qTop": 123,
              "qWidth": 123,
              "qHeight": 123
            },
            "qCaption": "value"
          }
        ],
        "qBroomPoints": [
          {
            "qPos": {
              "qx": 123,
              "qy": 123
            },
            "qTable": "value",
            "qFields": [
              "value"
            ]
          }
        ],
        "qConnectionPoints": [
          {
            "qPos": {
              "qx": 123,
              "qy": 123
            },
            "qFields": [
              "value"
            ]
          }
        ],
        "qZoomFactor": 1
      },
      "qSourceView": {
        "qTables": [
          {
            "qPos": {
              "qLeft": 123,
              "qTop": 123,
              "qWidth": 123,
              "qHeight": 123
            },
            "qCaption": "value"
          }
        ],
        "qBroomPoints": [
          {
            "qPos": {
              "qx": 123,
              "qy": 123
            },
            "qTable": "value",
            "qFields": [
              "value"
            ]
          }
        ],
        "qConnectionPoints": [
          {
            "qPos": {
              "qx": 123,
              "qy": 123
            },
            "qFields": [
              "value"
            ]
          }
        ],
        "qZoomFactor": 1
      }
    },
    "qMode": 123
  }
])

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "handle": 3,
  "method": "SetViewDlgSaveInfo",
  "params": {
    "qInfo": {
      "qPos": {
        "qLeft": 123,
        "qTop": 123,
        "qWidth": 123,
        "qHeight": 123
      },
      "qCtlInfo": {
        "qInternalView": {
          "qTables": [
            {
              "qPos": {
                "qLeft": 123,
                "qTop": 123,
                "qWidth": 123,
                "qHeight": 123
              },
              "qCaption": "value"
            }
          ],
          "qBroomPoints": [
            {
              "qPos": {
                "qx": 123,
                "qy": 123
              },
              "qTable": "value",
              "qFields": [
                "value"
              ]
            }
          ],
          "qConnectionPoints": [
            {
              "qPos": {
                "qx": 123,
                "qy": 123
              },
              "qFields": [
                "value"
              ]
            }
          ],
          "qZoomFactor": 1
        },
        "qSourceView": {
          "qTables": [
            {
              "qPos": {
                "qLeft": 123,
                "qTop": 123,
                "qWidth": 123,
                "qHeight": 123
              },
              "qCaption": "value"
            }
          ],
          "qBroomPoints": [
            {
              "qPos": {
                "qx": 123,
                "qy": 123
              },
              "qTable": "value",
              "qFields": [
                "value"
              ]
            }
          ],
          "qConnectionPoints": [
            {
              "qPos": {
                "qx": 123,
                "qy": 123
              },
              "qFields": [
                "value"
              ]
            }
          ],
          "qZoomFactor": 1
        }
      },
      "qMode": 123
    }
  }
}

Response

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

Doc StoreTempSelectionState

(qTTLOfTempState?)

Store current selection state temporarily.

The temporary selection state will be stored for 30min by default if TTL parameter is not present or positive.
StoreTempSelectionState method is only supported in SaaS Editions of Qlik Sense.

Parameters

  • qTTLOfTempStateinteger

    Time to live in seconds for stored selection state

Response

  • qIdstring
  • qReturnboolean

Errors

array

StoreTempSelectionState(qTTLOfTempState?)

const result = await doc.StoreTempSelectionState([
  123
])

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "handle": 3,
  "method": "StoreTempSelectionState",
  "params": {
    "qTTLOfTempState": 123
  }
}

Response

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

Doc TransformApp

(qDstParameters)

Transform current app into an instance of the targeted mode

Parameters

  • qDstParametersobject
    Required

    Attributes that should be set in the new app.

    Show qDstParameters properties
    • qNamestring

      The name (title) of the application

    • qSpaceIdstring

      ID of the space where the app is to be created. Empty value implies Personal space

    • qScriptParameterPrefixstring

      Prefix to be used on inserted ScriptParameters, only applicable for template apps

Response

  • qResultobject
    Show qResult properties
    • qAppIdstring

      ID of created App

Errors

array

TransformApp(qDstParameters)

const result = await doc.TransformApp([
  {
    "qName": "value",
    "qSpaceId": "value",
    "qScriptParameterPrefix": "value"
  }
])

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "handle": 3,
  "method": "TransformApp",
  "params": {
    "qDstParameters": {
      "qName": "value",
      "qSpaceId": "value",
      "qScriptParameterPrefix": "value"
    }
  }
}

Response

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "qResult": {
      "qAppId": "value"
    }
  }
}

Doc Undo

()

Undoes the previous operation.

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

Response

  • qSuccessboolean

Errors

array

Undo()

const result = await doc.Undo({})

Request

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

Response

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

Doc UnlockAll

(qStateName?)

Unlocks all selections in fields for current state.

Parameters

  • qStateNamestring

    Alternate state name. When set, applies to alternate state instead of current.

Response

object

Errors

array

UnlockAll(qStateName?)

const result = await doc.UnlockAll([
  "value"
])

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "handle": 3,
  "method": "UnlockAll",
  "params": {
    "qStateName": "value"
  }
}

Response

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