Conditions

Conditions are used by features such as data alerting and subscriptions to determine when action should be taken, based on data in a Qlik app.

Creates a new condition.

Facts

Rate limit Tier 2 (100 requests per minute)

Request Body

The condition create request definition.

  • application/json object

    only one of compoundCondition or dataCondition should be set

    Show application/json properties
    • type string
      Required

      Indicates the condition type

      Can be one of: "compound""data"

    • dataCondition object

      A condition based on data within an app

      Show dataCondition properties
      • headers array of strings

        List of header labels

      • history object

        History properties

        Show history properties
        • enabled boolean

          Is history enabled

      • measures array of objects

        List of returned measures

        Show measures properties
        • title string

          Measure title

        • qLibraryId string

          Refers to a measure stored in the library

        • qNumFormat object

          Format of the field

      • dimensions array of objects

        List of returned dimensions

        Show dimensions properties
        • field string

          Field referred to the dimension where the selection is made. This may be used to generate deep links.

        • title string

          Dimension title

        • qLibraryId string

          Refers to a dimension stored in the library

      • selections array of objects

        List of fields according to the bookmark definition

        Show selections properties
        • count number

          The count

        • field string

          Field name

        • selectedSummary array of strings

          Array of selected

      • conditionBase object

        A base condition

        Show conditionBase properties
        • type string

          Indicates the condition type

          Can be one of: "compound""data"

        • appId string

          The id of the app the condition is evaluated against

        • bookmarkId string

          The bookmark corresponding to the selection state to apply to the app at evaluation time

        • description string

          Description of the condition

      • conditionData object

        List of parameters specific to data condition are available in DCE and will be passed as is to DCE as per the API docs of data-condition-evaluator

    • compoundCondition object

      A condition made up of other conditions

      Show compoundCondition properties
      • data object

        Condition data

        Show data properties
        • history object

          History properties

          Show history properties
          • enabled boolean

            Is history enabled

        • conditions array of strings

          Array of condition ids

        • expression string

          Boolean expression made up of variable names defined from the conditions section

      • conditionBase object

        A base condition

        Show conditionBase properties
        • type string

          Indicates the condition type

          Can be one of: "compound""data"

        • appId string

          The id of the app the condition is evaluated against

        • bookmarkId string

          The bookmark corresponding to the selection state to apply to the app at evaluation time

        • description string

          Description of the condition

Responses

201

Condition created

  • application/json object
    Show application/json properties
    • errors array of objects
      Show errors properties
      • code string

        Error code specific to condition manager.

      • meta object
      • title string

        Error title.

      • detail string

        Error cause.

    • condition object

      only one of compoundCondition or dataCondition should be set

      Show condition properties
      • type string
        Required

        Indicates the condition type

        Can be one of: "compound""data"

      • ownerId string

        UserID of the condition owner

      • tenantId string

        The tenant id

      • dataCondition object

        A condition based on data within an app

        Show dataCondition properties
        • headers array of strings

          List of header labels

        • history object

          History properties

          Show history properties
          • enabled boolean

            Is history enabled

        • measures array of objects

          List of returned measures

          Show measures properties
          • title string

            Measure title

          • qLibraryId string

            Refers to a measure stored in the library

          • qNumFormat object

            Format of the field

        • dimensions array of objects

          List of returned dimensions

          Show dimensions properties
          • field string

            Field referred to the dimension where the selection is made. This may be used to generate deep links.

          • title string

            Dimension title

          • qLibraryId string

            Refers to a dimension stored in the library

        • selections array of objects

          List of fields according to the bookmark definition

          Show selections properties
          • count number

            The count

          • field string

            Field name

          • selectedSummary array of strings

            Array of selected

        • conditionBase object

          A base condition

          Show conditionBase properties
          • id string

            The unique id for the resource

          • type string

            Indicates the condition type

            Can be one of: "compound""data"

          • appId string

            The id of the app the condition is evaluated against

          • created string

            When the resource was created

          • ownerId string

            The id of the user the user which owns the condition

          • updated string

            When the resource was last updated

          • tenantId string

            The tenant id

          • bookmarkId string

            The bookmark corresponding to the selection state to apply to the app at evaluation time

          • createdById string

            The id of the user which created the condition

          • description string

            Description of the condition

          • lastReloadTime string

            The time of the last reload, if the scan is triggered by a reload. If exists and value does not match app's last reload time, the evaluation will fail.

        • conditionData object

          List of parameters specific to data condition are available in DCE and will be passed as is to DCE as per the API docs of data-condition-evaluator

      • compoundCondition object

        A condition made up of other conditions

        Show compoundCondition properties
        • data object

          Condition data

          Show data properties
          • history object

            History properties

            Show history properties
            • enabled boolean

              Is history enabled

          • conditions array of strings

            Array of condition ids

          • expression string

            Boolean expression made up of variable names defined from the conditions section

        • conditionBase object

          A base condition

          Show conditionBase properties
          • id string

            The unique id for the resource

          • type string

            Indicates the condition type

            Can be one of: "compound""data"

          • appId string

            The id of the app the condition is evaluated against

          • created string

            When the resource was created

          • ownerId string

            The id of the user the user which owns the condition

          • updated string

            When the resource was last updated

          • tenantId string

            The tenant id

          • bookmarkId string

            The bookmark corresponding to the selection state to apply to the app at evaluation time

          • createdById string

            The id of the user which created the condition

          • description string

            Description of the condition

          • lastReloadTime string

            The time of the last reload, if the scan is triggered by a reload. If exists and value does not match app's last reload time, the evaluation will fail.

400

Bad request body

  • application/json object
    Show application/json properties
    • errors array of objects

      Array of errors

      Show errors properties
      • code string

        Error code specific to condition manager.

      • meta object

        meta properties for an error.

      • title string

        Error title.

      • detail string

        Error cause.

    • traceId string

      trace id

default

Error response.

  • application/json object
    Show application/json properties
    • errors array of objects

      Array of errors

      Show errors properties
      • code string

        Error code specific to condition manager.

      • meta object

        meta properties for an error.

      • title string

        Error title.

      • detail string

        Error cause.

    • traceId string

      trace id

POST /api/v1/conditions
import { createQlikApi } from '@qlik/api'
const qlik = createQlikApi({
hostConfig: {
host: 'https://{tenant}.{region}.qlikcloud.com',
apiKey: '<access-token>',
},
})
await qlik.conditions.createCondition({
compoundCondition: {
conditionBase: {
appId: '4xQ1chLoHkOikyzUGcHJquteNrAfketW',
bookmarkId:
'anTjnOABmxlCirVx8IRfhWhLd9IZjENl',
description: 'My condition',
type: 'compound',
},
data: {
conditions: [
'rDDAcMEI1V0qzauEWepEVY8oSLJ9fvA2',
'qFPF1dAtPK4vfPTmKyyuKaqA6iERCwLi',
'4gnz8E6ZruG0lkSKwkau66P24CtORyLr',
'ATs--Z0b_NGyuHajcbQkxu7RrajgPaEQ',
],
expression: '($0 OR $1) AND ($2 OR $3)',
history: { enabled: true },
},
},
dataCondition: {
conditionBase: {
appId: '4xQ1chLoHkOikyzUGcHJquteNrAfketW',
bookmarkId:
'anTjnOABmxlCirVx8IRfhWhLd9IZjENl',
description: 'My condition',
type: 'compound',
},
conditionData: {},
dimensions: [
{
field: 'Neighborhood',
qLibraryId: 'PgQKNQ',
title: 'Neighborhood',
},
],
headers: ['sumnum'],
history: { enabled: true },
measures: [
{
qLibraryId: 'PgQKNQ',
qNumFormat: {
qDec: '.',
qFmt: '###0',
qType: 'I',
qnDec: 0,
qUseThou: 1,
},
title: 'sumnum',
},
],
selections: [
{
count: 2,
field: 'SalesTerritoryCountry',
selectedSummary: [],
},
],
},
type: 'compound',
})
qlik condition create \
--type 'compound'
curl "https://{tenant}.{region}.qlikcloud.com/api/v1/conditions" \
-X POST \
-H "Content-type: application/json" \
-H "Authorization: Bearer <access_token>" \
-d '{"type":"compound","dataCondition":{"headers":["sumnum"],"history":{"enabled":true},"measures":[{"title":"sumnum","qLibraryId":"PgQKNQ","qNumFormat":{"qDec":".","qFmt":"###0","qType":"I","qnDec":0,"qUseThou":1}}],"dimensions":[{"field":"Neighborhood","title":"Neighborhood","qLibraryId":"PgQKNQ"}],"selections":[{"count":2,"field":"SalesTerritoryCountry","selectedSummary":"[ Germany, Australia ]"}],"conditionBase":{"type":"compound","appId":"4xQ1chLoHkOikyzUGcHJquteNrAfketW","bookmarkId":"anTjnOABmxlCirVx8IRfhWhLd9IZjENl","description":"My condition"},"conditionData":{}},"compoundCondition":{"data":{"history":{"enabled":true},"conditions":["rDDAcMEI1V0qzauEWepEVY8oSLJ9fvA2","qFPF1dAtPK4vfPTmKyyuKaqA6iERCwLi","4gnz8E6ZruG0lkSKwkau66P24CtORyLr","ATs--Z0b_NGyuHajcbQkxu7RrajgPaEQ"],"expression":"($0 OR $1) AND ($2 OR $3)"},"conditionBase":{"type":"compound","appId":"4xQ1chLoHkOikyzUGcHJquteNrAfketW","bookmarkId":"anTjnOABmxlCirVx8IRfhWhLd9IZjENl","description":"My condition"}}}'

