Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

DevOps Tips: Using the Apache NiFi Toolkit with Apache NiFI 1.6.0

DZone's Guide to

DevOps Tips: Using the Apache NiFi Toolkit with Apache NiFI 1.6.0

Read this article in order to learn more about using NiFi CLI for administration and management.

· Integration Zone ·
Free Resource

SnapLogic is the leading self-service enterprise-grade integration platform. Download the 2018 GartnerMagic Quadrant for Enterprise iPaaS or play around on the platform, risk free, for 30 days.

Apache NiFi now has a cool command-line tool that can run interactive or one-off.

You can see it here.

You will need to fork and build the current version of Apache NiFi from GitHub. If you have the Java JDK 8+ and Maven, you are good to go. It's pretty quick.

After you build, navigate to the nifi-toolkit target directory and you will have a zip to copy and unzip. You can then use this helpful tool.

This is a separate tool from https://github.com/Chaffelson/nipyapi. Both are awesome though.

I ran this on my local Mac:

nifi-toolkit-1.6.0

List Registry Buckets

./bin/cli.sh registry list-buckets -u http://localhost:18080
#   Name                       Id                                     Description
-   ------------------------   ------------------------------------   -----------
1   Development                dd323482-c62e-4b18-9f99-c782abd512b4   (empty)
2   Experimental               2f3d1e34-4e20-4d16-af5a-7be99af98869   (empty)
3   Integration                e7410f97-1ec1-4b20-a87b-35944517ba4a   (empty)
4   Production                 d3acee10-1bef-4fa8-a75c-0d0e37f7162e   (empty)
5   Test                       09774cd8-3d3c-4ac6-9921-e341b96b6e38   (empty)
6   nipyapi_console_bucket_0   e40b9d47-cf67-46cc-85d5-028195e6f38a   (empty)
7   nipyapi_console_bucket_1   f4212398-af8f-45f3-8951-5ee71800bed8   (empty)
8   tim                        7a547c9d-cba6-4445-be29-eb8e9f3892da   (empty)

./bin/cli.sh session set nifi.props ../conf/nifi.properties

./bin/cli.sh session set nifi.reg.props /Volumes/seagate/apps/nifi-registry/nifi-registry-assembly/target/nifi-registry-0.1.1-SNAPSHOT-bin/nifi-registry-0.1.1-SNAPSHOT/conf/nifi-registry.properties

./bin/cli.sh registry list-flows -b dd323482-c62e-4b18-9f99-c782abd512b4  -u http://localhost:18080 -ot json

