Hello.
I'm trying to add users to Ranger via RESTAPI, but I could only add one singular user at a time.
This is the command I'm using with a json file
curl -u admin:$PASSWORD -i -X POST -H "Accept: application/json" -H "Content-Type: application/json" https://$RANGER_URL:6182/service/xusers/secure/users -d @users_RESTAPI.json -vvv
And the json file as the following
{ "name":"user_1",
"firstName":"",
"lastName": "",
"loginId": "user_1",
"emailAddress" : "",
"description" : "",
"password" : "pass123",
"groupIdList":[3],
"status":1,
"isVisible":1,
"userRoleList": [ "ROLE_USER" ],
"userSource": 0
},
{ "name":"user_2",
"firstName":"",
"lastName": "",
"loginId": "user_1",
"emailAddress" : "",
"description" : "",
"password" : "pass123",
"groupIdList":[3],
"status":1,
"isVisible":1,
"userRoleList": [ "ROLE_USER" ],
"userSource": 0
}
Only the first user is added, the following entries are ignored.
Do the users need to be added one by one via RESTAPI?
Thanks