Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

How to log in into different system using Rest Api in Apache Nifi?

avatar
New Contributor

Hello @All,

 

I am totally new in apache NiFi i am going to integrate Polarion ALM to NiFi using Rest Apis. But i am not able to understand where i need to give API link and where i need to give logIn credential i am using invokeHTTP process so anyone having any  idea on this please help me.

 

Thanks and Regards,

Digambar Dhere

 

2 REPLIES 2

avatar

Hi @Diga ,

Here are some videos to help you get started with the InvokeHttp Processor:

https://www.youtube.com/watch?v=aNrdWYy4i34

https://www.youtube.com/watch?v=SZhX_gce63E

https://www.youtube.com/watch?v=Jk7H8w3evN0

 

As far as logging in and authentication, it depends what kind of authentication the Rest API has. If it has simple authentication (username & password) you can enter those in the Basic Authentication Username & Basic Authentication Password properties. If you need to get Access Token (OAuth2) then you either obtain this through another InvokeHttp processor and pass it to the actual rest api invokehttp as "Authorization" header property (dynamically added to the processor), or second option is to take advantage of the "OAuth2 Access Token provider" in the InvokeHttp processor by setting up "StandardOauth2AccessTokenProvider" service and provide the credentials  and the access token url there.

 

Hope that helps.

Thanks

 

avatar
Super Mentor

@Diga 
In a scenario like this, the first thing to ask yourself is "How would I do this outside of NiFi?".  If you were to use curl from command line, how would you handle authentication with the Polarion ALM rest-api endpoints?  The answer there would help with how you would handle it within NiFi and assist in getting a better response in the community.  @SAMSAL provided some great suggestions of possible methods.

Matt