<?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 Re: NIFI API REST - Upload Json definition flow file in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/NIFI-API-REST-Upload-Json-definition-flow-file/m-p/380651#M244118</link>
    <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/80381"&gt;@SAMSAL&lt;/a&gt;&amp;nbsp;Thank you.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For future reference.&amp;nbsp; If you ever need to figure out what the request is,&amp;nbsp; simply use NIFI UI to do the action you want while monitoring your Developer Tools.&amp;nbsp; &amp;nbsp;This will expose the full request/response on any given UI action.&lt;/P&gt;&lt;P&gt;I have filed a JIRA for this.&lt;/P&gt;&lt;P&gt;&lt;A href="https://issues.apache.org/jira/browse/NIFI-12503" target="_blank" rel="noopener"&gt;https://issues.apache.org/jira/browse/NIFI-12503&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 11 Dec 2023 16:02:16 GMT</pubDate>
    <dc:creator>steven-matison</dc:creator>
    <dc:date>2023-12-11T16:02:16Z</dc:date>
    <item>
      <title>NIFI API REST - Upload Json definition flow file</title>
      <link>https://community.cloudera.com/t5/Support-Questions/NIFI-API-REST-Upload-Json-definition-flow-file/m-p/380379#M244055</link>
      <description>&lt;P&gt;hi everyone ! hoping everybody has an awsome day.&lt;/P&gt;&lt;P&gt;I am trying to create a process Group with a flow definition json i downloaded.&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;when i upload a file.json manually and checked the nifi-request.log and the only i see is this pettiotion "&amp;nbsp;&lt;/SPAN&gt;&lt;A href="http://localhost:8081/" target="_blank" rel="nofollow noopener noreferrer"&gt;http://localhost:8081&lt;/A&gt;&lt;SPAN&gt;/process-groups/{id}/process-groups/upload&lt;/SPAN&gt;&lt;SPAN&gt;"&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;but i don't see the body in sent request, i want to use the api rest to upload this file but documentation is not clear in this aspect&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;pettition #1:&lt;BR /&gt;curl&lt;/SPAN&gt; &lt;SPAN&gt;--location&lt;/SPAN&gt; &lt;SPAN&gt;"&lt;A href="http://localhost:8082/nifi-api/process-groups/{id}/process-groups/upload" target="_blank" rel="noopener"&gt;http://localhost:8082/nifi-api/process-groups/{id}/process-groups/upload&lt;/A&gt;"&lt;/SPAN&gt; &lt;SPAN&gt;\&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;--form &lt;/SPAN&gt;&lt;SPAN&gt;"file=@/path/to/my/flowDefinition.json"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;Response: Process Group name is required&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;pettition #2:&lt;BR /&gt;curl&lt;/SPAN&gt; &lt;SPAN&gt;--location&lt;/SPAN&gt; &lt;SPAN&gt;"&lt;A href="http://localhost:8082/nifi-api/process-groups/{id}/process-groups/upload" target="_blank" rel="noopener"&gt;http://localhost:8082/nifi-api/process-groups/{id}/process-groups/upload&lt;/A&gt;"&lt;/SPAN&gt; &lt;SPAN&gt;\&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;--header &lt;/SPAN&gt;&lt;SPAN&gt;'Content-Type: multipart/form-data'&lt;/SPAN&gt; &lt;SPAN&gt;\&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;-F &lt;/SPAN&gt;&lt;SPAN&gt;'id=root'&lt;/SPAN&gt; &lt;SPAN&gt;\&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;-F &lt;/SPAN&gt;&lt;SPAN&gt;'name=QA_FLOW'&lt;/SPAN&gt; &lt;SPAN&gt;\&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;-F &lt;/SPAN&gt;&lt;SPAN&gt;'position[x]=577.0'&lt;/SPAN&gt; &lt;SPAN&gt;\&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;-F &lt;/SPAN&gt;&lt;SPAN&gt;'position[y]=11.0'&lt;/SPAN&gt; &lt;SPAN&gt;\&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;-F &lt;/SPAN&gt;&lt;SPAN&gt;'clientId=27bf6df2-018c-1000-362e-61166913eee4'&lt;/SPAN&gt; &lt;SPAN&gt;\&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;-F &lt;/SPAN&gt;&lt;SPAN&gt;'disconnectNode=true'&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;-F&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;"file=@/path/to/my/flowDefinition.json"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;Response: Process Group name is required&amp;nbsp;&lt;/P&gt;&lt;P&gt;no matter how hard i tried i could not find a way to upload this file or even make the API accepts the name parameter.&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&lt;SPAN&gt;If someone can help me i would thanks a lot&lt;BR /&gt;have a nice day.&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Dec 2023 17:16:02 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/NIFI-API-REST-Upload-Json-definition-flow-file/m-p/380379#M244055</guid>
      <dc:creator>Colombia</dc:creator>
      <dc:date>2023-12-06T17:16:02Z</dc:date>
    </item>
    <item>
      <title>Re: NIFI API REST - Upload Json definition flow file</title>
      <link>https://community.cloudera.com/t5/Support-Questions/NIFI-API-REST-Upload-Json-definition-flow-file/m-p/380384#M244057</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/108168"&gt;@Colombia&lt;/a&gt; ,&lt;/P&gt;&lt;P&gt;First of all you are right , the documentation seems to be lacking around this call. When I check the Nifi Rest API documentation under (&lt;A title="api" href="https://nifi.apache.org/docs/nifi-docs/rest-api/index.html" target="_self"&gt;Nifi-Api&lt;/A&gt;&amp;nbsp;) here is what I find for the upload api :&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SAMSAL_0-1701894321710.png" style="width: 400px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/39131i7C14275D79B70E8C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SAMSAL_0-1701894321710.png" alt="SAMSAL_0-1701894321710.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;For some reason the Name of all the parameters are not shown ! Not sure if they were missed by mistake or I'm missing something here&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/35454"&gt;@MattWho&lt;/a&gt; ,&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/95503"&gt;@steven-matison&lt;/a&gt; might know.&lt;/P&gt;&lt;P&gt;After trial and error using Postman I was able to get it working and here is the curl command as provided by postman:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;curl --location 'https://{url}:9443/nifi-api/process-groups/17baf155-018c-1000-7bde-586d185d1d0d/process-groups/upload' \
