📅  最后修改于: 2020-11-18 08:44:00             🧑  作者: Mango
NiFi提供了大量的API,可帮助开发人员进行更改并从任何其他工具或定制开发的应用程序中获取NiFi的信息。在本教程中,我们将使用Google chrome中的postman应用程序来解释一些示例。
要添加postmantoyour Google Chrome,请转到下面提到的URL,然后单击“添加到chrome”按钮。现在,您将看到一个添加了Google Chrome浏览器的新应用。
NiFi rest API的当前版本为1.8.0,并且该文档位于下面提到的URL中。
https://nifi.apache.org/docs/nifi-docs/rest-api/index.html
以下是最常用的NiFi rest API模块-
http://
如果启用了HTTPS https://
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 lineage. |
现在让我们考虑一个示例,并在邮递员上运行以获取有关正在运行的NiFi实例的详细信息。
GET http://localhost:8080/nifi-api/flow/about
{
"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"
}
}