Support Questions

Find answers, ask questions, and share your expertise

Ranger Rest API to delete policy working only for admin account

I am facing an issue to delete a policy. I have created a policy using Ranger Rest API and i am trying to delete it by using the document's version

Request URL : "service/public/api/service/{id}"

and i am failing with the error 404.

"curl -iv -u 'D****:********' -X DELETE ''

HTTP/1.1 404 Not Found < Server: Apache-Coyote/1.1 Server: Apache-Coyote/1.1 < X-Frame-Options: DENY X-Frame-Options: DENY < Content-Length: 0 Content-Length: 0 < Date: Wed, 05 Apr 2017 16:58:36 GMT"

when i performed manual deletion from GUI with same user account i successfully deleted it and checked browser network and found the solution.

what worked for me is changing the url to

"curl -iv -u 'D****:********' -X DELETE ''

I tried above steps with an delegated administrator user account.

If i try the same deletion operation, using deletion URL provided in doc service/public/api/service/{id}, with one of our user accounts with admin access It works perfectly fine.

Strange, but this needs an investigation.


User needs to have ADMIN role for deleting policies.

New Contributor

Hello I am trying to create policy using rest api, but I am always getting 404 Not Found error.

curl -iv -X POST -H "Content-type:application/json" -H "Accept:application/json" -u '********' https://<hostname of the edge>:6080/service/plugins/policies -d test.json

I enter the password, but after that I am getting the above error.

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