- Apache NiFi - Discussion
- Apache NiFi - Useful Resources
- Apache NiFi - Quick Guide
- Apache NiFi - Logging
- Apache NiFi - Custom Controllers Service
- Apache NiFi - Custom Processor
- Apache NiFi - Reporting Task
- Apache NiFi - Controller Settings
- Apache NiFi - Remote Process Group
- Apache NiFi - Upgrade
- Apache NiFi - Monitoring
- Apache NiFi - Data Provenance
- Apache NiFi - API
- Apache NiFi - Templates
- Apache NiFi - Creating Flows
- Apache NiFi - Administration
- Apache NiFi - Configuration
- Apache NiFi - Labels
- Apache NiFi - Process Groups
- Apache NiFi - Queues
- Apache NiFi - FlowFile
- Apache NiFi - Processors Relationship
- Apache NiFi - Processors Categorization
- Apache NiFi - Processors
- Apache NiFi - User Interface
- Apache NiFi - Environment Setup
- Apache NiFi - Basic Concepts
- Apache NiFi - Introduction
- Apache NiFi - Home
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
Apache NiFi - API
NiFi offers a large number of API, which helps developers to make changes and get information of NiFi from any other tool or custom developed apppcations. In this tutorial, we will use postman app in google chrome to explain some examples.
To add postmantoyour Google Chrome, go to the below mentioned URL and cpck add to chrome button. You will now see a new app added toyour Google Chrome.
The current version of NiFi rest API is 1.8.0 and the documentation is present in the below mentioned URL.
Following are the most used NiFi rest API Modules −
http://<nifi url>:<nifi port>/nifi-api/<api-path>
In case HTTPS is enabled https://<nifi url>:<nifi port>/nifi-api/<api-path>
S.No. | API module Name | api-path | Description |
---|---|---|---|
1 | Access | /access | To authenticate user and get access token from NiFi. |
2 | Controller | /controller | To manage the cluster and create reporting task. |
3 | Controller Services | /controller-services | It is used to manage controller services and update controller service references. |
4 | Reporting Tasks | /reporting-tasks | To manage reporting tasks. |
5 | Flow | /flow | To get the data flow metadata and component status and query history |
6 | Process Groups | /process-groups | To upload and instantiate a template and create components. |
7 | Processors | /processors | To create and schedule a processor and set its properties. |
8 | Connections | /connections | To create a connection, set queue priority and update connection destination |
9 | FlowFile Queues | /flowfile-queues | To view queue contents, download flowfile content, and empty queue. |
10 | Remote Process Groups | /remote-process-groups | To create a remote group and enable transmission. |
11 | Provenance | /provenance | To query provenance, and search event pneage. |
Let us now consider an example and run on postman to get the details about the running NiFi instance.
Request
GET http://localhost:8080/nifi-api/flow/about
Response
{ "about": { "title": "NiFi", "version": "1.7.1", "uri": "http://localhost:8080/nifi-api/", "contentViewerUrl": "../nifi-content-viewer/", "timezone": "SGT", "buildTag": "nifi-1.7.1-RC1", "buildTimestamp": "07/12/2018 12:54:43 SGT" } }Advertisements