Unable to upload process group through REST API
Templates are deprecated from 2.X
I have existing nifi process groups in the form of exported .json files
Below is the requirement for REST API:
1. Create process group using exported .json file if not exist
2. Update existing process group
I am able to uplod to existing process group using below curl:
curl --location 'https://localhost:8443/nifi-api/process-groups/1e373804-0191-1000-e950-856de82e267d/process-groups/upload' \
--header 'Cookie: __Secure-Request-Token=2dae7036-f4c3-4115-9865-6c9d7984dfa8' \
--header 'Authorization: Bearer esometoken3M' \
--form 'positionX="11.0"' \
--form 'clientId="11"' \
--form 'disconnectNode="false"' \
--form 'groupName="empty"' \
--form 'positionY="557.0"' \
--form 'file=@"/home/gwl/Downloads/existing-flow.json"'
But when i try to upload completely new process group using below curl:
curl --location 'https://localhost:8443/nifi-api/process-groups/01911000-3804-1e37-10a0-827d946513c6/process-groups/upload' \
--header 'Cookie: __Secure-Request-Token=2dae7036-f4c3-4115-9865-6c9d7984dfa8' \
--header 'Authorization: Bearer eyJraWQE3MjI3ODc2ODksImlzcyI6Imh0dHBzOi8vMTI3LjAuMC4xOjg0NDMiLCJncm91cNr3F1fuSJ4dtIymm4qB7OwWRrLUiRq-qMB3GTqR8Tvg_CZ6kHsYuyNEGWF9g1nnmEVvd0bQ5ok-wChtM82G1Fud3DfBjFH6-Uzeb-L47assCIL1dzMD2KyC-5HpuTHF3M' \
--form 'positionX="11.0"' \
--form 'clientId="11"' \
--form 'disconnectNode="false"' \
--form 'groupName="empty"' \
--form 'positionY="557.0"' \
--form 'file=@"/home/gwl/Downloads/new-flow.json"'
It gives me below error:
An unexpected error has occurred. Please check the logs for additional details.
The log output from nifi-user.log is:

