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.

REST API for creating tag-based policies in Ranger

Highlighted

REST API for creating tag-based policies in Ranger

New Contributor

Hi Everyone,

Can I create a tag-based policy in Ranger using REST API? I wasn't able to find any documentation to it.

I have a lot of tags created in Atlas and I want to create a tag-based policy based on those. I have the details of all tags, I am looking for a scalable way to import that to Ranger.

2 REPLIES 2

Re: REST API for creating tag-based policies in Ranger

Expert Contributor

I haven't had time to try this out yet, but you could try exporting the tag-based policy to get the general JSON structure. Then modify if necessary and use the REST API to send the JSON back to Ranger to create policies. I don't see it documented anywhere either.

Re: REST API for creating tag-based policies in Ranger

Cloudera Employee

@Abhilash : Please refer to REST API documentation for Service REST : https://ranger.apache.org/apidocs/resource_ServiceREST.html#resource_ServiceREST_createPolicy_POST