Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Sep 9, 2021 4:49:22 AM
Sonja_Bauernfeind
Oct 9, 2018 9:19:39 AM
This article explains how to using QRS API a user can export and save a Qlik Sense application using Powershell.
The below script exports the app to the C:\temp folder as test.qvf. Make sure to create the C:\temp folder beforehand
$hdrs = @{} $hdrs.Add("X-Qlik-xrfkey","EzFIU5eur2XQBfW7") $hdrs.Add("X-Qlik-User","UserDirectory=DOMAIN;UserId=Administrator") $cert = Get-ChildItem -Path "Cert:\CurrentUser\My" | Where {$_.Subject -like '*QlikClient*'} $servername = "https://qlikserver2.domain.local" $url = $servername+":4242/qrs/app/3b56d983-b359-4e40-8711-75012814cd70/export/9d8e95a5-9c67-4b6b-8a74-78f3a7bd88e2?xrfkey=EzFIU5eur2XQBfW7" $output = "C:\temp\test.qvf" $firstcall=Invoke-RestMethod -UseDefaultCredentials -Uri $url -Method Post -Headers $hdrs -Certificate $cert $url2= $servername+$firstcall.downloadPath Invoke-RestMethod -UseDefaultCredentials -Uri $url2 -Method Get -ContentType 'multipart/form-data' -OutFile $output