<?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: 400 Bad Request  for qrs api call in Integration, Extension &amp; APIs</title>
    <link>https://community.qlik.com/t5/Integration-Extension-APIs/400-Bad-Request-for-qrs-api-call/m-p/1801684#M14801</link>
    <description>&lt;P&gt;I managed. I only need to html encode:&lt;/P&gt;&lt;P&gt;$endpoint = "/app?xrfkey=0123456789abcdef&amp;amp;filter=name+eq+%27myappname%27";&lt;/P&gt;</description>
    <pubDate>Thu, 22 Apr 2021 10:17:54 GMT</pubDate>
    <dc:creator>aguirre</dc:creator>
    <dc:date>2021-04-22T10:17:54Z</dc:date>
    <item>
      <title>400 Bad Request  for qrs api call</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/400-Bad-Request-for-qrs-api-call/m-p/1801677#M14800</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I would like to get app id from app name with QRS api but I am getting this error:&lt;/P&gt;&lt;P&gt;Bad Request HTTP Error 400. The request is badly formed.&lt;/P&gt;&lt;P&gt;I use php code.&lt;/P&gt;&lt;P&gt;If the endpoint is&amp;nbsp;&lt;/P&gt;&lt;P&gt;$endpoint = "&lt;A href="https://mysvr:4242/qrs/about?xrfkey=0123456789abcdef" target="_blank"&gt;https://mysvr:4242/qrs/about?xrfkey=0123456789abcdef&lt;/A&gt;";&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;$endpoint = "&lt;A href="https://mysvr:4242/qrs/about/api/description?extended=true&amp;amp;method=GET&amp;amp;format=JSON&amp;amp;xrfkey=0123456789abcdef" target="_blank"&gt;https://mysvr:4242/qrs/about/api/description?extended=true&amp;amp;method=GET&amp;amp;format=JSON&amp;amp;xrfkey=0123456789abcdef&lt;/A&gt;";&lt;/P&gt;&lt;P&gt;it works.&lt;/P&gt;&lt;P&gt;But if I try:&lt;/P&gt;&lt;P&gt;$endpoint = "&lt;A href="https://mysvr:4242/qrs/app?xrfkey=0123456789abcdef&amp;amp;filter=Name" target="_blank"&gt;https://mysvr:4242/qrs/app?xrfkey=0123456789abcdef&amp;amp;filter=Name&lt;/A&gt; eq 'myAppName'";&lt;/P&gt;&lt;P&gt;I get&amp;nbsp;&lt;/P&gt;&lt;P&gt;Bad Request&lt;/P&gt;&lt;P&gt;HTTP Error 400. The request is badly formed&lt;/P&gt;&lt;P&gt;Another endpoint with the same error is:&lt;/P&gt;&lt;P&gt;$endpoint = "&lt;A href="https://mysvr:4242/qrs/user/count?xrfkey=0123456789abcdef&amp;amp;filter=Name" target="_blank"&gt;https://mysvr:4242/qrs/user/count?xrfkey=0123456789abcdef&amp;amp;filter=Name&lt;/A&gt; eq 'My Name'";&lt;/P&gt;&lt;P&gt;Do you know what it could be?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below the rest of my code.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;$headers = array(&lt;BR /&gt;'Accept: application/json',&lt;BR /&gt;'Content-Type: application/json',&lt;BR /&gt;'x-qlik-xrfkey:0123456789abcdef',&lt;BR /&gt;'Connection:Keep-Alive',&lt;BR /&gt;'X-Qlik-User: UserDirectory=Internal;UserId=sa_repository'&lt;BR /&gt;);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;$url = $endpoint;&lt;BR /&gt;$certFile = "c:/inetpub/wwwroot/phpad/cert.pem";&lt;BR /&gt;$keyFile = "c:/inetpub/wwwroot/phpad/key.pem";&lt;/P&gt;&lt;P&gt;$request = curl_init();&lt;BR /&gt;$options = array(&lt;BR /&gt;CURLOPT_URL =&amp;gt; $url,&lt;BR /&gt;CURLOPT_SSLCERT =&amp;gt; $certFile,&lt;BR /&gt;CURLOPT_SSLKEY =&amp;gt; $keyFile,&lt;BR /&gt;CURLOPT_RETURNTRANSFER =&amp;gt; true,&lt;BR /&gt;CURLOPT_FOLLOWLOCATION =&amp;gt; true,&lt;BR /&gt;CURLOPT_SSL_VERIFYHOST =&amp;gt; false,&lt;BR /&gt;CURLOPT_SSL_VERIFYPEER =&amp;gt; false,&lt;BR /&gt;CURLOPT_HTTPHEADER =&amp;gt; $headers,&lt;BR /&gt;);&lt;BR /&gt;curl_setopt($request, CURLOPT_CUSTOMREQUEST, "GET");&lt;BR /&gt;curl_setopt_array($request, $options);&lt;BR /&gt;$response = curl_exec($request);&lt;/P&gt;</description>
      <pubDate>Fri, 13 Aug 2021 18:44:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/400-Bad-Request-for-qrs-api-call/m-p/1801677#M14800</guid>
      <dc:creator>aguirre</dc:creator>
      <dc:date>2021-08-13T18:44:03Z</dc:date>
    </item>
    <item>
      <title>Re: 400 Bad Request  for qrs api call</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/400-Bad-Request-for-qrs-api-call/m-p/1801684#M14801</link>
      <description>&lt;P&gt;I managed. I only need to html encode:&lt;/P&gt;&lt;P&gt;$endpoint = "/app?xrfkey=0123456789abcdef&amp;amp;filter=name+eq+%27myappname%27";&lt;/P&gt;</description>
      <pubDate>Thu, 22 Apr 2021 10:17:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/400-Bad-Request-for-qrs-api-call/m-p/1801684#M14801</guid>
      <dc:creator>aguirre</dc:creator>
      <dc:date>2021-04-22T10:17:54Z</dc:date>
    </item>
  </channel>
</rss>