Example Response

{
"errors": [
{
"code": "string",
"meta": {},
"title": "string",
"detail": "string"
}
],
"condition": {
"type": "compound",
"ownerId": "EIwSIgqjmbHGwQJI0ShQoS3ORdz5nCpA",
"tenantId": "5GI7yWoJk9lvNtuEc66SXCypXVfhbVeH",
"dataCondition": {
"headers": [
"sumnum"
],
"history": {
"enabled": true
},
"measures": [
{
"title": "sumnum",
"qLibraryId": "PgQKNQ",
"qNumFormat": {
"qDec": ".",
"qFmt": "###0",
"qType": "I",
"qnDec": 0,
"qUseThou": 1
}
}
],
"dimensions": [
{
"field": "Neighborhood",
"title": "Neighborhood",
"qLibraryId": "PgQKNQ"
}
],
"selections": [
{
"count": 2,
"field": "SalesTerritoryCountry",
"selectedSummary": "[ Germany, Australia ]"
}
],
"conditionBase": {
"id": "5f31c6e8476ae50001030fb6",
"type": "compound",
"appId": "4xQ1chLoHkOikyzUGcHJquteNrAfketW",
"created": "2006-01-02T15:04:05Z07:00",
"ownerId": "EIwSIgqjmbHGwQJI0ShQoS3ORdz5nCpA",
"updated": "2006-01-02T14:04:05Z07:00",
"tenantId": "5GI7yWoJk9lvNtuEc66SXCypXVfhbVeH",
"bookmarkId": "anTjnOABmxlCirVx8IRfhWhLd9IZjENl",
"createdById": "EIwSIgqjmbHGwQJI0ShQoS3ORdz5nCpA",
"description": "My condition",
"lastReloadTime": "2006-01-02T15:04:05Z07:00"
},
"conditionData": {}
},
"compoundCondition": {
"data": {
"history": {
"enabled": true
},
"conditions": [
"rDDAcMEI1V0qzauEWepEVY8oSLJ9fvA2",
"qFPF1dAtPK4vfPTmKyyuKaqA6iERCwLi",
"4gnz8E6ZruG0lkSKwkau66P24CtORyLr",
"ATs--Z0b_NGyuHajcbQkxu7RrajgPaEQ"
],
"expression": "($0 OR $1) AND ($2 OR $3)"
},
"conditionBase": {
"id": "5f31c6e8476ae50001030fb6",
"type": "compound",
"appId": "4xQ1chLoHkOikyzUGcHJquteNrAfketW",
"created": "2006-01-02T15:04:05Z07:00",
"ownerId": "EIwSIgqjmbHGwQJI0ShQoS3ORdz5nCpA",
"updated": "2006-01-02T14:04:05Z07:00",
"tenantId": "5GI7yWoJk9lvNtuEc66SXCypXVfhbVeH",
"bookmarkId": "anTjnOABmxlCirVx8IRfhWhLd9IZjENl",
"createdById": "EIwSIgqjmbHGwQJI0ShQoS3ORdz5nCpA",
"description": "My condition",
"lastReloadTime": "2006-01-02T15:04:05Z07:00"
}
}
}
}

Retrieve a specific condition by id.

Facts

Rate limit Tier 1 (1000 requests per minute)

Path Parameters

  • id string
    Required

    The id of the condition

Responses

200

The condition

  • application/json object

    only one of compoundCondition or dataCondition should be set

    Show application/json properties
    • type string
      Required

      Indicates the condition type

      Can be one of: "compound""data"

    • ownerId string

      UserID of the condition owner

    • tenantId string

      The tenant id

    • dataCondition object

      A condition based on data within an app

      Show dataCondition properties
      • headers array of strings

        List of header labels

      • history object

        History properties

        Show history properties
        • enabled boolean

          Is history enabled

      • measures array of objects

        List of returned measures

        Show measures properties
        • title string

          Measure title

        • qLibraryId string

          Refers to a measure stored in the library

        • qNumFormat object

          Format of the field

      • dimensions array of objects

        List of returned dimensions

        Show dimensions properties
        • field string

          Field referred to the dimension where the selection is made. This may be used to generate deep links.

        • title string

          Dimension title

        • qLibraryId string

          Refers to a dimension stored in the library

      • selections array of objects

        List of fields according to the bookmark definition

        Show selections properties
        • count number

          The count

        • field string

          Field name

        • selectedSummary array of strings

          Array of selected

      • conditionBase object

        A base condition

        Show conditionBase properties
        • id string

          The unique id for the resource

        • type string

          Indicates the condition type

          Can be one of: "compound""data"

        • appId string

          The id of the app the condition is evaluated against

        • created string

          When the resource was created

        • ownerId string

          The id of the user the user which owns the condition

        • updated string

          When the resource was last updated

        • tenantId string

          The tenant id

        • bookmarkId string

          The bookmark corresponding to the selection state to apply to the app at evaluation time

        • createdById string

          The id of the user which created the condition

        • description string

          Description of the condition

        • lastReloadTime string

          The time of the last reload, if the scan is triggered by a reload. If exists and value does not match app's last reload time, the evaluation will fail.

      • conditionData object

        List of parameters specific to data condition are available in DCE and will be passed as is to DCE as per the API docs of data-condition-evaluator

    • compoundCondition object

      A condition made up of other conditions

      Show compoundCondition properties
      • data object

        Condition data

        Show data properties
        • history object

          History properties

          Show history properties
          • enabled boolean

            Is history enabled

        • conditions array of strings

          Array of condition ids

        • expression string

          Boolean expression made up of variable names defined from the conditions section

      • conditionBase object

        A base condition

        Show conditionBase properties
        • id string

          The unique id for the resource

        • type string

          Indicates the condition type

          Can be one of: "compound""data"

        • appId string

          The id of the app the condition is evaluated against

        • created string

          When the resource was created

        • ownerId string

          The id of the user the user which owns the condition

        • updated string

          When the resource was last updated

        • tenantId string

          The tenant id

        • bookmarkId string

          The bookmark corresponding to the selection state to apply to the app at evaluation time

        • createdById string

          The id of the user which created the condition

        • description string

          Description of the condition

        • lastReloadTime string

          The time of the last reload, if the scan is triggered by a reload. If exists and value does not match app's last reload time, the evaluation will fail.

404

Resource does not exist.

  • application/json object
    Show application/json properties
    • errors array of objects

      Array of errors

      Show errors properties
      • code string

        Error code specific to condition manager.

      • meta object

        meta properties for an error.

      • title string

        Error title.

      • detail string

        Error cause.

    • traceId string

      trace id

default

Error response.

  • application/json object
    Show application/json properties
    • errors array of objects

      Array of errors

      Show errors properties
      • code string

        Error code specific to condition manager.

      • meta object

        meta properties for an error.

      • title string

        Error title.

      • detail string

        Error cause.

    • traceId string

      trace id

