Hey Vel, Thanks for sharing a great resource. Bookmark'ed now. :) In fact, I'd be interested to know what is the difference between "xusers" and "users" types of APIs. Any quick thought on that?
On Mon, Jun 4, 2018 at 4:20 PM, Velmurugan Periasamy < [email protected]> wrote: > You can also refer http://ranger.apache.org/apidocs/index.html > > From: Burak Emre Kabakcı <[email protected]> > Reply-To: "[email protected]" <[email protected]> > Date: Monday, June 4, 2018 at 7:13 PM > To: "[email protected]" <[email protected]> > Cc: "[email protected]" <[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]> 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 Kabakcı <[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 >> > -- -Rathor
