A RUBY SDK to use APACHE NIFI API.
See more at APACHE NIFI API.
https://rubygems.org/gems/nifi_sdk_ruby
Add this line to your application's Gemfile:
gem 'nifi_sdk_ruby'
And then execute:
$ bundle
Or install it yourself as:
$ gem install nifi_sdk_ruby
require 'nifi_sdk_ruby'
nifi_client = Nifi.new()
nifi_client.set_debug true
# Get Root Process Group
pg_root = nifi_client.get_process_group
puts "PG Root's ID"
puts pg_root['id']
new_pg = nifi_client.create_process_group(:name => 'test')
puts new_pg
puts nifi_client.process_group_by_name? test
puts nifi_client.get_process_group(new_pg['id'])
puts nifi_client.get_process_group_by_name 'test'
puts nifi_client.delete_process_group(new_pg['id'])
From file ...
puts nifi_client.upload_template(:path => 'IN.hmStaff.taskStatus.xml')
From url ...
puts nifi_client.upload_template(:path => 'https://your.domain.net/IN.hmStaff.taskStatus.xml')
puts nifi_client.template_by_name? test
t = nifi_client.get_template_group_by_name 'test'
puts t
puts nifi_client.delete_template t['id']
By id
puts nifi_client.create_template_instance(:id => '43fwe1s-asd2-sdf3-sfq3ev')
Or by name
puts nifi_client.create_template_instance(:name => 'TemplateName')
Bug reports and pull requests are welcome on GitHub at https://github.com/icalvete/nifi_sdk_ruby. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.
The gem is available as open source under the terms of the MIT License.
Israel Calvete Talavera [email protected]