Member since
05-26-2020
5
Posts
0
Kudos Received
0
Solutions
09-18-2020
07:03 AM
Here u go Open bash script and put the info url="https://<you environment>:9091/nifi-api/" url_encoded="application/x-www-form-urlencoded" accept_header="Accept: application/json" content_type="Content-Type: application/json" data="username=<your user name>&password=<your password" rm -rf /tmp/a end_point="access/token" curl -k -X POST "${url}${end_point}" -H "${url_encoded}" --data "${data}" > /tmp/a token=`cat /tmp/a` bearer="Authorization: Bearer ${token}" # Now you are all set to run the curl commands # Get root id end_point="process-groups/root" curl -k -X GET "${url}${end_point}" -H "${content_type}" -H "${bearer}" # Get all the components under root which includes all processgroups, process, controller service, connections and everything. # NOTE: the identifier id WILL NOT MATCH your NIFI id. They are different. but this is one stop for full automation end_point="process-groups/root/download" curl -k -X GET "${url}${end_point}" -H "${content_type}" -H "${bearer}"
... View more
06-15-2020
08:05 PM
i am getting zookeeper already running on pid. how to fix it?
... View more
05-26-2020
04:17 PM
Use Case 1 How to get all the groups in the main canvas programmatically? Answer: url="https://localhost:8080/nifi-api/" content_type="Content-Type: application/json" end_point="process-groups/root/process-groups" curl -k "${url}${end_point}" -H "${content_type}" -H "${bearer}" Use Case 2 How to get the groups after finding the root and it's child groups ? For example From the Root --> Karthik Playground ==> Csv_2_Kafka, JSON_2_KAFKA Karthik Playground consists of 2 process group csv_2_kafka and json_2_kafka Root. (uuid "aaaa-bbbb" ==> Karthik Playground. (uuid "cccc-dddd") ==> csv_2_kafka. (uid "eeee-fff") ==> json_2_kafka. (uid "gggg-hhhh") From the use case 1, we get all the UUid under Component for all the process groups in root. Get the uuid for karthik playground and pass like this url="https://localhost:8080/nifi-api/" content_type="Content-Type: application/json" end_point="process-groups/cccc-dddd/process-groups" curl -k "${url}${end_point}" -H "${content_type}" -H "${bearer}" This will fetch csv_2_kafka and json_2_kafka Do the same process to get the information from csv_2_kafka and json_2_kafka
... View more
05-26-2020
04:13 PM
This will work https://localhost:8080/nifi-api/process-groups/root/process-groups This will print all the groups found in the main canvas
... View more