Skip to main content
Announcements
See why Qlik is a Leader in the 2024 Gartner® Magic Quadrant™ for Analytics & BI Platforms. Download Now
cancel
Showing results for 
Search instead for 
Did you mean: 
g_bolshakov
Contributor III
Contributor III

Get data from API via Python

Hello colleagues!

I have already read almost all the posts on the forum and did not find an answer to my question:
Can I get data from the app using the QRS API?
For example: I have an app. I would like to get its data via the API (for example, the sales amount). Or can I get the table in some form and then I can calculate the value of the sales amount myself.

I came across the app/datasegment/full method. It seemed to me that you can get a data segment from it, but the only interesting thing there is the metaDataObject field, but its meaning is not clear to me

Thank you in advance for any help!

Labels (4)
8 Replies
NadiaB
Support
Support

Hi @g_bolshakov 

I believe this might be the information you are looking for, let me know if that helps.

https://help.qlik.com/en-US/sense-developer/April2020/Subsystems/APIs/Content/Sense_ClientAPIs/Capab...

Kind regards.

 

Don't forget to mark as "Solution Accepted" the comment that resolves the question/issue. #ngm
g_bolshakov
Contributor III
Contributor III
Author

Hi @NadiaB !

Thank you for your suggestion, unfortunately, I failed to use this method for my task. If anything changes, I'll let you know.

subaru
Partner - Contributor II
Partner - Contributor II

Hi @g_bolshakov , did u get anything working on this? I also have the same requirement but unable to do so.

Øystein_Kolsrud
Employee
Employee

The TLDR answer to your question is: No, it is not possible to get data from an app using the QRS API. You have to use the engine API to extract data from apps.

Some more explanation: In general, the responsibility between the QRS and Engine APIs are divided like this:

  • App Management: QRS
  • App Contents: Engine

So operations such as copy, import, publish, etc is handled through QRS, while data extraction and app modifications such as adding or editing sheets and visualizations is handled by the engine. There are some exceptions to this, but that's the general picture. And extracting data is definitely not an exception but right in the core of the responsibility of the engine. It's the engine that has all the logic for doing the expression evaluation and data aggregation that is necessary to return data.

I am not sure what the exact semantics of the "app/datasegment" endpoint is, but that's an endpoint that is used internally that can only be called by the Qlik Sense service users (like INTERNAL\sa_engine). I think it's associated with some security aspect (which is handled by the QRS).

beatYesterday
Contributor III
Contributor III

I'm in a situation where I have the Engine API connection setup with Python and am able to execute the exportData method on the desired table object.  However, I'm having difficulty actually downloading the temporary csv file via the qUrl returned from exportData task.  How should one go about accessing the CSV?

Thank you,

 

Geoff

ameher
Contributor
Contributor

Hello Geoff,
I am trying to do something very similar. Instead of exporting data to a csv file I'm trying to export it in a Pandas DataFrame. Could you please help me with what you have achieved so far?
It will save my life!

beatYesterday
Contributor III
Contributor III

Hi @ameher,  feel free to send me a message and you can give me specifics about what you're trying to do exactly.  Admittedly, it's been years since I've done this and don't remember the specifics off the top of my head.

Larry_blacc
Contributor
Contributor

@ameher And @beatYesterday 

I hope you are both well, I know it might be a minute since you both attempted this task but I have a similar problem and would appreciate any assistance.

 

there is a client portal which has Qlikview dashboard embedded in it, I am expected to apply some filters, expand the table and export the data programmatically using python. I’ve been trying selenium but it’s not work

Can you please point me