I could able to create a new user by the following JSON format.(Using POSTER add-on to post this data to REST service.)
{
"name":"user34",
"pass":"3323",
"mail":"[email protected]",
"status":"1"
}
My question is how to create a user with specific role. I tried with the following JSON format.
{
"name":"user35",
"pass":"pwds3",
"mail":"[email protected]",
"status":"1",
"roles":{
"2":"authenticated user",
"4":"moderator"
}
}
but the response gives the following error
["An illegal choice has been detected. Please contact the site administrator."]