roles

Available Since: V1

Get or set the roles assigned to a user. 

Get Request

GET api/1/user/roles/
Parameter Description
uid The ID of the user to get the roles for.

Successful Response (200)

[
    "store_mgr",
    "content_editor"
]

Unsuccessful Response (400)

[ ]

Set Request

POST api/1/user/roles/
Parameter Description
uid The ID of the user to set the roles for.
roles The JSON encoded array of roles to assign to the user.

Successful Response (200)

A list of roles assigned to the user are returned, if the server does not know a role being set then that roles is ignored and not returned in this list.

[
    "store_mgr",
    "content_editor"
]

Unsuccessful Response (400)

{
    "result":false
}



TOP