<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to export an app to a folder using API and Powershell? in Integration, Extension &amp; APIs</title>
    <link>https://community.qlik.com/t5/Integration-Extension-APIs/How-to-export-an-app-to-a-folder-using-API-and-Powershell/m-p/1884054#M16192</link>
    <description>&lt;P&gt;Thanks Levi.&lt;/P&gt;
&lt;P&gt;My requirement is to download qlik visualization in excel format from a non Qlik authenticated screen. Do I need to again authenticate Qlik in this screen and do the login mechanism and then export the objects? Is there any other way to export the visualizations to excel without doing the login mechanism i.e. via any scripting?&lt;/P&gt;</description>
    <pubDate>Fri, 21 Jan 2022 19:24:53 GMT</pubDate>
    <dc:creator>Kaushiki</dc:creator>
    <dc:date>2022-01-21T19:24:53Z</dc:date>
    <item>
      <title>How to export an app to a folder using API and Powershell?</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/How-to-export-an-app-to-a-folder-using-API-and-Powershell/m-p/1608192#M11056</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I am fairly new to Powershell and I have to export Qlik Sense app from our enterprise environment using AP and Poweshell.&lt;/P&gt;&lt;P&gt;Can anyone guide me through maybe with a sample code of how this is done please?&lt;/P&gt;&lt;P&gt;In our enterprise environment&amp;nbsp; we use single sign-on Windows authentication, I have rootadmin level capabilitiy with my account.&lt;/P&gt;&lt;P&gt;I read this page here &lt;A href="http://help.qlik.com/en-US/sense-developer/April2019/Subsystems/RepositoryServiceAPI/Content/Sense_RepositoryServiceAPI/RepositoryServiceAPI-App-Export-App-Two-Calls.htm" target="_blank"&gt;http://help.qlik.com/en-US/sense-developer/April2019/Subsystems/RepositoryServiceAPI/Content/Sense_RepositoryServiceAPI/RepositoryServiceAPI-App-Export-App-Two-Calls.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;However beyond this I need help on how to write the code.&lt;/P&gt;&lt;P&gt;Anyone have something they can share? &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I am familiar with variables, and Get commands in Powershell but probably consider myself a beginer when it comes to these activities.&lt;/P&gt;</description>
      <pubDate>Wed, 31 Jul 2019 17:50:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/How-to-export-an-app-to-a-folder-using-API-and-Powershell/m-p/1608192#M11056</guid>
      <dc:creator>mwallman</dc:creator>
      <dc:date>2019-07-31T17:50:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to export an app to a folder using API and Powershell?</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/How-to-export-an-app-to-a-folder-using-API-and-Powershell/m-p/1608309#M11059</link>
      <description>&lt;P&gt;Rather than reinventing the wheel you can use the Qlik-CLI PowerShell module.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://github.com/ahaydon/Qlik-Cli" target="_blank" rel="noopener"&gt;https://github.com/ahaydon/Qlik-Cli&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;(If you have internet Access just type )&lt;/P&gt;
&lt;PRE&gt;&lt;SPAN class="pl-c1"&gt;Install-Module&lt;/SPAN&gt; Qlik&lt;SPAN class="pl-k"&gt;-&lt;/SPAN&gt;Cli&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;Then you can connect to the Qlik Sense server using&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Connect-Qlik&lt;/PRE&gt;
&lt;P&gt;and export the app using&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Export-QlikApp -id &amp;lt;AppID&amp;gt; -filename &amp;lt;pathtosaveitto&amp;gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Aug 2019 02:35:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/How-to-export-an-app-to-a-folder-using-API-and-Powershell/m-p/1608309#M11059</guid>
      <dc:creator>Marc</dc:creator>
      <dc:date>2019-08-01T02:35:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to export an app to a folder using API and Powershell?</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/How-to-export-an-app-to-a-folder-using-API-and-Powershell/m-p/1608378#M11061</link>
      <description>&lt;P&gt;Bonjour Marc&lt;/P&gt;&lt;P&gt;Unfortunately we are not allowed to use that so have to use PowerShell!&lt;/P&gt;&lt;P&gt;Any suggestions please?&lt;/P&gt;</description>
      <pubDate>Thu, 01 Aug 2019 08:30:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/How-to-export-an-app-to-a-folder-using-API-and-Powershell/m-p/1608378#M11061</guid>
      <dc:creator>mwallman</dc:creator>
      <dc:date>2019-08-01T08:30:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to export an app to a folder using API and Powershell?</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/How-to-export-an-app-to-a-folder-using-API-and-Powershell/m-p/1608383#M11062</link>
      <description>&lt;P&gt;Qlik-CLI is a PowerShell module.&lt;/P&gt;
