Reputation: 6290
New to NiFi!
I have a scenario where I make one rest request and get some data back. The data I receive contains an ID which I need to make subsequent requests. So for example:
InvokeHTTP GET request:
result:
[
{
id: 123
},
{
id: 345
}
]
InvokeHTTP GET Request:
Is there a way for me to assemble the two requests above to pass to InvokeHTTP in NiFi?
Thanks in advance!
Upvotes: 4
Views: 2382
Reputation: 14194
If the response is in JSON, you probably want to use SplitJson
to split the array into separate flowfiles, then use EvaluateJSONPath
to extract the id
values into flowfile attributes (one per flowfile). From there, you can feed those flowfiles into another InvokeHTTP
processor and reference the relevant attribute values.
Upvotes: 6