Support Questions

Find answers, ask questions, and share your expertise

Nifi 2.0.0 \ Invoke HTTP process (Get) with body

avatar
Explorer

Dears ,

Kindly note that I am trying to send InvokeHttp request as Get with the following body=   

{
    "Domain": [
        ["write_date",">=","2024-07-01 04:00:00.000"],
        ["write_date","<=","2024-07-12 04:00:00.000"]
    ]
}
 
 
I have done some investigations and found no solution for my problem
 

   

11 REPLIES 11

avatar
Super Guru

Hi @AnikaBaykus ,

I dont think this is going to work through InvokeHttp. I recommend you use custom  Groovy code through Executescript or using Curl through ExecuteStreamCommand.

 

Here are some links that can help you getting started:

Curl via StreamCommand:

https://community.cloudera.com/t5/Support-Questions/NiFi-Execute-Stream-Command-Curl-Call/m-p/368127

 

API vs Groovy script:

https://stackoverflow.com/questions/57242452/in-nifi-how-to-call-a-rest-service-using-groovy-script

 

ExecuteScript tutorial:

https://community.cloudera.com/t5/Community-Articles/ExecuteScript-Cookbook-part-1/ta-p/248922

https://community.cloudera.com/t5/Community-Articles/ExecuteScript-Cookbook-part-2/ta-p/249018

https://community.cloudera.com/t5/Community-Articles/ExecuteScript-Cookbook-part-3/ta-p/249148

 

If that helps please accept the  solution.

Thanks

 

avatar
New Contributor

Thank you @SAMSAL ,  we used Execute Process with a curl script file, when writing the script into the Execute Process itself, the body still did not go away. Your message helped solve the problem, 👏but unfortunately I don't have a button to mark it as a solution.😪