<?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 Run &amp;quot;Import&amp;quot; QRS request using Qliksense Rest Connector (Post Request) in Integration, Extension &amp; APIs</title>
    <link>https://community.qlik.com/t5/Integration-Extension-APIs/Run-quot-Import-quot-QRS-request-using-Qliksense-Rest-Connector/m-p/1552164#M10112</link>
    <description>&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;I'm currently looking to automate a process where apps are moved from our production server to a QA server.&amp;nbsp; Everything was running fine until I attempted to import the app on the QA server.&amp;nbsp; I have the below powershell script that I wrote which works 100% and imports and app to the server, but attempting to do the same thing with the Qliksense Rest connector doesn't work (I'd prefer to have this run in Qliksense so it can be managed by other developers).&amp;nbsp; Below I've pasted screenshots of my setup.&amp;nbsp; Can Qliksense not do this kind of connect?&amp;nbsp; It gives me an error saying "403 (No client certificate supplied)"&lt;/P&gt;&lt;P&gt;Working powershell script:&lt;/P&gt;&lt;PRE&gt;param([string]$tempcontent,[string]$appname)

$hdrs = @{}
$hdrs.Add("X-Qlik-Xrfkey","0123456789abcdef")
$hdrs.Add("X-Qlik-User", "UserDirectory=internal; UserId=sa_repository")

$CertPath = "C:\ProgramData\Qlik\Sense\Engine\Certificates\client.pfx"
$CertPass = "something"
$Cert = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2($CertPath, $CertPass)

$body = @{
    "name" = "simple_test.qvf"
    "ContentType" = "application/json; charset=utf-8"

} | ConvertTo-Json

$body

add-type @"
    using System.Net;
    using System.Security.Cryptography.X509Certificates;
    public class TrustAllCertsPolicy : ICertificatePolicy {
        public bool CheckValidationResult(
            ServicePoint srvPoint, X509Certificate certificate,
            WebRequest request, int certificateProblem) {
            return true;
        }
    }
"@
[System.Net.ServicePointManager]::CertificatePolicy = New-Object TrustAllCertsPolicy

Invoke-RestMethod -Uri "https://server:4242/qrs/app/import?xrfkey=0123456789abcdef&amp;amp;name=test_import" -Method Post -Headers $hdrs -Body {"simple_test.qvf"} -ContentType 'application/json'  -Certificate $cert&lt;/PRE&gt;&lt;P&gt;Not working Rest connect from Qliksense:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="3.png" style="width: 622px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/7251iBBEBDEFE1F280630/image-size/large?v=v2&amp;amp;px=999" role="button" title="3.png" alt="3.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2.png" style="width: 609px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/7252iFAD150D134EABB96/image-size/large?v=v2&amp;amp;px=999" role="button" title="2.png" alt="2.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="1.png" style="width: 613px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/7250iBBF11747C836AB7A/image-size/large?v=v2&amp;amp;px=999" role="button" title="1.png" alt="1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 16 Nov 2024 06:26:09 GMT</pubDate>
    <dc:creator>nsm1234567</dc:creator>
    <dc:date>2024-11-16T06:26:09Z</dc:date>
    <item>
      <title>Run "Import" QRS request using Qliksense Rest Connector (Post Request)</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Run-quot-Import-quot-QRS-request-using-Qliksense-Rest-Connector/m-p/1552164#M10112</link>
      <description>&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;I'm currently looking to automate a process where apps are moved from our production server to a QA server.&amp;nbsp; Everything was running fine until I attempted to import the app on the QA server.&amp;nbsp; I have the below powershell script that I wrote which works 100% and imports and app to the server, but attempting to do the same thing with the Qliksense Rest connector doesn't work (I'd prefer to have this run in Qliksense so it can be managed by other developers).&amp;nbsp; Below I've pasted screenshots of my setup.&amp;nbsp; Can Qliksense not do this kind of connect?&amp;nbsp; It gives me an error saying "403 (No client certificate supplied)"&lt;/P&gt;&lt;P&gt;Working powershell script:&lt;/P&gt;&lt;PRE&gt;param([string]$tempcontent,[string]$appname)

$hdrs = @{}
$hdrs.Add("X-Qlik-Xrfkey","0123456789abcdef")
$hdrs.Add("X-Qlik-User", "UserDirectory=internal; UserId=sa_repository")

$CertPath = "C:\ProgramData\Qlik\Sense\Engine\Certificates\client.pfx"
$CertPass = "something"
$Cert = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2($CertPath, $CertPass)

$body = @{
    "name" = "simple_test.qvf"
    "ContentType" = "application/json; charset=utf-8"

} | ConvertTo-Json

$body

add-type @"
    using System.Net;
    using System.Security.Cryptography.X509Certificates;
    public class TrustAllCertsPolicy : ICertificatePolicy {
        public bool CheckValidationResult(
            ServicePoint srvPoint, X509Certificate certificate,
            WebRequest request, int certificateProblem) {
            return true;
        }
    }
"@
[System.Net.ServicePointManager]::CertificatePolicy = New-Object TrustAllCertsPolicy

Invoke-RestMethod -Uri "https://server:4242/qrs/app/import?xrfkey=0123456789abcdef&amp;amp;name=test_import" -Method Post -Headers $hdrs -Body {"simple_test.qvf"} -ContentType 'application/json'  -Certificate $cert&lt;/PRE&gt;&lt;P&gt;Not working Rest connect from Qliksense:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="3.png" style="width: 622px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/7251iBBEBDEFE1F280630/image-size/large?v=v2&amp;amp;px=999" role="button" title="3.png" alt="3.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2.png" style="width: 609px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/7252iFAD150D134EABB96/image-size/large?v=v2&amp;amp;px=999" role="button" title="2.png" alt="2.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="1.png" style="width: 613px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/7250iBBF11747C836AB7A/image-size/large?v=v2&amp;amp;px=999" role="button" title="1.png" alt="1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 06:26:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Run-quot-Import-quot-QRS-request-using-Qliksense-Rest-Connector/m-p/1552164#M10112</guid>
      <dc:creator>nsm1234567</dc:creator>
      <dc:date>2024-11-16T06:26:09Z</dc:date>
    </item>
  </channel>
</rss>

