<?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 Consuming API with TREST in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Consuming-API-with-TREST/m-p/2231204#M21580</link>
    <description>&lt;P&gt;Hi Guys&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;could someone help me to config a tRest component to get Json response from an API (this is my job)&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Job.JPG" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M6xN.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/145440iEC45C94A968C166B/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M6xN.jpg" alt="0683p000009M6xN.jpg" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;1. getAccessToken (TrestClient) I sent my credentials to get the Access Token&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="tRestClient.JPG" style="width: 794px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M84A.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/155739i5EC4163B7E378E57/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M84A.jpg" alt="0683p000009M84A.jpg" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;2. I extract the Access Token in the "extractXmlAccessToken" and save it to a global Var on the component setAccessToken&lt;/P&gt; 
&lt;P&gt;3. I build a Json structure (not important at this point)&lt;/P&gt; 
&lt;P&gt;4. I want to get a Json response from an API but I get an error&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="error.JPG" style="width: 146px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M87Y.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/133393iEF529BB620A9B1EA/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M87Y.jpg" alt="0683p000009M87Y.jpg" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;here is the tRest config&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="TrestConfig.JPG" style="width: 807px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M8Qs.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/138952iB3688387FA935BBD/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M8Qs.jpg" alt="0683p000009M8Qs.jpg" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;but if I use Postman I'm able to get the Json response&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="postman.JPG" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M83b.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/149817i623C27F83646E606/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M83b.jpg" alt="0683p000009M83b.jpg" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Thanks in advance&lt;/P&gt; 
&lt;P&gt;Alberto&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 03:43:25 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-11-16T03:43:25Z</dc:date>
    <item>
      <title>Consuming API with TREST</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Consuming-API-with-TREST/m-p/2231204#M21580</link>
      <description>&lt;P&gt;Hi Guys&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;could someone help me to config a tRest component to get Json response from an API (this is my job)&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Job.JPG" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M6xN.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/145440iEC45C94A968C166B/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M6xN.jpg" alt="0683p000009M6xN.jpg" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;1. getAccessToken (TrestClient) I sent my credentials to get the Access Token&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="tRestClient.JPG" style="width: 794px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M84A.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/155739i5EC4163B7E378E57/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M84A.jpg" alt="0683p000009M84A.jpg" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;2. I extract the Access Token in the "extractXmlAccessToken" and save it to a global Var on the component setAccessToken&lt;/P&gt; 
&lt;P&gt;3. I build a Json structure (not important at this point)&lt;/P&gt; 
&lt;P&gt;4. I want to get a Json response from an API but I get an error&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="error.JPG" style="width: 146px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M87Y.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/133393iEF529BB620A9B1EA/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M87Y.jpg" alt="0683p000009M87Y.jpg" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;here is the tRest config&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="TrestConfig.JPG" style="width: 807px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M8Qs.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/138952iB3688387FA935BBD/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M8Qs.jpg" alt="0683p000009M8Qs.jpg" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;but if I use Postman I'm able to get the Json response&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="postman.JPG" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M83b.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/149817i623C27F83646E606/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M83b.jpg" alt="0683p000009M83b.jpg" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Thanks in advance&lt;/P&gt; 
&lt;P&gt;Alberto&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 03:43:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Consuming-API-with-TREST/m-p/2231204#M21580</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T03:43:25Z</dc:date>
    </item>
    <item>
      <title>Re: Consuming API with TREST</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Consuming-API-with-TREST/m-p/2231205#M21581</link>
      <description>1. For testing, print the access token (String)globalMap.get("accessToken") on console to check if it is retrieved correctly. 
&lt;BR /&gt;2. There should be a blank space after Bearer, eg: 
&lt;BR /&gt;"Bearer "+(String)globalMap.get("accessToken") 
&lt;BR /&gt;3. Write the all the header name/value in the Http Header list of tRest or tHttpRequest as it requires them in Postman. 
&lt;BR /&gt; 
&lt;BR /&gt;Regards 
&lt;BR /&gt;Shong</description>
      <pubDate>Fri, 27 Dec 2019 03:02:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Consuming-API-with-TREST/m-p/2231205#M21581</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-12-27T03:02:33Z</dc:date>
    </item>
  </channel>
</rss>