GET /api/v1/conditions/{id}
import { createQlikApi } from '@qlik/api'
const qlik = createQlikApi({
hostConfig: {
host: 'https://{tenant}.{region}.qlikcloud.com',
apiKey: '<access-token>',
},
})
await qlik.conditions.getCondition(
'TiQ8GPVr8qI714Lp5ChAAFFaU24MJy69',
)
qlik condition get 'TiQ8GPVr8qI714Lp5ChAAFFaU24MJy69'
curl "https://{tenant}.{region}.qlikcloud.com/api/v1/conditions/{id}" \
-H "Authorization: Bearer <access_token>"

Example Response

{
"type": "compound",
"ownerId": "EIwSIgqjmbHGwQJI0ShQoS3ORdz5nCpA",
"tenantId": "5GI7yWoJk9lvNtuEc66SXCypXVfhbVeH",
"dataCondition": {
"headers": [
"sumnum"
],
"history": {
"enabled": true
},
"measures": [
{
"title": "sumnum",
"qLibraryId": "PgQKNQ",
"qNumFormat": {
"qDec": ".",
"qFmt": "###0",
"qType": "I",
"qnDec": 0,
"qUseThou": 1
}
}
],
"dimensions": [
{
"field": "Neighborhood",
"title": "Neighborhood",
"qLibraryId": "PgQKNQ"
}
],
"selections": [
{
"count": 2,
"field": "SalesTerritoryCountry",
"selectedSummary": "[ Germany, Australia ]"
}
],
"conditionBase": {
"id": "5f31c6e8476ae50001030fb6",
"type": "compound",
"appId": "4xQ1chLoHkOikyzUGcHJquteNrAfketW",
"created": "2006-01-02T15:04:05Z07:00",
"ownerId": "EIwSIgqjmbHGwQJI0ShQoS3ORdz5nCpA",
"updated": "2006-01-02T14:04:05Z07:00",
"tenantId": "5GI7yWoJk9lvNtuEc66SXCypXVfhbVeH",
"bookmarkId": "anTjnOABmxlCirVx8IRfhWhLd9IZjENl",
"createdById": "EIwSIgqjmbHGwQJI0ShQoS3ORdz5nCpA",
"description": "My condition",
"lastReloadTime": "2006-01-02T15:04:05Z07:00"
},
"conditionData": {}
},
"compoundCondition": {
"data": {
"history": {
"enabled": true
},
"conditions": [
"rDDAcMEI1V0qzauEWepEVY8oSLJ9fvA2",
"qFPF1dAtPK4vfPTmKyyuKaqA6iERCwLi",
"4gnz8E6ZruG0lkSKwkau66P24CtORyLr",
"ATs--Z0b_NGyuHajcbQkxu7RrajgPaEQ"
],
"expression": "($0 OR $1) AND ($2 OR $3)"
},
"conditionBase": {
"id": "5f31c6e8476ae50001030fb6",
"type": "compound",
"appId": "4xQ1chLoHkOikyzUGcHJquteNrAfketW",
"created": "2006-01-02T15:04:05Z07:00",
"ownerId": "EIwSIgqjmbHGwQJI0ShQoS3ORdz5nCpA",
"updated": "2006-01-02T14:04:05Z07:00",
"tenantId": "5GI7yWoJk9lvNtuEc66SXCypXVfhbVeH",
"bookmarkId": "anTjnOABmxlCirVx8IRfhWhLd9IZjENl",
"createdById": "EIwSIgqjmbHGwQJI0ShQoS3ORdz5nCpA",
"description": "My condition",
"lastReloadTime": "2006-01-02T15:04:05Z07:00"
}
}
}

Patch values in the condition

Facts

Rate limit Tier 2 (100 requests per minute)

Path Parameters

  • id string
    Required

    The id of the condition

Request Body

  • application/json array of objects

    A JSON Patch document as defined in https://datatracker.ietf.org/doc/html/rfc6902.

    Show application/json properties
    • op string
      Required

      The operation to be performed.

      Can be one of: "replace""remove""add"

    • path string
      Required

      The path for the given resource field to patch.

    • value object

      The value to be used for this operation.

Responses

204

The condition was updated

400

A path or value was invalid

  • application/json object
    Show application/json properties
    • errors array of objects

      Array of errors

      Show errors properties
      • code string

        Error code specific to condition manager.

      • meta object

        meta properties for an error.

      • title string

        Error title.

      • detail string

        Error cause.

    • traceId string

      trace id

404

Resource does not exist.

  • application/json object
    Show application/json properties
    • errors array of objects

      Array of errors

      Show errors properties
      • code string

        Error code specific to condition manager.

      • meta object

        meta properties for an error.

      • title string

        Error title.

      • detail string

        Error cause.

    • traceId string

      trace id

default

Error response

  • application/json object
    Show application/json properties
    • errors array of objects

      Array of errors

      Show errors properties
      • code string

        Error code specific to condition manager.

      • meta object

        meta properties for an error.

      • title string

        Error title.

      • detail string

        Error cause.

    • traceId string

      trace id

PATCH /api/v1/conditions/{id}
import { createQlikApi } from '@qlik/api'
const qlik = createQlikApi({
hostConfig: {
host: 'https://{tenant}.{region}.qlikcloud.com',
apiKey: '<access-token>',
},
})
await qlik.conditions.patchCondition(
'TiQ8GPVr8qI714Lp5ChAAFFaU24MJy69',
[
{
op: 'replace',
path: '/compoundCondition/conditionBase/ownerId',
value: 'I6mWVd60wRWIbOXZr1ZKV8QTnxhnitbX',
},
{
op: 'replace',
path: '/dataCondition/conditionBase/description',
value: 'My description',
},
{
op: 'remove',
path: '/compoundCondition/data/conditions/0',
},
{
op: 'replace',
path: '/compoundCondition//data/expression',
value: '$0 AND $1',
},
{
op: 'replace',
path: '/dataCondition/conditionData/measure',
value: 'revenue',
},
],
)
qlik condition patch 'TiQ8GPVr8qI714Lp5ChAAFFaU24MJy69' \
--op 'replace' \
--path '/compoundCondition/conditionBase/ownerId'
curl "https://{tenant}.{region}.qlikcloud.com/api/v1/conditions/{id}" \
-X PATCH \
-H "Content-type: application/json" \
-H "Authorization: Bearer <access_token>" \
-d '[{"op":"replace","path":"/compoundCondition/conditionBase/ownerId","value":"I6mWVd60wRWIbOXZr1ZKV8QTnxhnitbX"},{"op":"replace","path":"/dataCondition/conditionBase/description","value":"My description"},{"op":"remove","path":"/compoundCondition/data/conditions/0"},{"op":"replace","path":"/compoundCondition//data/expression","value":"$0 AND $1"},{"op":"replace","path":"/dataCondition/conditionData/measure","value":"revenue"}]'

Delete the condition

Facts

Rate limit Tier 2 (100 requests per minute)

Path Parameters

  • id string
    Required

    The id of the condition

Responses

204

The record was deleted.

404

Resource does not exist.

  • application/json object
    Show application/json properties
    • errors array of objects

      Array of errors

      Show errors properties
      • code string

        Error code specific to condition manager.

      • meta object

        meta properties for an error.

      • title string

        Error title.

      • detail string

        Error cause.

    • traceId string

      trace id

default

Error response

  • application/json object
    Show application/json properties
    • errors array of objects

      Array of errors

      Show errors properties
      • code string

        Error code specific to condition manager.

      • meta object

        meta properties for an error.

      • title string

        Error title.

      • detail string

        Error cause.

    • traceId string

      trace id

DELETE /api/v1/conditions/{id}
import { createQlikApi } from '@qlik/api'
const qlik = createQlikApi({
hostConfig: {
host: 'https://{tenant}.{region}.qlikcloud.com',
apiKey: '<access-token>',
},
})
await qlik.conditions.deleteCondition(
'TiQ8GPVr8qI714Lp5ChAAFFaU24MJy69',
)
qlik condition rm 'TiQ8GPVr8qI714Lp5ChAAFFaU24MJy69'
curl "https://{tenant}.{region}.qlikcloud.com/api/v1/conditions/{id}" \
-X DELETE \
-H "Authorization: Bearer <access_token>"

Executes the condition

Facts

Rate limit Tier 2 (100 requests per minute)

Path Parameters

  • id string
    Required

    The id of the condition

