Support Questions

Find answers, ask questions, and share your expertise

REST api to fetch user/group information from Ranger

avatar
Contributor

Hi

Is there any REST api available to fetch user/group information from Ranger?

1 ACCEPTED SOLUTION

avatar
Expert Contributor

@Shashi Vish

You can use the following

curl -u <username>:<password> -X GET http://<ranger host:port>/service/xusers/users

View solution in original post

2 REPLIES 2

avatar
Expert Contributor

@Shashi Vish

You can use the following

curl -u <username>:<password> -X GET http://<ranger host:port>/service/xusers/users

avatar
Contributor

There are, but it seems that they are for Ranger internal use. There aren't any public APIs. Here is the public API documentation for Ranger 0.5. You can also take a look at the following classes if you're interested:

org.apache.ranger.rest.PublicAPIs

org.apache.ranger.rest.PublicAPIsv2

The UI is hitting some user and group endpoints, but it doesn't seem as if there is documentation around them. I wouldn't rely on them.