Hi Chhaya,

Here are the curl call details:

1. Create User :
curl -i --header "Accept:application/json" -H "Content-Type:
application/json" -u admin:admin -X POST
http://localhost:6080/service/xusers/secure/users
-d @/jsonFilePath

Sample json:
{
        "name": "admin1801",
        "firstName": "Admin18",
        "lastName": "",
        "password": "test1234",
        "description": "admin",
        "groupIdList": [],
        "groupNameList": [],
        "status": 1,
        "userSource": 0,
        "userRoleList": ["ROLE_SYS_ADMIN"]
}


change the json according to your requirement and also make sure that
password length should be at-least 8(must contain alphabets & numbers).

2. Update User :
curl -i --header "Accept:application/json" -H "Content-Type:
application/json" -u admin:admin -X
http://localhost:6080/service/xusers/secure/users/{id} -d @/jsonFilePath
Sample json : { "id":75, "name": "admin1801", * "firstName": "Admin1801",*
"lastName": "", "password": "test1234", "description": "admin",
"groupIdList": [], "groupNameList": [], "status": 1, "userSource": 0,
"userRoleList": ["ROLE_SYS_ADMIN"] }
3. Delete User:
curl -i --header "Accept:application/json" -H "Content-Type:
application/json" -u admin:admin -X DELETE
http://localhost:6080/service/xusers/users/{id}


4. All groups call:

Create group : /secure/groups           Method: POST
Update group : /secure/groups/{id}    Method: PUT
Delete group : /secure/groups/{id}     Method: DELETE



Regard,
Bhavik Patel
+91-7208744109

On Sun, Aug 14, 2016 at 11:36 PM, Vishwakarma, Chhaya <Chhaya.Vishwakarma@
thinkbiganalytics.com> wrote:

> Hi All,
>
>
>
> How can I add/remove/update users/groups through Ranger REST api?
>
>
>
>    http:<ip>:6080/service/xusers/???
>
>
>
> Any help would be appreciated
>
>
>
> Regards,
>
> Chhaya
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>

Reply via email to