Support Questions

Find answers, ask questions, and share your expertise
Announcements
We’ve updated our product names and community labels - click here for full details

Create nifi project using java

avatar
New Contributor

Hi everyone 
So I'm an intern and it's my first time using apache NiFi. I wonder if there is any way to create a whole apache NiFi project using java: i.e: I have a button in java I need a code that able me to when I press this button a processor will be dragged and dropped in apache NiFi UI !!
Is it possible ??

if it is, how can we make it?

1 ACCEPTED SOLUTION

avatar
Master Mentor

@maryem 

 

Any action you can do through the NiFi UI, you can also do via interacting directly with the NiFi rest-api.

This will not animate the action of actually dragging and dropping a processor on the canvas, but you can make a rest-api call that would add new processor of type ABC at coordinates x,y on the canvas.

 

NiFi's rest-api documentation can be found here:
https://nifi.apache.org/docs/nifi-docs/rest-api/index.html

Some users find it easier to learn the rest-api call through examples.  If you open the developer tools in your browser, you can perform the action via the UI and see the rest-api call that was made.  Most browser developer tools even let you save the rest-api call as a curl command that you could then execute yourself via command line.

Matt

View solution in original post

1 REPLY 1

avatar
Master Mentor

@maryem 

 

Any action you can do through the NiFi UI, you can also do via interacting directly with the NiFi rest-api.

This will not animate the action of actually dragging and dropping a processor on the canvas, but you can make a rest-api call that would add new processor of type ABC at coordinates x,y on the canvas.

 

NiFi's rest-api documentation can be found here:
https://nifi.apache.org/docs/nifi-docs/rest-api/index.html

Some users find it easier to learn the rest-api call through examples.  If you open the developer tools in your browser, you can perform the action via the UI and see the rest-api call that was made.  Most browser developer tools even let you save the rest-api call as a curl command that you could then execute yourself via command line.

Matt