<?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 Rest call with curly braces in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Rest-call-with-curly-braces/m-p/2237173#M25685</link>
    <description>&lt;P&gt;&lt;SPAN&gt;Hi,&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm calling the facebook API with tREST and when adding the time_range to the URL the job fails.&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The call works fine when testing in postman but it seems that Talend has problem with the curly braces {}.&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My URL is: "&lt;A href="https://graph.facebook.com/v3.1/6063275471072/insights?fields=campaign_id,campaign_name,clicks,impressions,spend&amp;amp;fields=campaign_id,campaign_name,clicks,impressions,spend&amp;amp;" target="_blank" rel="nofollow noopener noreferrer"&gt;https://graph.facebook.com/v3.1/6063275471072/insights?fields=campaign_id,campaign_name,clicks,impressions,spend&amp;amp;fields=campaign_id,campaign_name,clicks,impressions,spend&amp;amp;&lt;/A&gt;&lt;/SPAN&gt;&lt;STRONG&gt;time_range={since:'2018-08-21',until:'2018-08-21'}&lt;/STRONG&gt;&lt;SPAN&gt;&amp;amp;access_token=***"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The Error is: Exception in component tREST_1&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;java.lang.IllegalArgumentException: Illegal character in query at index 124&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I tried different brackets, context variables and backslash&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;\{&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;but I can't make it work. Can anyone give me a hint ?&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 24 Aug 2018 10:16:36 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2018-08-24T10:16:36Z</dc:date>
    <item>
      <title>Rest call with curly braces</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Rest-call-with-curly-braces/m-p/2237173#M25685</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hi,&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm calling the facebook API with tREST and when adding the time_range to the URL the job fails.&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The call works fine when testing in postman but it seems that Talend has problem with the curly braces {}.&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My URL is: "&lt;A href="https://graph.facebook.com/v3.1/6063275471072/insights?fields=campaign_id,campaign_name,clicks,impressions,spend&amp;amp;fields=campaign_id,campaign_name,clicks,impressions,spend&amp;amp;" target="_blank" rel="nofollow noopener noreferrer"&gt;https://graph.facebook.com/v3.1/6063275471072/insights?fields=campaign_id,campaign_name,clicks,impressions,spend&amp;amp;fields=campaign_id,campaign_name,clicks,impressions,spend&amp;amp;&lt;/A&gt;&lt;/SPAN&gt;&lt;STRONG&gt;time_range={since:'2018-08-21',until:'2018-08-21'}&lt;/STRONG&gt;&lt;SPAN&gt;&amp;amp;access_token=***"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The Error is: Exception in component tREST_1&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;java.lang.IllegalArgumentException: Illegal character in query at index 124&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I tried different brackets, context variables and backslash&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;\{&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;but I can't make it work. Can anyone give me a hint ?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 24 Aug 2018 10:16:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Rest-call-with-curly-braces/m-p/2237173#M25685</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-08-24T10:16:36Z</dc:date>
    </item>
    <item>
      <title>Re: Rest call with curly braces</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Rest-call-with-curly-braces/m-p/2237174#M25686</link>
      <description>I prefer to use tSystem with a cUrl command...
&lt;BR /&gt;However since and until should be within quotes as what the api is telling me.
&lt;BR /&gt;'since':
&lt;BR /&gt;
&lt;BR /&gt;Im not sure if the url is encoded into a safe url by the tREST component, check your call by using fiddler or similar software to find out / debug whats happening on a lower level.
&lt;BR /&gt;
&lt;BR /&gt;</description>
      <pubDate>Fri, 24 Aug 2018 10:36:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Rest-call-with-curly-braces/m-p/2237174#M25686</guid>
      <dc:creator>Jesperrekuh</dc:creator>
      <dc:date>2018-08-24T10:36:48Z</dc:date>
    </item>
    <item>
      <title>Re: Rest call with curly braces</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Rest-call-with-curly-braces/m-p/2237175#M25687</link>
      <description>Thank you Dijke!&lt;BR /&gt;curl in tSystem was a good tip. I made it work there.</description>
      <pubDate>Fri, 24 Aug 2018 13:09:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Rest-call-with-curly-braces/m-p/2237175#M25687</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-08-24T13:09:45Z</dc:date>
    </item>
    <item>
      <title>Re: Rest call with curly braces</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Rest-call-with-curly-braces/m-p/2237176#M25688</link>
      <description>&lt;P&gt;Make sure the cUrl is called like this:&lt;/P&gt;
&lt;P&gt;search for tSystem and bash array or something to load it in the same bash environment ... below an example on how I do it:&lt;/P&gt;
&lt;PRE&gt;new String[]{"bash","-c","curl -k -L -v -c "+((String)globalMap.get("cookiesFolder"))+"/cookie.txt  https://somefreakingurl/login -d 'login=login&amp;amp;username="+context.Usr+"&amp;amp;password="+context.Pwd+"'" }&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 24 Aug 2018 13:21:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Rest-call-with-curly-braces/m-p/2237176#M25688</guid>
      <dc:creator>Jesperrekuh</dc:creator>
      <dc:date>2018-08-24T13:21:10Z</dc:date>
    </item>
  </channel>
</rss>

