You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@nifi.apache.org by dkommineni <dk...@gmail.com> on 2019/10/10 15:42:29 UTC

InvokeHTTP with dynamic query parameters based on previous request response

Hi,

I am planning to pull data from github API URL 
https://api.github.com/repos/kubernetes/kubernetes/issues?since=2018-01-01T00:00:00Z
<https://api.github.com/repos/kubernetes/kubernetes/issues?since=2018-01-01T00:00:00Z>  
using InvokeHTTP processor. Once the processor fetch data, I would like to
query the github API again with new timestamp based on the previous request
results like 
https://api.github.com/repos/kubernetes/kubernetes/issues?since=2018-01-02T00:00:00Z
<https://api.github.com/repos/kubernetes/kubernetes/issues?since=2018-01-02T00:00:00Z> 
. 

How can I achieve this dynamic query parameters for each request based on
previous request response?

Any help or directions would be great help.

Regards
Devaraj



--
Sent from: http://apache-nifi-users-list.2361937.n4.nabble.com/

Re: InvokeHTTP with dynamic query parameters based on previous request response

Posted by dkommineni <dk...@gmail.com>.
Hi Vijay,

Thanks for your response.

I want to have only one InvokeHTTP request which continuously query for the
API with dynamic parameters.
I am new to Apache Nifi, if you could provided little more details, it would
be great.

Regards
Devaraj



--
Sent from: http://apache-nifi-users-list.2361937.n4.nabble.com/

Re: InvokeHTTP with dynamic query parameters based on previous request response

Posted by Vijay Chhipa <vc...@apple.com>.
Devraj, 

You will need to parse the response JSON produced by the first InvokeHTTP. You can do extract the timestamp you want using the EL syntax. 
If you only care when you made the previous request and want to store that timestamp somewhere, you can do so by adding a new attribute in the flowfiles attribute map. you can then use this value in the next InvokeHTTP cal as a value for 'since'

Vijay


> On Oct 10, 2019, at 10:42 AM, dkommineni <dk...@gmail.com> wrote:
> 
> Hi,
> 
> I am planning to pull data from github API URL 
> https://api.github.com/repos/kubernetes/kubernetes/issues?since=2018-01-01T00:00:00Z
> <https://api.github.com/repos/kubernetes/kubernetes/issues?since=2018-01-01T00:00:00Z>  
> using InvokeHTTP processor. Once the processor fetch data, I would like to
> query the github API again with new timestamp based on the previous request
> results like 
> https://api.github.com/repos/kubernetes/kubernetes/issues?since=2018-01-02T00:00:00Z
> <https://api.github.com/repos/kubernetes/kubernetes/issues?since=2018-01-02T00:00:00Z> 
> . 
> 
> How can I achieve this dynamic query parameters for each request based on
> previous request response?
> 
> Any help or directions would be great help.
> 
> Regards
> Devaraj
> 
> 
> 
> --
> Sent from: http://apache-nifi-users-list.2361937.n4.nabble.com/