Skip to content

Update Role Rights

Updates the specified Role Rights. Note that if you set all three permissions to false your role right will instead be deleted resulting in a smaller result set than you might expect.

Verb PATCH
Endpoint {base-url}/role-rights/
Max Page Size N/A

Request Body

{
  "body": [
    {
      "id": 12,
      "roleId": 5,
      "rightId": 1,
      "canView": true,
      "canEdit": true,
      "canExecute": false
    }
  ]
}

Note

All changes in this request are atomic. If any item fails, the entire batch is rolled back and no changes are made.

Returns

On Success

Echoes back the provided data.

Response Body

[
  {
    "id": 12,
    "roleId": 5,
    "rightId": 1,
    "canView": true,
    "canEdit": true,
    "canExecute": false
  }
]

On Error

HTTP Code Error Code Definition
403 DATA_ACCESS_VIOLATION One or more of the specified role right ids belong to an organization you do not have access to. The roleId/rightId in the body cannot move a role right and are ignored on update.
404 MISSING_RECORD One or more of the specified role right ids do not exist.
422 VALIDATION_ERROR A required field (roleId, rightId) is missing or zero.