Support Questions

Find answers, ask questions, and share your expertise

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

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

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

Take a Tour of the Community
Don't have an account?
Your experience may be limited. Sign in to explore more.