Support Questions
Find answers, ask questions, and share your expertise

Ranger Update Multiple Policies via REST API

Highlighted

Ranger Update Multiple Policies via REST API

Explorer

I am trying to update multiple policies in a particular service simultaneously.

Using the below command i am getting all the policies in a particular service

curl -vk -H "Content-type:application/json" --netrc-file my-password-file -X GET http://localhost:6080/service/public/v2/api/service/POC_hadoop/policy -o rangerpolicies.json

In the file obtained i.e. rangerpolicies.json , i am updating a few properties.

While updating, using the put command, i am facing error which i have attached as attachment.

error.txt

The command used:-

curl -vk "Content-type:application/json" --netrc-file my-password-file -X PUT -d @rangerpolicies.json  http://localhost:6080/service/public/v2/api/service/POC_hadoop/policy/

A single policy-wise, i am able to update, but is this option not available at service level?

Also, is there any workaround available, because to update all policies one by one in case of 100+ policies is not feasible.

Ranger version :0.7

Thanks in advance.

1 REPLY 1

Re: Ranger Update Multiple Policies via REST API

Don't have an account?