Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
saranrajk
Contributor II
Contributor II

how to download app using qrs api and at what path the app will be saved

Hi,

I'm trying to export app from qlik sense using QRS 

1, at first call it returns an token ID when I used the follow url

/qrs/app/{appid}/export?xrfkey=12345678qwertyui'
2, and for the call using token id it returns me the out put some thing like encoded and I didn't the qvf file and for the second call I have used the following url
/qrs/download/app/{appid}/{tokenid_returned _from_ the _first_call}/{qppname}.qvf
I wanna know at what path the app will be down load
3 Replies
Anonymous
Not applicable

Hi Saranrajk  ,

For as far i know, the QRS won't save the .qvf for you on a specific folder, but will return de App itself (in form of a stream)

I use the same API and the response from this call (qrs/download/app/{appid}/{tokenid_returned _from_ the _first_call}/{qppname}.qvf) is a "Stream".

So with example in C#, you can save this stream as a file somewhat like:

 servercall:

HttpWebResponse response = (HttpWebResponse)req.GetResponse();
Stream str = response.GetResponseStream();

and Saving file to system:

using (System.IO.FileStream output = new System.IO.FileStream(@"" + txtFolder + "\\" + fileName + ".qvf", FileMode.Create))
            {
                str .CopyTo(output);
           }

regards Boycke

saranrajk
Contributor II
Contributor II
Author

Hi Boycke, 

thank you for your response as you said I wrote it as stream in to a file with QVF extension using node js, but when I',m trying to import that file through qmc it throw me an error as invalid app.

subramani_r
Contributor III
Contributor III

Hey guys.

I generated the download path for the qlik app by calling the qrs API, but unable to download the qvf by appending it with the host url, any thoughts on how to fix it?