<?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: iterate rest call then make another rest call based on first rest call in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/iterate-rest-call-then-make-another-rest-call-based-on-first/m-p/2267001#M46034</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt; 
&lt;P&gt;If I understand your requirement very well, you can use tContextLoad or Implicit tContextLoad to iterate a list of userID variables in&amp;nbsp; a flat file and set a Context value in tRest URL parameter.&lt;/P&gt; 
&lt;P&gt;Here is a related topic:&lt;A title="https://community.talend.com/t5/Design-and-Development/resolved-Iterate-through-a-list-of-URL-s-for-tRSSInput/m-p/94539" href="https://community.qlik.com/s/feed/0D53p00007vCoR7CAK" target="_self"&gt;https://community.talend.com/t5/Design-and-Development/resolved-Iterate-through-a-list-of-URL-s-for-tRSSInput/m-p/94539&lt;/A&gt;&lt;/P&gt; 
&lt;P&gt;Let us know if it is what you are looking for.&lt;/P&gt; 
&lt;P&gt;Best regards&lt;/P&gt; 
&lt;P&gt;Sabrina&lt;/P&gt;</description>
    <pubDate>Fri, 30 Nov 2018 08:27:54 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2018-11-30T08:27:54Z</dc:date>
    <item>
      <title>iterate rest call then make another rest call based on first rest call</title>
      <link>https://community.qlik.com/t5/Talend-Studio/iterate-rest-call-then-make-another-rest-call-based-on-first/m-p/2267000#M46033</link>
      <description>&lt;P&gt;I have a list of userID variables I need to do a rest call on to get the sessionID&lt;/P&gt; 
&lt;P&gt;If the userID exists, it returns a sessionID --&amp;gt; Rest call using the sessionID to update that session&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;if it doesnt, I need to create the session --&amp;gt;Rest call using the userID to create new session&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;example:&lt;/P&gt; 
&lt;P&gt;I have ids {1, 2, 3}&lt;/P&gt; 
&lt;P&gt;iterate rest call, tREST: GET url: "&lt;A href="http://www.rest.com/" target="_blank" rel="nofollow noopener noreferrer noopener noreferrer"&gt;www.rest.com/&lt;/A&gt;" + input_row.id&lt;/P&gt; 
&lt;P&gt;I either get a 404 or 200, 200 has id2 in it I need for next rest call&lt;/P&gt; 
&lt;P&gt;was going to put those in a hashmap like &amp;lt;id, id2&amp;gt; and put those on globalMap ?&lt;/P&gt; 
&lt;P&gt;then itereate on globalMap.newHashMap&lt;/P&gt; 
&lt;P&gt;if id2 is null, do tREST_2&lt;/P&gt; 
&lt;P&gt;else do tREST_3 with id2 variable&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;so was thinking tFlowToIterate_1 --&amp;gt; tREST_1 --&amp;gt; tExtractJSONFields (to get the id2) --&amp;gt; tJavaRow (create hashmap) --&amp;gt; tFlowToItereate_2 --&amp;gt; if id2 === null, do tREST_2...Else do tREST_3&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Does that make sense? I am having trouble&amp;nbsp;with the data flow and mapping what I get back from tREST_1 with the inputs I am putting in.&lt;/P&gt; 
&lt;P&gt;And also with the IF between deciding which of the 2 REST calls i do&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;thanks so much, I am pretty new to talend, but understand java very well, just trying to understand the flow of variables better&lt;/P&gt;</description>
      <pubDate>Thu, 22 Nov 2018 07:42:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/iterate-rest-call-then-make-another-rest-call-based-on-first/m-p/2267000#M46033</guid>
      <dc:creator>kevin91</dc:creator>
      <dc:date>2018-11-22T07:42:03Z</dc:date>
    </item>
    <item>
      <title>Re: iterate rest call then make another rest call based on first rest call</title>
      <link>https://community.qlik.com/t5/Talend-Studio/iterate-rest-call-then-make-another-rest-call-based-on-first/m-p/2267001#M46034</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt; 
&lt;P&gt;If I understand your requirement very well, you can use tContextLoad or Implicit tContextLoad to iterate a list of userID variables in&amp;nbsp; a flat file and set a Context value in tRest URL parameter.&lt;/P&gt; 
&lt;P&gt;Here is a related topic:&lt;A title="https://community.talend.com/t5/Design-and-Development/resolved-Iterate-through-a-list-of-URL-s-for-tRSSInput/m-p/94539" href="https://community.qlik.com/s/feed/0D53p00007vCoR7CAK" target="_self"&gt;https://community.talend.com/t5/Design-and-Development/resolved-Iterate-through-a-list-of-URL-s-for-tRSSInput/m-p/94539&lt;/A&gt;&lt;/P&gt; 
&lt;P&gt;Let us know if it is what you are looking for.&lt;/P&gt; 
&lt;P&gt;Best regards&lt;/P&gt; 
&lt;P&gt;Sabrina&lt;/P&gt;</description>
      <pubDate>Fri, 30 Nov 2018 08:27:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/iterate-rest-call-then-make-another-rest-call-based-on-first/m-p/2267001#M46034</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-11-30T08:27:54Z</dc:date>
    </item>
  </channel>
</rss>

