Skip to main content
hegdemahendra
Gold ⭐️⭐️
Nov 15, 2022 6:26 PM UTC
Solved

How to delete a variable from nifi variable registry through nifi rest api ?

Hello experts,

 

I am using below api to create and update variable registry variables..

/nifi-api/process-groups/" + processGroupId + "/variable-registry/update-requests

 But I am unable to delete any already created variable from specific processor group variable registry using nifi api.

Which api I am suppose to use to delete a variable registry variables?

 

Thanks,

Mahendra

 

Green_
Green_Answer
Gold ⭐️⭐️
Nov 18, 2022 5:06 PM UTC

After testing, in order to remove a variable you need to send an update request where that variable's value is null.

5 replies

Green_
Gold ⭐️⭐️
Nov 16, 2022 1:56 AM UTC

Hello Mahendra,

 

Have you tried sending an update request that includes all the variables except the one you wish to delete? If that doesn't work I'll run some tests next time I'm at office and post an update.

Translate
hegdemahendra
Gold ⭐️⭐️
Nov 17, 2022 4:36 AM UTC

Thanks @Green_ .
That did not work for me

Translate
Green_
Green_Answer
Gold ⭐️⭐️
Nov 18, 2022 5:06 PM UTC

After testing, in order to remove a variable you need to send an update request where that variable's value is null.

Translate
VidyaSargur
Community Manager
Community Manager
Nov 17, 2022 5:16 AM UTC

@hegdemahendra, Thank you for your participation in Cloudera Community. I'm happy to see you resolved your issue. Please mark the appropriate reply as the solution, as it will make it easier for others to find the answer in the future.

Translate
Regards, Vidya Sargur Madabhushi| Senior Community Manager | Was your question answered? Make sure to mark the answer as the Best Answer. If you find a reply useful, say thanks by clicking on the thumbs up button.