<?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: QRS API Make Copy Powershell in Integration, Extension &amp; APIs</title>
    <link>https://community.qlik.com/t5/Integration-Extension-APIs/QRS-API-Make-Copy-Powershell/m-p/1785261#M13892</link>
    <description>&lt;P&gt;Thank you &lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/29425"&gt;@Damien_V&lt;/a&gt;&amp;nbsp;!&lt;/P&gt;</description>
    <pubDate>Tue, 23 Feb 2021 12:58:47 GMT</pubDate>
    <dc:creator>mjperreault</dc:creator>
    <dc:date>2021-02-23T12:58:47Z</dc:date>
    <item>
      <title>QRS API Make Copy Powershell</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/QRS-API-Make-Copy-Powershell/m-p/1784919#M13887</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have the below powershell script which is successfully duplicating an app in my Qlik Sense site.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;$qlikserver = 'myqlikserver'
$appid = 'fee68b53-e3e3-4ddf-18bb-0fce33920072'

$xrfkey = "iX83QmNlvu87yyAB"

$url = "https://$($qlikserver)/header/qrs/app/$($appid)/copy?xrfkey=$($xrfkey)"
$headers = @{}
$headers.Add("X-Qlik-xrfkey","$xrfkey")
$headers.Add("X-Qlik-User","UserDirectory=INTERNAL;UserId=sa_repository")
$headers.Add("Header","myuser")
$body = ''

Invoke-RestMethod -Uri $url -Method Post -Body $body -ContentType 'application/json' -Headers $headers&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;However once I try and add the name parameter to the path I get a 403 error.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;$qlikserver = 'myqlikserver'

$xrfkey = "iX83QmNlvu87yyAB"
$appid = 'fee68b53-e3e3-4ddf-18bb-0fce33920072'
$appname = 'mycopy'

$url = "https://$($qlikserver)/header/qrs/app/$($appid)/copy?name=$($appname)?xrfkey=$($xrfkey)"
$headers = @{}
$headers.Add("X-Qlik-xrfkey","$xrfkey")
$headers.Add("X-Qlik-User","UserDirectory=INTERNAL;UserId=sa_repository")
$headers.Add("Header","myuser")
$body = ''

Invoke-RestMethod -Uri $url -Method Post -Body $body -ContentType 'application/json' -Headers $headers&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Does anyone have any thoughts?&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Mark&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 00:33:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/QRS-API-Make-Copy-Powershell/m-p/1784919#M13887</guid>
      <dc:creator>mjperreault</dc:creator>
      <dc:date>2024-11-16T00:33:15Z</dc:date>
    </item>
    <item>
      <title>Re: QRS API Make Copy Powershell</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/QRS-API-Make-Copy-Powershell/m-p/1785057#M13889</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/27636"&gt;@mjperreault&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There is a syntax mistake on this line:&lt;/P&gt;&lt;P&gt;$url = "https://$($qlikserver)/header/qrs/app/$($appid)/copy?name=$($appname)?xrfkey=$($xrfkey)"&lt;/P&gt;&lt;P&gt;It should be&amp;nbsp; ..&amp;amp;xrfkey=..&lt;/P&gt;&lt;P&gt;When you have several URL parameters, the other parameters should be preceded by &amp;amp;&lt;/P&gt;&lt;P&gt;You are getting 403 because the xrfkey key doesn't get passed.&lt;/P&gt;</description>
      <pubDate>Tue, 23 Feb 2021 08:05:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/QRS-API-Make-Copy-Powershell/m-p/1785057#M13889</guid>
      <dc:creator>Damien_V</dc:creator>
      <dc:date>2021-02-23T08:05:44Z</dc:date>
    </item>
    <item>
      <title>Re: QRS API Make Copy Powershell</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/QRS-API-Make-Copy-Powershell/m-p/1785261#M13892</link>
      <description>&lt;P&gt;Thank you &lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/29425"&gt;@Damien_V&lt;/a&gt;&amp;nbsp;!&lt;/P&gt;</description>
      <pubDate>Tue, 23 Feb 2021 12:58:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/QRS-API-Make-Copy-Powershell/m-p/1785261#M13892</guid>
      <dc:creator>mjperreault</dc:creator>
      <dc:date>2021-02-23T12:58:47Z</dc:date>
    </item>
  </channel>
</rss>

