Programmatically adding processors

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Programmatically adding processors

Phil H
Hi there,

I need to add new properties/routes to RouteOnAttribute and subsequent PutFile processors based on an external input (a basic web interface).

Hoping someone can point me in the right direction in terms of either config files to change, or API calls to make to simulate what the NiFi UI would send through.

Thanks in advance,
Phil
Reply | Threaded
Open this post in threaded view
|

Re: Programmatically adding processors

Robert R. Bruno
In the past, I've used the Chrome developer tools network view to see the
api calls made by the NiFi UI.  Just manually go through the steps you want
to automate in the UI and view the REST calls made.

Hope that helps.

Robert

On Mon, Jan 29, 2018, 21:31 Phil H <[hidden email]> wrote:

> Hi there,
>
> I need to add new properties/routes to RouteOnAttribute and subsequent
> PutFile processors based on an external input (a basic web interface).
>
> Hoping someone can point me in the right direction in terms of either
> config files to change, or API calls to make to simulate what the NiFi UI
> would send through.
>
> Thanks in advance,
> Phil
Reply | Threaded
Open this post in threaded view
|

Re: Programmatically adding processors

Phil H
Thanks Robert!

Cheers,
Phil

> On 30 Jan 2018, at 13:35, Robert R. Bruno <[hidden email]> wrote:
>
> In the past, I've used the Chrome developer tools network view to see the
> api calls made by the NiFi UI.  Just manually go through the steps you want
> to automate in the UI and view the REST calls made.
>
> Hope that helps.
>
> Robert
>
>> On Mon, Jan 29, 2018, 21:31 Phil H <[hidden email]> wrote:
>>
>> Hi there,
>>
>> I need to add new properties/routes to RouteOnAttribute and subsequent
>> PutFile processors based on an external input (a basic web interface).
>>
>> Hoping someone can point me in the right direction in terms of either
>> config files to change, or API calls to make to simulate what the NiFi UI
>> would send through.
>>
>> Thanks in advance,
>> Phil
Reply | Threaded
Open this post in threaded view
|

Re: Programmatically adding processors

Chad Zobrisky
Phil,

The chrome dev tools option is definitely helpful with building request
order and looking for the calls you need to make.  There is also nifi rest
docs[1] available online.

1. https://nifi.apache.org/docs/nifi-docs/rest-api/index.html

Chad

[hidden email]



On Mon, Jan 29, 2018 at 9:47 PM Phil H <[hidden email]> wrote:

> Thanks Robert!
>
> Cheers,
> Phil
>
> > On 30 Jan 2018, at 13:35, Robert R. Bruno <[hidden email]> wrote:
> >
> > In the past, I've used the Chrome developer tools network view to see the
> > api calls made by the NiFi UI.  Just manually go through the steps you
> want
> > to automate in the UI and view the REST calls made.
> >
> > Hope that helps.
> >
> > Robert
> >
> >> On Mon, Jan 29, 2018, 21:31 Phil H <[hidden email]> wrote:
> >>
> >> Hi there,
> >>
> >> I need to add new properties/routes to RouteOnAttribute and subsequent
> >> PutFile processors based on an external input (a basic web interface).
> >>
> >> Hoping someone can point me in the right direction in terms of either
> >> config files to change, or API calls to make to simulate what the NiFi
> UI
> >> would send through.
> >>
> >> Thanks in advance,
> >> Phil
>
Reply | Threaded
Open this post in threaded view
|

Re: Programmatically adding processors

Daniel Chaffelson
Hi Phil,
It's not part of the official NiFi project, but I have been building a
python client to do exactly the kind of changes in NiFi that you describe.
You can find it at https://github.com/Chaffelson/nipyapi
And the function to update a processor's config via API call is here:
https://github.com/Chaffelson/nipyapi/blob/18142f2a03aebac14be75b607eb35074efa6aa7f/nipyapi/canvas.py#L377
There are also calls to stop and start the processor in order to effect the
change.

Happy to receive feature requests and PRs.

Thanks,
Dan.

On Tue, Jan 30, 2018 at 2:01 PM Chad Zobrisky <[hidden email]> wrote:

> Phil,
>
> The chrome dev tools option is definitely helpful with building request
> order and looking for the calls you need to make.  There is also nifi rest
> docs[1] available online.
>
> 1. https://nifi.apache.org/docs/nifi-docs/rest-api/index.html
>
> Chad
>
> [hidden email]
>
>
>
> On Mon, Jan 29, 2018 at 9:47 PM Phil H <[hidden email]> wrote:
>
> > Thanks Robert!
> >
> > Cheers,
> > Phil
> >
> > > On 30 Jan 2018, at 13:35, Robert R. Bruno <[hidden email]> wrote:
> > >
> > > In the past, I've used the Chrome developer tools network view to see
> the
> > > api calls made by the NiFi UI.  Just manually go through the steps you
> > want
> > > to automate in the UI and view the REST calls made.
> > >
> > > Hope that helps.
> > >
> > > Robert
> > >
> > >> On Mon, Jan 29, 2018, 21:31 Phil H <[hidden email]> wrote:
> > >>
> > >> Hi there,
> > >>
> > >> I need to add new properties/routes to RouteOnAttribute and subsequent
> > >> PutFile processors based on an external input (a basic web interface).
> > >>
> > >> Hoping someone can point me in the right direction in terms of either
> > >> config files to change, or API calls to make to simulate what the NiFi
> > UI
> > >> would send through.
> > >>
> > >> Thanks in advance,
> > >> Phil
> >
>