conditions
Conditions is the resource representing a condition query based on data in a Qlik app.
Endpoints
Skip to sectionGET | /conditions/settings |
PUT | /conditions/settings |
POST | /conditions |
GET | /conditions/{id} |
DELETE | /conditions/{id} |
PATCH | /conditions/{id} |
POST | /conditions/{id}/evaluations |
GET | /conditions/{id}/evaluations/{evaluationId} |
DELETE | /conditions/{id}/evaluations/{evaluationId} |
POST | /conditions/previews |
GET | /conditions/previews/{id} |
Retrieves condition manager settings
Lists api settings.
Responses GET /conditions/settings
200 application/json | The api settings have been successfully returned |
404 application/json | Resource does not exist. |
500 application/json | Internal server error. |
default application/json | Error response. |
GET/conditions/settings
curl "https://your-tenant.us.qlikcloud.com/api/v1/conditions/settings" \
-H "Authorization: Bearer <API-key>"
Response GET /conditions/settings
{
"tenantId": "cgdsAumGmQ6l0Bi7CUKt9V8P_Y9GL0sC",
"enable-conditions": true
}
Updates condition manager settings
Updates API configuration. Accessible only by tenant admins.
Header Parameters PUT /conditions/settings
Authorization optional string | The JWT used for authentication. Send the JWT in the AuthRequest header using the Bearer schema. |
Request Body PUT /conditions/settings
application/json | Request for updating the api settings |
Responses PUT /conditions/settings
204 object | api settings have been successfully updated. |
400 application/json | Bad request body |
500 application/json | Internal server error. |
default application/json | Error response. |
PUT/conditions/settings
curl "https://your-tenant.us.qlikcloud.com/api/v1/conditions/settings" \
-X PUT \
-H "Authorization: Bearer <API-key>" \
-H "Content-type: application/json" \
-d '{"enable-conditions":true}'
Request PUT /conditions/settings
{
"enable-conditions": true
}
Creates a new condition.
Request Body POST /conditions
application/json | The condition create request definition. |
Responses POST /conditions
201 application/json | Condition created |
400 application/json | Bad request body |
default application/json | Error response. |
POST/conditions
curl "https://your-tenant.us.qlikcloud.com/api/v1/conditions" \
-X POST \
-H "Authorization: Bearer <API-key>" \
-H "Content-type: application/json" \
-d '{"type":"compound","compoundCondition":{"conditionBase":{"created":"2006-01-02T15:04:05Z07:00","createdById":"EIwSIgqjmbHGwQJI0ShQoS3ORdz5nCpA","description":"My condition","id":"5f31c6e8476ae50001030fb6","ownerId":"EIwSIgqjmbHGwQJI0ShQoS3ORdz5nCpA","tenantId":"5GI7yWoJk9lvNtuEc66SXCypXVfhbVeH","appId":"4xQ1chLoHkOikyzUGcHJquteNrAfketW","bookmarkId":"anTjnOABmxlCirVx8IRfhWhLd9IZjENl","type":"compound","updated":"2006-01-02T14:04:05Z07:00","lastReloadTime":"2006-01-02T15:04:05Z07:00"},"data":{"history":{"enabled":true},"conditions":["rDDAcMEI1V0qzauEWepEVY8oSLJ9fvA2","qFPF1dAtPK4vfPTmKyyuKaqA6iERCwLi","4gnz8E6ZruG0lkSKwkau66P24CtORyLr","ATs--Z0b_NGyuHajcbQkxu7RrajgPaEQ"],"expression":"($0 OR $1) AND ($2 OR $3)"}},"dataCondition":{"history":{"enabled":true},"conditionBase":{"created":"2006-01-02T15:04:05Z07:00","createdById":"EIwSIgqjmbHGwQJI0ShQoS3ORdz5nCpA","description":"My condition","id":"5f31c6e8476ae50001030fb6","ownerId":"EIwSIgqjmbHGwQJI0ShQoS3ORdz5nCpA","tenantId":"5GI7yWoJk9lvNtuEc66SXCypXVfhbVeH","appId":"4xQ1chLoHkOikyzUGcHJquteNrAfketW","bookmarkId":"anTjnOABmxlCirVx8IRfhWhLd9IZjENl","type":"compound","updated":"2006-01-02T14:04:05Z07:00","lastReloadTime":"2006-01-02T15:04:05Z07:00"},"conditionData":{},"selections":[{"field":"SalesTerritoryCountry","count":2,"selectedSummary":"[ Germany, Australia ]"}],"dimensions":[{"qLibraryId":"PgQKNQ","field":"Neighborhood","title":"Neighborhood"}],"headers":["sumnum"],"measures":[{"qLibraryId":"PgQKNQ","qNumFormat":{"qDec":".","qFmt":"###0","qType":"I","qUseThou":1,"qnDec":0},"title":"sumnum"}]}}'
Request POST /conditions
{
"type": "compound",
"compoundCondition": {
"conditionBase": {
"created": "2006-01-02T15:04:05Z07:00",
"createdById": "EIwSIgqjmbHGwQJI0ShQoS3ORdz5nCpA",
"description": "My condition",
"id": "5f31c6e8476ae50001030fb6",
"ownerId": "EIwSIgqjmbHGwQJI0ShQoS3ORdz5nCpA",
"tenantId": "5GI7yWoJk9lvNtuEc66SXCypXVfhbVeH",
"appId": "4xQ1chLoHkOikyzUGcHJquteNrAfketW",
"bookmarkId": "anTjnOABmxlCirVx8IRfhWhLd9IZjENl",
"type": "compound",
"updated": "2006-01-02T14:04:05Z07:00",
"lastReloadTime": "2006-01-02T15:04:05Z07:00"
},
"data": {
"history": {
"enabled": true
},
"conditions": [
"rDDAcMEI1V0qzauEWepEVY8oSLJ9fvA2",
"qFPF1dAtPK4vfPTmKyyuKaqA6iERCwLi",
"4gnz8E6ZruG0lkSKwkau66P24CtORyLr",
"ATs--Z0b_NGyuHajcbQkxu7RrajgPaEQ"
],
"expression": "($0 OR $1) AND ($2 OR $3)"
}
},
"dataCondition": {
"history": {
"enabled": true
},
"conditionBase": {
"created": "2006-01-02T15:04:05Z07:00",
"createdById": "EIwSIgqjmbHGwQJI0ShQoS3ORdz5nCpA",
"description": "My condition",
"id": "5f31c6e8476ae50001030fb6",
"ownerId": "EIwSIgqjmbHGwQJI0ShQoS3ORdz5nCpA",
"tenantId": "5GI7yWoJk9lvNtuEc66SXCypXVfhbVeH",
"appId": "4xQ1chLoHkOikyzUGcHJquteNrAfketW",
"bookmarkId": "anTjnOABmxlCirVx8IRfhWhLd9IZjENl",
"type": "compound",
"updated": "2006-01-02T14:04:05Z07:00",
"lastReloadTime": "2006-01-02T15:04:05Z07:00"
},
"conditionData": {},
"selections": [
{
"field": "SalesTerritoryCountry",
"count": 2,
"selectedSummary": "[ Germany, Australia ]"
}
],
"dimensions": [
{
"qLibraryId": "PgQKNQ",
"field": "Neighborhood",
"title": "Neighborhood"
}
],
"headers": [
"sumnum"
],
"measures": [
{
"qLibraryId": "PgQKNQ",
"qNumFormat": {
"qDec": ".",
"qFmt": "###0",
"qType": "I",
"qUseThou": 1,
"qnDec": 0
},
"title": "sumnum"
}
]
}
}
Response POST /conditions
{
"condition": {
"type": "compund",
"compoundCondition": {
"conditionBase": {
"created": "2006-01-02T15:04:05Z07:00",
"createdById": "EIwSIgqjmbHGwQJI0ShQoS3ORdz5nCpA",
"description": "My condition",
"id": "5f31c6e8476ae50001030fb6",
"ownerId": "EIwSIgqjmbHGwQJI0ShQoS3ORdz5nCpA",
"tenantId": "5GI7yWoJk9lvNtuEc66SXCypXVfhbVeH",
"appId": "4xQ1chLoHkOikyzUGcHJquteNrAfketW",
"bookmarkId": "anTjnOABmxlCirVx8IRfhWhLd9IZjENl",
"type": "compound",
"updated": "2006-01-02T14:04:05Z07:00",
"lastReloadTime": "2006-01-02T15:04:05Z07:00"
},
"data": {
"history": {
"enabled": true
},
"conditions": [
"rDDAcMEI1V0qzauEWepEVY8oSLJ9fvA2",
"qFPF1dAtPK4vfPTmKyyuKaqA6iERCwLi",
"4gnz8E6ZruG0lkSKwkau66P24CtORyLr",
"ATs--Z0b_NGyuHajcbQkxu7RrajgPaEQ"
],
"expression": "($0 OR $1) AND ($2 OR $3)"
}
},
"dataCondition": {
"conditionBase": {
"created": "2006-01-02T15:04:05Z07:00",
"createdById": "EIwSIgqjmbHGwQJI0ShQoS3ORdz5nCpA",
"description": "My condition",
"id": "5f31c6e8476ae50001030fb6",
"ownerId": "EIwSIgqjmbHGwQJI0ShQoS3ORdz5nCpA",
"tenantId": "5GI7yWoJk9lvNtuEc66SXCypXVfhbVeH",
"appId": "4xQ1chLoHkOikyzUGcHJquteNrAfketW",
"bookmarkId": "anTjnOABmxlCirVx8IRfhWhLd9IZjENl",
"type": "compound",
"updated": "2006-01-02T14:04:05Z07:00",
"lastReloadTime": "2006-01-02T15:04:05Z07:00"
},
"conditionData": {},
"history": {
"enabled": true
},
"selections": [
{
"field": "SalesTerritoryCountry",
"count": 2,
"selectedSummary": "[ Germany, Australia ]"
}
],
"dimensions": [
{
"qLibraryId": "PgQKNQ",
"field": "Neighborhood",
"title": "Neighborhood"
}
],
"headers": [
"sumnum"
],
"measures": [
{
"qLibraryId": "PgQKNQ",
"qNumFormat": {
"qDec": ".",
"qFmt": "###0",
"qType": "I",
"qUseThou": 1,
"qnDec": 0
},
"title": "sumnum"
}
]
}
},
"errors": [
{
"code": "string",
"detail": "string",
"title": "string",
"meta": {}
}
]
}
Retrieve a specific condition by id.
Path Parameters GET /conditions/{id}
id string<uid> | The id of the condition |
Responses GET /conditions/{id}
200 application/json | The condition |
404 application/json | Resource does not exist. |
default application/json | Error response. |
GET/conditions/{id}
curl "https://your-tenant.us.qlikcloud.com/api/v1/conditions/{id}" \
-H "Authorization: Bearer <API-key>"
Response GET /conditions/{id}
{
"type": "compund",
"compoundCondition": {
"conditionBase": {
"created": "2006-01-02T15:04:05Z07:00",
"createdById": "EIwSIgqjmbHGwQJI0ShQoS3ORdz5nCpA",
"description": "My condition",
"id": "5f31c6e8476ae50001030fb6",
"ownerId": "EIwSIgqjmbHGwQJI0ShQoS3ORdz5nCpA",
"tenantId": "5GI7yWoJk9lvNtuEc66SXCypXVfhbVeH",
"appId": "4xQ1chLoHkOikyzUGcHJquteNrAfketW",
"bookmarkId": "anTjnOABmxlCirVx8IRfhWhLd9IZjENl",
"type": "compound",
"updated": "2006-01-02T14:04:05Z07:00",
"lastReloadTime": "2006-01-02T15:04:05Z07:00"
},
"data": {
"history": {
"enabled": true
},
"conditions": [
"rDDAcMEI1V0qzauEWepEVY8oSLJ9fvA2",
"qFPF1dAtPK4vfPTmKyyuKaqA6iERCwLi",
"4gnz8E6ZruG0lkSKwkau66P24CtORyLr",
"ATs--Z0b_NGyuHajcbQkxu7RrajgPaEQ"
],
"expression": "($0 OR $1) AND ($2 OR $3)"
}
},
"dataCondition": {
"conditionBase": {
"created": "2006-01-02T15:04:05Z07:00",
"createdById": "EIwSIgqjmbHGwQJI0ShQoS3ORdz5nCpA",
"description": "My condition",
"id": "5f31c6e8476ae50001030fb6",
"ownerId": "EIwSIgqjmbHGwQJI0ShQoS3ORdz5nCpA",
"tenantId": "5GI7yWoJk9lvNtuEc66SXCypXVfhbVeH",
"appId": "4xQ1chLoHkOikyzUGcHJquteNrAfketW",
"bookmarkId": "anTjnOABmxlCirVx8IRfhWhLd9IZjENl",
"type": "compound",
"updated": "2006-01-02T14:04:05Z07:00",
"lastReloadTime": "2006-01-02T15:04:05Z07:00"
},
"conditionData": {},
"history": {
"enabled": true
},
"selections": [
{
"field": "SalesTerritoryCountry",
"count": 2,
"selectedSummary": "[ Germany, Australia ]"
}
],
"dimensions": [
{
"qLibraryId": "PgQKNQ",
"field": "Neighborhood",
"title": "Neighborhood"
}
],
"headers": [
"sumnum"
],
"measures": [
{
"qLibraryId": "PgQKNQ",
"qNumFormat": {
"qDec": ".",
"qFmt": "###0",
"qType": "I",
"qUseThou": 1,
"qnDec": 0
},
"title": "sumnum"
}
]
}
}
Delete the condition
Path Parameters DELETE /conditions/{id}
id string<uid> | The id of the condition |
Responses DELETE /conditions/{id}
204 object | The record was deleted. |
404 application/json | Resource does not exist. |
default application/json | Error response |
DELETE/conditions/{id}
curl "https://your-tenant.us.qlikcloud.com/api/v1/conditions/{id}" \
-X DELETE \
-H "Authorization: Bearer <API-key>"
Patch values in the condition
Path Parameters PATCH /conditions/{id}
id string<uid> | The id of the condition |
Request Body PATCH /conditions/{id}
application/json | No description |
Responses PATCH /conditions/{id}
204 object | The condition was updated |
400 application/json | A path or value was invalid |
404 application/json | Resource does not exist. |
default application/json | Error response |
PATCH/conditions/{id}
curl "https://your-tenant.us.qlikcloud.com/api/v1/conditions/{id}" \
-X PATCH \
-H "Authorization: Bearer <API-key>" \
-H "Content-type: application/json" \
-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"}]'
Request PATCH /conditions/{id}
[
{
"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"
}
]
Executes the condition
Path Parameters POST /conditions/{id}/evaluations
id string<uid> | The id of the condition |
Request Body POST /conditions/{id}/evaluations
application/json | No description |
Responses POST /conditions/{id}/evaluations
201 application/json | Condition evaluation created |
400 application/json | Bad request body |
500 application/json | Internal server error. |
default application/json | Error response. |
POST/conditions/{id}/evaluations
curl "https://your-tenant.us.qlikcloud.com/api/v1/conditions/{id}/evaluations" \
-X POST \
-H "Authorization: Bearer <API-key>" \
-H "Content-type: application/json" \
-d '{"causalEvent":{"manualTrigger":true,"eventID":"string","manualTriggerID":"string","data":{"eventID":"string","lastReloadTime":"2006-01-02T15:04:05Z07:00"},"extensions":{"tenantID":"string","userID":"string","sessionID":"string"}},"contextId":"795c75ba-7812-4c8f-9ced-551b6b006183","alertId":"5f64885b2e11d23982c09e03"}'
Request POST /conditions/{id}/evaluations
{
"causalEvent": {
"manualTrigger": true,
"eventID": "string",
"manualTriggerID": "string",
"data": {
"eventID": "string",
"lastReloadTime": "2006-01-02T15:04:05Z07:00"
},
"extensions": {
"tenantID": "string",
"userID": "string",
"sessionID": "string"
}
},
"contextId": "795c75ba-7812-4c8f-9ced-551b6b006183",
"alertId": "5f64885b2e11d23982c09e03"
}
Response POST /conditions/{id}/evaluations
{
"contextId": "795c75ba-7812-4c8f-9ced-551b6b006183",
"evaluationId": "795c75ba-7812-4c8f-9ced-551b6b006183",
"errors": [
{
"code": "string",
"detail": "string",
"title": "string",
"meta": {}
}
]
}
Get an Evaluation
Path Parameters GET /conditions/{id}/evaluations/{evaluationId}
id string<uid> | The id of the condition |
evaluationId string<uid> | The id of the evaluation |
Responses GET /conditions/{id}/evaluations/{evaluationId}
200 application/json | The evaluation |
404 application/json | Resource does not exist. |
default application/json | Error response. |
GET/conditions/{id}/evaluations/{evaluationId}
curl "https://your-tenant.us.qlikcloud.com/api/v1/conditions/{id}/evaluations/{evaluationId}" \
-H "Authorization: Bearer <API-key>"
Response GET /conditions/{id}/evaluations/{evaluationId}
{
"evaluation": {
"causalEvent": {},
"contextId": "string",
"endTime": "string",
"reloadEndTime": "string",
"id": "string",
"conditionId": "string",
"dataConditionEvaluatorId": "string",
"ownerId": "string",
"result": true,
"resultData": {},
"startTime": "string",
"status": "RUNNING",
"tenantId": "string",
"retries": 0,
"condition": {
"type": "compund",
"compoundCondition": {
"conditionBase": {
"created": "2006-01-02T15:04:05Z07:00",
"createdById": "EIwSIgqjmbHGwQJI0ShQoS3ORdz5nCpA",
"description": "My condition",
"id": "5f31c6e8476ae50001030fb6",
"ownerId": "EIwSIgqjmbHGwQJI0ShQoS3ORdz5nCpA",
"tenantId": "5GI7yWoJk9lvNtuEc66SXCypXVfhbVeH",
"appId": "4xQ1chLoHkOikyzUGcHJquteNrAfketW",
"bookmarkId": "anTjnOABmxlCirVx8IRfhWhLd9IZjENl",
"type": "compound",
"updated": "2006-01-02T14:04:05Z07:00",
"lastReloadTime": "2006-01-02T15:04:05Z07:00"
},
"data": {
"history": {
"enabled": true
},
"conditions": [
"rDDAcMEI1V0qzauEWepEVY8oSLJ9fvA2",
"qFPF1dAtPK4vfPTmKyyuKaqA6iERCwLi",
"4gnz8E6ZruG0lkSKwkau66P24CtORyLr",
"ATs--Z0b_NGyuHajcbQkxu7RrajgPaEQ"
],
"expression": "($0 OR $1) AND ($2 OR $3)"
}
},
"dataCondition": {
"conditionBase": {
"created": "2006-01-02T15:04:05Z07:00",
"createdById": "EIwSIgqjmbHGwQJI0ShQoS3ORdz5nCpA",
"description": "My condition",
"id": "5f31c6e8476ae50001030fb6",
"ownerId": "EIwSIgqjmbHGwQJI0ShQoS3ORdz5nCpA",
"tenantId": "5GI7yWoJk9lvNtuEc66SXCypXVfhbVeH",
"appId": "4xQ1chLoHkOikyzUGcHJquteNrAfketW",
"bookmarkId": "anTjnOABmxlCirVx8IRfhWhLd9IZjENl",
"type": "compound",
"updated": "2006-01-02T14:04:05Z07:00",
"lastReloadTime": "2006-01-02T15:04:05Z07:00"
},
"conditionData": {},
"history": {
"enabled": true
},
"selections": [
{
"field": "SalesTerritoryCountry",
"count": 2,
"selectedSummary": "[ Germany, Australia ]"
}
],
"dimensions": [
{
"qLibraryId": "PgQKNQ",
"field": "Neighborhood",
"title": "Neighborhood"
}
],
"headers": [
"sumnum"
],
"measures": [
{
"qLibraryId": "PgQKNQ",
"qNumFormat": {
"qDec": ".",
"qFmt": "###0",
"qType": "I",
"qUseThou": 1,
"qnDec": 0
},
"title": "sumnum"
}
]
}
},
"errors": [
{
"code": "string",
"title": "string",
"meta": {
"fatal": true
}
}
],
"retryPolicy": "NONE",
"alertId": "5f64885b2e11d23982c09e03",
"removalErrorCount": 3
},
"condition": {
"type": "compund",
"compoundCondition": {
"conditionBase": {
"created": "2006-01-02T15:04:05Z07:00",
"createdById": "EIwSIgqjmbHGwQJI0ShQoS3ORdz5nCpA",
"description": "My condition",
"id": "5f31c6e8476ae50001030fb6",
"ownerId": "EIwSIgqjmbHGwQJI0ShQoS3ORdz5nCpA",
"tenantId": "5GI7yWoJk9lvNtuEc66SXCypXVfhbVeH",
"appId": "4xQ1chLoHkOikyzUGcHJquteNrAfketW",
"bookmarkId": "anTjnOABmxlCirVx8IRfhWhLd9IZjENl",
"type": "compound",
"updated": "2006-01-02T14:04:05Z07:00",
"lastReloadTime": "2006-01-02T15:04:05Z07:00"
},
"data": {
"history": {
"enabled": true
},
"conditions": [
"rDDAcMEI1V0qzauEWepEVY8oSLJ9fvA2",
"qFPF1dAtPK4vfPTmKyyuKaqA6iERCwLi",
"4gnz8E6ZruG0lkSKwkau66P24CtORyLr",
"ATs--Z0b_NGyuHajcbQkxu7RrajgPaEQ"
],
"expression": "($0 OR $1) AND ($2 OR $3)"
}
},
"dataCondition": {
"conditionBase": {
"created": "2006-01-02T15:04:05Z07:00",
"createdById": "EIwSIgqjmbHGwQJI0ShQoS3ORdz5nCpA",
"description": "My condition",
"id": "5f31c6e8476ae50001030fb6",
"ownerId": "EIwSIgqjmbHGwQJI0ShQoS3ORdz5nCpA",
"tenantId": "5GI7yWoJk9lvNtuEc66SXCypXVfhbVeH",
"appId": "4xQ1chLoHkOikyzUGcHJquteNrAfketW",
"bookmarkId": "anTjnOABmxlCirVx8IRfhWhLd9IZjENl",
"type": "compound",
"updated": "2006-01-02T14:04:05Z07:00",
"lastReloadTime": "2006-01-02T15:04:05Z07:00"
},
"conditionData": {},
"history": {
"enabled": true
},
"selections": [
{
"field": "SalesTerritoryCountry",
"count": 2,
"selectedSummary": "[ Germany, Australia ]"
}
],
"dimensions": [
{
"qLibraryId": "PgQKNQ",
"field": "Neighborhood",
"title": "Neighborhood"
}
],
"headers": [
"sumnum"
],
"measures": [
{
"qLibraryId": "PgQKNQ",
"qNumFormat": {
"qDec": ".",
"qFmt": "###0",
"qType": "I",
"qUseThou": 1,
"qnDec": 0
},
"title": "sumnum"
}
]
}
}
}
Delete an Evaluation
Path Parameters DELETE /conditions/{id}/evaluations/{evaluationId}
id string<uid> | The id of the condition |
evaluationId string<uid> | The id of the evaluation |
Responses DELETE /conditions/{id}/evaluations/{evaluationId}
204 object | The evaluation was deleted |
404 application/json | Resource does not exist. |
default application/json | Error response |
DELETE/conditions/{id}/evaluations/{evaluationId}
curl "https://your-tenant.us.qlikcloud.com/api/v1/conditions/{id}/evaluations/{evaluationId}" \
-X DELETE \
-H "Authorization: Bearer <API-key>"
Create condition preview request\
Create condition preview request.
Request Body POST /conditions/previews
application/json | Create condition preview request |
Responses POST /conditions/previews
201 application/json | Condition preview request created. |
400 application/json | Bad request body |
500 application/json | Internal server error. |
default application/json | Error response. |
POST/conditions/previews
curl "https://your-tenant.us.qlikcloud.com/api/v1/conditions/previews" \
-X POST \
-H "Authorization: Bearer <API-key>" \
-H "Content-type: application/json" \
-d '{"type":"compound","compoundCondition":{"conditionBase":{"created":"2006-01-02T15:04:05Z07:00","createdById":"EIwSIgqjmbHGwQJI0ShQoS3ORdz5nCpA","description":"My condition","id":"5f31c6e8476ae50001030fb6","ownerId":"EIwSIgqjmbHGwQJI0ShQoS3ORdz5nCpA","tenantId":"5GI7yWoJk9lvNtuEc66SXCypXVfhbVeH","appId":"4xQ1chLoHkOikyzUGcHJquteNrAfketW","bookmarkId":"anTjnOABmxlCirVx8IRfhWhLd9IZjENl","type":"compound","updated":"2006-01-02T14:04:05Z07:00","lastReloadTime":"2006-01-02T15:04:05Z07:00"},"data":{"history":{"enabled":true},"conditions":["rDDAcMEI1V0qzauEWepEVY8oSLJ9fvA2","qFPF1dAtPK4vfPTmKyyuKaqA6iERCwLi","4gnz8E6ZruG0lkSKwkau66P24CtORyLr","ATs--Z0b_NGyuHajcbQkxu7RrajgPaEQ"],"expression":"($0 OR $1) AND ($2 OR $3)"}},"dataCondition":{"history":{"enabled":true},"conditionBase":{"created":"2006-01-02T15:04:05Z07:00","createdById":"EIwSIgqjmbHGwQJI0ShQoS3ORdz5nCpA","description":"My condition","id":"5f31c6e8476ae50001030fb6","ownerId":"EIwSIgqjmbHGwQJI0ShQoS3ORdz5nCpA","tenantId":"5GI7yWoJk9lvNtuEc66SXCypXVfhbVeH","appId":"4xQ1chLoHkOikyzUGcHJquteNrAfketW","bookmarkId":"anTjnOABmxlCirVx8IRfhWhLd9IZjENl","type":"compound","updated":"2006-01-02T14:04:05Z07:00","lastReloadTime":"2006-01-02T15:04:05Z07:00"},"conditionData":{},"selections":[{"field":"SalesTerritoryCountry","count":2,"selectedSummary":"[ Germany, Australia ]"}],"dimensions":[{"qLibraryId":"PgQKNQ","field":"Neighborhood","title":"Neighborhood"}],"headers":["sumnum"],"measures":[{"qLibraryId":"PgQKNQ","qNumFormat":{"qDec":".","qFmt":"###0","qType":"I","qUseThou":1,"qnDec":0},"title":"sumnum"}]}}'
Request POST /conditions/previews
{
"type": "compound",
"compoundCondition": {
"conditionBase": {
"created": "2006-01-02T15:04:05Z07:00",
"createdById": "EIwSIgqjmbHGwQJI0ShQoS3ORdz5nCpA",
"description": "My condition",
"id": "5f31c6e8476ae50001030fb6",
"ownerId": "EIwSIgqjmbHGwQJI0ShQoS3ORdz5nCpA",
"tenantId": "5GI7yWoJk9lvNtuEc66SXCypXVfhbVeH",
"appId": "4xQ1chLoHkOikyzUGcHJquteNrAfketW",
"bookmarkId": "anTjnOABmxlCirVx8IRfhWhLd9IZjENl",
"type": "compound",
"updated": "2006-01-02T14:04:05Z07:00",
"lastReloadTime": "2006-01-02T15:04:05Z07:00"
},
"data": {
"history": {
"enabled": true
},
"conditions": [
"rDDAcMEI1V0qzauEWepEVY8oSLJ9fvA2",
"qFPF1dAtPK4vfPTmKyyuKaqA6iERCwLi",
"4gnz8E6ZruG0lkSKwkau66P24CtORyLr",
"ATs--Z0b_NGyuHajcbQkxu7RrajgPaEQ"
],
"expression": "($0 OR $1) AND ($2 OR $3)"
}
},
"dataCondition": {
"history": {
"enabled": true
},
"conditionBase": {
"created": "2006-01-02T15:04:05Z07:00",
"createdById": "EIwSIgqjmbHGwQJI0ShQoS3ORdz5nCpA",
"description": "My condition",
"id": "5f31c6e8476ae50001030fb6",
"ownerId": "EIwSIgqjmbHGwQJI0ShQoS3ORdz5nCpA",
"tenantId": "5GI7yWoJk9lvNtuEc66SXCypXVfhbVeH",
"appId": "4xQ1chLoHkOikyzUGcHJquteNrAfketW",
"bookmarkId": "anTjnOABmxlCirVx8IRfhWhLd9IZjENl",
"type": "compound",
"updated": "2006-01-02T14:04:05Z07:00",
"lastReloadTime": "2006-01-02T15:04:05Z07:00"
},
"conditionData": {},
"selections": [
{
"field": "SalesTerritoryCountry",
"count": 2,
"selectedSummary": "[ Germany, Australia ]"
}
],
"dimensions": [
{
"qLibraryId": "PgQKNQ",
"field": "Neighborhood",
"title": "Neighborhood"
}
],
"headers": [
"sumnum"
],
"measures": [
{
"qLibraryId": "PgQKNQ",
"qNumFormat": {
"qDec": ".",
"qFmt": "###0",
"qType": "I",
"qUseThou": 1,
"qnDec": 0
},
"title": "sumnum"
}
]
}
}
Response POST /conditions/previews
{
"previewId": "467ea9bc-bbd7-11ea-b3de-0242ac130004"
}
Get condition preview response
Get condition preview response.
Path Parameters GET /conditions/previews/{id}
id string<uid> | The id of the condition |
Responses GET /conditions/previews/{id}
200 application/json | The evaluation |
400 application/json | Bad request body |
404 application/json | Resource does not exist. |
500 application/json | Internal server error. |
default application/json | Error response. |
GET/conditions/previews/{id}
curl "https://your-tenant.us.qlikcloud.com/api/v1/conditions/previews/{id}" \
-H "Authorization: Bearer <API-key>"
Response GET /conditions/previews/{id}
{
"previewId": "467ea9bc-bbd7-11ea-b3de-0242ac130004",
"status": "ACCEPTED",
"evaluation": {
"ownerId": "string",
"resultUrl": "string",
"startTime": "string",
"endTime": "string",
"tenantId": "string"
},
"condition": {
"type": "compund",
"compoundCondition": {
"conditionBase": {
"created": "2006-01-02T15:04:05Z07:00",
"createdById": "EIwSIgqjmbHGwQJI0ShQoS3ORdz5nCpA",
"description": "My condition",
"id": "5f31c6e8476ae50001030fb6",
"ownerId": "EIwSIgqjmbHGwQJI0ShQoS3ORdz5nCpA",
"tenantId": "5GI7yWoJk9lvNtuEc66SXCypXVfhbVeH",
"appId": "4xQ1chLoHkOikyzUGcHJquteNrAfketW",
"bookmarkId": "anTjnOABmxlCirVx8IRfhWhLd9IZjENl",
"type": "compound",
"updated": "2006-01-02T14:04:05Z07:00",
"lastReloadTime": "2006-01-02T15:04:05Z07:00"
},
"data": {
"history": {
"enabled": true
},
"conditions": [
"rDDAcMEI1V0qzauEWepEVY8oSLJ9fvA2",
"qFPF1dAtPK4vfPTmKyyuKaqA6iERCwLi",
"4gnz8E6ZruG0lkSKwkau66P24CtORyLr",
"ATs--Z0b_NGyuHajcbQkxu7RrajgPaEQ"
],
"expression": "($0 OR $1) AND ($2 OR $3)"
}
},
"dataCondition": {
"conditionBase": {
"created": "2006-01-02T15:04:05Z07:00",
"createdById": "EIwSIgqjmbHGwQJI0ShQoS3ORdz5nCpA",
"description": "My condition",
"id": "5f31c6e8476ae50001030fb6",
"ownerId": "EIwSIgqjmbHGwQJI0ShQoS3ORdz5nCpA",
"tenantId": "5GI7yWoJk9lvNtuEc66SXCypXVfhbVeH",
"appId": "4xQ1chLoHkOikyzUGcHJquteNrAfketW",
"bookmarkId": "anTjnOABmxlCirVx8IRfhWhLd9IZjENl",
"type": "compound",
"updated": "2006-01-02T14:04:05Z07:00",
"lastReloadTime": "2006-01-02T15:04:05Z07:00"
},
"conditionData": {},
"history": {
"enabled": true
},
"selections": [
{
"field": "SalesTerritoryCountry",
"count": 2,
"selectedSummary": "[ Germany, Australia ]"
}
],
"dimensions": [
{
"qLibraryId": "PgQKNQ",
"field": "Neighborhood",
"title": "Neighborhood"
}
],
"headers": [
"sumnum"
],
"measures": [
{
"qLibraryId": "PgQKNQ",
"qNumFormat": {
"qDec": ".",
"qFmt": "###0",
"qType": "I",
"qUseThou": 1,
"qnDec": 0
},
"title": "sumnum"
}
]
}
},
"errors": [
{
"code": "string",
"detail": "string",
"title": "string",
"meta": {}
}
]
}
Selections
Array<Selections_inner>List of fields according to the bookmark definition
Properties
field string | Field name |
count number | The count |
selectedSummary Array<string> | Array of selected |
ConditionResponse
objectProperties
condition optional | only one of compoundCondition or dataCondition should be set |
errors | No description |
MultipleEvaluationsRemovalRequest
Array<string>MultipleEvaluationsRemovalResponse
objectProperties
evaluationIDs Array<string> | No description |
PreviewResponse
objectProperties
previewId string<uid> | When the resource was created |
PreviewStatusResponse
objectProperties
previewId string<uid> | When the resource was created |
status string | No description Enum: ACCEPTED FAILED RUNNING SUCCESSFUL |
evaluation optional | No description |
condition optional | only one of compoundCondition or dataCondition should be set |
errors | No description |
CompoundCondition
objectA condition made up of other conditions
Properties
conditionBase optional | A base condition |
data optional | Condition data |
CompoundResult
objectProperties
conditions | A map of variable names to sub-condition results |
expression string | The expression that was executed |
ConditionCreateRequest
objectonly one of compoundCondition or dataCondition should be set
Properties
type string | Indicates the condition type Enum: compound data |
compoundCondition optional | A condition made up of other conditions |
dataCondition optional | A condition based on data within an app |
Condition
objectonly one of compoundCondition or dataCondition should be set
Properties
type string | Indicates the condition type Enum: compound data |
compoundCondition optional | A condition made up of other conditions |
dataCondition optional | A condition based on data within an app |
ConditionDCEMirror
objectonly one of compoundCondition or dataCondition should be set
Properties
type string | Indicates the condition type Enum: compound data |
compoundCondition optional | A condition made up of other conditions |
dataCondition optional | A condition based on data within an app |
ConditionBase
objectA base condition
Properties
created string<string> | When the resource was created |
createdById string<uid> | The id of the user which created the condition |
description string | Description of the condition |
id string<uid> | The unique id for the resource |
ownerId string<uid> | The id of the user the user which owns the condition |
tenantId string<uid> | The tenant id |
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 |
type string | Indicates the condition type Enum: compound data |
updated string<string> | When the resource was last updated |
lastReloadTime string<RFC3339> | 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. |
ConditionPage
objectProperties
data | No description |
links optional | No description |
ConditionPatch
Array<ConditionPatch_inner>A JSON Patch document as defined in https://datatracker.ietf.org/doc/html/rfc6902.
Properties
op string | The operation to be performed. Enum: replace remove add |
path string | The path for the given resource field to patch. |
value optional object | The value to be used for this operation. |
CreateEvaluationRequest
objectProperties
causalEvent optional | No description |
contextId string | Extra context information to carry through to the result if any |
alertId optional string | The id of the alerting task the condition and evaluation is part of |
CreateEvaluationResponse
objectProperties
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 |
errors | No description |
GetEvaluationResponse
objectGet response returns the evaluation and condition associated
Properties
evaluation optional | No description |
condition optional | only one of compoundCondition or dataCondition should be set |
DataConditionCreateRequest
objectA condition based on data within an app
Properties
history optional | History properties |
conditionBase optional | A base condition |
conditionData optional object | List of parameters specific to data condition are available in DCE and will be passed as is to DCE as per https://github.com/qlik-trial/data-condition-evaluator/blob/master/api-docs.yml |
selections | List of fields according to the bookmark definition |
dimensions | List of returned dimensions |
headers Array<string> | List of header labels |
measures | List of returned measures |
DataCondition
objectA condition based on data within an app
Properties
conditionBase optional | A base condition |
conditionData optional object | List of parameters specific to data condition are available in DCE and will be passed as is to DCE as per https://github.com/qlik-trial/data-condition-evaluator/blob/master/api-docs.yml |
history optional | History properties |
selections | List of fields according to the bookmark definition |
dimensions | List of returned dimensions |
headers Array<string> | List of header labels |
measures | List of returned measures |
DataConditionDCEMirror
objectA condition based on data within an app
Properties
conditionBase optional | A base condition |
conditionData optional | No description |
history optional | History properties |
selections | List of fields according to the bookmark definition |
dimensions | List of returned dimensions |
headers Array<string> | List of header labels |
measures | List of returned measures |
HistoryProperties
objectHistory properties
Properties
enabled boolean | Is history enabled |
HistoryContext
stringEVALUATION - when the trigger-based evaluation request got received INITIAL - when the initial request is sent to create the first history item PREVIEW - when the request is a preview
Enum:
INITIAL
EVALUATION
PREVIEW
HistoryCondition
objectA condition based on data within an app with history
Properties
context string | EVALUATION - when the trigger-based evaluation request got received INITIAL - when the initial request is sent to create the first history item PREVIEW - when the request is a preview Enum: INITIAL EVALUATION PREVIEW |
type string | Indicates the condition type Enum: compound data |
compoundCondition optional | A condition made up of other conditions |
dataCondition optional | A condition based on data within an app |
ConditionDimensions
Array<ConditionDimensions_inner>List of returned dimensions
Properties
qLibraryId string | Refers to a dimension stored in the library |
field string | Field referred to the dimension where the selection is made. This may be used to generate deep links. |
title string | Dimension title |
ConditionHeaders
Array<string>List of header labels
ConditionMeasures
Array<ConditionMeasures_inner>List of returned measures
Properties
qLibraryId string | Refers to a measure stored in the library |
qNumFormat object | Format of the field |
title string | Measure title |
DataOperation
objectonly one of manualOperation, setOperation or measureOperation should beset
Properties
manualOperation optional | An operation using a static value |
measureOperation optional | An operation against the value of a different measure |
setOperation optional | An operation against a computed aggregate value of the values in the set of values from the app |
DataResult
objectProperties
count optional | No description |
negative Array<Array<>> | No description |
percentage optional | No description |
positive Array<Array<>> | No description |
Error
objectProperties
code string | Error code specific to condition manager. |
detail string | Error cause. |
title string | Error title. |
meta optional object | No description |
SingleErrorResponse
objectProperties
code string | Error code specific to condition manager. |
detail string | Error cause. |
title string | Error title. |
meta optional object | meta properties for an error. |
Errors
Array<Error>Properties
code string | Error code specific to condition manager. |
detail string | Error cause. |
title string | Error title. |
meta object | No description |
ErrorResponse
objectProperties
errors | Array of errors |
traceId string | trace id |
EvaluationErrors
Array<EvaluationError>Properties
code string | Error code specific to condition smanager. |
status | Error status. |
title string | Error title. |
meta | No description |
EvaluationError
objectProperties
code string | Error code specific to condition smanager. |
status | Error status. |
title string | Error title. |
meta optional | No description |
Evaluations
objectProperties
evaluations | No description |
Evaluation
objectProperties
causalEvent optional object | Representation of the event that caused the condition to be evaluated if one was included on when the evaluation was triggered |
contextId string | Extra context information to carry through to the result if one was included on when the evaluation was triggered |
endTime string<string> | The time the evaluation ended |
reloadEndTime string<string> | The time when the reload was completed in Engine |
id string<uid> | The unique id for the resource |
conditionId string<uid> | The unique id of the associated condition |
dataConditionEvaluatorId deprecated string<uid> | The unique id for the resource given from Data Condition Evaluator. |
ownerId string<uid> | userId of user being impersonated to evaluate the condition |
result boolean | The final result of the evalution |
resultData optional object | Condition type specific result, one of dataResult or compoundResult |
startTime string<string> | The time the evaluation started |
status string | The status of the evaluation execution Enum: RUNNING FAILED FINISHED DELETING |
tenantId string<uid> | The tenant id |
retries integer | number of retries sent to DCE |
condition optional | only one of compoundCondition or dataCondition should be set |
errors | No description |
retryPolicy string | what kind of retry policy this evaluation has Enum: NONE TOO_MANY_REQUESTS GENERIC_ERROR |
alertId string | The id of the alerting task the condition and evaluation is part of |
removalErrorCount integer | The number of times we have attempted to remove this evaluation data-file |
PreviewEvaluation
objectProperties
ownerId string<uid> | userId of user being impersonated to evaluate the condition |
resultUrl string | URL to download the condition results |
startTime string<string> | The time the evaluation started |
endTime string<string> | The time the evaluation ended |
tenantId string<uid> | The tenant id |
ManualOperation
objectAn operation using a static value
Properties
operand | The static value to evaluate against |
operator optional | one of numericalOperator or stringOperator should be set |
MeasureOperation
objectAn operation against the value of a different measure
Properties
compareToMeasure string | The name of the measure to compare against |
offset number | When present this offset is applied to the second measure value |
offsetIsPercent boolean | When present the offset isn't a fixed value applied to the second value but rather the evaluation will apply against the percent of the value. |
operator | No description Enum: equal notEqual greaterThan greaterThanOrEqual lessThan lessThanOrEqual in |
NumericalOperator
stringEnum:
equal
notEqual
greaterThan
greaterThanOrEqual
lessThan
lessThanOrEqual
in
Operator
objectone of numericalOperator or stringOperator should be set
Properties
numericalOperator | No description Enum: equal notEqual greaterThan greaterThanOrEqual lessThan lessThanOrEqual in |
stringOperator | No description Enum: containsString containsStringCaseInsensitive startsWith startsWithCaseInsensitive endsWith endsWithCaseInsensitive |
SetOperation
objectAn operation against a computed aggregate value of the values in the set of values from the app
Properties
aggregation string | The aggregate operation which gives the value to perform the operation against Enum: average standardDeviation percentile |
operand | The value to evaluate against. In the case of percentile aggregation this is the percentile factor. |
operator | No description Enum: equal notEqual greaterThan greaterThanOrEqual lessThan lessThanOrEqual in |
StringOperator
stringEnum:
containsString
containsStringCaseInsensitive
startsWith
startsWithCaseInsensitive
endsWith
endsWithCaseInsensitive
APISettingsUpload
objectProperties
enable-conditions boolean | Whether API endpoints for condition manager are enabled |
APISettings
objectProperties
tenantId optional string | These persisted api settings are only available for this tenant. Extracted from request JWT. |
enable-conditions boolean | Whether API endpoints for condition manager are enabled |
Self
objectObject with Href to a particular element or set of elements
Properties
href string | No description |
Page
objectProperties
href string | URL to particular set of elements |
token string | Page unique token |
type string | Page type, can be next or prev Enum: prev next |
Links
objectProperties
self optional | Object with Href to a particular element or set of elements |
ListLinks
objectProperties
self optional | Object with Href to a particular element or set of elements |
prev optional | No description |
next optional | No description |
CausalEvent
objectProperties
manualTrigger boolean | No description |
eventID string | the event id from eventing |
manualTriggerID string | the manual trigger id from eventing if present |
data optional | No description |
extensions optional | No description |
CausalEventData
objectProperties
eventID string | the event id from eventing service. |
lastReloadTime string<RFC3339> | The time of the last reload |
CausalEventExtensions
objectProperties
tenantID string | No description |
userID string | No description |
sessionID string | No description |
Selections_inner
objectProperties
field string | Field name |
count number | The count |
selectedSummary Array<string> | Array of selected |
CompoundCondition_data
objectCondition data
Properties
history optional | History properties |
conditions Array<string> | Array of condition ids |
expression string | Boolean expression made up of variable names defined from the conditions section |
ConditionPatch_inner
objectProperties
op string | The operation to be performed. Enum: replace remove add |
path string | The path for the given resource field to patch. |
value optional object | The value to be used for this operation. |
DataConditionDCEMirror_conditionData_condition
objectProperties
operations optional object | No description |
logic Array<string> | Optional logic defining how the operations will be evaluated. Can contain operation indexes or logic expressions |
DataConditionDCEMirror_conditionData
objectProperties
condition optional | No description |
ConditionDimensions_inner
objectProperties
qLibraryId string | Refers to a dimension stored in the library |
field string | Field referred to the dimension where the selection is made. This may be used to generate deep links. |
title string | Dimension title |
ConditionMeasures_inner
objectProperties
qLibraryId string | Refers to a measure stored in the library |
qNumFormat optional object | Format of the field |
title string | Measure title |
DataResult_count
objectProperties
negative number | No description |
positive number | No description |
total number | No description |
DataResult_percentage
objectProperties
negative number | No description |
positive number | No description |
EvaluationError_meta
objectProperties
fatal boolean | defines whether an error is recoverable or not |