如何使用Curl在apache Nifi中创建处理器的连接和删除 [英] How to create Connection and Delete of a processor in apache Nifi using Curl
问题描述
1)请让我知道使用curl创建apache Nifi连接的过程吗? 2)如何使用Curl删除处理器? 3)也请让我知道如何查找处理器的lastModifier值.
1)Please let me know the process for creating a apache Nifi connection using curl? 2)How to delete a processor using Curl? 3)also Please let me know How to find lastModifier value of a processor.
推荐答案
1/以了解nifi api: https://nifi.apache.org/docs/nifi-docs/rest-api/
1/ to understand nifi api: https://nifi.apache.org/docs/nifi-docs/rest-api/
2/使用chrome devtools (f12) / network
跟踪从浏览器到nifi服务器的请求,执行所需的操作,然后仅将请求复制为curl.下面的链接用于创建连接和删除处理器.
2/ use chrome devtools (f12) / network
to trace requests from browser to nifi server, do required actions, and just copy requests as curl. below curls for connection creation and processor deletion.
3/建立连接
curl -X POST 'http://localhost:8080/nifi-api/process-groups/fd6ba415-015b-1000-b8ee-13ea77e54502/connections' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-binary '{
"revision": {
"clientId": "439a9b14-015c-1000-5924-200a7fdaf626",
"version": 0
},
"component": {
"name": "",
"source": {
"id": "439b2f6c-015c-1000-6eb1-59309b64c5dd",
"groupId": "fd6ba415-015b-1000-b8ee-13ea77e54502",
"type": "PROCESSOR"
},
"destination": {
"id": "439b565d-015c-1000-320b-5db5df870c12",
"groupId": "fd6ba415-015b-1000-b8ee-13ea77e54502",
"type": "PROCESSOR"
},
"selectedRelationships": ["success"],
"flowFileExpiration": "0 sec",
"backPressureDataSizeThreshold": "1 GB",
"backPressureObjectThreshold": "10000",
"bends": [],
"prioritizers": []
}
}'
4/删除处理器(您必须先删除传入的连接)
4/ delete processor (you have to delete incoming connections before)
curl -X DELETE \
'http://localhost:8080/nifi-api/processors/439b565d-015c-1000-320b-5db5df870c12?version=2&clientId=439a9b14-015c-1000-5924-200a7fdaf626'
这篇关于如何使用Curl在apache Nifi中创建处理器的连接和删除的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!