Support Questions

Find answers, ask questions, and share your expertise

REST API Configuration for NiFi 2.0

avatar
New Contributor

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

1 ACCEPTED SOLUTION

avatar
Master Mentor

@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

View solution in original post

4 REPLIES 4

avatar
Community Manager

@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.


Regards,

Diana Torres,
Community Moderator


Was your question answered? Make sure to mark the answer as the accepted solution.
If you find a reply useful, say thanks by clicking on the thumbs up button.
Learn more about the Cloudera Community:

avatar
Master Mentor

@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

avatar
New Contributor

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

avatar
New Contributor

@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.