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.
GenericBookmark
Applies a bookmark.
Response
- qSuccessboolean
Errors
arrayApply()
const result = await genericBookmark.Apply({})
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "Apply"
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qSuccess": true
}
}
Applies a bookmark and verify result dataset against originally selected values.
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
arrayApplyAndVerify()
const result = await genericBookmark.ApplyAndVerify({})
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "ApplyAndVerify"
}
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 patch to the properties of an object. Allows an update to some of the properties. It should not be possible to patch "/qInfo/qId", and it will be forbidden in the near future.
Parameters
- qPatchesarray of objectsRequired
Array of patches.
qPatches properties
- qOpstring
Can be one of: "add""remove""replace"
- qPathstring
Path to the property to add, remove or replace.
- qValuestring
This parameter is not used in a remove operation. Corresponds to the value of the property to add or to the new value of the property to update. Examples: "false", "2", ""New title""
-
Response
objectErrors
arrayApplyPatches(qPatches)
const result = await genericBookmark.ApplyPatches([
[
{
"qOp": "add",
"qPath": "value",
"qValue": "value"
}
]
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "ApplyPatches",
"params": {
"qPatches": [
{
"qOp": "add",
"qPath": "value",
"qValue": "value"
}
]
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {}
}
Adds the generic bookmark to the list of approved objects
Response
objectErrors
arrayApprove()
const result = await genericBookmark.Approve({})
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "Approve"
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {}
}
Retrieves the values of a field for the default state.
Fieldvalue
Name | Description | Type |
---|---|---|
qText | Text related to the field value. | String |
qIsNumeric | Is set to true if the value is a numeric. Default is false. |
Boolean |
qNumber | Numeric value of the field. This parameter is displayed if qIsNumeric is set to true. |
Double |
Parameters
- qFieldstringRequired
Name of the field.
- qGetExcludedValuesbooleanRequired
If set to true, only NOT-selected values are returned.
- qDataPageobjectRequired
Range of returned values.
qDataPage properties
- qStartIndexinteger
The start value of the range.
- qEndIndexinteger
The end value of the range.
-
Response
- qFieldValuesarray of objects
qFieldValues 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
arrayGetFieldValues(qField, qGetExcludedValues, qDataPage)
const result = await genericBookmark.GetFieldValues([
"value",
true,
{
"qStartIndex": 123,
"qEndIndex": 123
}
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "GetFieldValues",
"params": {
"qField": "value",
"qGetExcludedValues": true,
"qDataPage": {
"qStartIndex": 123,
"qEndIndex": 123
}
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qFieldValues": [
{
"qText": "value",
"qIsNumeric": true,
"qNumber": 123
}
]
}
}
Retrieves the values of a field per state.
Fieldvalue
Name | Description | Type |
---|---|---|
qText | Text related to the field value. | String |
qIsNumeric | Is set to true if the value is a numeric. Default is false. |
Boolean |
qNumber | Numeric value of the field. This parameter is displayed if qIsNumeric is set to true. |
Double |
Parameters
- qFieldstringRequired
Name of the field.
- qGetExcludedValuesbooleanRequired
When to true, only NOT-selected values are returned.
- qDataPagesobjectRequired
Range of returned values per state, an empty array will return the values of all states. Only one page without a state name returns the values for all states, using the start and end indices of the first page.
qDataPages properties
- qStatePagesarray of objects
Bookmark field pages for different states.
qStatePages properties
- qStateNamestring
The name of the selected state.
- qStartIndexinteger
The start value of the range.
- qEndIndexinteger
The end value of the range.
-
-
Response
- qFieldValuesarray of objects
qFieldValues properties
- qStateNamestring
Name of the state.
- qFieldValuesarray of objects
The field values associated with the state.
qFieldValues 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
arrayGetFieldValuesEx(qField, qGetExcludedValues, qDataPages)
const result = await genericBookmark.GetFieldValuesEx([
"value",
true,
{
"qStatePages": [
{
"qStateName": "$",
"qStartIndex": 123,
"qEndIndex": 123
}
]
}
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "GetFieldValuesEx",
"params": {
"qField": "value",
"qGetExcludedValues": true,
"qDataPages": {
"qStatePages": [
{
"qStateName": "$",
"qStartIndex": 123,
"qEndIndex": 123
}
]
}
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qFieldValues": [
{
"qStateName": "value",
"qFieldValues": [
{
"qText": "value",
"qIsNumeric": true,
"qNumber": 123
}
]
}
]
}
}
Returns:
- The type of the object.
- The identifier of the object.
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.
-
Errors
arrayGetInfo()
const result = await genericBookmark.GetInfo({})
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "GetInfo"
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qInfo": {
"qId": "value",
"qType": "value"
}
}
}
Evaluates an object and displays its properties including the dynamic properties. If the member delta is set to true in the request object, only the delta is evaluated.
Response
- qLayoutobject
Is the layout for GenericBookmarkProperties.
qLayout 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.
-
- qBookmarkobject
qBookmark properties
- qStateDataarray of objects
List of selections for each state.
qStateData properties
- qStateNamestring
Name of the alternate state. Default is current selections: $
- qFieldItemsarray of objects
List of the selections.
qFieldItems properties
- qDefobject
qDef properties
- qNamestring
Name of the field.
- qTypestring
Can be one of: "NOT_PRESENT""PRESENT""IS_CYCLIC_GROUP""IS_DRILL_GROUP""IS_VAR""IS_EXPR""IS_IMPLICIT""IS_DETAIL"
-
- qLockedboolean
Indicates if the field is locked. Default is false.
- qSelectInfoobject
qSelectInfo properties
- qTextSearchstring
Text search string. Everything that matches the text is selected. This parameter is optional.
- qRangeLonumber
Lower value of the search range. This parameter is used when performing range selections or text searches in dimensions. Default is Null.
- qRangeHinumber
Highest value of the search range. This parameter is used when performing range selections or text searches in dimensions. Default is Null.
- 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.
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: ,
- qRangeInfoarray of objects
This parameter is used when performing range selections or text searches in measures. Gives information about the range of selections.
qRangeInfo properties
- qRangeLonumber
Lowest value in the range.
- qRangeHinumber
Highest value in the range.
- qMeasurestring
Label of the measure.
-
- qSoftLockboolean
Set to true to ignore locks; in that case, locked fields can be selected. The default value is false.
- qContinuousRangeInfoarray of objects
List of information about ranges for selections.
qContinuousRangeInfo properties
- qMinnumber
Lowest value in the range
- qMaxnumber
Highest value in the range
- qMinInclEqboolean
If set to true, the range includes the lowest value in the range of selections (Equals to ). [bn(50500)] Example: The range is [1,10]. If qMinInclEq is set to true it means that 1 is included in the range of selections.
- qMaxInclEqboolean
If set to true, the range includes the highest value in the range of selections (Equals to ). [bn(50500)] Example: The range is [1,10]. If qMinInclEq is set to true it means that 10 is included in the range of selections.
-
- qSelectFieldSearchboolean
This parameter is true if the TextSearch is a result of a Select Field operation.
-
- qValuesarray of objects
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.
-
- qExcludedValuesarray of objects
List of excluded values. Either the list of selected values or the list of excluded values is displayed.
qExcludedValues 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.
-
- qAndModeboolean
If set to true, selections within a list object are made in AND mode; If you have a list object that lists all customers, by selecting Customer 1 and Customer 2 while in and-mode, all records that are associated with Customer 1 and Customer 2 are selected. The default value is false; selections within a list object are made in OR mode. If you have a list object that lists all customers, by selecting Customer 1 and Customer 2 while in or-mode, all records that are associated with either Customer 1 or Customer 2 are selected. This parameter is not returned if set to false.
- qOneAndOnlyOneboolean
If set to true, the field has always one selection (not 0 and not more than 1). If another value is selected, the previous one is unselected. The default value is false. This parameter is not returned if set to false.
-
-
- qUtcModifyTimenumber
Time when the bookmark was created.
- qVariableItemsarray of objects
List of the variables in the app at the time the bookmark was created.
qVariableItems properties
- qNamestring
Name of the variable.
- 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.
-
- qDefinitionstring
The Reporting mode definition of the variable.
-
- qPatchesarray of objects
Softpatches to be applied with this bookmark.
qPatches 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.
-
- qPatchesarray of objects
Array with patches.
qPatches properties
- qOpstring
Can be one of: "add""remove""replace"
- qPathstring
Path to the property to add, remove or replace.
- qValuestring
This parameter is not used in a remove operation. Corresponds to the value of the property to add or to the new value of the property to update. Examples: "false", "2", ""New title""
-
- qChildrenarray of undefineds
Array with child objects and their patches.
-
- qCyclicGroupStatesarray of objects
Information about cyclic groups by zero-based index. This field is unused.
qCyclicGroupStates 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.
-
- qActiveFieldinteger
Active field of the cyclic group, identified by a zero-based index.
-
- qGroupStatesarray of objectsExperimental
Information about cyclic groups indexed by field definition.
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.
-
-
- qFieldInfosarray of objects
Information about the field selections associated with the bookmark.
qFieldInfos properties
- qFieldNamestring
The name of the field.
- qValuesCountinteger
Number of selected values in the field.
- qExcludedValuesCountinteger
Number of excluded values in the field.
-
-
Errors
arrayGetLayout()
const result = await genericBookmark.GetLayout({})
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "GetLayout"
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qLayout": {
"qInfo": {
"qId": "value",
"qType": "value"
},
"qMeta": {
"qName": "value"
},
"qBookmark": {
"qStateData": [
{
"qStateName": "value",
"qFieldItems": [
{
"qDef": {
"qName": "value",
"qType": "NOT_PRESENT"
},
"qLocked": true,
"qSelectInfo": {
"qTextSearch": "value",
"qRangeLo": -1e+300,
"qRangeHi": -1e+300,
"qNumberFormat": {
"qType": "U",
"qnDec": 10,
"qUseThou": 123,
"qFmt": "value",
"qDec": "value",
"qThou": "value"
},
"qRangeInfo": [
{
"qRangeLo": -1e+300,
"qRangeHi": -1e+300,
"qMeasure": "value"
}
],
"qSoftLock": true,
"qContinuousRangeInfo": [
{
"qMin": 123,
"qMax": 123,
"qMinInclEq": true,
"qMaxInclEq": true
}
],
"qSelectFieldSearch": true
},
"qValues": [
{
"qText": "value",
"qIsNumeric": true,
"qNumber": 123
}
],
"qExcludedValues": [
{
"qText": "value",
"qIsNumeric": true,
"qNumber": 123
}
],
"qAndMode": true,
"qOneAndOnlyOne": true
}
]
}
],
"qUtcModifyTime": 123,
"qVariableItems": [
{
"qName": "value",
"qValue": {
"qText": "value",
"qIsNumeric": true,
"qNumber": 123
},
"qDefinition": "value"
}
],
"qPatches": [
{
"qInfo": {
"qId": "value",
"qType": "value"
},
"qPatches": [
{
"qOp": "add",
"qPath": "value",
"qValue": "value"
}
],
"qChildren": []
}
],
"qCyclicGroupStates": [
{
"qInfo": {
"qId": "value",
"qType": "value"
},
"qActiveField": 123
}
],
"qGroupStates": [
{
"qInfo": {
"qId": "value",
"qType": "value"
},
"qActiveFieldDef": "value"
}
]
},
"qFieldInfos": [
{
"qFieldName": "value",
"qValuesCount": 123,
"qExcludedValuesCount": 123
}
]
}
}
}
Shows the properties of an object.
Response
- qPropobject
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.
-
Errors
arrayGetProperties()
const result = await genericBookmark.GetProperties({})
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "GetProperties"
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qProp": {
"qInfo": {
"qId": "value",
"qType": "value"
},
"qMetaDef": {},
"qIncludeVariables": true,
"qDistinctValues": true
}
}
}
Publishes a bookmark.
Response
objectErrors
arrayPublish()
const result = await genericBookmark.Publish({})
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "Publish"
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {}
}
Sets some properties for a bookmark.
Parameters
- qPropobjectRequired
Information about the bookmark.
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
objectErrors
arraySetProperties(qProp)
const result = await genericBookmark.SetProperties([
{
"qInfo": {
"qId": "value",
"qType": "value"
},
"qMetaDef": {},
"qIncludeVariables": true,
"qDistinctValues": true
}
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "SetProperties",
"params": {
"qProp": {
"qInfo": {
"qId": "value",
"qType": "value"
},
"qMetaDef": {},
"qIncludeVariables": true,
"qDistinctValues": true
}
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {}
}
Removes the generic bookmark from the list of approved objects
Response
objectErrors
arrayUnApprove()
const result = await genericBookmark.UnApprove({})
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "UnApprove"
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {}
}
Unpublishes a bookmark.
Response
objectErrors
arrayUnPublish()
const result = await genericBookmark.UnPublish({})
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "UnPublish"
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {}
}