Hi Elliot,
 The request looks fine. Hope ranger is running on port 8080. I
quickly tried the same on my setup and the request is successful and I
see the user in ranger UI. Do you see any errors in ranger admin logs?
When you mentioned, the response seems incomplete, can you give some
details?

- Sailaja.

On Thu, Oct 1, 2020 at 10:45 AM Elliot West <tea...@gmail.com> wrote:
>
> Hello, I'm trying to create users via the REST API, and while I get responses 
> back, they seem incomplete and the users do not show up in the UI. Any 
> assistance would be appreciated. Note that in the example below I'd already 
> successfully managed to create the group 'g-team' with a POST to 
> /service/xusers/groups
>
> Example user:
>
> {
>   "owner": "Admin",
>   "updatedBy": "Admin",
>   "name": "customer",
>   "firstName": "Agent",
>   "password": "Ranger2!0",
>   "description": "Platform Agent",
>   "groupNameList": [
>     "g-team"
>   ],
>   "status": 1,
>   "isVisible": 1,
>   "userSource": 1,
>   "userRoleList": [
>     "ROLE_USER"
>   ]
> }
>
> And REST call:
>
> curl -u 'admin:Ranger2!0' \
>   -X POST -H "Accept: application/json" \
>   -H "Content-Type: application/json" \
>   --data @customer.json \
>   http://localhost:8080/service/xusers/users
>
> Thanks,
>
> Elliot.

Reply via email to