<?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: Provide nifi variable from nifi rest API in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Provide-nifi-variable-from-nifi-rest-API/m-p/193035#M80858</link>
    <description>&lt;P&gt;It works .. Thanks you&lt;/P&gt;</description>
    <pubDate>Tue, 24 Jul 2018 16:38:46 GMT</pubDate>
    <dc:creator>amittal6_</dc:creator>
    <dc:date>2018-07-24T16:38:46Z</dc:date>
    <item>
      <title>Provide nifi variable from nifi rest API</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Provide-nifi-variable-from-nifi-rest-API/m-p/193032#M80855</link>
      <description>&lt;P&gt;Is there any way where we can provide nifi processor group variables when executing the process group from rest api as parameter &lt;/P&gt;</description>
      <pubDate>Wed, 18 Jul 2018 13:13:59 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Provide-nifi-variable-from-nifi-rest-API/m-p/193032#M80855</guid>
      <dc:creator>amittal6_</dc:creator>
      <dc:date>2018-07-18T13:13:59Z</dc:date>
    </item>
    <item>
      <title>Re: Provide nifi variable from nifi rest API</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Provide-nifi-variable-from-nifi-rest-API/m-p/193033#M80856</link>
      <description>&lt;P&gt;&lt;A href="https://community.hortonworks.com/questions/203525/provide-nifi-variable-from-nifi-rest-api.html#"&gt;@aman mittal&lt;/A&gt;&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;P&gt;What the actual curl command will look like depends on whether your NiFi target is secured or not and how it has been secured. I am not completely clear on what you mean by "executing the process group".&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;P&gt;Here is an example curl command that can be used to create or update a key/value variable on an existing process group.  This example assumes the NiFi has been secured and authorization is via LDAP.&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;P&gt;# Obtain a user authentication token:&lt;/P&gt;&lt;PRE&gt;token=$(curl -k 'https://&amp;lt;hostname&amp;gt;:&amp;lt;port&amp;gt;/nifi-api/access/token'  --data 'username=&amp;lt;username&amp;gt;&amp;amp;password=&amp;lt;password&amp;gt;’)&lt;/PRE&gt;&lt;P&gt;-&lt;/P&gt;&lt;P&gt;#Get current process group variable-registry details:&lt;/P&gt;&lt;PRE&gt;curl -k 'https://&amp;lt;hostname&amp;gt;:&amp;lt;port&amp;gt;/nifi-api/process-groups/&amp;lt;process group uuid&amp;gt;/variable-registry' -H "Authorization: Bearer $token"&lt;/PRE&gt;&lt;P&gt;-&lt;/P&gt;&lt;P&gt;#create or update a variable on a specific process group:&lt;/P&gt;&lt;PRE&gt;curl -k 'https://&amp;lt;hostname&amp;gt;:&amp;lt;port&amp;gt;/nifi-api/process-groups/&amp;lt;process group uuid&amp;gt;/variable-registry/update-requests' -H "Authorization: Bearer $token" -H 'Content-Type: application/json' --data-binary '{"processGroupRevision":{"clientId":"&amp;lt;client id from above response&amp;gt;","version":2},"variableRegistry":{"processGroupId":"&amp;lt;process group uuid&amp;gt;","variables":[{"variable":{"name":"new-pg-var","value":"testing1234"}}]}}' --compressed&lt;/PRE&gt;&lt;P&gt;-&lt;/P&gt;&lt;P&gt;Note: If you Target Nifi is unsecured you will not need to worry about authentication or authorization. So above command would not require "-k" or "-H "Authorization: Bearer $token".  The URL in that case would also be http instead of https.&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Matt&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;P&gt;If you found this Answer addressed your original question, please take a moment to login and click "Accept" below the answer.&lt;/P&gt;</description>
      <pubDate>Wed, 18 Jul 2018 21:35:53 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Provide-nifi-variable-from-nifi-rest-API/m-p/193033#M80856</guid>
      <dc:creator>MattWho</dc:creator>
      <dc:date>2018-07-18T21:35:53Z</dc:date>
    </item>
    <item>
      <title>Re: Provide nifi variable from nifi rest API</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Provide-nifi-variable-from-nifi-rest-API/m-p/193034#M80857</link>
      <description>&lt;P&gt;&lt;A href="https://community.hortonworks.com/questions/203525/provide-nifi-variable-from-nifi-rest-api.html#"&gt;@Matt Clarke&lt;/A&gt; above command gives the following error . &lt;/P&gt;&lt;P&gt;The specified resource could not be found.curl: (6) Could not resolve host: Content-Type; Name or service not known&lt;/P&gt;</description>
      <pubDate>Tue, 24 Jul 2018 16:34:13 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Provide-nifi-variable-from-nifi-rest-API/m-p/193034#M80857</guid>
      <dc:creator>amittal6_</dc:creator>
      <dc:date>2018-07-24T16:34:13Z</dc:date>
    </item>
    <item>
      <title>Re: Provide nifi variable from nifi rest API</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Provide-nifi-variable-from-nifi-rest-API/m-p/193035#M80858</link>
      <description>&lt;P&gt;It works .. Thanks you&lt;/P&gt;</description>
      <pubDate>Tue, 24 Jul 2018 16:38:46 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Provide-nifi-variable-from-nifi-rest-API/m-p/193035#M80858</guid>
      <dc:creator>amittal6_</dc:creator>
      <dc:date>2018-07-24T16:38:46Z</dc:date>
    </item>
  </channel>
</rss>