&lt;P&gt;It is a set of pre configured scripts that simplify the process for authenticating to sense and accessing the APIs.&lt;/P&gt;
&lt;P&gt;"We have to use PowerShell".. this is PowerShell &lt;span class="lia-unicode-emoji" title=":beaming_face_with_smiling_eyes:"&gt;😁&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Aug 2019 08:56:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/How-to-export-an-app-to-a-folder-using-API-and-Powershell/m-p/1608383#M11062</guid>
      <dc:creator>Marc</dc:creator>
      <dc:date>2019-08-01T08:56:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to export an app to a folder using API and Powershell?</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/How-to-export-an-app-to-a-folder-using-API-and-Powershell/m-p/1608497#M11064</link>
      <description>&lt;P&gt;As&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/29458"&gt;@Marc&lt;/a&gt;&amp;nbsp;mentioned, Qlik-CLI is an attractive route to go for this or any PowerShell related QRS activities. It's really quite a bit easier than recreating the wheel.&lt;/P&gt;
&lt;P&gt;Let's compare the Qlik-CLI method vs. a raw PowerShell method:&lt;/P&gt;
&lt;P&gt;Qlik-CLI:&lt;/P&gt;
&lt;LI-CODE lang="csharp"&gt;Connect-Qlik
Get-QlikApp -filter "name eq 'Random Data'" | Export-QlikApp -filename "$($(Get-QlikApp -filter "name eq 'Random Data'").name).qvf"&lt;/LI-CODE&gt;
&lt;P&gt;Raw PowerShell:&lt;/P&gt;
&lt;LI-CODE lang="csharp"&gt;$hdrs = @{}
$hdrs.Add("X-Qlik-Xrfkey","examplexrfkey123")
$hdrs.Add("X-Qlik-User", "UserDirectory=INTERNAL; UserId=sa_api")
$cert = Get-ChildItem -Path "Cert:\CurrentUser\My" | Where {$_.Subject -like '*QlikClient*'}
$body = '{}'
$Data = Get-Content C:\ProgramData\Qlik\Sense\Host.cfg
$FQDN = [System.Text.Encoding]::UTF8.GetString([System.Convert]::FromBase64String($($Data)))
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]'Ssl3,Tls,Tls11,Tls12' 
$app = Invoke-RestMethod -Uri "https://$($FQDN):4242/qrs/app/full?filter=(name eq 'Random Data')&amp;amp;xrfkey=examplexrfkey123" -Method Get -Headers $hdrs -ContentType 'application/json' -Certificate $cert
$exporttoken = Invoke-RestMethod -Uri "https://$($FQDN):4242/qrs/App/$($app.id)/export/6f9e5622-7306-4b00-9da2-15b132cf7984?xrfkey=examplexrfkey123&amp;amp;skipdata=false" -Method Post -Body $body -Headers $hdrs -ContentType 'application/json' -Certificate $cert
Invoke-RestMethod -Uri "https://$($FQDN):4242$($exporttoken.downloadPath)" -Method Get -Headers $hdrs -ContentType 'application/json' -Certificate $cert |  Set-Content "$($app.name).qvf" -Encoding Ascii&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But if you&amp;nbsp;&lt;EM&gt;have&lt;/EM&gt; to recreate the wheel, then I have examples for &lt;A href="https://github.com/levi-turner/QlikSenseScripts/blob/master/qlik_sense_qrs_generic-GET.ps1" target="_self"&gt;GETs&lt;/A&gt; and &lt;A href="https://github.com/levi-turner/QlikSenseScripts/blob/master/qlik_sense_qrs_generic-POST.ps1" target="_self"&gt;POSTs&lt;/A&gt; on my GitHub&lt;/P&gt;</description>
      <pubDate>Thu, 01 Aug 2019 12:24:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/How-to-export-an-app-to-a-folder-using-API-and-Powershell/m-p/1608497#M11064</guid>
      <dc:creator>Levi_Turner</dc:creator>
      <dc:date>2019-08-01T12:24:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to export an app to a folder using API and Powershell?</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/How-to-export-an-app-to-a-folder-using-API-and-Powershell/m-p/1884044#M16190</link>
      <description>&lt;P&gt;Hi Levi,&lt;/P&gt;
