Created 07-08-2021 06:00 AM
I need immediate help for the below use case:
To perform POST activity with one of the system we have to follow the below steps:
Step 1: Request a Token: To obtain a token by submitting an Authenticate request.
The authentication request must be sent to http://today/authentication/v1/login using the GET method. The request header must contain an Authorization header in the following format:
Authorization: Basic <EncodedCredentials> where <EncodedCredentials> is the Base 64 encoded string for the credentials in the following format:
<username>:<password>
The token expiry is stored in the Authenticate response header.
Step2: To Call subsequent API request:
With a request token in hand, you can now submit a request (example: Create Projects) to update data to System
We must include your access token in the Authorization header of every request.
The authorization header must look like this:
Authorization: System <TokenValue>
...where <TokenValue> is the token obtained from the authentication call.
My query is that How to pass both the details (Authorization Key which is output from one processor and BODY part which we get from GetFile processor) to a single InvokeHTTP processor.
Looking for early Response.
Thanks in advance.
Created 07-12-2021 01:19 PM
@midee
So the output from first invokeHTTP is your token response.
You could use the PutdistributedMapCache processor to write that token to a cache entry
Then in your other flow with the GetFile processor, you send success to a FetchDistributedMapCache processor to retrieve that token and write it to an attribute (token for example) on this FlowFile.
Now you have your token in an attribute on the same FlowFile that has your content for the next invokeHTTP processor in your flow
If you found this addressed your query, please take a moment to login and click "Accept" on this solution.
Thank you,
Matt
Created 07-19-2021 05:44 AM
@midee have you resolved your issue? If so, please mark the appropriate reply as the solution, as it will make it easier for others to find the answer in the future.