Request Body

  • application/json object
    Show application/json properties
    • alertId string

      The id of the alerting task the condition and evaluation is part of

    • contextId string
      Required

      Extra context information to carry through to the result if any

    • causalEvent object
      Required
      Show causalEvent properties
      • data object
        Show data properties
        • eventID string

          the event id from eventing service.

        • lastReloadTime string

          The time of the last reload

      • eventID string

        the event id from eventing

      • extensions object
        Show extensions properties
        • userID string
        • tenantID string
        • sessionID string
      • manualTrigger boolean
      • manualTriggerID string

        the manual trigger id from eventing if present

Responses

201

Condition evaluation created

  • application/json object
    Show application/json properties
    • errors array of objects
      Show errors properties
      • code string

        Error code specific to condition manager.

      • meta object
      • title string

        Error title.

      • detail string

        Error cause.

    • contextId string

      Extra context information to carry through to the result if any

    • evaluationId string

      Extra context information to carry through to the result if any

400

Bad request body

  • application/json object
    Show application/json properties
    • errors array of objects

      Array of errors

      Show errors properties
      • code string

        Error code specific to condition manager.

      • meta object

        meta properties for an error.

      • title string

        Error title.

      • detail string

        Error cause.

    • traceId string

      trace id

500

Internal server error.

  • application/json object
    Show application/json properties
    • errors array of objects

      Array of errors

      Show errors properties
      • code string

        Error code specific to condition manager.

      • meta object

        meta properties for an error.

      • title string

        Error title.

      • detail string

        Error cause.

    • traceId string

      trace id

default

Error response.

  • application/json object
    Show application/json properties
    • errors array of objects

      Array of errors

      Show errors properties
      • code string

        Error code specific to condition manager.

      • meta object

        meta properties for an error.

      • title string

        Error title.

      • detail string

        Error cause.

    • traceId string

      trace id

POST /api/v1/conditions/{id}/evaluations
import { createQlikApi } from '@qlik/api'
const qlik = createQlikApi({
hostConfig: {
host: 'https://{tenant}.{region}.qlikcloud.com',
apiKey: '<access-token>',
},
})
await qlik.conditions.createConditionEvaluation(
'TiQ8GPVr8qI714Lp5ChAAFFaU24MJy69',
{
alertId: '5f64885b2e11d23982c09e03',
causalEvent: {
data: {
eventID: 'string',
lastReloadTime:
'2006-01-02T15:04:05Z07:00',
},
eventID: 'string',
extensions: {
sessionID: 'string',
tenantID: 'string',
userID: 'string',
},
manualTrigger: true,
manualTriggerID: 'string',
},
contextId:
'795c75ba-7812-4c8f-9ced-551b6b006183',
},
)
qlik condition evaluation create \
--conditionId 'TiQ8GPVr8qI714Lp5ChAAFFaU24MJy69' \
--causalEvent-data-eventID 'string' \
--causalEvent-data-lastReloadTime '2006-01-02T15:04:05Z07:00' \
--causalEvent-eventID 'string' \
--causalEvent-extensions-sessionID 'string' \
--causalEvent-extensions-tenantID 'string' \
--causalEvent-extensions-userID 'string' \
--causalEvent-manualTrigger true \
--causalEvent-manualTriggerID 'string' \
--contextId '795c75ba-7812-4c8f-9ced-551b6b006183'
curl "https://{tenant}.{region}.qlikcloud.com/api/v1/conditions/{id}/evaluations" \
-X POST \
-H "Content-type: application/json" \
-H "Authorization: Bearer <access_token>" \
-d '{"alertId":"5f64885b2e11d23982c09e03","contextId":"795c75ba-7812-4c8f-9ced-551b6b006183","causalEvent":{"data":{"eventID":"string","lastReloadTime":"2006-01-02T15:04:05Z07:00"},"eventID":"string","extensions":{"userID":"string","tenantID":"string","sessionID":"string"},"manualTrigger":true,"manualTriggerID":"string"}}'

Example Response

{
"errors": [
{
"code": "string",
"meta": {},
"title": "string",
"detail": "string"
}
],
"contextId": "795c75ba-7812-4c8f-9ced-551b6b006183",
"evaluationId": "795c75ba-7812-4c8f-9ced-551b6b006183"
}

Get an Evaluation

Facts

Rate limit Tier 1 (1000 requests per minute)

Path Parameters

  • evaluationId string
    Required

    The id of the evaluation

  • id string
    Required

    The id of the condition

Responses

200

The evaluation

  • application/json object

    Get response returns the evaluation and condition associated

    Show application/json properties
    • condition object

      only one of compoundCondition or dataCondition should be set

      Show condition properties
      • type string
        Required

        Indicates the condition type

        Can be one of: "compound""data"

      • ownerId string

        UserID of the condition owner

      • tenantId string

        The tenant id

      • dataCondition object

        A condition based on data within an app

        Show dataCondition properties
        • headers array of strings

          List of header labels

        • history object

          History properties

          Show history properties
          • enabled boolean

            Is history enabled

        • measures array of objects

          List of returned measures

          Show measures properties
          • title string

            Measure title

          • qLibraryId string

            Refers to a measure stored in the library

          • qNumFormat object

            Format of the field

        • dimensions array of objects

          List of returned dimensions

          Show dimensions properties
          • field string

            Field referred to the dimension where the selection is made. This may be used to generate deep links.

          • title string

            Dimension title

          • qLibraryId string

            Refers to a dimension stored in the library

        • selections array of objects

          List of fields according to the bookmark definition

          Show selections properties
          • count number

            The count

          • field string

            Field name

          • selectedSummary array of strings

            Array of selected

        • conditionBase object

          A base condition

          Show conditionBase properties
          • id string

            The unique id for the resource

          • type string

            Indicates the condition type

            Can be one of: "compound""data"

          • appId string

            The id of the app the condition is evaluated against

          • created string

            When the resource was created

          • ownerId string

            The id of the user the user which owns the condition

          • updated string

            When the resource was last updated

          • tenantId string

            The tenant id

          • bookmarkId string

            The bookmark corresponding to the selection state to apply to the app at evaluation time

          • createdById string

            The id of the user which created the condition

          • description string

            Description of the condition

          • lastReloadTime string

            The time of the last reload, if the scan is triggered by a reload. If exists and value does not match app's last reload time, the evaluation will fail.

        • conditionData object

          List of parameters specific to data condition are available in DCE and will be passed as is to DCE as per the API docs of data-condition-evaluator

      • compoundCondition object

        A condition made up of other conditions

        Show compoundCondition properties
        • data object

          Condition data

          Show data properties
          • history object

            History properties

            Show history properties
            • enabled boolean

              Is history enabled

          • conditions array of strings

            Array of condition ids

          • expression string

            Boolean expression made up of variable names defined from the conditions section

        • conditionBase object

          A base condition

          Show conditionBase properties
          • id string

            The unique id for the resource

          • type string

            Indicates the condition type

            Can be one of: "compound""data"

          • appId string

            The id of the app the condition is evaluated against

          • created string

            When the resource was created

          • ownerId string

            The id of the user the user which owns the condition

          • updated string

            When the resource was last updated

          • tenantId string

            The tenant id

          • bookmarkId string

            The bookmark corresponding to the selection state to apply to the app at evaluation time

          • createdById string

            The id of the user which created the condition

          • description string

            Description of the condition

          • lastReloadTime string

            The time of the last reload, if the scan is triggered by a reload. If exists and value does not match app's last reload time, the evaluation will fail.

    • evaluation object
      Show evaluation properties
      • id string

        The unique id for the resource

      • errors array of objects
        Show errors properties
        • code string

          Error code specific to condition smanager.

        • meta object
          Show meta properties
          • fatal boolean

            defines whether an error is recoverable or not

        • title string

          Error title.

        • status any

          Error status.

      • result boolean

        The final result of the evalution

      • status string

        The status of the evaluation execution

        Can be one of: "RUNNING""FAILED""FINISHED""DELETING"

      • alertId string

        The id of the alerting task the condition and evaluation is part of

      • endTime string

        The time the evaluation ended

      • ownerId string

        userId of user being impersonated to evaluate the condition

      • retries integer

        number of retries sent to DCE

      • tenantId string

        The tenant id

      • condition object

        only one of compoundCondition or dataCondition should be set

        Show condition properties
        • type string
          Required

          Indicates the condition type

          Can be one of: "compound""data"

        • ownerId string

          UserID of the condition owner

        • tenantId string

          The tenant id

        • dataCondition object

          A condition based on data within an app

          Show dataCondition properties
          • headers array of strings

            List of header labels

          • history object

            History properties

            Show history properties
            • enabled boolean

              Is history enabled

          • measures array of objects

            List of returned measures

            Show measures properties
            • title string

              Measure title

            • qLibraryId string

              Refers to a measure stored in the library

            • qNumFormat object

              Format of the field

          • dimensions array of objects

            List of returned dimensions

            Show dimensions properties
            • field string

              Field referred to the dimension where the selection is made. This may be used to generate deep links.

            • title string

              Dimension title

            • qLibraryId string

              Refers to a dimension stored in the library

          • selections array of objects

            List of fields according to the bookmark definition

            Show selections properties
            • count number

              The count

            • field string

              Field name

            • selectedSummary array of strings

              Array of selected

          • conditionBase object

            A base condition

            Show conditionBase properties
            • id string

              The unique id for the resource

            • type string

              Indicates the condition type

              Can be one of: "compound""data"

            • appId string

              The id of the app the condition is evaluated against

            • created string

              When the resource was created

            • ownerId string

              The id of the user the user which owns the condition

            • updated string

              When the resource was last updated

            • tenantId string

              The tenant id

            • bookmarkId string

              The bookmark corresponding to the selection state to apply to the app at evaluation time

            • createdById string

              The id of the user which created the condition

            • description string

              Description of the condition

            • lastReloadTime string

              The time of the last reload, if the scan is triggered by a reload. If exists and value does not match app's last reload time, the evaluation will fail.

          • conditionData object

            List of parameters specific to data condition are available in DCE and will be passed as is to DCE as per the API docs of data-condition-evaluator

        • compoundCondition object

          A condition made up of other conditions

          Show compoundCondition properties
          • data object

            Condition data

            Show data properties
            • history object

              History properties

              Show history properties
              • enabled boolean

                Is history enabled

            • conditions array of strings

              Array of condition ids

            • expression string

              Boolean expression made up of variable names defined from the conditions section

          • conditionBase object

            A base condition

            Show conditionBase properties
            • id string

              The unique id for the resource

            • type string

              Indicates the condition type

              Can be one of: "compound""data"

            • appId string

              The id of the app the condition is evaluated against

            • created string

              When the resource was created

            • ownerId string

              The id of the user the user which owns the condition

            • updated string

              When the resource was last updated

            • tenantId string

              The tenant id

            • bookmarkId string

              The bookmark corresponding to the selection state to apply to the app at evaluation time

            • createdById string

              The id of the user which created the condition

            • description string

              Description of the condition

            • lastReloadTime string

              The time of the last reload, if the scan is triggered by a reload. If exists and value does not match app's last reload time, the evaluation will fail.

      • contextId string

        Extra context information to carry through to the result if one was included on when the evaluation was triggered

      • startTime string

        The time the evaluation started

      • resultData object

        Condition type specific result, one of dataResult or compoundResult

      • causalEvent object

        Representation of the event that caused the condition to be evaluated if one was included on when the evaluation was triggered

      • conditionId string

        The unique id of the associated condition

      • retryPolicy string

        what kind of retry policy this evaluation has

        Can be one of: "NONE""TOO_MANY_REQUESTS""GENERIC_ERROR"

      • reloadEndTime string

        The time when the reload was completed in Engine

      • byokMigrationId string

        internal identifier used when migrating keys

      • removalErrorCount integer

        The number of times we have attempted to remove this evaluation data-file

      • dataConditionEvaluatorId string Deprecated

        The unique id for the resource given from Data Condition Evaluator.

