- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
How to use the RestLookupService to make REST API calls?
- Labels:
-
Apache NiFi
Created ‎07-06-2022 01:10 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am trying to learn how to use the RestLookupService to make REST API calls. But since it is a controller service, not a processor.. so I need some guidance on which processor I should use.. where I can configure this service. I want to save the response that this service returns to somewhere else..let's say to the local file system...using PutFile.
Created ‎07-06-2022 04:50 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@sayak17 ,
You need to configure your RestLookupService with the details of the external REST service that you want to use for lookups and then use the LookupRecord processor in your flow to perform the actual lookups.
The LookupRecord processor takes a reference to the RestLookupService controller service.
Cheers,
André
Was your question answered? Please take some time to click on "Accept as Solution" below this post.
If you find a reply useful, say thanks by clicking on the thumbs up button.
Created ‎07-06-2022 04:50 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@sayak17 ,
You need to configure your RestLookupService with the details of the external REST service that you want to use for lookups and then use the LookupRecord processor in your flow to perform the actual lookups.
The LookupRecord processor takes a reference to the RestLookupService controller service.
Cheers,
André
Was your question answered? Please take some time to click on "Accept as Solution" below this post.
If you find a reply useful, say thanks by clicking on the thumbs up button.
Created ‎07-07-2022 08:51 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@sayak17
If you are simply looking to GET from a REST API endpoint and take the response and write to a local file on the server where your NiFi service is running, you'll want to use the InvokeHTTP processor and feed that to your putFile processor.
If you found this response assisted with your query, please take a moment to login and click on "Accept as Solution" below this post.
Thank you,
Matt
