Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]
Created on
08-27-2016
08:30 PM
- last edited on
04-21-2026
05:29 AM
by
GrazittiAPI
I've created a few templates and want to save them someplace. I'm aware of the ability to download from the Web UI, but for scripting's sake would prefer to copy them from a folder somewhere. Does NiFi save templates in a folder someplace?
Created 08-27-2016 08:43 PM
Randy, there is a directory within NiFi under conf IIRC. However, this will not work as easily in a cluster.
The right way is to download templates via a REST api, see what UI is doing under the hood.
Created 08-27-2016 08:43 PM
Randy, there is a directory within NiFi under conf IIRC. However, this will not work as easily in a cluster.
The right way is to download templates via a REST api, see what UI is doing under the hood.
Created 08-28-2016 09:46 PM
I'm not running a cluster, so copying from a directory would be easier. Looking in $NIFI_HOME/conf, I have:
[root@monitor nifi]# ls -all conf/ total 72 drwxr-xr-x. 3 root root 4096 Aug 28 21:38 . drwxr-xr-x. 14 root root 4096 Aug 28 21:37 .. drwxr-xr-x. 2 root root 4096 Aug 28 21:38 archive -rw-rw-r--. 1 root root 3781 Aug 5 18:48 authorizers.xml -rw-rw-r--. 1 root root 2119 Aug 5 18:48 bootstrap-notification-services.xml -rw-rw-r--. 1 root root 2906 Aug 5 18:48 bootstrap.conf -rw-r--r--. 1 root root 8300 Aug 28 21:38 flow.xml.gz -rw-rw-r--. 1 root root 8158 Aug 5 18:48 logback.xml -rw-rw-r--. 1 root root 6089 Aug 5 18:48 login-identity-providers.xml -rw-rw-r--. 1 root root 8407 Aug 28 21:36 nifi.properties -rw-rw-r--. 1 root root 3637 Aug 5 18:48 state-management.xml -rw-rw-r--. 1 root root 1437 Aug 5 18:48 zookeeper.properties
Unfortunately none of these contains anything resembling my "Test" template. Where else should I look, @Andrew Grande?
Created 12-02-2016 09:26 AM
I am trying to download a template using rest api - where do I get the id of the template
Created 12-23-2016 05:15 PM
You need to query the template list first.
/flow/templates
Then parse the json and get the id.
Regards,
Wendell
Created 11-25-2016 07:52 AM
If you still having that problem, you can export the template by the Global Menu/Templates/
There list all the templates and have a button to download. The template is downloaded in a xml file.
Hope it helps
Regards
Created 11-26-2016 03:20 PM
@Randy Gelhausen Under conf there is a templates directory where all the templates are located.
Created 02-15-2017 07:52 AM
in which way are they stored - I did not see any templates directory after creating a test template - I can still find the template in NiFi, however it is not stored under conf, so perhaps you have a different setup?
Created 02-15-2017 08:10 AM
running on Ubuntu: the template is stored in conf directory in a flow.xml.gz file -- try to open it in vim, then you can search for your template name, perhaps you can make a script to extract template, however it seems that it is better to use the web interface where you can download to a xml file
Created 12-01-2017 10:43 AM
@Andrew Grande I want to delete all templates visible in the Nifi UI under Templates tab how to do it? i dont want to delete it one by one from UI.
Also in my Nifi setup my templates are not being stored in /home/nifi/conf/templates directory, so where are these stored by Nifi?
please help!!