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.

Create nifi project using java

Solved Go to solution

Create nifi project using java

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

Accepted Solutions
Highlighted

Re: Create nifi project using java

Master Guru

@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
Highlighted

Re: Create nifi project using java

Master Guru

@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

Don't have an account?
Coming from Hortonworks? Activate your account here