Reputation: 189
Is it possible to make a two step API call using NiFi? What I am looking to do with make the first call (a POST) to retrieve an autho token that the second call would use to perform a GET and retrieve the requested data? I know that I can use the InvokeHTTP processor to make a GET or a POST call as seen below, but struggling with how to use the output of the first call as attribute of the second call. My thought is is the evaluateJSON processor to extract the token from the first call, but how do I get the token into my second call?
Upvotes: 0
Views: 268
Reputation: 547
Probably you need this token in your second call as a header.
You can add attributes as header in InvokeHttp
either via Attributes to Send
or as dynamic property
Suppose you have an attribute named token
use this as a header like below (header key and value may be different)
Upvotes: 1