<?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: API POST in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/API-POST/m-p/2329867#M99013</link>
    <description>&lt;P&gt;When I tried thttprequest, I got an "Bad Credentials" error. It's odd, because when I use the same https link in Postman, I get a success message. Here are the settings I'm using in the thttprequest object (a header for the key value).&lt;/P&gt;</description>
    <pubDate>Tue, 01 Nov 2022 19:49:31 GMT</pubDate>
    <dc:creator>TJones_AuctionEdge</dc:creator>
    <dc:date>2022-11-01T19:49:31Z</dc:date>
    <item>
      <title>API POST</title>
      <link>https://community.qlik.com/t5/Talend-Studio/API-POST/m-p/2329865#M99011</link>
      <description>&lt;P&gt;I'm using Talend Open Studio for ESB - Version: 8.0.1. I have a job that loops thru data and creates a CSV for each data element, like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; ID&amp;nbsp;&amp;nbsp;&amp;nbsp;DATA&lt;/P&gt;&lt;P&gt;&amp;gt; A&amp;nbsp;&amp;nbsp;&amp;nbsp;QQQQ# $%$&lt;/P&gt;&lt;P&gt;&amp;gt; B&amp;nbsp;&amp;nbsp;&amp;nbsp;WWWE^UTU&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;etc. The job creates FileA.csv, then FileB.csv etc. That all works, but the next step I need will take FileA.csv and POST that data to an API.&lt;/P&gt;&lt;P&gt;The URI for each file is different, so I'm using a context to create the link. The links look like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;https://&amp;lt;&amp;lt;USER&amp;gt;&amp;gt;:&amp;lt;&amp;lt;PASSWORD&amp;gt;&amp;gt;@&amp;lt;&amp;lt;HOST&amp;gt;&amp;gt;/prod/updatenodes?application_code=fileA&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is a different application code for each file. I've tested the link for these files in Postman, and they all work, here's the message:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"result": "success",&lt;/P&gt;&lt;P&gt;"message": "Update batch submitted with 0 items",&lt;/P&gt;&lt;P&gt;"threadId": []&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, the links are correct. In Talend ESB, I'm using a tFileFetch object with Post Method checked. The file image_Tal.png shows the settings&lt;/P&gt;&lt;P&gt;of the tFileFetch. When I use a context URL, I get this error:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; Exception in component tFileFetch_1 (Cognosos)&lt;/P&gt;&lt;P&gt;&amp;gt; java.lang.IllegalArgumentException: host parameter is null&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also tried hard-coding the full URL into the filefetch object, I get this error:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sep 08, 2022 1:49:39 PM org.apache.commons.httpclient.HttpMethodDirector executeWithRetry&lt;/P&gt;&lt;P&gt;INFO: I/O exception (java.net.ConnectException) caught when processing request: Connection timed out: no further information&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, how do I post the data from the CSV to the API? I've tried tRest, but it wouldn't allow me to use a context variable as the URI.&lt;/P&gt;&lt;P&gt;Because each different file has a different ID/Password, I need to use a variable for each iteration in the loop. When I use a&lt;/P&gt;&lt;P&gt;context for the URI, it gives me the error "URI is not absolute". I had the same problem with RestRequest and RestClient.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are there some settings I need to add to Talend ESB? I'm using the defaults now - I'm not sure what settings to change. How do I use&lt;/P&gt;&lt;P&gt;Talend to POST this API data, assuming I've got a link that is working in Postman?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Nov 2024 22:25:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/API-POST/m-p/2329865#M99011</guid>
      <dc:creator>TJones_AuctionEdge</dc:creator>
      <dc:date>2024-11-15T22:25:31Z</dc:date>
    </item>
    <item>
      <title>Re: API POST</title>
      <link>https://community.qlik.com/t5/Talend-Studio/API-POST/m-p/2329866#M99012</link>
      <description>&lt;P&gt;Hi &lt;/P&gt;&lt;P&gt;Use tHttpRequest or tRest component, can you show me the URL you use on tRest component? FileA is the string value or you need to post parameter from file?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Shong&lt;/P&gt;</description>
      <pubDate>Wed, 26 Oct 2022 02:26:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/API-POST/m-p/2329866#M99012</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-10-26T02:26:29Z</dc:date>
    </item>
    <item>
      <title>Re: API POST</title>
      <link>https://community.qlik.com/t5/Talend-Studio/API-POST/m-p/2329867#M99013</link>
      <description>&lt;P&gt;When I tried thttprequest, I got an "Bad Credentials" error. It's odd, because when I use the same https link in Postman, I get a success message. Here are the settings I'm using in the thttprequest object (a header for the key value).&lt;/P&gt;</description>
      <pubDate>Tue, 01 Nov 2022 19:49:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/API-POST/m-p/2329867#M99013</guid>
      <dc:creator>TJones_AuctionEdge</dc:creator>
      <dc:date>2022-11-01T19:49:31Z</dc:date>
    </item>
  </channel>
</rss>

