<?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: Bad Exported file (call export api in qlik sense) in Integration, Extension &amp; APIs</title>
    <link>https://community.qlik.com/t5/Integration-Extension-APIs/Bad-Exported-file-call-export-api-in-qlik-sense/m-p/1663415#M12092</link>
    <description>&lt;P&gt;Thank you. my problem solved. your code is great.&lt;/P&gt;&lt;P&gt;and the main problem was about putting values in variable so if I write the file like your command it will be solve.&lt;/P&gt;&lt;P&gt;Invoke-RestMethod -Uri $url -Method Get -Headers $hdrs -ContentType 'application/json' -Certificate $cert &lt;STRONG&gt;-OutFile $output&lt;/STRONG&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV class="gtx-trans-icon"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Tue, 07 Jan 2020 18:42:52 GMT</pubDate>
    <dc:creator>parviz_asoodehfard</dc:creator>
    <dc:date>2020-01-07T18:42:52Z</dc:date>
    <item>
      <title>Bad Exported file (call export api in qlik sense)</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Bad-Exported-file-call-export-api-in-qlik-sense/m-p/1663319#M12084</link>
      <description>&lt;P&gt;I export an app with these commands by PowerShell but when I try to open it in Qlik Sense desktop it says: "unsupported file format"&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;$hdrs = @{}&lt;BR /&gt;$hdrs.Add("X-Qlik-xrfkey","1234567890123456")&lt;BR /&gt;$hdrs.Add("X-Qlik-User","UserDirectory=XXX;UserId=XXXXX")&lt;BR /&gt;$cert = Get-ChildItem -Path "Cert:\CurrentUser\My" | Where {$_.Subject -like '*QlikClient*'}&lt;/P&gt;&lt;P&gt;$t = "22cde6c8-30b7-11ea-978f-2e728ce88125"&lt;BR /&gt;$url = "&lt;A href="https://XXXXXXXXXX:4242/qrs/app/b2febd3f-eb7a-4783-bbbe-ac700468f39f/export/" target="_blank"&gt;https://XXXXXXXXXX:4242/qrs/app/b2febd3f-eb7a-4783-bbbe-ac700468f39f/export/&lt;/A&gt;"+$t+"?skipData=True&amp;amp;xrfkey=1234567890123456"&lt;BR /&gt;$downloadPath = (Invoke-RestMethod -Uri $url -Method POST -Headers $hdrs -Certificate $cert).downloadPath&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;$url = "&lt;A href="https://XXXXXXXXX:4242" target="_blank"&gt;https://XXXXXXXXX:4242&lt;/A&gt;"+$downloadPath+"?&amp;amp;xrfkey=1234567890123456"&lt;BR /&gt;$file = Invoke-RestMethod -Uri $url -Method GET -Headers $hdrs -Certificate $cert&lt;BR /&gt;$file | Out-File c:\TestFolder\new2.qvf&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Sat, 16 Nov 2024 03:39:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Bad-Exported-file-call-export-api-in-qlik-sense/m-p/1663319#M12084</guid>
      <dc:creator>parviz_asoodehfard</dc:creator>
      <dc:date>2024-11-16T03:39:31Z</dc:date>
    </item>
    <item>
      <title>Re: Bad Exported file (call export api in qlik sense)</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Bad-Exported-file-call-export-api-in-qlik-sense/m-p/1663396#M12087</link>
      <description>&lt;P&gt;If you used code I wrote, apologies&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":grinning_face:"&gt;😀&lt;/span&gt;. This is running for me:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&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=true" -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 -OutFile "$($app.name).qvf"&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jan 2020 17:59:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Bad-Exported-file-call-export-api-in-qlik-sense/m-p/1663396#M12087</guid>
      <dc:creator>Levi_Turner</dc:creator>
      <dc:date>2020-01-07T17:59:48Z</dc:date>
    </item>
    <item>
      <title>Re: Bad Exported file (call export api in qlik sense)</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Bad-Exported-file-call-export-api-in-qlik-sense/m-p/1663404#M12088</link>
      <description>&lt;P&gt;Would you please say I Should have this file by default?&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;C:\ProgramData\Qlik\Sense\Host.cfg&lt;/PRE&gt;&lt;P&gt;Or should I generate by myself? if yes, what should I write inside it?&amp;nbsp;&lt;/P&gt;&lt;P&gt;And Can I ask where it will be saved?&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jan 2020 18:23:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Bad-Exported-file-call-export-api-in-qlik-sense/m-p/1663404#M12088</guid>
      <dc:creator>parviz_asoodehfard</dc:creator>
      <dc:date>2020-01-07T18:23:28Z</dc:date>
    </item>
    <item>
      <title>Re: Bad Exported file (call export api in qlik sense)</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Bad-Exported-file-call-export-api-in-qlik-sense/m-p/1663410#M12090</link>
      <description>&lt;P&gt;That is the base64 encrypted file which lists the hostname for the Qlik site. The code is written to be run on the server but dynamically connect no matter what Qlik is installed as. If you know the hostname, you can statically define is a variable in the PowerShell code on your end.&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jan 2020 18:32:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Bad-Exported-file-call-export-api-in-qlik-sense/m-p/1663410#M12090</guid>
      <dc:creator>Levi_Turner</dc:creator>
      <dc:date>2020-01-07T18:32:56Z</dc:date>
    </item>
    <item>
      <title>Re: Bad Exported file (call export api in qlik sense)</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Bad-Exported-file-call-export-api-in-qlik-sense/m-p/1663415#M12092</link>
      <description>&lt;P&gt;Thank you. my problem solved. your code is great.&lt;/P&gt;&lt;P&gt;and the main problem was about putting values in variable so if I write the file like your command it will be solve.&lt;/P&gt;&lt;P&gt;Invoke-RestMethod -Uri $url -Method Get -Headers $hdrs -ContentType 'application/json' -Certificate $cert &lt;STRONG&gt;-OutFile $output&lt;/STRONG&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV class="gtx-trans-icon"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 07 Jan 2020 18:42:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Bad-Exported-file-call-export-api-in-qlik-sense/m-p/1663415#M12092</guid>
      <dc:creator>parviz_asoodehfard</dc:creator>
      <dc:date>2020-01-07T18:42:52Z</dc:date>
    </item>
    <item>
      <title>Re: Bad Exported file (call export api in qlik sense)</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Bad-Exported-file-call-export-api-in-qlik-sense/m-p/1663421#M12093</link>
      <description>&lt;P&gt;I found this:&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/levi-turner/QlikSenseScripts" target="_blank"&gt;https://github.com/levi-turner/QlikSenseScripts&lt;/A&gt;&lt;/P&gt;&lt;P&gt;It is great. But I can't find any file for "import". Do you have any sample for import?&lt;/P&gt;&lt;P&gt;I wrote this but it has 400 (bad request) error&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;$Body = @{&lt;BR /&gt;filename="test_import.qvf"&lt;BR /&gt;} | ConvertTo-Json&lt;/P&gt;&lt;P&gt;$url = "https://XXX:4242/qrs/app/import?name=test_import&amp;amp;xrfkey=1234567890123456"&lt;BR /&gt;$response = Invoke-RestMethod -Uri $url -Method POST -Headers $hdrs -Certificate $cert -Body $Body -ContentType 'application/json'&lt;BR /&gt;$response&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jan 2020 18:57:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Bad-Exported-file-call-export-api-in-qlik-sense/m-p/1663421#M12093</guid>
      <dc:creator>parviz_asoodehfard</dc:creator>
      <dc:date>2020-01-07T18:57:43Z</dc:date>
    </item>
    <item>
      <title>Re: Bad Exported file (call export api in qlik sense)</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Bad-Exported-file-call-export-api-in-qlik-sense/m-p/1663434#M12094</link>
      <description>&lt;P&gt;Please create a separate thread for this ask.&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jan 2020 19:31:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Bad-Exported-file-call-export-api-in-qlik-sense/m-p/1663434#M12094</guid>
      <dc:creator>Levi_Turner</dc:creator>
      <dc:date>2020-01-07T19:31:45Z</dc:date>
    </item>
  </channel>
</rss>

