如何使用 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.下面的 curls 用于连接创建和处理器删除.
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屋!