--header 'Content-Type: multipart/form-data' \
--header 'Authorization: Bearer ...' \
--form 'positionX="11.0"' \
--form 'clientId="4036074c-018c-1000-3e06-aaaaaaaaaaaa"' \
--form 'disconnectNode="true"' \
--form 'groupName="testapi"' \
--form 'positionY="557.0"' \
--form 'file=@"/C:/nifi-2.0.0-M1-bin/nifi-2.0.0-M1/test123.json"'&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SAMSAL_1-1701894642365.png" style="width: 400px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/39132i8AD556C7ACD2F04A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SAMSAL_1-1701894642365.png" alt="SAMSAL_1-1701894642365.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If that helps please &lt;STRONG&gt;accept&lt;/STRONG&gt; solution.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 06 Dec 2023 20:32:26 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/NIFI-API-REST-Upload-Json-definition-flow-file/m-p/380384#M244057</guid>
      <dc:creator>SAMSAL</dc:creator>
      <dc:date>2023-12-06T20:32:26Z</dc:date>
    </item>
    <item>
      <title>Re: NIFI API REST - Upload Json definition flow file</title>
      <link>https://community.cloudera.com/t5/Support-Questions/NIFI-API-REST-Upload-Json-definition-flow-file/m-p/380463#M244066</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/80381"&gt;@SAMSAL&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;my friend, I just wanted to give you a huge thank you for your superhero-like assistance with the NiFi API on the community platform! Your solution was nothing short of amazing and saved the day in a way only a true superhero could.&lt;/P&gt;&lt;P&gt;Your expertise made a world of difference, and I'm incredibly grateful for your support.&lt;/P&gt;&lt;P&gt;Thanks a ton!&lt;/P&gt;&lt;P&gt;Best regards,&lt;BR /&gt;&lt;BR /&gt;have a awesome day&lt;/P&gt;</description>
      <pubDate>Thu, 07 Dec 2023 13:34:07 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/NIFI-API-REST-Upload-Json-definition-flow-file/m-p/380463#M244066</guid>
      <dc:creator>Colombia</dc:creator>
      <dc:date>2023-12-07T13:34:07Z</dc:date>
    </item>
    <item>
      <title>Re: NIFI API REST - Upload Json definition flow file</title>
      <link>https://community.cloudera.com/t5/Support-Questions/NIFI-API-REST-Upload-Json-definition-flow-file/m-p/380651#M244118</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/80381"&gt;@SAMSAL&lt;/a&gt;&amp;nbsp;Thank you.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For future reference.&amp;nbsp; If you ever need to figure out what the request is,&amp;nbsp; simply use NIFI UI to do the action you want while monitoring your Developer Tools.&amp;nbsp; &amp;nbsp;This will expose the full request/response on any given UI action.&lt;/P&gt;&lt;P&gt;I have filed a JIRA for this.&lt;/P&gt;&lt;P&gt;&lt;A href="https://issues.apache.org/jira/browse/NIFI-12503" target="_blank" rel="noopener"&gt;https://issues.apache.org/jira/browse/NIFI-12503&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Dec 2023 16:02:16 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/NIFI-API-REST-Upload-Json-definition-flow-file/m-p/380651#M244118</guid>
      <dc:creator>steven-matison</dc:creator>
      <dc:date>2023-12-11T16:02:16Z</dc:date>
    </item>
  </channel>
</rss>

