<?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: Passing parameters into REST API connection in Connectivity &amp; Data Prep</title>
    <link>https://community.qlik.com/t5/Connectivity-Data-Prep/Passing-parameters-into-REST-API-connection/m-p/1671535#M4915</link>
    <description>&lt;P&gt;Have a look at this line:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="6"&gt;&lt;STRONG&gt;let vRequestBody = vRequestBody &amp;amp;'&amp;lt;/call&amp;gt;&lt;FONT color="#0000FF"&gt;")&lt;/FONT&gt;';&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is the last two characters in the string something that should really be there. To me it looks like something that shouldn't be there...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 02 Feb 2020 06:41:37 GMT</pubDate>
    <dc:creator>petter</dc:creator>
    <dc:date>2020-02-02T06:41:37Z</dc:date>
    <item>
      <title>Passing parameters into REST API connection</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/Passing-parameters-into-REST-API-connection/m-p/1671523#M4914</link>
      <description>&lt;P&gt;I am trying to load data from Adaptive Insights using REST connection.&lt;/P&gt;&lt;P&gt;When I setup the rest connection, I specify the:&lt;/P&gt;&lt;P&gt;URL &lt;A href="https://api.adaptiveinsights.com/api/v19" target="_blank"&gt;https://api.adaptiveinsights.com/api/v19&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Method: POST&lt;/P&gt;&lt;P&gt;Request Body:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;lt;?xml version='1.0' encoding='UTF-8'?&amp;gt;&lt;BR /&gt;&amp;lt;call method="exportData" callerName="Qlik"&amp;gt;&lt;BR /&gt;&amp;lt;credentials login="xxxxx" password="xxxxx"/&amp;gt;&lt;BR /&gt;&amp;lt;version name ="xxxxx"/&amp;gt;&lt;BR /&gt;&amp;lt;format useInternalCodes="true"/&amp;gt;&lt;BR /&gt;&amp;lt;filters&amp;gt;&lt;BR /&gt;&amp;lt;accounts&amp;gt;&lt;BR /&gt;&amp;lt;account code = "Revenue" isAssumption="false" includeDescendants="true"/&amp;gt;&lt;BR /&gt;&amp;lt;/accounts&amp;gt;&lt;BR /&gt;&amp;lt;/filters&amp;gt;&lt;BR /&gt;&amp;lt;rules includeRollups="true"&amp;gt;&lt;BR /&gt;&amp;lt;currency useCorporate="true"/&amp;gt;&lt;BR /&gt;&amp;lt;/rules&amp;gt;&lt;BR /&gt;&amp;lt;/call&amp;gt;&lt;/P&gt;&lt;P&gt;I then have the following data returned, with success = true and the whole dataset returned in a csv format.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="Image1.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/27841i9AF2B6ACEE308280/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Image1.png" alt="Image1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to make the "version name" parameter dynamic in the script, so I have been trying to use the "With Connection" syntax.&lt;/P&gt;&lt;P&gt;Let vRequestBody ='';&lt;BR /&gt;let vRequestBody = vRequestBody &amp;amp;'&amp;lt;?xml version="1.0" encoding="utf-8"?&amp;gt;';&lt;BR /&gt;let vRequestBody = vRequestBody &amp;amp;'&amp;lt;call method="exportData" callerName="Qlik"&amp;gt;';&lt;BR /&gt;let vRequestBody = vRequestBody &amp;amp;'&amp;lt;credentials login="xxxxx" password="xxxxx"/&amp;gt;';&lt;BR /&gt;let vRequestBody = vRequestBody &amp;amp;'&amp;lt;version name ="xxxxx"/&amp;gt;';&lt;BR /&gt;let vRequestBody = vRequestBody &amp;amp;'&amp;lt;format useInternalCodes="true"/&amp;gt;';&lt;BR /&gt;let vRequestBody = vRequestBody &amp;amp;'&amp;lt;filters&amp;gt;';&lt;BR /&gt;let vRequestBody = vRequestBody &amp;amp;'&amp;lt;accounts&amp;gt;';&lt;BR /&gt;let vRequestBody = vRequestBody &amp;amp;'&amp;lt;account code = "Revenue" isAssumption="false" includeDescendants="true"/&amp;gt;';&lt;BR /&gt;let vRequestBody = vRequestBody &amp;amp;'&amp;lt;/accounts&amp;gt;';&lt;BR /&gt;let vRequestBody = vRequestBody &amp;amp;'&amp;lt;/filters&amp;gt;';&lt;BR /&gt;let vRequestBody = vRequestBody &amp;amp;'&amp;lt;rules includeRollups="true"&amp;gt;';&lt;BR /&gt;let vRequestBody = vRequestBody &amp;amp;'&amp;lt;currency useCorporate="true"/&amp;gt;';&lt;BR /&gt;let vRequestBody = vRequestBody &amp;amp;'&amp;lt;/rules&amp;gt;';&lt;BR /&gt;let vRequestBody = vRequestBody &amp;amp;'&amp;lt;/call&amp;gt;")';&lt;/P&gt;&lt;P&gt;let vRequestBody = replace(vRequestBody,'"', chr(34)&amp;amp;chr(34));&lt;/P&gt;&lt;P&gt;RestConnectorMasterTable:&lt;BR /&gt;SQL SELECT&lt;BR /&gt;"attr:success" AS "success",&lt;BR /&gt;"output"&lt;BR /&gt;FROM XML "response" QDL&lt;BR /&gt;WITH CONNECTION (URL "&lt;A href="https://api.adaptiveinsights.com/api/v23" target="_blank"&gt;https://api.adaptiveinsights.com/api/v23&lt;/A&gt;",&lt;BR /&gt;BODY "$(vRequestBody)"&lt;BR /&gt;);&lt;/P&gt;&lt;P&gt;This doesn't error, but I don't get any results.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Image2.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/27842i206F514842CEE532/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Image2.png" alt="Image2.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I don't suppose anyone has an idea why this might be??&lt;/P&gt;&lt;P&gt;I am using the same connection for both.&lt;/P&gt;&lt;P&gt;Many thanks in anticipation of any help!&lt;/P&gt;&lt;P&gt;Kate&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Dec 2021 14:01:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/Passing-parameters-into-REST-API-connection/m-p/1671523#M4914</guid>
      <dc:creator>kateperry</dc:creator>
      <dc:date>2021-12-21T14:01:50Z</dc:date>
    </item>
    <item>
      <title>Re: Passing parameters into REST API connection</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/Passing-parameters-into-REST-API-connection/m-p/1671535#M4915</link>
      <description>&lt;P&gt;Have a look at this line:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="6"&gt;&lt;STRONG&gt;let vRequestBody = vRequestBody &amp;amp;'&amp;lt;/call&amp;gt;&lt;FONT color="#0000FF"&gt;")&lt;/FONT&gt;';&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is the last two characters in the string something that should really be there. To me it looks like something that shouldn't be there...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 02 Feb 2020 06:41:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/Passing-parameters-into-REST-API-connection/m-p/1671535#M4915</guid>
      <dc:creator>petter</dc:creator>
      <dc:date>2020-02-02T06:41:37Z</dc:date>
    </item>
    <item>
      <title>Re: Passing parameters into REST API connection</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/Passing-parameters-into-REST-API-connection/m-p/1671703#M4917</link>
      <description>&lt;P&gt;Thank you so so so so much for responding with that. You are 100% correct. Removing those characters returned the data perfectly.&amp;nbsp;&lt;/P&gt;&lt;P&gt;You would not believe how many hours I spent looking at this and I still missed it. What a silly copy/paste error to have caused me such a headache!&lt;/P&gt;&lt;P&gt;You're a star!!!!! Much appreciated.&lt;/P&gt;</description>
      <pubDate>Mon, 03 Feb 2020 09:47:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/Passing-parameters-into-REST-API-connection/m-p/1671703#M4917</guid>
      <dc:creator>kateperry</dc:creator>
      <dc:date>2020-02-03T09:47:19Z</dc:date>
    </item>
  </channel>
</rss>

