You can also refer http://ranger.apache.org/apidocs/index.html
From: Burak Emre Kabakci <[email protected]<mailto:[email protected]>> Reply-To: "[email protected]<mailto:[email protected]>" <[email protected]<mailto:[email protected]>> Date: Monday, June 4, 2018 at 7:13 PM To: "[email protected]<mailto:[email protected]>" <[email protected]<mailto:[email protected]>> Cc: "[email protected]<mailto:[email protected]>" <[email protected]<mailto:[email protected]>> Subject: Re: Fetch users via RESTFul API Ah, this is a great tip! Now I can inspect the XHR requests to find out which API endpoints I should use. Thanks Vipin! On Tue, Jun 5, 2018 at 1:30 AM Vipin Rathor <[email protected]<mailto:[email protected]>> wrote: Hello Emre, You can try hitting this API: "/service/xusers/users?page=0&pageSize=25&startIndex=0" This gives you list of user records with group names in this XML format: <vXUsers> <createDate>2018-02-20T02:05:00.502Z</createDate> <id>40</id> <owner>Admin</owner> <updateDate>2018-02-20T02:05:00.644Z</updateDate> <updatedBy>Admin</updatedBy> <description>d44003875 - add from Unix box</description> <firstName>d44003875</firstName> <groupIdList>15</groupIdList> <groupIdList>14</groupIdList> <groupIdList>17</groupIdList> <groupNameList>hr</groupNameList> <groupNameList>hadoop-users</groupNameList> <groupNameList>Remote Desktop Users</groupNameList> <isVisible>1</isVisible> <lastName>d44003875</lastName> <name>d44003875</name> <password>*****</password> <userRoleList>ROLE_USER</userRoleList> <userSource>1</userSource> </vXUsers> This is actually how Ranger Admin UI gets the users' list. Similarly, try "/service/xusers/groups?page=0&pageSize=25&startIndex=0" for groups. Hope this helps. Regards, Vipin On Mon, Jun 4, 2018 at 6:38 AM, Burak Emre Kabakci <[email protected]<mailto:[email protected]>> wrote: AFAIK, the latest version of the documentation of RESTFul API is here: https://cwiki.apache.org/confluence/display/RANGER/Apache+Ranger+0.6+-+REST+APIs+for+Service+Definition%2C+Service+and+Policy+Management#ApacheRanger0.6-RESTAPIsforServiceDefinition,ServiceandPolicyManagement-SearchPoliciesinaService I'm trying to fetch the all users via RESTFul API and the policies attached to them but I couldn't find the Users API in the documentation. All I can fetch is the service definitions and the policies attached to users but that's not enough for me to integrate Ranger into our application. Is there any API in order to fetch the users and their groups, if not, is there any workaround that I can use? Best, Emre -- -Rathor
