1)请告诉我使用curl创建apache Nifi连接的过程? 2)如何使用Curl删除处理器? 3)还请让我知道如何找到处理器的lastModifier值。
答案 0 :(得分:4)
1 /了解nifi api:https://nifi.apache.org/docs/nifi-docs/rest-api/
2 /使用chrome devtools (f12) / network
跟踪从浏览器到nifi服务器的请求,执行必要的操作,并将请求复制为curl。以下卷曲用于连接创建和处理器删除。
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 /删除处理器(你必须先删除传入的连接)
curl -X DELETE \
'http://localhost:8080/nifi-api/processors/439b565d-015c-1000-320b-5db5df870c12?version=2&clientId=439a9b14-015c-1000-5924-200a7fdaf626'