<?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>question How  to send a POST API request in Apache NIFi in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/How-to-send-a-POST-API-request-in-Apache-NIFi/m-p/373137#M241497</link>
    <description>&lt;P&gt;I have NiFi pipeline which get data from a csv and transform into a JSON. Then I want to send a post API request from the JSIN created.&lt;BR /&gt;I need help setting up the InvokeHTTP processor in NiFi.&amp;nbsp;&lt;BR /&gt;API authorization is using an API key. I need assitance of how to define the api keys, url and JSON body inside InvokeHTTP processor&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="bhadraka_0-1687508157896.png" style="width: 400px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/37908i4D34B93AC022EA01/image-size/medium?v=v2&amp;amp;px=400" role="button" title="bhadraka_0-1687508157896.png" alt="bhadraka_0-1687508157896.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 23 Jun 2023 08:18:39 GMT</pubDate>
    <dc:creator>bhadraka</dc:creator>
    <dc:date>2023-06-23T08:18:39Z</dc:date>
    <item>
      <title>How  to send a POST API request in Apache NIFi</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-to-send-a-POST-API-request-in-Apache-NIFi/m-p/373137#M241497</link>
      <description>&lt;P&gt;I have NiFi pipeline which get data from a csv and transform into a JSON. Then I want to send a post API request from the JSIN created.&lt;BR /&gt;I need help setting up the InvokeHTTP processor in NiFi.&amp;nbsp;&lt;BR /&gt;API authorization is using an API key. I need assitance of how to define the api keys, url and JSON body inside InvokeHTTP processor&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="bhadraka_0-1687508157896.png" style="width: 400px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/37908i4D34B93AC022EA01/image-size/medium?v=v2&amp;amp;px=400" role="button" title="bhadraka_0-1687508157896.png" alt="bhadraka_0-1687508157896.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Jun 2023 08:18:39 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-to-send-a-POST-API-request-in-Apache-NIFi/m-p/373137#M241497</guid>
      <dc:creator>bhadraka</dc:creator>
      <dc:date>2023-06-23T08:18:39Z</dc:date>
    </item>
    <item>
      <title>Re: How  to send a POST API request in Apache NIFi</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-to-send-a-POST-API-request-in-Apache-NIFi/m-p/373151#M241502</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/105574"&gt;@bhadraka&lt;/a&gt;&amp;nbsp;Check out this flow definition example for how to prepare and test JSON ahead of an invokeHttp post.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Screen Shot 2023-06-23 at 9.03.51 AM.png" style="width: 999px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/37909iBF5CF419228250B1/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2023-06-23 at 9.03.51 AM.png" alt="Screen Shot 2023-06-23 at 9.03.51 AM.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Flow Def File:&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;&lt;A href="https://raw.githubusercontent.com/cldr-steven-matison/NiFi-Templates/main/InvokeHttp_Demo_2.json" target="_blank" rel="noopener"&gt;https://raw.githubusercontent.com/cldr-steven-matison/NiFi-Templates/main/InvokeHttp_Demo_2.json&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As far as the post itself goes.&amp;nbsp; I highly recommend that you test API calls with something like Postman so that you can clearly test what headers and such are required so that the API call works.&amp;nbsp; Only then try to make it work with InvokeHttp duplicating all headers.&amp;nbsp; &amp;nbsp; &amp;nbsp;Figuring out how to get the call to work and how to configure InvokeHTTP at same time is not fun.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;&lt;FONT size="2" color="#FF6600"&gt;TIP:&amp;nbsp; in Invoke HTTP click the + to add key value pairs corresponding to your headers or values you need to pass.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Jun 2023 13:05:03 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-to-send-a-POST-API-request-in-Apache-NIFi/m-p/373151#M241502</guid>
      <dc:creator>steven-matison</dc:creator>
      <dc:date>2023-06-23T13:05:03Z</dc:date>
    </item>
  </channel>
</rss>