404

Resource does not exist.

  • application/json object
    Show application/json properties
    • errors array of objects

      Array of errors

      Show errors properties
      • code string

        Error code specific to condition manager.

      • meta object

        meta properties for an error.

      • title string

        Error title.

      • detail string

        Error cause.

    • traceId string

      trace id

default

Error response.

  • application/json object
    Show application/json properties
    • errors array of objects

      Array of errors

      Show errors properties
      • code string

        Error code specific to condition manager.

      • meta object

        meta properties for an error.

      • title string

        Error title.

      • detail string

        Error cause.

    • traceId string

      trace id

GET /api/v1/conditions/{id}/evaluations/{evaluationId}
import { createQlikApi } from '@qlik/api'
const qlik = createQlikApi({
hostConfig: {
host: 'https://{tenant}.{region}.qlikcloud.com',
apiKey: '<access-token>',
},
})
await qlik.conditions.getConditionEvaluation(
'TiQ8GPVr8qI714Lp5ChAAFFaU24MJy69',
'TiQ8GPVr8qI714Lp5ChAAFFaU24MJy69',
)
qlik condition evaluation get 'TiQ8GPVr8qI714Lp5ChAAFFaU24MJy69' \
--conditionId 'TiQ8GPVr8qI714Lp5ChAAFFaU24MJy69'
curl "https://{tenant}.{region}.qlikcloud.com/api/v1/conditions/{id}/evaluations/{evaluationId}" \
-H "Authorization: Bearer <access_token>"

Example Response

