Associate Roles With This User
post
/api/v2/users/{id}/roles/
Make a POST request to this resource to add or remove a role from this user. The following fields may be modified:
id
: The Role ID to add to the user. (int, required)disassociate
: Provide if you want to remove the role. (any value, optional)
Request
Supported Media Types
- application/json
Path Parameters
Root Schema : schema
Example:
{
"id":"26"
}
Response
Supported Media Types
- application/json
201 Response
400 Response
Example Response (application/json)
{
"msg":"You cannot grant private credential access to another user"
}
403 Response
Example Response (application/json)
{
"detail":"You do not have permission to perform this action."
}