[ {
  "identifier" : "391ead49-79e1-4537-b4c9-a794a129eefe",
  "name" : "aaa Demo",
  "description" : "",
  "bucketIdentifier" : "dd323482-c62e-4b18-9f99-c782abd512b4",
  "bucketName" : "Development",
  "createdTimestamp" : 1521840088894,
  "modifiedTimestamp" : 1521840088908,
  "type" : "Flow",
  "permissions" : {
    "canRead" : true,
    "canWrite" : true,
    "canDelete" : true
  },
  "versionCount" : 1,
  "link" : {
    "params" : {
      "rel" : "self"
    },
    "href" : "buckets/dd323482-c62e-4b18-9f99-c782abd512b4/flows/391ead49-79e1-4537-b4c9-a794a129eefe"
  }
}, {
  "identifier" : "7b8711fb-0454-4302-a6a3-7c2383ed901a",
  "name" : "aaa ETL POC Kafka",
  "description" : "",
  "bucketIdentifier" : "dd323482-c62e-4b18-9f99-c782abd512b4",
  "bucketName" : "Development",
  "createdTimestamp" : 1521840078539,
  "modifiedTimestamp" : 1522362203607,
  "type" : "Flow",
  "permissions" : {
    "canRead" : true,
    "canWrite" : true,
    "canDelete" : true
  },
  "versionCount" : 2,
  "link" : {
    "params" : {
      "rel" : "self"
    },
    "href" : "buckets/dd323482-c62e-4b18-9f99-c782abd512b4/flows/7b8711fb-0454-4302-a6a3-7c2383ed901a"
  }
}, {
  "identifier" : "418f0946-740a-439f-bfd5-f49d7f03f7b0",
  "name" : "aaa POC",
  "description" : "",
  "bucketIdentifier" : "dd323482-c62e-4b18-9f99-c782abd512b4",
  "bucketName" : "Development",
  "createdTimestamp" : 1521840096718,
  "modifiedTimestamp" : 1522249506270,
  "type" : "Flow",
  "permissions" : {
    "canRead" : true,
    "canWrite" : true,
    "canDelete" : true
  },
  "versionCount" : 2,
  "link" : {
    "params" : {
      "rel" : "self"
    },
    "href" : "buckets/dd323482-c62e-4b18-9f99-c782abd512b4/flows/418f0946-740a-439f-bfd5-f49d7f03f7b0"
  }
}, {
  "identifier" : "6c87bba2-e44d-462b-8c42-e89bae35c896",
  "name" : "aaa Partition 1",
  "description" : "",
  "bucketIdentifier" : "dd323482-c62e-4b18-9f99-c782abd512b4",
  "bucketName" : "Development",
  "createdTimestamp" : 1521840000793,
  "modifiedTimestamp" : 1522252098304,
  "type" : "Flow",
  "permissions" : {
    "canRead" : true,
    "canWrite" : true,
    "canDelete" : true
  },
  "versionCount" : 2,
  "link" : {
    "params" : {
      "rel" : "self"
    },
    "href" : "buckets/dd323482-c62e-4b18-9f99-c782abd512b4/flows/6c87bba2-e44d-462b-8c42-e89bae35c896"
  }
}, {
  "identifier" : "ce2fdaf9-bf81-43fa-846f-f38f6891be95",
  "name" : "water Twitter",
  "description" : "",
  "bucketIdentifier" : "dd323482-c62e-4b18-9f99-c782abd512b4",
  "bucketName" : "Development",
  "createdTimestamp" : 1521840058128,
  "modifiedTimestamp" : 1522252580364,
  "type" : "Flow",
  "permissions" : {
    "canRead" : true,
    "canWrite" : true,
    "canDelete" : true
  },
  "versionCount" : 3,
  "link" : {
    "params" : {
      "rel" : "self"
    },
    "href" : "buckets/dd323482-c62e-4b18-9f99-c782abd512b4/flows/ce2fdaf9-bf81-43fa-846f-f38f6891be95"
  }
}, {
  "identifier" : "dd98dfa1-5d8a-4871-a145-2b2a99e9c1bd",
  "name" : "water",
  "description" : "",
  "bucketIdentifier" : "dd323482-c62e-4b18-9f99-c782abd512b4",
  "bucketName" : "Development",
  "createdTimestamp" : 1521840050742,
  "modifiedTimestamp" : 1522246164842,
  "type" : "Flow",
  "permissions" : {
    "canRead" : true,
    "canWrite" : true,
    "canDelete" : true
  },
  "versionCount" : 2,
  "link" : {
    "params" : {
      "rel" : "self"
    },
    "href" : "buckets/dd323482-c62e-4b18-9f99-c782abd512b4/flows/dd98dfa1-5d8a-4871-a145-2b2a99e9c1bd"
  }
}, {
  "identifier" : "6225970e-c483-4041-bddc-9ffe906baaf5",
  "name" : "Backup",
  "description" : "",
  "bucketIdentifier" : "dd323482-c62e-4b18-9f99-c782abd512b4",
  "bucketName" : "Development",
  "createdTimestamp" : 1521840114610,
  "modifiedTimestamp" : 1521840114621,
  "type" : "Flow",
  "permissions" : {
    "canRead" : true,
    "canWrite" : true,
    "canDelete" : true
  },
  "versionCount" : 1,
  "link" : {
    "params" : {
      "rel" : "self"
    },
    "href" : "buckets/dd323482-c62e-4b18-9f99-c782abd512b4/flows/6225970e-c483-4041-bddc-9ffe906baaf5"
  }
}, {
  "identifier" : "d9ddcea0-1f65-49ca-9c84-a98b5aea7c14",
  "name" : "Backup NiFi Registry",
  "description" : "",
  "bucketIdentifier" : "dd323482-c62e-4b18-9f99-c782abd512b4",
  "bucketName" : "Development",
  "createdTimestamp" : 1522497354889,
  "modifiedTimestamp" : 1523637422397,
  "type" : "Flow",
  "permissions" : {
    "canRead" : true,
    "canWrite" : true,
    "canDelete" : true
  },
  "versionCount" : 3,
  "link" : {
    "params" : {
      "rel" : "self"
    },
    "href" : "buckets/dd323482-c62e-4b18-9f99-c782abd512b4/flows/d9ddcea0-1f65-49ca-9c84-a98b5aea7c14"
  }
}, {
  "identifier" : "1d429eac-b4e0-4adc-b1a0-a4872c27dfd6",
  "name" : "Backup Schemas",
  "description" : "",
  "bucketIdentifier" : "dd323482-c62e-4b18-9f99-c782abd512b4",
  "bucketName" : "Development",
  "createdTimestamp" : 1522076372861,
  "modifiedTimestamp" : 1522497180409,
  "type" : "Flow",
  "permissions" : {
    "canRead" : true,
    "canWrite" : true,
    "canDelete" : true
  },
  "versionCount" : 3,
  "link" : {
    "params" : {
      "rel" : "self"
    },
    "href" : "buckets/dd323482-c62e-4b18-9f99-c782abd512b4/flows/1d429eac-b4e0-4adc-b1a0-a4872c27dfd6"
  }
}, {
  "identifier" : "da41aa10-cdcc-4b24-b4cd-6af8d2d51f0d",
  "name" : "DataWorksSummit2018",
  "description" : "",
  "bucketIdentifier" : "dd323482-c62e-4b18-9f99-c782abd512b4",
  "bucketName" : "Development",
  "createdTimestamp" : 1524079296861,
  "modifiedTimestamp" : 1524079297284,
  "type" : "Flow",
  "permissions" : {
    "canRead" : true,
    "canWrite" : true,
    "canDelete" : true
  },
  "versionCount" : 1,
  "link" : {
    "params" : {
      "rel" : "self"
    },
    "href" : "buckets/dd323482-c62e-4b18-9f99-c782abd512b4/flows/da41aa10-cdcc-4b24-b4cd-6af8d2d51f0d"
  }
}, {
  "identifier" : "86fcb309-50dd-44d8-bcb9-df98dcad5147",
  "name" : "Deep Learning Local",
  "description" : "TensorFlow\nApache MXNet",
  "bucketIdentifier" : "dd323482-c62e-4b18-9f99-c782abd512b4",
  "bucketName" : "Development",
  "createdTimestamp" : 1521841611090,
  "modifiedTimestamp" : 1524111902612,
  "type" : "Flow",
  "permissions" : {
    "canRead" : true,
    "canWrite" : true,
    "canDelete" : true
  },
  "versionCount" : 13,
  "link" : {
    "params" : {
      "rel" : "self"
    },
    "href" : "buckets/dd323482-c62e-4b18-9f99-c782abd512b4/flows/86fcb309-50dd-44d8-bcb9-df98dcad5147"
  }
}, {
  "identifier" : "ef5e318f-61ae-473f-afe8-b4d004b9401a",
  "name" : "DisplayImages",
  "description" : "",
  "bucketIdentifier" : "dd323482-c62e-4b18-9f99-c782abd512b4",
  "bucketName" : "Development",
  "createdTimestamp" : 1522698373151,
  "modifiedTimestamp" : 1522698373749,
  "type" : "Flow",
  "permissions" : {
    "canRead" : true,
    "canWrite" : true,
    "canDelete" : true
  },
  "versionCount" : 1,
  "link" : {
    "params" : {
      "rel" : "self"
    },
    "href" : "buckets/dd323482-c62e-4b18-9f99-c782abd512b4/flows/ef5e318f-61ae-473f-afe8-b4d004b9401a"
  }
}, {
  "identifier" : "d67c248a-6dcf-4785-b6ba-8d62bd272048",
  "name" : "Drones",
  "description" : "",
  "bucketIdentifier" : "dd323482-c62e-4b18-9f99-c782abd512b4",
  "bucketName" : "Development",
  "createdTimestamp" : 1521840043046,
  "modifiedTimestamp" : 1521840043065,
  "type" : "Flow",
  "permissions" : {
    "canRead" : true,
    "canWrite" : true,
    "canDelete" : true
  },
  "versionCount" : 1,
  "link" : {
    "params" : {
      "rel" : "self"
    },
    "href" : "buckets/dd323482-c62e-4b18-9f99-c782abd512b4/flows/d67c248a-6dcf-4785-b6ba-8d62bd272048"
  }
}, {
  "identifier" : "64a861d3-da76-40a7-8258-59bc84cb3920",
  "name" : "First Version",
  "description" : "",
  "bucketIdentifier" : "dd323482-c62e-4b18-9f99-c782abd512b4",
  "bucketName" : "Development",
  "createdTimestamp" : 1516754562969,
  "modifiedTimestamp" : 1523652572628,
  "type" : "Flow",
  "permissions" : {
    "canRead" : true,
    "canWrite" : true,
    "canDelete" : true
  },
  "versionCount" : 23,
  "link" : {
    "params" : {
      "rel" : "self"
    },
    "href" : "buckets/dd323482-c62e-4b18-9f99-c782abd512b4/flows/64a861d3-da76-40a7-8258-59bc84cb3920"
  }
}, {
  "identifier" : "51cdc133-0f80-45c4-9f57-4db80e14b1ba",
  "name" : "Flat File Ingest",
  "description" : "",
  "bucketIdentifier" : "dd323482-c62e-4b18-9f99-c782abd512b4",
  "bucketName" : "Development",
  "createdTimestamp" : 1517515827689,
  "modifiedTimestamp" : 1517608811893,
  "type" : "Flow",
  "permissions" : {
    "canRead" : true,
    "canWrite" : true,
    "canDelete" : true
  },
  "versionCount" : 2,
  "link" : {
    "params" : {
      "rel" : "self"
    },
    "href" : "buckets/dd323482-c62e-4b18-9f99-c782abd512b4/flows/51cdc133-0f80-45c4-9f57-4db80e14b1ba"
  }
}, {
  "identifier" : "edcce7af-f2cd-42bb-be13-56df04eac967",
  "name" : "Flights",
  "description" : "",
  "bucketIdentifier" : "dd323482-c62e-4b18-9f99-c782abd512b4",
  "bucketName" : "Development",
  "createdTimestamp" : 1521839911832,
  "modifiedTimestamp" : 1522252095529,
  "type" : "Flow",
  "permissions" : {
    "canRead" : true,
    "canWrite" : true,
    "canDelete" : true
  },
  "versionCount" : 2,
  "link" : {
    "params" : {
      "rel" : "self"
    },
    "href" : "buckets/dd323482-c62e-4b18-9f99-c782abd512b4/flows/edcce7af-f2cd-42bb-be13-56df04eac967"
  }
}, {
  "identifier" : "4409863e-a055-4258-85fd-d38d97d844ff",
  "name" : "HL7",
  "description" : "",
  "bucketIdentifier" : "dd323482-c62e-4b18-9f99-c782abd512b4",
  "bucketName" : "Development",
  "createdTimestamp" : 1521840150843,
  "modifiedTimestamp" : 1522249094133,
  "type" : "Flow",
  "permissions" : {
    "canRead" : true,
    "canWrite" : true,
    "canDelete" : true
  },
  "versionCount" : 2,
  "link" : {
    "params" : {
      "rel" : "self"
    },
    "href" : "buckets/dd323482-c62e-4b18-9f99-c782abd512b4/flows/4409863e-a055-4258-85fd-d38d97d844ff"
  }
}, {
  "identifier" : "2862f26c-1c9b-476b-8fcc-c9889853e83e",
  "name" : "place",
  "description" : "",
  "bucketIdentifier" : "dd323482-c62e-4b18-9f99-c782abd512b4",
  "bucketName" : "Development",
  "createdTimestamp" : 1521840013403,
  "modifiedTimestamp" : 1521840013414,
  "type" : "Flow",
  "permissions" : {
    "canRead" : true,
    "canWrite" : true,
    "canDelete" : true
  },
  "versionCount" : 1,
  "link" : {
    "params" : {
      "rel" : "self"
    },
    "href" : "buckets/dd323482-c62e-4b18-9f99-c782abd512b4/flows/2862f26c-1c9b-476b-8fcc-c9889853e83e"
  }
}, {
  "identifier" : "e458f1eb-6991-4547-b108-2330d45a2f52",
  "name" : "IBM",
  "description" : "",
  "bucketIdentifier" : "dd323482-c62e-4b18-9f99-c782abd512b4",
  "bucketName" : "Development",
  "createdTimestamp" : 1521840107194,
  "modifiedTimestamp" : 1521840107201,
  "type" : "Flow",
  "permissions" : {
    "canRead" : true,
    "canWrite" : true,
    "canDelete" : true
  },
  "versionCount" : 1,
  "link" : {
    "params" : {
      "rel" : "self"
    },
    "href" : "buckets/dd323482-c62e-4b18-9f99-c782abd512b4/flows/e458f1eb-6991-4547-b108-2330d45a2f52"
  }
}, {
  "identifier" : "f2cc6a69-e1d8-4d74-b310-c83d29feddcc",
  "name" : "Integrate Geo",
  "description" : "",
  "bucketIdentifier" : "dd323482-c62e-4b18-9f99-c782abd512b4",
  "bucketName" : "Development",
  "createdTimestamp" : 1521839902600,
  "modifiedTimestamp" : 1523644378024,
  "type" : "Flow",
  "permissions" : {
    "canRead" : true,
    "canWrite" : true,
    "canDelete" : true
  },
  "versionCount" : 3,
  "link" : {
    "params" : {
      "rel" : "self"
    },
    "href" : "buckets/dd323482-c62e-4b18-9f99-c782abd512b4/flows/f2cc6a69-e1d8-4d74-b310-c83d29feddcc"
  }
}, {
  "identifier" : "8a39489a-3431-4ac7-a5fe-83f0ff3663b4",
  "name" : "Internet of Beer",
  "description" : "IoT + Deep Learning + Supervised Learning + phone gps ingest + Feed Ingest + Social Media + Picture ingest and analyze",
  "bucketIdentifier" : "dd323482-c62e-4b18-9f99-c782abd512b4",
  "bucketName" : "Development",
  "createdTimestamp" : 1523643141557,
  "modifiedTimestamp" : 1523643968208,
  "type" : "Flow",
  "permissions" : {
    "canRead" : true,
    "canWrite" : true,
    "canDelete" : true
  },
  "versionCount" : 2,
  "link" : {
    "params" : {
      "rel" : "self"
    },
    "href" : "buckets/dd323482-c62e-4b18-9f99-c782abd512b4/flows/8a39489a-3431-4ac7-a5fe-83f0ff3663b4"
  }
}, {
  "identifier" : "d759b371-2c98-4dbe-b2f8-05657efcb828",
  "name" : "product place",
  "description" : "",
  "bucketIdentifier" : "dd323482-c62e-4b18-9f99-c782abd512b4",
  "bucketName" : "Development",
  "createdTimestamp" : 1521840023279,
  "modifiedTimestamp" : 1522252092880,
  "type" : "Flow",
  "permissions" : {
    "canRead" : true,
    "canWrite" : true,
    "canDelete" : true
  },
  "versionCount" : 3,
  "link" : {
    "params" : {
      "rel" : "self"
    },
    "href" : "buckets/dd323482-c62e-4b18-9f99-c782abd512b4/flows/d759b371-2c98-4dbe-b2f8-05657efcb828"
  }
}, {
  "identifier" : "f0a45484-98e6-45fd-b815-c0b64bab2b6f",
  "name" : "Pharma MQTT",
  "description" : "",
  "bucketIdentifier" : "dd323482-c62e-4b18-9f99-c782abd512b4",
  "bucketName" : "Development",
  "createdTimestamp" : 1521840034235,
  "modifiedTimestamp" : 1521840034244,
  "type" : "Flow",
  "permissions" : {
    "canRead" : true,
    "canWrite" : true,
    "canDelete" : true
  },
  "versionCount" : 1,
  "link" : {
    "params" : {
      "rel" : "self"
    },
    "href" : "buckets/dd323482-c62e-4b18-9f99-c782abd512b4/flows/f0a45484-98e6-45fd-b815-c0b64bab2b6f"
  }
}, {
  "identifier" : "d88ed1c8-3e0f-44d3-b67f-d6566db8a9b9",
  "name" : "MXNetServer",
  "description" : "mxnet server connection",
  "bucketIdentifier" : "dd323482-c62e-4b18-9f99-c782abd512b4",
  "bucketName" : "Development",
  "createdTimestamp" : 1518104624528,
  "modifiedTimestamp" : 1524111906112,
  "type" : "Flow",
  "permissions" : {
    "canRead" : true,
    "canWrite" : true,
    "canDelete" : true
  },
  "versionCount" : 13,
  "link" : {
    "params" : {
      "rel" : "self"
    },
    "href" : "buckets/dd323482-c62e-4b18-9f99-c782abd512b4/flows/d88ed1c8-3e0f-44d3-b67f-d6566db8a9b9"
  }
}, {
  "identifier" : "178cfea3-8d54-44ff-b252-d3d100041a30",
  "name" : "MiniFi Creator",
  "description" : "",
  "bucketIdentifier" : "dd323482-c62e-4b18-9f99-c782abd512b4",
  "bucketName" : "Development",
  "createdTimestamp" : 1517005511676,
  "modifiedTimestamp" : 1517082021271,
  "type" : "Flow",
  "permissions" : {
    "canRead" : true,
    "canWrite" : true,
    "canDelete" : true
  },
  "versionCount" : 3,
  "link" : {
    "params" : {
      "rel" : "self"
    },
    "href" : "buckets/dd323482-c62e-4b18-9f99-c782abd512b4/flows/178cfea3-8d54-44ff-b252-d3d100041a30"
  }
}, {
  "identifier" : "58c887f4-1cfb-4a7c-b732-4b31b260df7e",
  "name" : "MiniFi Jetson MQTT",
  "description" : "",
  "bucketIdentifier" : "dd323482-c62e-4b18-9f99-c782abd512b4",
  "bucketName" : "Development",
  "createdTimestamp" : 1522698439589,
  "modifiedTimestamp" : 1522771843123,
  "type" : "Flow",
  "permissions" : {
    "canRead" : true,
    "canWrite" : true,
    "canDelete" : true
  },
  "versionCount" : 3,
  "link" : {
    "params" : {
      "rel" : "self"
    },
    "href" : "buckets/dd323482-c62e-4b18-9f99-c782abd512b4/flows/58c887f4-1cfb-4a7c-b732-4b31b260df7e"
  }
}, {
  "identifier" : "5fc0add8-4a95-4ed6-ba40-480a57299dc3",
  "name" : "Mobile Ingest",
  "description" : "",
  "bucketIdentifier" : "dd323482-c62e-4b18-9f99-c782abd512b4",
  "bucketName" : "Development",
  "createdTimestamp" : 1521839889009,
  "modifiedTimestamp" : 1522252234607,
  "type" : "Flow",
  "permissions" : {
    "canRead" : true,
    "canWrite" : true,
    "canDelete" : true
  },
  "versionCount" : 2,
  "link" : {
    "params" : {
      "rel" : "self"
    },
    "href" : "buckets/dd323482-c62e-4b18-9f99-c782abd512b4/flows/5fc0add8-4a95-4ed6-ba40-480a57299dc3"
  }
}, {
  "identifier" : "b75ab78a-0e6a-48d8-9c79-9907fdd588aa",
  "name" : "Mobile Phone Ingest",
  "description" : "",
  "bucketIdentifier" : "dd323482-c62e-4b18-9f99-c782abd512b4",
  "bucketName" : "Development",
  "createdTimestamp" : 1523641063614,
  "modifiedTimestamp" : 1523641063709,
  "type" : "Flow",
  "permissions" : {
    "canRead" : true,
    "canWrite" : true,
    "canDelete" : true
  },
  "versionCount" : 1,
  "link" : {
    "params" : {
      "rel" : "self"
    },
    "href" : "buckets/dd323482-c62e-4b18-9f99-c782abd512b4/flows/b75ab78a-0e6a-48d8-9c79-9907fdd588aa"
  }
}, {
  "identifier" : "4060bdd9-6683-4d08-9c89-b4287cf30a4d",
  "name" : "Monitor Power Local",
  "description" : "local",
  "bucketIdentifier" : "dd323482-c62e-4b18-9f99-c782abd512b4",
  "bucketName" : "Development",
  "createdTimestamp" : 1515791354068,
  "modifiedTimestamp" : 1523651603644,
  "type" : "Flow",
  "permissions" : {
    "canRead" : true,
    "canWrite" : true,
    "canDelete" : true
  },
  "versionCount" : 11,
  "link" : {
    "params" : {
      "rel" : "self"
    },
    "href" : "buckets/dd323482-c62e-4b18-9f99-c782abd512b4/flows/4060bdd9-6683-4d08-9c89-b4287cf30a4d"
  }
}, {
  "identifier" : "37cc56a7-126f-48ff-9224-5cea80fc1f79",
  "name" : "Movidius Ingest",
  "description" : "",
  "bucketIdentifier" : "dd323482-c62e-4b18-9f99-c782abd512b4",
  "bucketName" : "Development",
  "createdTimestamp" : 1521839973960,
  "modifiedTimestamp" : 1523917401292,
  "type" : "Flow",
  "permissions" : {
    "canRead" : true,
    "canWrite" : true,
    "canDelete" : true
  },
  "versionCount" : 8,
  "link" : {
    "params" : {
      "rel" : "self"
    },
    "href" : "buckets/dd323482-c62e-4b18-9f99-c782abd512b4/flows/37cc56a7-126f-48ff-9224-5cea80fc1f79"
  }
}, {
  "identifier" : "e1677c9b-f97b-4eea-a644-00c542d3d781",
  "name" : "NVidia Jetson TX1 Processing Local",
  "description" : "Local Jetson",
  "bucketIdentifier" : "dd323482-c62e-4b18-9f99-c782abd512b4",
  "bucketName" : "Development",
  "createdTimestamp" : 1516050390446,
  "modifiedTimestamp" : 1523033627484,
  "type" : "Flow",
  "permissions" : {
    "canRead" : true,
    "canWrite" : true,
    "canDelete" : true
  },
  "versionCount" : 18,
  "link" : {
    "params" : {
      "rel" : "self"
    },
    "href" : "buckets/dd323482-c62e-4b18-9f99-c782abd512b4/flows/e1677c9b-f97b-4eea-a644-00c542d3d781"
  }
}, {
  "identifier" : "f5dda5ef-3660-4c22-9aa1-fb36c539f643",
  "name" : "NiFi16 Experiments",
  "description" : "NiFi16 Experiments",
  "bucketIdentifier" : "dd323482-c62e-4b18-9f99-c782abd512b4",
  "bucketName" : "Development",
  "createdTimestamp" : 1523637405975,
  "modifiedTimestamp" : 1523637406198,
  "type" : "Flow",
  "permissions" : {
    "canRead" : true,
    "canWrite" : true,
    "canDelete" : true
  },
  "versionCount" : 1,
  "link" : {
    "params" : {
      "rel" : "self"
    },
    "href" : "buckets/dd323482-c62e-4b18-9f99-c782abd512b4/flows/f5dda5ef-3660-4c22-9aa1-fb36c539f643"
  }
}, {
  "identifier" : "c0cc71f2-68e1-4157-a80b-a6bfe4f098b1",
  "name" : "Person Blocker",
  "description" : "",
  "bucketIdentifier" : "dd323482-c62e-4b18-9f99-c782abd512b4",
  "bucketName" : "Development",
  "createdTimestamp" : 1523046406925,
  "modifiedTimestamp" : 1523048416942,
  "type" : "Flow",
  "permissions" : {
    "canRead" : true,
    "canWrite" : true,
    "canDelete" : true
  },
  "versionCount" : 2,
  "link" : {
    "params" : {
      "rel" : "self"
    },
    "href" : "buckets/dd323482-c62e-4b18-9f99-c782abd512b4/flows/c0cc71f2-68e1-4157-a80b-a6bfe4f098b1"
  }
}, {
  "identifier" : "35cd923b-679e-497f-80ff-b9f0fa8a0f0e",
  "name" : "Process MiniFi Creator",
  "description" : "",
  "bucketIdentifier" : "dd323482-c62e-4b18-9f99-c782abd512b4",
  "bucketName" : "Development",
  "createdTimestamp" : 1517005566715,
  "modifiedTimestamp" : 1517102371332,
  "type" : "Flow",
  "permissions" : {
    "canRead" : true,
    "canWrite" : true,
    "canDelete" : true
  },
  "versionCount" : 2,
  "link" : {
    "params" : {
      "rel" : "self"
    },
    "href" : "buckets/dd323482-c62e-4b18-9f99-c782abd512b4/flows/35cd923b-679e-497f-80ff-b9f0fa8a0f0e"
  }
}, {
  "identifier" : "d818840d-2657-49ea-95b4-b58e1c0fdbdf",
  "name" : "Spark Integration",
  "description" : "",
  "bucketIdentifier" : "dd323482-c62e-4b18-9f99-c782abd512b4",
  "bucketName" : "Development",
  "createdTimestamp" : 1517253928065,
  "modifiedTimestamp" : 1517345802681,
  "type" : "Flow",
  "permissions" : {
    "canRead" : true,
    "canWrite" : true,
    "canDelete" : true
  },
  "versionCount" : 2,
  "link" : {
    "params" : {
      "rel" : "self"
    },
    "href" : "buckets/dd323482-c62e-4b18-9f99-c782abd512b4/flows/d818840d-2657-49ea-95b4-b58e1c0fdbdf"
  }
}, {
  "identifier" : "472eb39b-9ee5-485b-858c-bceb0bdaeb10",
  "name" : "Spring Boot 2 ",
  "description" : "",
  "bucketIdentifier" : "dd323482-c62e-4b18-9f99-c782abd512b4",
  "bucketName" : "Development",
  "createdTimestamp" : 1521839961984,
  "modifiedTimestamp" : 1522246310636,
  "type" : "Flow",
  "permissions" : {
    "canRead" : true,
    "canWrite" : true,
    "canDelete" : true
  },
  "versionCount" : 2,
  "link" : {
    "params" : {
      "rel" : "self"
    },
    "href" : "buckets/dd323482-c62e-4b18-9f99-c782abd512b4/flows/472eb39b-9ee5-485b-858c-bceb0bdaeb10"
  }
}, {
  "identifier" : "f05b8f0c-bcdc-4798-9a46-dbe7ff0b6d28",
  "name" : "TensorFlowMXNetProcessing",
  "description" : "",
  "bucketIdentifier" : "dd323482-c62e-4b18-9f99-c782abd512b4",
  "bucketName" : "Development",
  "createdTimestamp" : 1522848101958,
  "modifiedTimestamp" : 1522848102166,
  "type" : "Flow",
  "permissions" : {
    "canRead" : true,
    "canWrite" : true,
    "canDelete" : true
  },
  "versionCount" : 1,
  "link" : {
    "params" : {
      "rel" : "self"
    },
    "href" : "buckets/dd323482-c62e-4b18-9f99-c782abd512b4/flows/f05b8f0c-bcdc-4798-9a46-dbe7ff0b6d28"
  }
}, {
  "identifier" : "fd6851d3-18af-492c-b9bf-a038bac417a4",
  "name" : "Tika",
  "description" : "",
  "bucketIdentifier" : "dd323482-c62e-4b18-9f99-c782abd512b4",
  "bucketName" : "Development",
  "createdTimestamp" : 1516215208293,
  "modifiedTimestamp" : 1521839930665,
  "type" : "Flow",
  "permissions" : {
    "canRead" : true,
    "canWrite" : true,
    "canDelete" : true
  },
  "versionCount" : 5,
  "link" : {
    "params" : {
      "rel" : "self"
    },
    "href" : "buckets/dd323482-c62e-4b18-9f99-c782abd512b4/flows/fd6851d3-18af-492c-b9bf-a038bac417a4"
  }
}, {
  "identifier" : "f76e0702-9630-4cb0-aef5-a248961b41fc",
  "name" : "Weather",
  "description" : "",
  "bucketIdentifier" : "dd323482-c62e-4b18-9f99-c782abd512b4",
  "bucketName" : "Development",
  "createdTimestamp" : 1521839924416,
  "modifiedTimestamp" : 1521839924428,
  "type" : "Flow",
  "permissions" : {
    "canRead" : true,
    "canWrite" : true,
    "canDelete" : true
  },
  "versionCount" : 1,
  "link" : {
    "params" : {
      "rel" : "self"
    },
    "href" : "buckets/dd323482-c62e-4b18-9f99-c782abd512b4/flows/f76e0702-9630-4cb0-aef5-a248961b41fc"
  }
}, {
  "identifier" : "968b48f6-aaab-40a0-9074-01ad476b65d0",
  "name" : "Weather Local",
  "description" : "",
  "bucketIdentifier" : "dd323482-c62e-4b18-9f99-c782abd512b4",
  "bucketName" : "Development",
  "createdTimestamp" : 1522252104918,
  "modifiedTimestamp" : 1522252104958,
  "type" : "Flow",
  "permissions" : {
    "canRead" : true,
    "canWrite" : true,
    "canDelete" : true
  },
  "versionCount" : 1,
  "link" : {
    "params" : {
      "rel" : "self"
    },
    "href" : "buckets/dd323482-c62e-4b18-9f99-c782abd512b4/flows/968b48f6-aaab-40a0-9074-01ad476b65d0"
  }
}, {
  "identifier" : "02daca4b-4c14-4616-8891-d04a2d45b338",
  "name" : "Weg Page Ingest",
  "description" : "",
  "bucketIdentifier" : "dd323482-c62e-4b18-9f99-c782abd512b4",
  "bucketName" : "Development",
  "createdTimestamp" : 1523641088195,
  "modifiedTimestamp" : 1523642783980,
  "type" : "Flow",
  "permissions" : {
    "canRead" : true,
    "canWrite" : true,
    "canDelete" : true
  },
  "versionCount" : 3,
  "link" : {
    "params" : {
      "rel" : "self"
    },
    "href" : "buckets/dd323482-c62e-4b18-9f99-c782abd512b4/flows/02daca4b-4c14-4616-8891-d04a2d45b338"
  }
}, {
  "identifier" : "c45779b1-a9f1-4603-a721-b898018efa56",
  "name" : "c-cda ingest",
  "description" : "",
  "bucketIdentifier" : "dd323482-c62e-4b18-9f99-c782abd512b4",
  "bucketName" : "Development",
  "createdTimestamp" : 1521840158291,
  "modifiedTimestamp" : 1522252544710,
  "type" : "Flow",
  "permissions" : {
    "canRead" : true,
    "canWrite" : true,
    "canDelete" : true
  },
  "versionCount" : 2,
  "link" : {
    "params" : {
      "rel" : "self"
    },
    "href" : "buckets/dd323482-c62e-4b18-9f99-c782abd512b4/flows/c45779b1-a9f1-4603-a721-b898018efa56"
  }
}, {
  "identifier" : "eb8a9f26-304d-4967-ad09-e880ead9e50c",
  "name" : "jetson ingest",
  "description" : "",
  "bucketIdentifier" : "dd323482-c62e-4b18-9f99-c782abd512b4",
  "bucketName" : "Development",
  "createdTimestamp" : 1515810733851,
  "modifiedTimestamp" : 1515810733869,
  "type" : "Flow",
  "permissions" : {
    "canRead" : true,
    "canWrite" : true,
    "canDelete" : true
  },
  "versionCount" : 1,
  "link" : {
    "params" : {
      "rel" : "self"
    },
    "href" : "buckets/dd323482-c62e-4b18-9f99-c782abd512b4/flows/eb8a9f26-304d-4967-ad09-e880ead9e50c"
  }
}, {
  "identifier" : "f3893fd0-fbd1-43e5-a8a9-ef6f2a5f82d1",
  "name" : "jetson minifi",
  "description" : "",
  "bucketIdentifier" : "dd323482-c62e-4b18-9f99-c782abd512b4",
  "bucketName" : "Development",
  "createdTimestamp" : 1515810717305,
  "modifiedTimestamp" : 1522702554919,
  "type" : "Flow",
  "permissions" : {
    "canRead" : true,
    "canWrite" : true,
    "canDelete" : true
  },
  "versionCount" : 6,
  "link" : {
    "params" : {
      "rel" : "self"
    },
    "href" : "buckets/dd323482-c62e-4b18-9f99-c782abd512b4/flows/f3893fd0-fbd1-43e5-a8a9-ef6f2a5f82d1"
  }
}, {
  "identifier" : "b4f8f776-1e6a-4b7c-be36-997678e12a31",
  "name" : "minifi",
  "description" : "",
  "bucketIdentifier" : "dd323482-c62e-4b18-9f99-c782abd512b4",
  "bucketName" : "Development",
  "createdTimestamp" : 1521840136409,
  "modifiedTimestamp" : 1522253724327,
  "type" : "Flow",
  "permissions" : {
    "canRead" : true,
    "canWrite" : true,
    "canDelete" : true
  },
  "versionCount" : 2,
  "link" : {
    "params" : {
      "rel" : "self"
    },
    "href" : "buckets/dd323482-c62e-4b18-9f99-c782abd512b4/flows/b4f8f776-1e6a-4b7c-be36-997678e12a31"
  }
}, {
  "identifier" : "be3456e9-3410-4d02-ab9e-323680e7655b",
  "name" : "nifi registry reading",
  "description" : "",
  "bucketIdentifier" : "dd323482-c62e-4b18-9f99-c782abd512b4",
  "bucketName" : "Development",
  "createdTimestamp" : 1517430895411,
  "modifiedTimestamp" : 1522246519295,
  "type" : "Flow",
  "permissions" : {
    "canRead" : true,
    "canWrite" : true,
    "canDelete" : true
  },
  "versionCount" : 10,
  "link" : {
    "params" : {
      "rel" : "self"
    },
    "href" : "buckets/dd323482-c62e-4b18-9f99-c782abd512b4/flows/be3456e9-3410-4d02-ab9e-323680e7655b"
  }
} ]%                                                                                                                                                                                              <br>

