Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Apr 4, 2023 3:49:22 AM
Sep 23, 2021 10:31:10 AM
This is a sample on how to export an app from Qlik Sense SaaS using the REST API.
The API documentation can be found here: https://qlik.dev/apis/rest/apps#%23%2Fentries%2Fapps%2F-appId%2Fexport-post
The example provided in this article is for demonstration purposes only. Support and modifications cannot be supported. For further assistance, please see our Qlik Sense Integrations and API forum.
The below demonstrates how to call the API to export the app and download the file.
The API call itself will create a temporary file of the exported app that needs to be downloaded with a separate call. The URL to the temporary file is returned in the response header "Location".
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
$tenantname = "https://mytenant.eu.qlikcloud.com"
$apikey ="eyJhbGciOiJ...sxhFexiXQPUdpkNE0Z"
$appid ="8d5919f3-5131-49fe-8a14-5d8d1e8c9b22"
$hdrs = @{}
$hdrs.Add("Authorization","Bearer "+$apikey)
$hdrs.Add("content-type","application/json")
$url = $tenantname+"/api/v1/apps/"+$appid+"/export"
$resp = Invoke-WebRequest -Uri $url -Method Post -Headers $hdrs
$tempFileUrl = $tenantname+$resp.Headers.Location
Invoke-WebRequest -Uri $tempFileUrl -OutFile "C:\temp\exportedfile.qvf" -Headers $hdrs
Hi,
This is very helpful for sharing apps between tenants.
I'm using Qlik REST connector to activate all QLIK REST APIs and use WITH CONNECTION to run all calls.
Maybe you can assist with the last step of [-OutFileUrl] on how to implement it using WITH CONNECTION approach in Qlik script.
Thanks in advance.
Hello @CreoLabs
I recommend posting about your requirement in our Integrations and API forums. There, you will have access to our active userbase as well as our active support agents.
All the best,
Sonja
OK. Thanks
Will this work with any file in QS SaaS? QVDs? Excel?
It's not a problem with any data file - you can make STORE to any cloud storage location easily.
The problem is with the application itself - this script should support export of the app itself