<?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: Rest API - JSON - Error 500 - How to remove spaces and line breaks ? in Integration, Extension &amp; APIs</title>
    <link>https://community.qlik.com/t5/Integration-Extension-APIs/Rest-API-JSON-Error-500-How-to-remove-spaces-and-line-breaks/m-p/2513355#M22029</link>
    <description>&lt;P&gt;I would think that the error message you are getting is from the rest api server, not from Qlik. Therefore, there's nothing you can do in qlik as a workaround (unless you can specify a parameter in the request that will make the api return the data in the compact format without line breaks).&lt;/P&gt;&lt;P&gt;Did you try to fetch the data with e.g. &lt;A href="https://www.postman.com/" target="_self"&gt;Postman&lt;/A&gt; instead of Qlik, to see if you are getting the same error message?&lt;/P&gt;</description>
    <pubDate>Mon, 07 Apr 2025 12:35:02 GMT</pubDate>
    <dc:creator>henrikalmen</dc:creator>
    <dc:date>2025-04-07T12:35:02Z</dc:date>
    <item>
      <title>Rest API - JSON - Error 500 - How to remove spaces and line breaks ?</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Rest-API-JSON-Error-500-How-to-remove-spaces-and-line-breaks/m-p/2513208#M22020</link>
      <description>&lt;P&gt;Hi !&lt;BR /&gt;I'm trying to import data from a Qlik Sense app using a REST API connector, and when creating the REST connector, I get "HTTP protocol error 500 (Internal Server Error):&amp;nbsp;{"error":"Internal Server Error: null","status":500}".&lt;/P&gt;&lt;P&gt;The JSON format to be imported is like this:&lt;BR /&gt;[&lt;BR /&gt;&amp;nbsp; {"id":"1",&lt;BR /&gt;&amp;nbsp; &amp;nbsp;"modulo":"ERP",&lt;BR /&gt;&amp;nbsp; &amp;nbsp;"version":"6.1"&lt;BR /&gt;&amp;nbsp; },&lt;BR /&gt;&amp;nbsp; &amp;nbsp;{"id":"2",&lt;BR /&gt;&amp;nbsp; &amp;nbsp; "modulo":"CRM",&lt;BR /&gt;&amp;nbsp; &amp;nbsp; "version":"8.2"&lt;BR /&gt;&amp;nbsp; &amp;nbsp;}&lt;BR /&gt;]&lt;/P&gt;&lt;P&gt;The strange thing is that when importing from another version of the same API, which returns a compact JSON format (without spaces or line breaks between fields), it works perfectly, both when creating the REST connector and via script.&lt;BR /&gt;The format that works well is this:&lt;BR /&gt;[{"id":"1", "modulo":"ERP", "version":"6.1"},&lt;BR /&gt;{"id":"2", "modulo":"CRM", "version":"8.2"}]&lt;/P&gt;&lt;P&gt;Both endpoints are visible from Qlik, don't require pagination, and have the correct authentication and parameters. Both JSONs has no hierarchical structure, and the result output is about 400 records.&lt;/P&gt;&lt;P&gt;I'm using client managed Qlik Sense Enterprise February 2023 Patch 2, qliksenseserver: 14.113.4&lt;/P&gt;&lt;P&gt;This script works well with the compact JSON API, but does not work with the JSON API with breaks and spaces.&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;LIB CONNECT TO 'Rest_Api';&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;RestConnectorMasterTable:&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;SQL SELECT&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;&amp;nbsp; &amp;nbsp;"id",&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;&amp;nbsp; &amp;nbsp;"module",&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;&amp;nbsp; &amp;nbsp;"version"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;FROM JSON (wrap on) "root"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;WITH CONNECTION&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;( Url "&lt;A href="https://xxx.xxx.com/api/reports/modulos?FechaDesde=2024-01-01&amp;amp;ACCESS_TOKEN=xxxxxxxxxxxxxxxxxxxxx" target="_blank"&gt;https://xxx.xxx.com/api/reports/modulos?FechaDesde=2024-01-01&amp;amp;ACCESS_TOKEN=xxxxxxxxxxxxxxxxxxxxx&lt;/A&gt;");&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;Report:&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;LOAD&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;&amp;nbsp; &amp;nbsp;id,&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;&amp;nbsp; &amp;nbsp;module,&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;&amp;nbsp; &amp;nbsp;version&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;RESIDENT RestConnectorMasterTable;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;DROP TABLE RestConnectorMasterTable;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Does anyone know how to remove spaces and line breaks from JSON preferably from Qlik Sense ? &lt;/STRONG&gt;I need to access many APIs, and modifying them all isn't the best option.&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;Regards,&lt;BR /&gt;Fernando&lt;/P&gt;</description>
      <pubDate>Fri, 04 Apr 2025 20:06:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Rest-API-JSON-Error-500-How-to-remove-spaces-and-line-breaks/m-p/2513208#M22020</guid>
      <dc:creator>Fernando_Fabregas</dc:creator>
      <dc:date>2025-04-04T20:06:25Z</dc:date>
    </item>
    <item>
      <title>Re: Rest API - JSON - Error 500 - How to remove spaces and line breaks ?</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Rest-API-JSON-Error-500-How-to-remove-spaces-and-line-breaks/m-p/2513355#M22029</link>
      <description>&lt;P&gt;I would think that the error message you are getting is from the rest api server, not from Qlik. Therefore, there's nothing you can do in qlik as a workaround (unless you can specify a parameter in the request that will make the api return the data in the compact format without line breaks).&lt;/P&gt;&lt;P&gt;Did you try to fetch the data with e.g. &lt;A href="https://www.postman.com/" target="_self"&gt;Postman&lt;/A&gt; instead of Qlik, to see if you are getting the same error message?&lt;/P&gt;</description>
      <pubDate>Mon, 07 Apr 2025 12:35:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Rest-API-JSON-Error-500-How-to-remove-spaces-and-line-breaks/m-p/2513355#M22029</guid>
      <dc:creator>henrikalmen</dc:creator>
      <dc:date>2025-04-07T12:35:02Z</dc:date>
    </item>
    <item>
      <title>Re: Rest API - JSON - Error 500 - How to remove spaces and line breaks ?</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Rest-API-JSON-Error-500-How-to-remove-spaces-and-line-breaks/m-p/2513362#M22030</link>
      <description>&lt;P&gt;Hi Henri, thanks for the reply.&lt;BR /&gt;I tried it from a browser and it works fine, I fetch de data correctly.&lt;/P&gt;&lt;P&gt;If possible, I'll be testing from Qlik Cloud and contacting the API provider to resolve the issue outside of Qlik.&lt;BR /&gt;If I find a solution, I'll post it here and close the post.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Apr 2025 13:03:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Rest-API-JSON-Error-500-How-to-remove-spaces-and-line-breaks/m-p/2513362#M22030</guid>
      <dc:creator>Fernando_Fabregas</dc:creator>
      <dc:date>2025-04-07T13:03:38Z</dc:date>
    </item>
    <item>
      <title>Re: Rest API - JSON - Error 500 - How to remove spaces and line breaks ?</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Rest-API-JSON-Error-500-How-to-remove-spaces-and-line-breaks/m-p/2513386#M22032</link>
      <description>&lt;P&gt;Have you tried verifying the json data in a json validator such as jsonchecker.com ?&lt;/P&gt;</description>
      <pubDate>Mon, 07 Apr 2025 15:09:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Rest-API-JSON-Error-500-How-to-remove-spaces-and-line-breaks/m-p/2513386#M22032</guid>
      <dc:creator>henrikalmen</dc:creator>
      <dc:date>2025-04-07T15:09:16Z</dc:date>
    </item>
  </channel>
</rss>