&lt;P&gt;Is it possible to export data to excel instead of qvf using Qlik-cli?&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jan 2022 19:00:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/How-to-export-an-app-to-a-folder-using-API-and-Powershell/m-p/1884044#M16190</guid>
      <dc:creator>Kaushiki</dc:creator>
      <dc:date>2022-01-21T19:00:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to export an app to a folder using API and Powershell?</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/How-to-export-an-app-to-a-folder-using-API-and-Powershell/m-p/1884049#M16191</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/79608"&gt;@Kaushiki&lt;/a&gt;&amp;nbsp;: No. Qlik-Cli-Windows accesses the RESTful APIs on Qlik Sense Enterprise Client Managed (principally the Repository API). This API does not look&amp;nbsp;&lt;EM&gt;inside&lt;/EM&gt; an app. Any actions which are possible via the QMC would be possible via the Repository API (and therefore Qlik-Cli-Windows). Exporting data from a table is an Engine action which is exposed via the Engine APIs (&lt;A href="https://help.qlik.com/en-US/sense-developer/Subsystems/EngineAPI/Content/Sense_EngineAPI/WorkingWithAppsAndVisualizations/ExportData/export-data-GO.htm" target="_self"&gt;example&lt;/A&gt;). This is a slightly more complicated API but is possible with additional work. PowerShell would not be the appropriate language for this, instead an actual programming language like &lt;A href="https://help.qlik.com/en-US/sense-developer/Subsystems/NetSDKAPI/Content/Sense_NetSDKAPI/CodeExamples/Download-code-examples.htm" target="_self"&gt;C#&lt;/A&gt; or &lt;A href="https://github.com/yoichiH01/Qlik-Sense-Engine-API---GetAllInfos" target="_self"&gt;NodeJS&lt;/A&gt; would be recommended.&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jan 2022 19:17:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/How-to-export-an-app-to-a-folder-using-API-and-Powershell/m-p/1884049#M16191</guid>
      <dc:creator>Levi_Turner</dc:creator>
      <dc:date>2022-01-21T19:17:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to export an app to a folder using API and Powershell?</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/How-to-export-an-app-to-a-folder-using-API-and-Powershell/m-p/1884054#M16192</link>
      <description>&lt;P&gt;Thanks Levi.&lt;/P&gt;
&lt;P&gt;My requirement is to download qlik visualization in excel format from a non Qlik authenticated screen. Do I need to again authenticate Qlik in this screen and do the login mechanism and then export the objects? Is there any other way to export the visualizations to excel without doing the login mechanism i.e. via any scripting?&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jan 2022 19:24:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/How-to-export-an-app-to-a-folder-using-API-and-Powershell/m-p/1884054#M16192</guid>
      <dc:creator>Kaushiki</dc:creator>
      <dc:date>2022-01-21T19:24:53Z</dc:date>
    </item>
  </channel>
</rss>

