Member since
03-28-2024
5
Posts
3
Kudos Received
0
Solutions
08-06-2024
06:54 AM
The term "headless" means that "I have access to NIFI server through REST API only!" Anyways, I used below curl to get root level process group: curl --location 'https://localhost:8443/nifi-api/process-groups/root' \ --header 'Authorization: Bearer eyJraWQiOiI1NGU4ZWRkNi00ZTY1LTQ3MmUtYTI5Ni1mNmI3MDJjZDYzNWEiLCJhbGciOiJQUzUxMiJ9.eyJzdWIiOiJkZWVwYWtkb2 I am closing this thread
... View more
08-05-2024
09:53 PM
I get it now. The NIFI has root process group which can be used to upload new process groups. I am using headless NIFI, is there any way to get root process group ID? I dont have access to NIFI UI canvas
... View more
08-04-2024
10:48 AM
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: 2024-08-04 23:17:17,479 ERROR [NiFi Web Server-904] o.a.nifi.web.api.config.ThrowableMapper An unexpected error has occurred: java.lang.NullPointerException: Cannot invoke "org.apache.nifi.groups.ProcessGroup.getControllerServices(boolean)" because "parentGroup" is null. Returning Internal Server Error response. java.lang.NullPointerException: Cannot invoke "org.apache.nifi.groups.ProcessGroup.getControllerServices(boolean)" because "parentGroup" is null
... View more
Labels:
- Labels:
-
Apache NiFi
03-28-2024
10:27 PM
3 Kudos
Changing Nifi version seems overhead as its running on kubernetes and there are many process groups running on that version. And i am not sure if doing that won't introduce the issues from earlier version. Is there any work around for this? Can I use GetHttp instead of InvokeHttp?
... View more
03-28-2024
08:29 AM
I am using Apache nifi invokeHttp processor to call Google API. The url contains a path which i need to encode.So in the URL,only path is encoded e.g. resources%2F8cb90ae6-16cc-4460-99f4-3ae0689b3b66%2Fdata_asset%2FCETIvowels-38.pdf However whenver I set encoded url, the processor internally replaces %2F with %252F which results in HTTP 404 response. E.g. Nifi convert URL - https://storage.googleapis.com/storage/v1/b/t-bis-1hg-jk/o/resources%2F8cb90ae6-16cc-4460-99f4-3ae0689b3b66%2Fdata_asset%2FCETIvowels-38.pdf?alt=media to https://storage.googleapis.com/storage/v1/b/t-bis-1hg-jk/o/resources%252F8cb90ae6-16cc-4460-99f4-3ae0689b3b66%252Fdata_asset%252FCETIvowels-38.pdf?alt=media
... View more
Labels:
- Labels:
-
Apache NiFi