@greenflag
Not knowing anything about this rest-api endpoint, all I have are questions.
How would you complete this task outside of NiFi?
How would you accomplish this using curl from command line?
What do the REST-API docs for your endpoint have in terms of how to get files?
Do they expect you to pass the filename in the rest-api request?
What is the rest-api endpoint that would return the list of files?
My initial thought here (with making numerous assumptions about your endpoint) is that you would need multiple InvokeHTTP processors possibly.
The first InvokeHTTP in the dataflow hits the rest-api endpoint that outputs the list of files in the endpoint directory which would end up in the content of the FlowFile. Then you split that FlowFile by its content so you have multiple FlowFiles (1 per each listed file). Then rename each FlowFile using the unique filename and finally pass each to another invokeHTTP processor that actually fetches that specific file.
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