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
Path Parameters
Body ()
Root Schema : schema
Example:
{
    "id":"26"
}
Back to Top

Response

Supported Media Types

201 Response

400 Response

Body
Example Response (application/json)
{
    "msg":"You cannot grant private credential access to another user"
}

403 Response

Body
Example Response (application/json)
{
    "detail":"You do not have permission to perform this action."
}
Back to Top