{
"condition": {
"type": "compound",
"ownerId": "EIwSIgqjmbHGwQJI0ShQoS3ORdz5nCpA",
"tenantId": "5GI7yWoJk9lvNtuEc66SXCypXVfhbVeH",
"dataCondition": {
"headers": [
"sumnum"
],
"history": {
"enabled": true
},
"measures": [
{
"title": "sumnum",
"qLibraryId": "PgQKNQ",
"qNumFormat": {
"qDec": ".",
"qFmt": "###0",
"qType": "I",
"qnDec": 0,
"qUseThou": 1
}
}
],
"dimensions": [
{
"field": "Neighborhood",
"title": "Neighborhood",
"qLibraryId": "PgQKNQ"
}
],
"selections": [
{
"count": 2,
"field": "SalesTerritoryCountry",
"selectedSummary": "[ Germany, Australia ]"
}
],
"conditionBase": {
"id": "5f31c6e8476ae50001030fb6",
"type": "compound",
"appId": "4xQ1chLoHkOikyzUGcHJquteNrAfketW",
"created": "2006-01-02T15:04:05Z07:00",
"ownerId": "EIwSIgqjmbHGwQJI0ShQoS3ORdz5nCpA",
"updated": "2006-01-02T14:04:05Z07:00",
"tenantId": "5GI7yWoJk9lvNtuEc66SXCypXVfhbVeH",
"bookmarkId": "anTjnOABmxlCirVx8IRfhWhLd9IZjENl",
"createdById": "EIwSIgqjmbHGwQJI0ShQoS3ORdz5nCpA",
"description": "My condition",
"lastReloadTime": "2006-01-02T15:04:05Z07:00"
},
"conditionData": {}
},
"compoundCondition": {
"data": {
"history": {
"enabled": true
},
"conditions": [
"rDDAcMEI1V0qzauEWepEVY8oSLJ9fvA2",
"qFPF1dAtPK4vfPTmKyyuKaqA6iERCwLi",
"4gnz8E6ZruG0lkSKwkau66P24CtORyLr",
"ATs--Z0b_NGyuHajcbQkxu7RrajgPaEQ"
],
"expression": "($0 OR $1) AND ($2 OR $3)"
},
"conditionBase": {
"id": "5f31c6e8476ae50001030fb6",
"type": "compound",
"appId": "4xQ1chLoHkOikyzUGcHJquteNrAfketW",
"created": "2006-01-02T15:04:05Z07:00",
"ownerId": "EIwSIgqjmbHGwQJI0ShQoS3ORdz5nCpA",
"updated": "2006-01-02T14:04:05Z07:00",
"tenantId": "5GI7yWoJk9lvNtuEc66SXCypXVfhbVeH",
"bookmarkId": "anTjnOABmxlCirVx8IRfhWhLd9IZjENl",
"createdById": "EIwSIgqjmbHGwQJI0ShQoS3ORdz5nCpA",
"description": "My condition",
"lastReloadTime": "2006-01-02T15:04:05Z07:00"
}
}
},
"evaluation": {
"id": "TiQ8GPVr8qI714Lp5ChAAFFaU24MJy69",
"errors": [
{
"code": "string",
"meta": {
"fatal": true
},
"title": "string"
}
],
"result": true,
"status": "RUNNING",
"alertId": "5f64885b2e11d23982c09e03",
"endTime": "string",
"ownerId": "TiQ8GPVr8qI714Lp5ChAAFFaU24MJy69",
"retries": 42,
"tenantId": "TiQ8GPVr8qI714Lp5ChAAFFaU24MJy69",
"condition": {
"type": "compound",
"ownerId": "EIwSIgqjmbHGwQJI0ShQoS3ORdz5nCpA",
"tenantId": "5GI7yWoJk9lvNtuEc66SXCypXVfhbVeH",
"dataCondition": {
"headers": [
"sumnum"
],
"history": {
"enabled": true
},
"measures": [
{
"title": "sumnum",
"qLibraryId": "PgQKNQ",
"qNumFormat": {
"qDec": ".",
"qFmt": "###0",
"qType": "I",
"qnDec": 0,
"qUseThou": 1
}
}
],
"dimensions": [
{
"field": "Neighborhood",
"title": "Neighborhood",
"qLibraryId": "PgQKNQ"
}
],
"selections": [
{
"count": 2,
"field": "SalesTerritoryCountry",
"selectedSummary": "[ Germany, Australia ]"
}
],
"conditionBase": {
"id": "5f31c6e8476ae50001030fb6",
"type": "compound",
"appId": "4xQ1chLoHkOikyzUGcHJquteNrAfketW",
"created": "2006-01-02T15:04:05Z07:00",
"ownerId": "EIwSIgqjmbHGwQJI0ShQoS3ORdz5nCpA",
"updated": "2006-01-02T14:04:05Z07:00",
"tenantId": "5GI7yWoJk9lvNtuEc66SXCypXVfhbVeH",
"bookmarkId": "anTjnOABmxlCirVx8IRfhWhLd9IZjENl",
"createdById": "EIwSIgqjmbHGwQJI0ShQoS3ORdz5nCpA",
"description": "My condition",
"lastReloadTime": "2006-01-02T15:04:05Z07:00"
},
"conditionData": {}
},
"compoundCondition": {
"data": {
"history": {
"enabled": true
},
"conditions": [
"rDDAcMEI1V0qzauEWepEVY8oSLJ9fvA2",
"qFPF1dAtPK4vfPTmKyyuKaqA6iERCwLi",
"4gnz8E6ZruG0lkSKwkau66P24CtORyLr",
"ATs--Z0b_NGyuHajcbQkxu7RrajgPaEQ"
],
"expression": "($0 OR $1) AND ($2 OR $3)"
},
"conditionBase": {
"id": "5f31c6e8476ae50001030fb6",
"type": "compound",
"appId": "4xQ1chLoHkOikyzUGcHJquteNrAfketW",
"created": "2006-01-02T15:04:05Z07:00",
"ownerId": "EIwSIgqjmbHGwQJI0ShQoS3ORdz5nCpA",
"updated": "2006-01-02T14:04:05Z07:00",
"tenantId": "5GI7yWoJk9lvNtuEc66SXCypXVfhbVeH",
"bookmarkId": "anTjnOABmxlCirVx8IRfhWhLd9IZjENl",
"createdById": "EIwSIgqjmbHGwQJI0ShQoS3ORdz5nCpA",
"description": "My condition",
"lastReloadTime": "2006-01-02T15:04:05Z07:00"
}
}
},
"contextId": "string",
"startTime": "string",
"resultData": {},
"causalEvent": {},
"conditionId": "TiQ8GPVr8qI714Lp5ChAAFFaU24MJy69",
"retryPolicy": "NONE",
"reloadEndTime": "string",
"byokMigrationId": "string",
"removalErrorCount": 3,
"dataConditionEvaluatorId": "TiQ8GPVr8qI714Lp5ChAAFFaU24MJy69"
}
}

Delete an Evaluation

Facts

Rate limit Tier 2 (100 requests per minute)

Path Parameters

  • evaluationId string
    Required

    The id of the evaluation

  • id string
    Required

    The id of the condition

Responses

204

The evaluation was deleted

404

Resource does not exist.

  • application/json object
    Show application/json properties
    • errors array of objects

      Array of errors

      Show errors properties
      • code string

        Error code specific to condition manager.

      • meta object

        meta properties for an error.

      • title string

        Error title.

      • detail string

        Error cause.

    • traceId string

      trace id

default

Error response

  • application/json object
    Show application/json properties
    • errors array of objects

      Array of errors

      Show errors properties
      • code string

        Error code specific to condition manager.

      • meta object

        meta properties for an error.

      • title string

        Error title.

      • detail string

        Error cause.

    • traceId string

      trace id

DELETE /api/v1/conditions/{id}/evaluations/{evaluationId}
import { createQlikApi } from '@qlik/api'
const qlik = createQlikApi({
hostConfig: {
host: 'https://{tenant}.{region}.qlikcloud.com',
apiKey: '<access-token>',
},
})
await qlik.conditions.deleteConditionEvaluation(
'TiQ8GPVr8qI714Lp5ChAAFFaU24MJy69',
'TiQ8GPVr8qI714Lp5ChAAFFaU24MJy69',
)
qlik condition evaluation rm 'TiQ8GPVr8qI714Lp5ChAAFFaU24MJy69' \
--conditionId 'TiQ8GPVr8qI714Lp5ChAAFFaU24MJy69'
curl "https://{tenant}.{region}.qlikcloud.com/api/v1/conditions/{id}/evaluations/{evaluationId}" \
-X DELETE \
-H "Authorization: Bearer <access_token>"

Create condition preview request\

Create condition preview request.

Facts

Rate limit Tier 2 (100 requests per minute)

Request Body

Create condition preview request

  • application/json object

    only one of compoundCondition or dataCondition should be set

    Show application/json properties
    • type string
      Required

      Indicates the condition type

      Can be one of: "compound""data"

    • dataCondition object

      A condition based on data within an app

      Show dataCondition properties
      • headers array of strings

        List of header labels

      • history object

        History properties

        Show history properties
        • enabled boolean

          Is history enabled

      • measures array of objects

        List of returned measures

        Show measures properties
        • title string

          Measure title

        • qLibraryId string

          Refers to a measure stored in the library

        • qNumFormat object

          Format of the field

      • dimensions array of objects

        List of returned dimensions

        Show dimensions properties
        • field string

          Field referred to the dimension where the selection is made. This may be used to generate deep links.

        • title string

          Dimension title

        • qLibraryId string

          Refers to a dimension stored in the library

      • selections array of objects

        List of fields according to the bookmark definition

        Show selections properties
        • count number

          The count

        • field string

          Field name

        • selectedSummary array of strings

          Array of selected

      • conditionBase object

        A base condition

        Show conditionBase properties
        • type string

          Indicates the condition type

          Can be one of: "compound""data"

        • appId string

          The id of the app the condition is evaluated against

        • bookmarkId string

          The bookmark corresponding to the selection state to apply to the app at evaluation time

        • description string

          Description of the condition

      • conditionData object

        List of parameters specific to data condition are available in DCE and will be passed as is to DCE as per the API docs of data-condition-evaluator

    • compoundCondition object

      A condition made up of other conditions

      Show compoundCondition properties
      • data object

        Condition data

        Show data properties
        • history object

          History properties

          Show history properties
          • enabled boolean

            Is history enabled

        • conditions array of strings

          Array of condition ids

        • expression string

          Boolean expression made up of variable names defined from the conditions section

      • conditionBase object

        A base condition

        Show conditionBase properties
        • type string

          Indicates the condition type

          Can be one of: "compound""data"

        • appId string

          The id of the app the condition is evaluated against

        • bookmarkId string

          The bookmark corresponding to the selection state to apply to the app at evaluation time

        • description string

          Description of the condition

Responses

201

Condition preview request created.

  • application/json object
    Show application/json properties
    • previewId string

      When the resource was created

400

Bad request body

  • application/json object
    Show application/json properties
    • errors array of objects

      Array of errors

      Show errors properties
      • code string

        Error code specific to condition manager.

      • meta object

        meta properties for an error.

      • title string

        Error title.

      • detail string

        Error cause.

    • traceId string

      trace id

500

Internal server error.

  • application/json object
    Show application/json properties
    • errors array of objects

      Array of errors

      Show errors properties
      • code string

        Error code specific to condition manager.

      • meta object

        meta properties for an error.

      • title string

        Error title.

      • detail string

        Error cause.

    • traceId string

      trace id

default

Error response.

  • application/json object
    Show application/json properties
    • errors array of objects

      Array of errors

      Show errors properties
      • code string

        Error code specific to condition manager.

      • meta object

        meta properties for an error.

      • title string

        Error title.

      • detail string

        Error cause.

    • traceId string

      trace id