List Registry Buckets As JSON

./bin/cli.sh registry list-buckets  -u http://localhost:18080 -ot json
[ {
  "identifier" : "dd323482-c62e-4b18-9f99-c782abd512b4",
  "name" : "Development",
  "createdTimestamp" : 1515619429045,
  "permissions" : {
    "canRead" : true,
    "canWrite" : true,
    "canDelete" : true
  },
  "link" : {
    "params" : {
      "rel" : "self"
    },
    "href" : "buckets/dd323482-c62e-4b18-9f99-c782abd512b4"
  }
}, {
  "identifier" : "2f3d1e34-4e20-4d16-af5a-7be99af98869",
  "name" : "Experimental",
  "createdTimestamp" : 1515619441720,
  "permissions" : {
    "canRead" : true,
    "canWrite" : true,
    "canDelete" : true
  },
  "link" : {
    "params" : {
      "rel" : "self"
    },
    "href" : "buckets/2f3d1e34-4e20-4d16-af5a-7be99af98869"
  }
}, {
  "identifier" : "e7410f97-1ec1-4b20-a87b-35944517ba4a",
  "name" : "Integration",
  "createdTimestamp" : 1515619435677,
  "permissions" : {
    "canRead" : true,
    "canWrite" : true,
    "canDelete" : true
  },
  "link" : {
    "params" : {
      "rel" : "self"
    },
    "href" : "buckets/e7410f97-1ec1-4b20-a87b-35944517ba4a"
  }
}, {
  "identifier" : "d3acee10-1bef-4fa8-a75c-0d0e37f7162e",
  "name" : "Production",
  "createdTimestamp" : 1515619404627,
  "permissions" : {
    "canRead" : true,
    "canWrite" : true,
    "canDelete" : true
  },
  "link" : {
    "params" : {
      "rel" : "self"
    },
    "href" : "buckets/d3acee10-1bef-4fa8-a75c-0d0e37f7162e"
  }
}, {
  "identifier" : "09774cd8-3d3c-4ac6-9921-e341b96b6e38",
  "name" : "Test",
  "createdTimestamp" : 1515619414172,
  "permissions" : {
    "canRead" : true,
    "canWrite" : true,
    "canDelete" : true
  },
  "link" : {
    "params" : {
      "rel" : "self"
    },
    "href" : "buckets/09774cd8-3d3c-4ac6-9921-e341b96b6e38"
  }
}, {
  "identifier" : "e40b9d47-cf67-46cc-85d5-028195e6f38a",
  "name" : "nipyapi_console_bucket_0",
  "createdTimestamp" : 1520608613095,
  "permissions" : {
    "canRead" : true,
    "canWrite" : true,
    "canDelete" : true
  },
  "link" : {
    "params" : {
      "rel" : "self"
    },
    "href" : "buckets/e40b9d47-cf67-46cc-85d5-028195e6f38a"
  }
}, {
  "identifier" : "f4212398-af8f-45f3-8951-5ee71800bed8",
  "name" : "nipyapi_console_bucket_1",
  "createdTimestamp" : 1520608613169,
  "permissions" : {
    "canRead" : true,
    "canWrite" : true,
    "canDelete" : true
  },
  "link" : {
    "params" : {
      "rel" : "self"
    },
    "href" : "buckets/f4212398-af8f-45f3-8951-5ee71800bed8"
  }
}, {
  "identifier" : "7a547c9d-cba6-4445-be29-eb8e9f3892da",
  "name" : "tim",
  "createdTimestamp" : 1515616281094,
  "permissions" : {
    "canRead" : true,
    "canWrite" : true,
    "canDelete" : true
  },
  "link" : {
    "params" : {
      "rel" : "self"
    },
    "href" : "buckets/7a547c9d-cba6-4445-be29-eb8e9f3892da"
  }
} ]%

