Skip to main content
BK84
Silver ⭐️⭐️
December 12, 2024
Solved

REST API Configuration for NiFi 2.0

Mates,

Need help or references of how to configure REST API on NiFi 2.0, unable to generate token as we were doing on 1.x.  Have NiFi on plan Linux not on any cluster

MattWho
MattWhoAnswer
Titanium ⭐️⭐️⭐️
December 13, 2024

@BK84 

The best way to capture rest-api calls is by using the developer tools available in your browser.  You can initiate the action with NiFi and capture the rest-api call that was made.  

I was able to fetch a token from my ldap-provider login in NiFi 2.0.0-M4 using below:

curl 'https://<nifi-node-hostname>:<nifi port>/nifi-api/access/token' -H 'content-type: application/x-www-form-urlencoded;charset=UTF-8' --data-raw 'username=<username>&password=<password>' --insecure


Which is no different then my NiFi 1.x version.

How have you been fetching your token?

Please help our community thrive. If you found any of the suggestions/solutions provided helped you with solving your issue or answering your question, please take a moment to login and click "Accept as Solution" on one or more of them that helped.

Thank you,
Matt

5 replies

DianaTorres
Community Manager
Community Manager
December 12, 2024

@BK84 Welcome to the Cloudera Community!

To help you get the best possible solution, I have tagged our NiFi experts @MattWho @steven-matison  who may be able to assist you further.

Please keep us updated on your post, and we hope you find a satisfactory solution to your query.

Translate
Regards, Diana Torres, Senior Community Moderator
MattWho
Titanium ⭐️⭐️⭐️
MattWhoAnswer
Titanium ⭐️⭐️⭐️
December 13, 2024

@BK84 

The best way to capture rest-api calls is by using the developer tools available in your browser.  You can initiate the action with NiFi and capture the rest-api call that was made.  

I was able to fetch a token from my ldap-provider login in NiFi 2.0.0-M4 using below:

curl 'https://<nifi-node-hostname>:<nifi port>/nifi-api/access/token' -H 'content-type: application/x-www-form-urlencoded;charset=UTF-8' --data-raw 'username=<username>&password=<password>' --insecure


Which is no different then my NiFi 1.x version.

How have you been fetching your token?

Please help our community thrive. If you found any of the suggestions/solutions provided helped you with solving your issue or answering your question, please take a moment to login and click "Accept as Solution" on one or more of them that helped.

Thank you,
Matt

Translate
BK84
BK84Author
Silver ⭐️⭐️
December 18, 2024

@MattWho - Could you help me with how to trigger a processor/processor group and capture there status using CURL.

Translate
BK84
BK84Author
Silver ⭐️⭐️
December 20, 2024

@MattWho @steven-matison   - Could one of you help me with how to trigger a processor/processor group and capture there status using CURL. I am ok to have a Shell Script to perform this.

Translate
MattWho
Titanium ⭐️⭐️⭐️
Titanium ⭐️⭐️⭐️
December 23, 2024

@BK84 
I suggest starting a new community question for your new query.  
When you start you r new question, please provide more detail on your ask.  Not clear what you mean by "trigger".   What is the use case you are trying to implement?

Thank you,

Matt

Translate