<?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: How can I get the token to use the REST API in a user and password protected instance of NiFi? in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/How-can-I-get-the-token-to-use-the-REST-API-in-a-user-and/m-p/235857#M197670</link>
    <description>&lt;P&gt;Hi &lt;A rel="user" href="https://community.cloudera.com/users/102226/chortels.html" nodeid="102226"&gt;@CarlosHS&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;inorder to perform CURL/REST APi with Nifi, you might need a access token ,&lt;/P&gt;&lt;P&gt;as per blog : &lt;/P&gt;&lt;P&gt;following command will get you the access token&lt;/P&gt;&lt;PRE&gt;curl 'https://nifi-host:port/nifi-api/access/token' -H 'Content-Type: application/x-www-form-urlencoded; charset=UTF-8' --data 'username=ldap-username&amp;amp;password=ldap-password' --compressed —insecure&lt;/PRE&gt;&lt;P&gt;Later this token need to be reused for all operations like : &lt;/P&gt;&lt;PRE&gt;curl -k ’https://nifi-host:port/nifi-api/flow/process-groups/root/status' -H “Authorization: Bearer $token”&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;hope this helps&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 19 Jul 2019 11:05:05 GMT</pubDate>
    <dc:creator>akhilsnaik</dc:creator>
    <dc:date>2019-07-19T11:05:05Z</dc:date>
  </channel>
</rss>