List All the Apache NiFi Flows for a Bucket

./bin/cli.sh registry list-flows -b dd323482-c62e-4b18-9f99-c782abd512b4  -u http://localhost:18080
#    Name                                 Id                                     Description
--   ----------------------------------   ------------------------------------   ----------------------------------------
1    AAAA Demo                            391ead49-79e1-4537-b4c9-a794a129eefe
2    AAAA ETL POC Kafka                   7b8711fb-0454-4302-a6a3-7c2383ed901a
3    AAAA POC                             418f0946-740a-439f-bfd5-f49d7f03f7b0
4    AAAA Partition 1                     6c87bba2-e44d-462b-8c42-e89bae35c896
5    WATER Twitter                        ce2fdaf9-bf81-43fa-846f-f38f6891be95
6    Water                                dd98dfa1-5d8a-4871-a145-2b2a99e9c1bd
7    Backup                               6225970e-c483-4041-bddc-9ffe906baaf5
8    Backup NiFi Registry                 d9ddcea0-1f65-49ca-9c84-a98b5aea7c14
9    Backup Schemas                       1d429eac-b4e0-4adc-b1a0-a4872c27dfd6
10   DataWorksSummit2018                  da41aa10-cdcc-4b24-b4cd-6af8d2d51f0d
11   Deep Learning Local                  86fcb309-50dd-44d8-bcb9-df98dcad5147   TensorFlow
Apache MXNet
12   DisplayImages                        ef5e318f-61ae-473f-afe8-b4d004b9401a
13   Drones                               d67c248a-6dcf-4785-b6ba-8d62bd272048
14   First Version                        64a861d3-da76-40a7-8258-59bc84cb3920
15   Flat File Ingest                     51cdc133-0f80-45c4-9f57-4db80e14b1ba
16   Flights                              edcce7af-f2cd-42bb-be13-56df04eac967
17   HL7                                  4409863e-a055-4258-85fd-d38d97d844ff
18   Somewell                             2862f26c-1c9b-476b-8fcc-c9889853e83e
19   IBM                                  e458f1eb-6991-4547-b108-2330d45a2f52
20   Integrate Geo                        f2cc6a69-e1d8-4d74-b310-c83d29feddcc
21   Internet of Beer                     8a39489a-3431-4ac7-a5fe-83f0ff3663b4   IoT + Deep Learning + Supervised Lear...
22   Pharma                               d759b371-2c98-4dbe-b2f8-05657efcb828
23   Pharma  MQTT                         f0a45484-98e6-45fd-b815-c0b64bab2b6f
24   MXNetServer                          d88ed1c8-3e0f-44d3-b67f-d6566db8a9b9   mxnet server connection
25   MiniFi Creator                       178cfea3-8d54-44ff-b252-d3d100041a30
26   MiniFi Jetson MQTT                   58c887f4-1cfb-4a7c-b732-4b31b260df7e
27   Mobile Ingest                        5fc0add8-4a95-4ed6-ba40-480a57299dc3
28   Mobile Phone Ingest                  b75ab78a-0e6a-48d8-9c79-9907fdd588aa
29   Monitor Power Local                  4060bdd9-6683-4d08-9c89-b4287cf30a4d   local
30   Movidius Ingest                      37cc56a7-126f-48ff-9224-5cea80fc1f79
31   NVidia Jetson TX1 Processing Local   e1677c9b-f97b-4eea-a644-00c542d3d781   Local Jetson
32   NiFi16 Experiments                   f5dda5ef-3660-4c22-9aa1-fb36c539f643   NiFi16 Experiments
33   Person Blocker                       c0cc71f2-68e1-4157-a80b-a6bfe4f098b1
34   Process MiniFi Creator               35cd923b-679e-497f-80ff-b9f0fa8a0f0e
35   Spark Integration                    d818840d-2657-49ea-95b4-b58e1c0fdbdf
36   Spring Boot 2                        472eb39b-9ee5-485b-858c-bceb0bdaeb10
37   TensorFlowMXNetProcessing            f05b8f0c-bcdc-4798-9a46-dbe7ff0b6d28
38   Tika                                 fd6851d3-18af-492c-b9bf-a038bac417a4
39   Weather                              f76e0702-9630-4cb0-aef5-a248961b41fc
40   Weather Local                        968b48f6-aaab-40a0-9074-01ad476b65d0
41   Weg Page Ingest                      02daca4b-4c14-4616-8891-d04a2d45b338
42   c-cda ingest                         c45779b1-a9f1-4603-a721-b898018efa56
43   jetson ingest                        eb8a9f26-304d-4967-ad09-e880ead9e50c
44   jetson minifi                        f3893fd0-fbd1-43e5-a8a9-ef6f2a5f82d1
45   minifi                               b4f8f776-1e6a-4b7c-be36-997678e12a31
46   nifi registry reading                be3456e9-3410-4d02-ab9e-323680e7655b

A really useful one is:

./bin/cli.sh registry export-flow-version --flowIdentifier 47766463-6e74-470f-b2fb-1ae9453cf45c -u http://localhost:18080 -ot json

We can do things like:

  • List all the buckets in an Apache NiFi registry
  • List all the flows
  • You can output simple text or -ot json for JSON. You can use this to script things even more with your favorite devops tools.

Like everything Apache NiFi, it's awesomely configurable. So you can add your own command! Take a look.

With SnapLogic’s integration platform you can save millions of dollars, increase integrator productivity by 5X, and reduce integration time to value by 90%. Sign up for our risk-free 30-day trial!

Topics:
apache nifi ,devops ,scripting ,integration ,hortonworks

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}