[ 
https://issues.apache.org/jira/browse/RANGER-2572?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17646748#comment-17646748
 ] 

Ramachandran edited comment on RANGER-2572 at 12/13/22 5:34 PM:
----------------------------------------------------------------

[~bharath028]  :/xusers/secure/users/\{id}  ---> This API will be used for 
adding/updating/deleting groups to the users 

This API is not honouring the id in the path parameter of the REST URI. Ranger 
is using the payload (VXUser) only for honouring 
Payload example:
{code:java}
{
  "name" : "...",
  "firstName" : "...",
  "lastName" : "...",
  "emailAddress" : "...",
  "password" : "...",
  "description" : "...",
  "credStoreId" : 12345,
  "groupIdList" : [ 12345, 12345 ],
  "myClassType" : 12345,
  "status" : 12345,
  "isVisible" : 12345,
  "userSource" : 12345,
  "userRoleList" : [ "...", "..." ],
  "groupNameList" : [ "...", "..." ],
  "otherAttributes" : "...",
  "syncSource" : "...",
  "id" : 12345,
  "createDate" : 12345,
  "updateDate" : 12345,
  "owner" : "...",
  "updatedBy" : "..."
}{code}
Refer:[https://ranger.apache.org/apidocs/resource_XUserREST.html#resource_XUserREST_secureUpdateXUser_PUT]

cc >> [[email protected]] 


was (Author: JIRAUSER295265):
[~bharath028]  :/xusers/secure/users/\{id}  ---> This API will be used for 
adding/updating/deleting groups to the users 

This API is not honouring the id in the path parameter of the REST URI. Ranger 
is using the payload (VXUser) only for honouring 
Payload example:
{code:java}
{
  "name" : "...",
  "firstName" : "...",
  "lastName" : "...",
  "emailAddress" : "...",
  "password" : "...",
  "description" : "...",
  "credStoreId" : 12345,
  "groupIdList" : [ 12345, 12345 ],
  "myClassType" : 12345,
  "status" : 12345,
  "isVisible" : 12345,
  "userSource" : 12345,
  "userRoleList" : [ "...", "..." ],
  "groupNameList" : [ "...", "..." ],
  "otherAttributes" : "...",
  "syncSource" : "...",
  "id" : 12345,
  "createDate" : 12345,
  "updateDate" : 12345,
  "owner" : "...",
  "updatedBy" : "..."
}{code}

Refer:https://ranger.apache.org/apidocs/resource_XUserREST.html#resource_XUserREST_secureUpdateXUser_PUT

> Unable to update/add user to group with userName using rest API.
> ----------------------------------------------------------------
>
>                 Key: RANGER-2572
>                 URL: https://issues.apache.org/jira/browse/RANGER-2572
>             Project: Ranger
>          Issue Type: New Feature
>          Components: Ranger
>    Affects Versions: 1.2.0
>            Reporter: bharath
>            Assignee: Ramachandran
>            Priority: Critical
>              Labels: features
>
> Hi Team,
>  # We have a requirement to add/update/delete a user to a group in ranger 
> through rest API. I see that there are rest API available using the userId 
> but not through userName.  Is there any way we can do this ??
>  # Also while creating a user the id that is given in JSON request is not 
> taken, instead ranger creates its own id for the user and gives it back as a 
> response. Is there a way to force ranger the id that I provide. But even this 
> id is not seen anywhere in the ranger UI.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to