Support Questions

Find answers, ask questions, and share your expertise

Not able to delete the NiFi existing flow using nifi-api

avatar
New Contributor

Hi All,
I am trying to delete my nifi existing process group through nifi-api curl but unfortunately it gives me error that "The revision must be specified" but everything specified as per the documentation but still not working, below is the curl command what I used for delete the process group(flow) to my target system and also I can able to delete the same through UI but not works with rest api.

curl -k -X DELETE "https://localhost:28443/nifi-api/process-groups/836e216e-0195-1000-d3b8-771b257f1fe6" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer  Token" \
--data '{
"revision": {
"version": 0
},
"disconnectedNodeAcknowledged": false
}'

ERROR: 400 - The revision must be specified.

Also find the below is the output of the process_groups:
{'permissions': {'canRead': True, 'canWrite': True}, 'processGroupFlow': {'id': '187acb23-0195-1000-1908-1543c761f376', 'uri': 'https://localhost:28443/nifi-api/flow/process-groups/187acb23-0195-1000-1908-1543c761f376', 'parameterContext': {'id': 'f24131aa-0fad-3876-f76a-591e810f66da', 'permissions': {'canRead': True, 'canWrite': True}, 'component': {'id': 'f24131aa-0fad-3876-f76a-591e810f66da', 'name': 'NiFi_Engine_Parameters'}}, 'breadcrumb': {'id': '187acb23-0195-1000-1908-1543c761f376', 'permissions': {'canRead': True, 'canWrite': True}, 'breadcrumb': {'id': '187acb23-0195-1000-1908-1543c761f376', 'name': 'NiFi Flow'}}, 'flow': {'processGroups': [{'revision': {'version': 0}, 'id': '836e216e-0195-1000-d3b8-771b257f1fe6', 'uri': 'https://localhost:28443/nifi-api/process-groups/836e216e-0195-1000-d3b8-771b257f1fe6', 'position': {'x': 392.0, 'y': 240.0}, 'permissions': {'canRead': True, 'canWrite': True}, 'bulletins': [], 'component': {'id': '836e216e-0195-1000-d3b8-771b257f1fe6', 'versionedComponentId': '3bcf353e-04bc-39e1-85fd-879f7318bb8a', 'parentGroupId': '187acb23-0195-1000-1908-1543c761f376', 'position': {'x': 392.0, 'y': 240.0}, 'name': 'NIFI_HL7_INTEGRATION_ENGINE_PG_ES_100325_latest', 'comments': '', 'parameterContext': {'id': 'f24131aa-0fad-3876-f76a-591e810f66da', 'permissions': {'canRead': True, 'canWrite': True}, 'component': {'id': 'f24131aa-0fad-3876-f76a-591e810f66da', 'name': 'NiFi_Engine_Parameters'}}, 'flowfileConcurrency': 'UNBOUNDED', 'flowfileOutboundPolicy': 'STREAM_WHEN_AVAILABLE', 'defaultFlowFileExpiration': '0 sec', 'defaultBackPressureObjectThreshold': 10000, 'defaultBackPressureDataSizeThreshold': '1 GB', 'executionEngine': 'INHERITED', 'maxConcurrentTasks': 1, 'statelessFlowTimeout': '1 min', 'runningCount': 0, 'stoppedCount': 542, 'invalidCount': 6, 'disabledCount': 0, 'activeRemotePortCount': 0, 'inactiveRemotePortCount': 0, 'upToDateCount': 0, 'locallyModifiedCount': 0, 'staleCount': 0, 'locallyModifiedAndStaleCount': 0, 'syncFailureCount': 0, 'localInputPortCount': 0, 'localOutputPortCount': 0, 'publicInputPortCount': 0, 'publicOutputPortCount': 0, 'statelessGroupScheduledState': 'STOPPED', 'inputPortCount': 0, 'outputPortCount': 0}, 'status': {'id': '836e216e-0195-1000-d3b8-771b257f1fe6', 'name': 'NIFI_HL7_INTEGRATION_ENGINE_PG_ES_100325_latest', 'statsLastRefreshed': '10:16:27 IST', 'aggregateSnapshot': {'id': '836e216e-0195-1000-d3b8-771b257f1fe6', 'name': 'NIFI_HL7_INTEGRATION_ENGINE_PG_ES_100325_latest', 'statelessActiveThreadCount': 0, 'flowFilesIn': 0, 'bytesIn': 0, 'input': '0 (0 bytes)', 'flowFilesQueued': 0, 'bytesQueued': 0, 'queued': '0 (0 bytes)', 'queuedCount': '0', 'queuedSize': '0 bytes', 'bytesRead': 0, 'read': '0 bytes', 'bytesWritten': 0, 'written': '0 bytes', 'flowFilesOut': 0, 'bytesOut': 0, 'output': '0 (0 bytes)', 'flowFilesTransferred': 0, 'bytesTransferred': 0, 'transferred': '0 (0 bytes)', 'bytesReceived': 0, 'flowFilesReceived': 0, 'received': '0 (0 bytes)', 'bytesSent': 0, 'flowFilesSent': 0, 'sent': '0 (0 bytes)', 'activeThreadCount': 0, 'terminatedThreadCount': 0, 'processingNanos': 0}}, 'runningCount': 0, 'stoppedCount': 542, 'invalidCount': 6, 'disabledCount': 0, 'activeRemotePortCount': 0, 'inactiveRemotePortCount': 0, 'upToDateCount': 0, 'locallyModifiedCount': 0, 'staleCount': 0, 'locallyModifiedAndStaleCount': 0, 'syncFailureCount': 0, 'localInputPortCount': 0, 'localOutputPortCount': 0, 'publicInputPortCount': 0, 'publicOutputPortCount': 0, 'parameterContext': {'id': 'f24131aa-0fad-3876-f76a-591e810f66da', 'permissions': {'canRead': True, 'canWrite': True}, 'component': {'id': 'f24131aa-0fad-3876-f76a-591e810f66da', 'name': 'NiFi_Engine_Parameters'}}, 'inputPortCount': 0, 'outputPortCount': 0}], 'remoteProcessGroups': [], 'processors': [], 'inputPorts': [], 'outputPorts': [], 'connections': [], 'labels': [], 'funnels': []}, 'lastRefreshed': '10:16:27 IST'}}

Awaiting for your response.
Thanks
Vijay Amirtharaj

0 REPLIES 0