POST /api/v1/conditions/previews
import { createQlikApi } from '@qlik/api'
const qlik = createQlikApi({
hostConfig: {
host: 'https://{tenant}.{region}.qlikcloud.com',
apiKey: '<access-token>',
},
})
await qlik.conditions.createConditionPreview({
compoundCondition: {
conditionBase: {
appId: '4xQ1chLoHkOikyzUGcHJquteNrAfketW',
bookmarkId:
'anTjnOABmxlCirVx8IRfhWhLd9IZjENl',
description: 'My condition',
type: 'compound',
},
data: {
conditions: [
'rDDAcMEI1V0qzauEWepEVY8oSLJ9fvA2',
'qFPF1dAtPK4vfPTmKyyuKaqA6iERCwLi',
'4gnz8E6ZruG0lkSKwkau66P24CtORyLr',
'ATs--Z0b_NGyuHajcbQkxu7RrajgPaEQ',
],
expression: '($0 OR $1) AND ($2 OR $3)',
history: { enabled: true },
},
},
dataCondition: {
conditionBase: {
appId: '4xQ1chLoHkOikyzUGcHJquteNrAfketW',
bookmarkId:
'anTjnOABmxlCirVx8IRfhWhLd9IZjENl',
description: 'My condition',
type: 'compound',
},
conditionData: {},
dimensions: [
{
field: 'Neighborhood',
qLibraryId: 'PgQKNQ',
title: 'Neighborhood',
},
],
headers: ['sumnum'],
history: { enabled: true },
measures: [
{
qLibraryId: 'PgQKNQ',
qNumFormat: {
qDec: '.',
qFmt: '###0',
qType: 'I',
qnDec: 0,
qUseThou: 1,
},
title: 'sumnum',
},
],
selections: [
{
count: 2,
field: 'SalesTerritoryCountry',
selectedSummary: [],
},
],
},
type: 'compound',
})
qlik condition preview create \
--type 'compound'
curl "https://{tenant}.{region}.qlikcloud.com/api/v1/conditions/previews" \
-X POST \
-H "Content-type: application/json" \
-H "Authorization: Bearer <access_token>" \
-d '{"type":"compound","dataCondition":{"headers":["sumnum"],"history":{"enabled":true},"measures":[{"title":"sumnum","qLibraryId":"PgQKNQ","qNumFormat":{"qDec":".","qFmt":"###0","qType":"I","qnDec":0,"qUseThou":1}}],"dimensions":[{"field":"Neighborhood","title":"Neighborhood","qLibraryId":"PgQKNQ"}],"selections":[{"count":2,"field":"SalesTerritoryCountry","selectedSummary":"[ Germany, Australia ]"}],"conditionBase":{"type":"compound","appId":"4xQ1chLoHkOikyzUGcHJquteNrAfketW","bookmarkId":"anTjnOABmxlCirVx8IRfhWhLd9IZjENl","description":"My condition"},"conditionData":{}},"compoundCondition":{"data":{"history":{"enabled":true},"conditions":["rDDAcMEI1V0qzauEWepEVY8oSLJ9fvA2","qFPF1dAtPK4vfPTmKyyuKaqA6iERCwLi","4gnz8E6ZruG0lkSKwkau66P24CtORyLr","ATs--Z0b_NGyuHajcbQkxu7RrajgPaEQ"],"expression":"($0 OR $1) AND ($2 OR $3)"},"conditionBase":{"type":"compound","appId":"4xQ1chLoHkOikyzUGcHJquteNrAfketW","bookmarkId":"anTjnOABmxlCirVx8IRfhWhLd9IZjENl","description":"My condition"}}}'

Example Response

{
"previewId": "467ea9bc-bbd7-11ea-b3de-0242ac130004"
}

Get condition preview response

Get condition preview response.

Facts

Rate limit Tier 1 (1000 requests per minute)

Path Parameters

  • id string
    Required

    The id of the condition

Responses

200

The evaluation

  • application/json object
    Show application/json properties
    • errors array of objects
      Show errors properties
      • code string

        Error code specific to condition manager.

      • meta object
      • title string

        Error title.

      • detail string

        Error cause.

    • status string

      Can be one of: "ACCEPTED""FAILED""RUNNING""SUCCESSFUL"

    • condition object

      only one of compoundCondition or dataCondition should be set

      Show condition properties
      • type string
        Required

        Indicates the condition type

        Can be one of: "compound""data"

      • ownerId string

        UserID of the condition owner

      • tenantId string

        The tenant id

      • dataCondition object

        A condition based on data within an app

        Show dataCondition properties
        • headers array of strings

          List of header labels

        • history object

          History properties

          Show history properties
          • enabled boolean

            Is history enabled

        • measures array of objects

          List of returned measures

          Show measures properties
          • title string

            Measure title

          • qLibraryId string

            Refers to a measure stored in the library

          • qNumFormat object

            Format of the field

        • dimensions array of objects

          List of returned dimensions

          Show dimensions properties
          • field string

            Field referred to the dimension where the selection is made. This may be used to generate deep links.

          • title string

            Dimension title

          • qLibraryId string

            Refers to a dimension stored in the library

        • selections array of objects

          List of fields according to the bookmark definition

          Show selections properties
          • count number

            The count

          • field string

            Field name

          • selectedSummary array of strings

            Array of selected

        • conditionBase object

          A base condition

          Show conditionBase properties
          • id string

            The unique id for the resource

          • type string

            Indicates the condition type

            Can be one of: "compound""data"

          • appId string

            The id of the app the condition is evaluated against

          • created string

            When the resource was created

          • ownerId string

            The id of the user the user which owns the condition

          • updated string

            When the resource was last updated

          • tenantId string

            The tenant id

          • bookmarkId string

            The bookmark corresponding to the selection state to apply to the app at evaluation time

          • createdById string

            The id of the user which created the condition

          • description string

            Description of the condition

          • lastReloadTime string

            The time of the last reload, if the scan is triggered by a reload. If exists and value does not match app's last reload time, the evaluation will fail.

        • conditionData object

          List of parameters specific to data condition are available in DCE and will be passed as is to DCE as per the API docs of data-condition-evaluator

      • compoundCondition object

        A condition made up of other conditions

        Show compoundCondition properties
        • data object

          Condition data

          Show data properties
          • history object

            History properties

            Show history properties
            • enabled boolean

              Is history enabled

          • conditions array of strings

            Array of condition ids

          • expression string

            Boolean expression made up of variable names defined from the conditions section

        • conditionBase object

          A base condition

          Show conditionBase properties
          • id string

            The unique id for the resource

          • type string

            Indicates the condition type

            Can be one of: "compound""data"

          • appId string

            The id of the app the condition is evaluated against

          • created string

            When the resource was created

          • ownerId string

            The id of the user the user which owns the condition

          • updated string

            When the resource was last updated

          • tenantId string

            The tenant id

          • bookmarkId string

            The bookmark corresponding to the selection state to apply to the app at evaluation time

          • createdById string

            The id of the user which created the condition

          • description string

            Description of the condition

          • lastReloadTime string

            The time of the last reload, if the scan is triggered by a reload. If exists and value does not match app's last reload time, the evaluation will fail.

    • previewId string

      When the resource was created

    • evaluation object
      Show evaluation properties
      • endTime string

        The time the evaluation ended

      • ownerId string

        userId of user being impersonated to evaluate the condition

      • tenantId string

        The tenant id

      • resultUrl string

        URL to download the condition results

      • startTime string

        The time the evaluation started

400

Bad request body

  • application/json object
    Show application/json properties
    • errors array of objects

      Array of errors

      Show errors properties
      • code string

        Error code specific to condition manager.

      • meta object

        meta properties for an error.

      • title string

        Error title.

      • detail string

        Error cause.

    • traceId string

      trace id

404

Resource does not exist.

  • application/json object
    Show application/json properties
    • errors array of objects

      Array of errors

      Show errors properties
      • code string

        Error code specific to condition manager.

      • meta object

        meta properties for an error.

      • title string

        Error title.

      • detail string

        Error cause.

    • traceId string

      trace id

500

Internal server error.

  • application/json object
    Show application/json properties
    • errors array of objects

      Array of errors

      Show errors properties
      • code string

        Error code specific to condition manager.

      • meta object

        meta properties for an error.

      • title string

        Error title.

      • detail string

        Error cause.

    • traceId string

      trace id

