Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

How to delete policies in bulk using REST end point in Apache ranger 0.7

Highlighted

How to delete policies in bulk using REST end point in Apache ranger 0.7

New Contributor

As i have seen that we can import and export bulk policies in ranger, Can we do same sort of operation to delete policies as well using Rest End Point. Let say if i have thousand of masking policies in Apache Ranger and i want to delete all of them. How can this task be achieved.

Thank you in Advance,

Subash

1 REPLY 1

Re: How to delete policies in bulk using REST end point in Apache ranger 0.7

There is no direct call to pass all the policies and delete them, but yes you can get policy list from ranger based on your query param through get call:

eg. this will list all the policies in the repo mentioned.

http://<ranger>:6080/service/public/v2/api/service/<service_name>/policy

and then you can write a script to iterate through that list and delete the policies through delete call:

http://<ranger>:6080/service/public/v2/api/policy/policy.id