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.

Ranger 0.4 Search Policy API

Highlighted

Ranger 0.4 Search Policy API

Contributor

Hi,

For Ranger 0.4, what should be the query parameter to use for Search Policy API to search based on HDFS resource path?

In the example provided in the link, https://cwiki.apache.org/confluence/display/RANGER/REST+APIs+for+Policy+Management I couldnt find anything related to path or resource path so wondering how to query the same.

As path based search functionality is available using Ranger UI, I presume there must be a way to search using APIs as well.

Thanks

Vijay

1 REPLY 1

Re: Ranger 0.4 Search Policy API

Expert Contributor

This is not in the documentation, we shall update it accordingly,

curl -iv -u admin:admin -H "Accept: application/json" -H "Content-Type: application/json" -X GET "http://<hostname>:6080/service/public/v2/api/policy?resource:path=/*"

This should work in 0.4

You can also refer the source here https://github.com/apache/incubator-ranger/blob/master/security-admin/src/main/java/org/apache/range...

In Ranger 0.6 please use the Public API V2. https://cwiki.apache.org/confluence/display/RANGER/REST+APIs+for+Service+Definition%2C+Service+and+P...

Don't have an account?
Coming from Hortonworks? Activate your account here