Qlik Community

Qlik Sense Integration, Extensions, & APIs

Discussion board where members can learn more about Integration, Extensions and API’s for Qlik Sense.

ruanhaese
Contributor

Qlik Sense API - getting Data

Hi

I'm playing around with the API's for Qlik Sense. More specifically the Engine API.

Its very much trial and error as I'm struggling to find documentation on using the API's.

My question is - how do I get to send a "qlik query" through to the API engine,

for example data = "SUM( {< Person={'John'} >} Amount)" and it should return the correct value through all the associations.

Basically I've been able to connect to the Engine and by selecting the right App and providing a table

I was able to collect a dataset back in .NET

I'm manipulating the dataset myself but I'm sure that I'm probably doing this the wrong way

as Qlik API's might be able to do the calculations (with all the associations) for you.

Any help on this or links to tutorials on what the separate API's are for would be greatly appreciated.

Tags (1)
1 Solution

Accepted Solutions
Employee
Employee

Re: Qlik Sense API - getting Data

You might want to have a look at this example:

http://branch.qlik.com/#!/project/5818518b9fa7b8156fa73588

It illustrates how to use hypercubes through the .Net SDK to access and filter data. But for a case where you just want to evaluate an expression like you mention in your post, you would typically use this endpoint:

https://help.qlik.com/en-US/sense-developer/February2018/apis/net%20sdk/html/M_Qlik_Engine_IApp_Eval...

Once you have opened the app, you can do like this:

var value = app.Evaluate("SUM( {< Person={'John'} >} Amount)");

Or if you want the numeric value, then you could do like this:

var numValue = app.EvaluateEx("SUM( {< Person={'John'} >} Amount)").Number;

3 Replies
akpofureenughwu
Contributor II

Re: Qlik Sense API - getting Data

Follow this link:

App integration API - simplify analysis of large data volumes

I hope this is helpful

Employee
Employee

Re: Qlik Sense API - getting Data

You might want to have a look at this example:

http://branch.qlik.com/#!/project/5818518b9fa7b8156fa73588

It illustrates how to use hypercubes through the .Net SDK to access and filter data. But for a case where you just want to evaluate an expression like you mention in your post, you would typically use this endpoint:

https://help.qlik.com/en-US/sense-developer/February2018/apis/net%20sdk/html/M_Qlik_Engine_IApp_Eval...

Once you have opened the app, you can do like this:

var value = app.Evaluate("SUM( {< Person={'John'} >} Amount)");

Or if you want the numeric value, then you could do like this:

var numValue = app.EvaluateEx("SUM( {< Person={'John'} >} Amount)").Number;

rodolfoviolac
New Contributor II

Re: Qlik Sense API - getting Data

You can use this package https://github.com/qmoni/qliksense-api

Community Browser