default

Error response.

  • application/json object
    Show application/json properties
    • errors array of objects

      Array of errors

      Show errors properties
      • code string

        Error code specific to condition manager.

      • meta object

        meta properties for an error.

      • title string

        Error title.

      • detail string

        Error cause.

    • traceId string

      trace id

GET /api/v1/conditions/previews/{id}
import { createQlikApi } from '@qlik/api'
const qlik = createQlikApi({
hostConfig: {
host: 'https://{tenant}.{region}.qlikcloud.com',
apiKey: '<access-token>',
},
})
await qlik.conditions.getConditionPreview(
'TiQ8GPVr8qI714Lp5ChAAFFaU24MJy69',
)
qlik condition preview get 'TiQ8GPVr8qI714Lp5ChAAFFaU24MJy69'
curl "https://{tenant}.{region}.qlikcloud.com/api/v1/conditions/previews/{id}" \
-H "Authorization: Bearer <access_token>"

Example Response

{
"errors": [
{
"code": "string",
"meta": {},
"title": "string",
"detail": "string"
}
],
"status": "ACCEPTED",
"condition": {
"type": "compound",
"ownerId": "EIwSIgqjmbHGwQJI0ShQoS3ORdz5nCpA",
"tenantId": "5GI7yWoJk9lvNtuEc66SXCypXVfhbVeH",
"dataCondition": {
"headers": [
"sumnum"
],
"history": {
"enabled": true
},
"measures": [
{
"title": "sumnum",
"qLibraryId": "PgQKNQ",
"qNumFormat": {
"qDec": ".",
"qFmt": "###0",
"qType": "I",
"qnDec": 0,
"qUseThou": 1
}
}
],
"dimensions": [
{
"field": "Neighborhood",
"title": "Neighborhood",
"qLibraryId": "PgQKNQ"
}
],
"selections": [
{
"count": 2,
"field": "SalesTerritoryCountry",
"selectedSummary": "[ Germany, Australia ]"
}
],
"conditionBase": {
"id": "5f31c6e8476ae50001030fb6",
"type": "compound",
"appId": "4xQ1chLoHkOikyzUGcHJquteNrAfketW",
"created": "2006-01-02T15:04:05Z07:00",
"ownerId": "EIwSIgqjmbHGwQJI0ShQoS3ORdz5nCpA",
"updated": "2006-01-02T14:04:05Z07:00",
"tenantId": "5GI7yWoJk9lvNtuEc66SXCypXVfhbVeH",
"bookmarkId": "anTjnOABmxlCirVx8IRfhWhLd9IZjENl",
"createdById": "EIwSIgqjmbHGwQJI0ShQoS3ORdz5nCpA",
"description": "My condition",
"lastReloadTime": "2006-01-02T15:04:05Z07:00"
},
"conditionData": {}
},
"compoundCondition": {
"data": {
"history": {
"enabled": true
},
"conditions": [
"rDDAcMEI1V0qzauEWepEVY8oSLJ9fvA2",
"qFPF1dAtPK4vfPTmKyyuKaqA6iERCwLi",
"4gnz8E6ZruG0lkSKwkau66P24CtORyLr",
"ATs--Z0b_NGyuHajcbQkxu7RrajgPaEQ"
],
"expression": "($0 OR $1) AND ($2 OR $3)"
},
"conditionBase": {
"id": "5f31c6e8476ae50001030fb6",
"type": "compound",
"appId": "4xQ1chLoHkOikyzUGcHJquteNrAfketW",
"created": "2006-01-02T15:04:05Z07:00",
"ownerId": "EIwSIgqjmbHGwQJI0ShQoS3ORdz5nCpA",
"updated": "2006-01-02T14:04:05Z07:00",
"tenantId": "5GI7yWoJk9lvNtuEc66SXCypXVfhbVeH",
"bookmarkId": "anTjnOABmxlCirVx8IRfhWhLd9IZjENl",
"createdById": "EIwSIgqjmbHGwQJI0ShQoS3ORdz5nCpA",
"description": "My condition",
"lastReloadTime": "2006-01-02T15:04:05Z07:00"
}
}
},
"previewId": "467ea9bc-bbd7-11ea-b3de-0242ac130004",
"evaluation": {
"endTime": "string",
"ownerId": "TiQ8GPVr8qI714Lp5ChAAFFaU24MJy69",
"tenantId": "TiQ8GPVr8qI714Lp5ChAAFFaU24MJy69",
"resultUrl": "string",
"startTime": "string"
}
}

Retrieves condition manager settings

Lists api settings.

Facts

Rate limit Tier 1 (1000 requests per minute)

Responses

200

The api settings have been successfully returned

  • application/json object
    Show application/json properties
    • tenantId string

      These persisted api settings are only available for this tenant. Extracted from request JWT.

    • enable-conditions boolean
      Required

      Whether API endpoints for condition manager are enabled

404

Resource does not exist.

  • application/json object
    Show application/json properties
    • errors array of objects

      Array of errors

      Show errors properties
      • code string

        Error code specific to condition manager.

      • meta object

        meta properties for an error.

      • title string

        Error title.

      • detail string

        Error cause.

    • traceId string

      trace id

500

Internal server error.

  • application/json object
    Show application/json properties
    • errors array of objects

      Array of errors

      Show errors properties
      • code string

        Error code specific to condition manager.

      • meta object

        meta properties for an error.

      • title string

        Error title.

      • detail string

        Error cause.

    • traceId string

      trace id

default

Error response.

  • application/json object
    Show application/json properties
    • errors array of objects

      Array of errors

      Show errors properties
      • code string

        Error code specific to condition manager.

      • meta object

        meta properties for an error.

      • title string

        Error title.

      • detail string

        Error cause.

    • traceId string

      trace id

GET /api/v1/conditions/settings
import { createQlikApi } from '@qlik/api'
const qlik = createQlikApi({
hostConfig: {
host: 'https://{tenant}.{region}.qlikcloud.com',
apiKey: '<access-token>',
},
})
await qlik.conditions.getConditionsSettings()
qlik condition settings get
curl "https://{tenant}.{region}.qlikcloud.com/api/v1/conditions/settings" \
-H "Authorization: Bearer <access_token>"

Example Response

{
"tenantId": "cgdsAumGmQ6l0Bi7CUKt9V8P_Y9GL0sC",
"enable-conditions": true
}

Updates condition manager settings

Updates API configuration. Accessible only by tenant admins.

Facts

Rate limit Tier 2 (100 requests per minute)

Header Parameters

  • Authorization string

    The JWT used for authentication. Send the JWT in the AuthRequest header using the Bearer schema.

Request Body

Request for updating the api settings

  • application/json object
    Show application/json properties
    • enable-conditions boolean
      Required

      Whether API endpoints for condition manager are enabled

Responses

204

api settings have been successfully updated.

400

Bad request body

  • application/json object
    Show application/json properties
    • errors array of objects

      Array of errors

      Show errors properties
      • code string

        Error code specific to condition manager.

      • meta object

        meta properties for an error.

      • title string

        Error title.

      • detail string

        Error cause.

    • traceId string

      trace id

500

Internal server error.

  • application/json object
    Show application/json properties
    • errors array of objects

      Array of errors

      Show errors properties
      • code string

        Error code specific to condition manager.

      • meta object

        meta properties for an error.

      • title string

        Error title.

      • detail string

        Error cause.

    • traceId string

      trace id

default

Error response.

  • application/json object
    Show application/json properties
    • errors array of objects

      Array of errors

      Show errors properties
      • code string

        Error code specific to condition manager.

      • meta object

        meta properties for an error.

      • title string

        Error title.

      • detail string

        Error cause.

    • traceId string

      trace id

PUT /api/v1/conditions/settings
import { createQlikApi } from '@qlik/api'
const qlik = createQlikApi({
hostConfig: {
host: 'https://{tenant}.{region}.qlikcloud.com',
apiKey: '<access-token>',
},
})
await qlik.conditions.setConditionsSettings({
'enable-conditions': true,
})
qlik condition settings set \
--enable-conditions true
curl "https://{tenant}.{region}.qlikcloud.com/api/v1/conditions/settings" \
-X PUT \
-H "Content-type: application/json" \
-H "Authorization: Bearer <access_token>" \
-d '{"enable-conditions":true}'