Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Need help with InvokeHTTP processor

Highlighted

Need help with InvokeHTTP processor

New Contributor

Hello,

I am trying to setup an InvokeHTTP processor to run below curl command. I have tried many approaches and I am thinking this setup should work, but my flowfile keeps routing to no retry. Can you please help identify what I might me missing here.

curl --location --request POST "https://api.uhooinc.com/v1/getlatestdata" --data "username=notmyusername@e2air.com&password=04db2afe736389fb116bc0dd5fc99b983a0f5232cffda13c8b0180a8e576518b&serialNumber=49ff72067580485656381667"


I first setup a GenerateFlowFile to put the content of data into the flowfile content as custom text, because I understood that InvokeHTTP with post the content of the flowfile as data.

Then I setup InvokeHTTP as below:

107913-1555256812492.png


However, this is not working as the flowfile routes to no retry.


The other way I tried was to use an updateattribute processor to set a variable and setup InvokeHTTP to use the variable in Attributes to Send.

Please advise what I might be missing here.

1 REPLY 1

Re: Need help with InvokeHTTP processor

Rising Star

@Brian Durkop

Hi Brian, I'm a beginner on NiFi myself but maybe you will find some information about the concrete problem if you have a look at the attributes of the flowfile which is routed to "no retry"-queue.

List queue -> mark the flowfile -> tab "ATTRIBUTES" and scroll down. There are some attributes named "invoke...." which could contain helpful information.

In my opinion there is no need for UpdateAttribute before InvokeHTTP.

At first sight on your invokeHTTP I can't see any informatin about "Authorization" but in the curl command there is.