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.

How to decalre key and value for post method in InvokeHTTP processor at nifi

Highlighted

How to decalre key and value for post method in InvokeHTTP processor at nifi

New Contributor

I try to pull data from RestApi post url to nifi for that I try to use InvokeHTTP method anyone help me. How to declare those post paraameters like key,values in processor?. I'm using HDP 2.5. Initially I declare key and value at "Attribute to send" option in InvokeHTTP processor. But it won't work. I don't know whether it is correct way or not

15855-screenshot-from-2017-05-30-151843.png

?

15854-screenshot-from-2017-05-30-151904.png

6 REPLIES 6

Re: How to decalre key and value for post method in InvokeHTTP processor at nifi

Master Guru

@Narasimma varman

The "Attributes to Send" property allows you to enter a java regular expression for the FlowFile Attributes you wish to send as headers:

15857-screen-shot-2017-05-30-at-84210-am.png

Looks like what you really want to use are custom dynamic properties:

15858-screen-shot-2017-05-30-at-84526-am.png

You can add as many dynamic properties as you want by clicking the small "+" icon in the upper right corner of the properties tab on the invokeHTTP processor.

Thanks,

Matt

Re: How to decalre key and value for post method in InvokeHTTP processor at nifi

New Contributor

Thanks Matt Clarke

Re: How to decalre key and value for post method in InvokeHTTP processor at nifi

New Contributor

Hi, I want to do the same want to pass json in post parameters so How can I pass a nested json in dynamic properties?

Re: How to decalre key and value for post method in InvokeHTTP processor at nifi

New Contributor

Yes , I add dynamic properties after that I start flow but there is no flow occurs and not even error is also occurs

Re: How to decalre key and value for post method in InvokeHTTP processor at nifi

Master Guru

@Narasimma varman

Sorry for late response, but I don't get pinged unless you add a comment to my response or tag me in your new answer.

The dynamic properties expect the the "value" to be a valid NiFI expression language (EL) statement. Otherwise it is treated as a literal value. So i expect what you are seeing is that exact string passed in the nested header or some kind of session rollback, etc...

Also not sure how you are pulling data using a "POST" method? Shouldn't you be using "GET"?

Thanks, Matt

Re: How to decalre key and value for post method in InvokeHTTP processor at nifi

New Contributor

Thanks Matt Clarke