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.
Doc
Aborts any selection mode in an app. For more information about selection mode, see BeginSelections method.
Parameters
- qAcceptbooleanRequired
Set this parameter to true to accept the selections before exiting the selection mode.
Response
objectErrors
arrayAbortModal(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": {}
}
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
- qStateNamestringRequired
Name of the alternate state.
Response
objectErrors
arrayAddAlternateState(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": {}
}
Adds a field on the fly.
Parameters
- qNamestringRequired
Name of the field.
- qExprstringRequired
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
arrayAddFieldFromExpression(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
}
}
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
- qStateNamestringRequired
Name of the alternate state.
- qSourceStateNamestring
Name of existing state to copy the initial selections from
Response
objectErrors
arrayAddSessionAlternateState(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": {}
}
Applies a bookmark and verifies result dataset against originally selected values.
Parameters
- qIdstringRequired
Identifier of the bookmark.
Response
- qResultobjectExperimental
qResult properties
- qApplySuccessboolean
Apply successfully or not *
- qWarningsarray of objectsExperimental
Field values verfication result *
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
-
- qGroupStateResultobjectExperimental
Result of applying GroupState to multiple cyclic groups.
qGroupStateResult properties
- qApplySuccessboolean
When true, the operation was successful.
- qWarningsarray of objectsExperimental
Lists which states failed to be applied and why.
qWarnings properties
- qStateobjectExperimental
qState properties
- qInfoobject
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
arrayApplyAndVerifyBookmark(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"
}
]
}
}
}
}
Applies a bookmark.
Parameters
- qIdstringRequired
Identifier of the bookmark.
Response
- qSuccessboolean
Errors
arrayApplyBookmark(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
}
}
Parameters
- qGroupStatesarray of objectsRequiredExperimental
qGroupStates properties
- qInfoobject
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
- qResultobjectExperimental
Result of applying GroupState to multiple cyclic groups.
qResult properties
- qApplySuccessboolean
When true, the operation was successful.
- qWarningsarray of objectsExperimental
Lists which states failed to be applied and why.
qWarnings properties
- qStateobjectExperimental
qState properties
- qInfoobject
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
arrayApplyGroupStates(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"
}
]
}
}
}
Apply temporary bookmark identified by Id.
Parameters
- qIdstringRequired
Identifier of the temporary selection state
Response
- qReturnboolean
Errors
arrayApplyTemporaryBookmark(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
}
}
Back()
const result = await doc.Back({})
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "Back"
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {}
}
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
}
}
Change the owner of a session app.
Parameters
- qNewOwnerIdstringRequired
Identifier of the new app owner.
Response
- qSuccessboolean
Errors
arrayChangeSessionAppOwner(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
}
}
Add a session app to a space.
Parameters
- qSpaceIdstringRequired
Identifier of the new space.
Response
- qSuccessboolean
Errors
arrayChangeSessionAppSpace(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
}
}
Checks if a given expression is valid.
Parameters
- qExprstringRequired
Expression to check.
- qLabelsarray of strings
List of labels.
Response
- qErrorMsgstring
- qBadFieldNamesarray of objects
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
qDangerousFieldNames properties
- qFrominteger
Position in the expression of the first character of the field name.
- qCountinteger
Number of characters in the field name.
-
Errors
arrayCheckExpression(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
}
]
}
}
Checks if:
- A given expression is valid.
- A number is correct according to the locale.
Parameters
- qExprstringRequired
Expression to check.
Response
- qErrorMsgstring
- qBadFieldNamesarray of objects
qBadFieldNames properties
- qFrominteger
Position in the expression of the first character of the field name.
- qCountinteger
Number of characters in the field name.
-
Errors
arrayCheckNumberOrExpression(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
}
]
}
}
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 } ] }
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
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
arrayCheckScriptSyntax()
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
}
]
}
}
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
objectErrors
arrayClearAll(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": {}
}
Clear the soft properties of all generic objects in the app
Response
objectErrors
arrayClearAllSoftPatches()
const result = await doc.ClearAllSoftPatches({})
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "ClearAllSoftPatches"
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {}
}
ClearUndoBuffer()
const result = await doc.ClearUndoBuffer({})
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "ClearUndoBuffer"
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {}
}
Clones a bookmark.
Parameters
- qIdstringRequired
Identifier of the object to clone.
Response
- qCloneIdstring
Errors
arrayCloneBookmark(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"
}
}
Clones a dimension.
Parameters
- qIdstringRequired
Identifier of the object to clone.
Response
- qCloneIdstring
Errors
arrayCloneDimension(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"
}
}
Clones a measure.
Parameters
- qIdstringRequired
Identifier of the object to clone.
Response
- qCloneIdstring
Errors
arrayCloneMeasure(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"
}
}
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.
Parameters
- qIdstringRequired
Identifier of the object to clone. The identifier must be a root object.
Response
- qCloneIdstring
Errors
arrayCloneObject(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"
}
}
Commits the draft of an object that was previously created by invoking the CreateDraft method. Committing a draft replaces the corresponding published object.
Parameters
- qIdstringRequired
Identifier of the draft to commit.
Response
objectErrors
arrayCommitDraft(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": {}
}
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
objectErrors
arrayCommitScript(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": {}
}
Creates a bookmark.
Parameters
- qPropobjectRequired
Properties for the object.
qProp properties
- qInfoobject
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.
- qIncludeVariablesbooleanExperimental
If true all variables will be stored in the bookmark.
- qDistinctValuesbooleanExperimental
If true all selected values will be stored distinct, i.e. searchstrings will not be kept.
-
Response
- qInfoobject
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
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
arrayCreateBookmark(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"
}
}
}
Creates a bookmark with softpatches.
Parameters
- qPropobjectRequired
Properties for the object.
qProp properties
- qInfoobject
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.
- qIncludeVariablesbooleanExperimental
If true all variables will be stored in the bookmark.
- qDistinctValuesbooleanExperimental
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
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
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
arrayCreateBookmarkEx(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"
}
}
}
Creates a connection. A connection indicates from which data source the data should be taken.
Parameters
- qConnectionobjectRequired
Information about the connection.
qConnection properties
- qIdstring
Identifier of the connection. Is generated by the engine and is unique.
- qNamestring
Name of the connection. This parameter is mandatory and must be set when creating or modifying a connection.
- qConnectionStringstring
One of:
- ODBC CONNECT TO [<provider name>]
- OLEDB CONNECT TO [<provider name>]
- CUSTOM CONNECT TO [<provider name>]
- "<local absolute or relative path, UNC path>"
- "<URL>"
Connection string. This parameter is mandatory and must be set when creating or modifying a connection.
- qTypestring
One of:
- ODBC
- OLEDB
- <Name of the custom connection file>
- folder
- internet
Type of the connection. This parameter is mandatory and must be set when creating or modifying a connection. For ODBC, OLEDB and custom connections, the engine checks that the connection type matches the connection string. The type is not case sensitive.
- qUserNamestring
Name of the user who creates the connection. This parameter is optional; it is only used for OLEDB, ODBC and CUSTOM connections. A call to GetConnection Method does not return the user name.
- qPasswordstring
Password of the user who creates the connection. This parameter is optional; it is only used for OLEDB, ODBC and CUSTOM connections. A call to GetConnection Method does not return the password.
- qModifiedDatestring
Is generated by the engine. Creation date of the connection or last modification date of the connection.
- qMetaobject
Layout for NxMetaDef.
qMeta properties
- qNamestring
Name. This property is optional.
-
- qLogOnstring
Can be one of: "LOG_ON_SERVICE_USER""LOG_ON_CURRENT_USER"
-
Response
- qConnectionIdstring
Errors
arrayCreateConnection(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"
}
}
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
- qPropobjectRequired
Information about the properties.
qProp properties
- qInfoobject
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
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
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
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
arrayCreateDimension(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"
}
}
}
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.
Parameters
- qIdstringRequired
Identifier of the object to create a draft from.
Response
- qDraftIdstring
Errors
arrayCreateDraft(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"
}
}
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
- qPropobjectRequired
Information about the properties.
qProp properties
- qInfoobject
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
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.
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
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
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
arrayCreateMeasure(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"
}
}
}
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.
Parameters
- qPropobjectRequired
Information about the object.
qProp properties
- qInfoobject
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
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
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
arrayCreateObject(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"
}
}
}
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.
Parameters
- qPropobjectRequired
Information about the object.
qProp properties
- qInfoobject
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
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
arrayCreateSessionObject(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"
}
}
}
Creates a transient variable.
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
- qPropobjectRequired
Name of the variable. Variable names are case sensitive.
qProp properties
- qInfoobject
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.
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
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
arrayCreateSessionVariable(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"
}
}
}
Create temporary bookmark
Parameters
- qOptionsobjectRequired
Options for the temporary bookmark
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
arrayCreateTemporaryBookmark(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
}
}
Creates a variable.
Parameters
- qNamestringRequired
Name of the variable. Variable names are case sensitive.
Response
- qReturnboolean
Errors
arrayCreateVariable(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
}
}
Creates a variable. To create a variable via a script, you need to use the SetScript method. For more information, see Create a variable.
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
- qPropobjectRequired
Name of the variable. Variable names are case sensitive and must be unique.
qProp properties
- qInfoobject
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.
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
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
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
arrayCreateVariableEx(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"
}
}
}
Deletes a connection.
Parameters
- qConnectionIdstringRequired
Identifier of the connection to remove.
Response
objectErrors
arrayDeleteConnection(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": {}
}
Removes a bookmark.
Parameters
- qIdstringRequired
Identifier of the bookmark.
Response
- qSuccessboolean
Errors
arrayDestroyBookmark(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
}
}
Removes a dimension.
Parameters
- qIdstringRequired
Identifier of the dimension to remove.
Response
- qSuccessboolean
Errors
arrayDestroyDimension(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
}
}
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.
Parameters
- qIdstringRequired
Identifier of the draft object to remove.
- qSourceIdstringRequired
Identifier of the source object (the object from which a draft was created).
Response
- qSuccessboolean
Errors
arrayDestroyDraft(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
}
}
Removes a generic measure.
Parameters
- qIdstringRequired
Identifier of the measure to remove.
Response
- qSuccessboolean
Errors
arrayDestroyMeasure(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
}
}
Removes an app object. The children of the object (if any) are removed as well.
Parameters
- qIdstringRequired
Identifier of the object to remove.
Response
- qSuccessboolean
Errors
arrayDestroyObject(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
}
}
Removes a transient object.
Parameters
- qIdstringRequired
Identifier of the transient object to remove.
Response
- qSuccessboolean
Errors
arrayDestroySessionObject(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
}
}
Removes a transient variable.
Parameters
- qIdstringRequired
Identifier of the variable.
Response
- qSuccessboolean
Errors
arrayDestroySessionVariable(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
}
}
Removes a transient variable.
Parameters
- qIdstringRequired
Identifier of the variable.
Response
- qSuccessboolean
Errors
arrayDestroySessionVariableById(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
}
}
Removes a transient variable.
Parameters
- qNamestringRequired
Name of the variable.
Response
- qSuccessboolean
Errors
arrayDestroySessionVariableByName(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
}
}
Removes a variable. Script-defined variables cannot be removed using the DestroyVariableById method or the DestroyVariableByName method. For more information, see Remove a variable.
Parameters
- qIdstringRequired
Identifier of the variable.
Response
- qSuccessboolean
Errors
arrayDestroyVariableById(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
}
}
Removes a variable. Script-defined variables cannot be removed using the DestroyVariableById method or the DestroyVariableByName method. For more information, see Remove a variable.
Parameters
- qNamestringRequired
Name of the variable.
Response
- qSuccessboolean
Errors
arrayDestroyVariableByName(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
}
}
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
arrayDoReload(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
}
}
Reloads the script that is set in an app and returns the path to the script log file.
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:
|
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
qParams properties
- qModeinteger
- : for default mode.
- : for ABEND; the reload of the script ends if an error occurs.
- : 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.
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
arrayDoReloadEx(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
}
}
}
Saves an app. All objects and data in the data model are saved.
Parameters
- qFileNamestring
Name of the file to save.
Response
objectErrors
arrayDoSave(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": {}
}
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
- qExpressionstringRequired
Expression to evaluate.
Response
- qReturnstring
Errors
arrayEvaluate(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"
}
}
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
- qExpressionstringRequired
Expression to evaluate.
Response
- qValueobject
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
arrayEvaluateEx(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
}
}
}
Expands the expression.
Parameters
- qExpressionstringRequired
The expression string to expand.
Response
- qExpandedExpressionstring
Errors
arrayExpandExpression(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"
}
}
Applies a bookmark to reduce (slice) the data on. Returns a url and file size to the reduced application. Section Access is always applied.
Parameters
- qOptionsobject
BookmarkId used to reduced the app on and an expire time.
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
qDownloadInfo properties
- qUrlstring
URL to download the reduced app on.
- qFileSizeinteger
The filesize of the reduced app.
-
Errors
arrayExportReducedData(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
}
}
}
Retrieves any fields that belong to the same archipelago as the specified field and that match at least one of the specified tags.
Parameters
- qFieldNamestringRequired
Name of the field. This method looks for fields that belong to the same archipelago as this specified field.
- qTagsarray of stringsRequired
List of tags. This method looks for fields that match at least one of the tags in this list.
Response
- qFieldNamesarray of objects
qFieldNames properties
- qNamestring
Name of the field.
- qTagsarray of strings
List of tags.
-
Errors
arrayFindMatchingFields(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"
]
}
]
}
}
Forward()
const result = await doc.Forward({})
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "Forward"
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {}
}
Returns the number of entries on the Forward stack.
Response
- qReturninteger
Errors
arrayForwardCount()
const result = await doc.ForwardCount({})
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "ForwardCount"
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qReturn": 123
}
}
Returns the identifier and the type of any generic object in the app.
Response
- qInfosarray of objects
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
arrayGetAllInfos()
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"
}
]
}
}
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
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.
qMeta properties
- qNamestring
Name. This property is optional.
-
- qLocaleInfoobject
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
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.
- qThumbnailobjectIn addition, this structure can return dynamic properties.
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
arrayGetAppLayout()
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"
}
}
}
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
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.
- qThumbnailobjectIn addition, this structure can contain dynamic properties.
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
arrayGetAppProperties()
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"
}
}
}
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
- qTable1stringRequired
Name of the first table.
- qTable2stringRequired
Name of the second table.
Response
- qScorearray of objects
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
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
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
arrayGetAssociationScores(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
}
}
]
}
}
Returns the handle of a bookmark.
Parameters
- qIdstringRequired
Identifier of the bookmark.
Response
- qReturnobject
qReturn properties
- qTypestring
The native type of the object.
- qHandleinteger
The handle used to connect to object.
- qGenericTypestring
The type of the object.
- qGenericIdstring
Object ID.
-
Errors
arrayGetBookmark(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"
}
}
}
Returns all bookmarks compatible with options.
Parameters
- qOptionsobjectRequired
Bookmark type filter and requested properties.
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
qList properties
- qInfoobject
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.
qMeta properties
- qNamestring
Name. This property is optional.
-
- qDataobject
Contains dynamic JSON data specified by the client.
-
Errors
arrayGetBookmarks(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": {}
}
]
}
}
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
- qConnectionIdstringRequired
Identifier of the connection.
Response
- qConnectionobject
qConnection properties
- qIdstring
Identifier of the connection. Is generated by the engine and is unique.
- qNamestring
Name of the connection. This parameter is mandatory and must be set when creating or modifying a connection.
- qConnectionStringstring
One of:
- ODBC CONNECT TO [<provider name>]
- OLEDB CONNECT TO [<provider name>]
- CUSTOM CONNECT TO [<provider name>]
- "<local absolute or relative path, UNC path>"
- "<URL>"
Connection string. This parameter is mandatory and must be set when creating or modifying a connection.
- qTypestring
One of:
- ODBC
- OLEDB
- <Name of the custom connection file>
- folder
- internet
Type of the connection. This parameter is mandatory and must be set when creating or modifying a connection. For ODBC, OLEDB and custom connections, the engine checks that the connection type matches the connection string. The type is not case sensitive.
- qUserNamestring
Name of the user who creates the connection. This parameter is optional; it is only used for OLEDB, ODBC and CUSTOM connections. A call to GetConnection Method does not return the user name.
- qPasswordstring
Password of the user who creates the connection. This parameter is optional; it is only used for OLEDB, ODBC and CUSTOM connections. A call to GetConnection Method does not return the password.
- qModifiedDatestring
Is generated by the engine. Creation date of the connection or last modification date of the connection.
- qMetaobject
Layout for NxMetaDef.
qMeta properties
- qNamestring
Name. This property is optional.
-
- qLogOnstring
Can be one of: "LOG_ON_SERVICE_USER""LOG_ON_CURRENT_USER"
-
Errors
arrayGetConnection(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"
}
}
}
Lists the connections in an app.
Response
- qConnectionsarray of objects
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.
qMeta properties
- qNamestring
Name. This property is optional.
-
- qLogOnstring
Can be one of: "LOG_ON_SERVICE_USER""LOG_ON_CURRENT_USER"
-
Errors
arrayGetConnections()
const result = await doc.GetConnections({})
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "GetConnections"
}
Response