-
Notifications
You must be signed in to change notification settings - Fork 0
UpdateUserRoles
Luis Huertas edited this page Feb 7, 2022
·
1 revision
Updates the roles that a user has
Base Url : http://your-app-base-url.com
Endpoint : /auth/user/:id/role
Method : PUT
Auth required : Yes
header key | header value | description |
---|---|---|
Authorization | BEARER jwtToken | access_token generated using /token
|
Permissions required : Access string 'OAUTH2_user:update'
type: body
{
"roles": [{ "id": 1 }]
}
Request Fields Description
key | value | description |
---|---|---|
roles | [{ "id": 1 }] | The new roles id list of the user |
{
"code": 200001,
"message": "User roles added"
}
Response Fields Description
key | value | description |
---|---|---|
code | 200001 | result code |
message | User added | result message |
Response codes
- If response is success, http status will be 201 and code in body will be 200001
code | description |
---|---|
500000 | Not categorized error |
200001 | Roles were updated |