Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Problem when delete policy in ranger by name,How to delete a policy in Ranger with service name and policy name?

avatar
Explorer

Hi,

I try to delete ranger policy by name, but failed(delete by policy id succeeds):

curl -v -u admin:admin -X DELETE http://myhost:6080/service/public/v2/api/policy?servicename=myservice&policyname=mypolicy

It reports HTTP/1.1 400 Bad Request

Does anyone know the reasons?

,

Follow the document I user the Restapi to delete a policy

I can successfully delete policy by poicyid using curl, but failed to delete policy by name.

curl -v -u admin:admin -X DELETE http://35.167.43.5:6080/service/public/v2/api/policy?servicename=hawq&policyname=mypolicy

But it reports HTTP/1.1 400 Bad Request.

Does anyone know the reason?

Thanks

1 ACCEPTED SOLUTION

avatar
Contributor
hide-solution

This problem has been solved!

Want to get a detailed solution you have to login/registered on the community

Register/Login
4 REPLIES 4

avatar
Expert Contributor

avatar
Explorer

Yes, I could delete by id. But I find policy can be deleted by policy name in Ranger wiki. Doesn't it work?

avatar
Contributor
hide-solution

This problem has been solved!

Want to get a detailed solution you have to login/registered on the community

Register/Login

avatar
Explorer

Thanks @akulkarni, the single quotes works.