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

Ranger 0.4 Search Policy API

Ranger 0.4 Search Policy API



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, 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.




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

In Ranger 0.6 please use the Public API V2.