This method requires authentication.
To assign a user or group to an access role, the currently authenticated user must be either: the owner of the folder, an administrator, or a user who has received GrantAccess permission on the folder. GrantAccess permission is given through the Manager access role. To test whether the current user can assign a user or group to a role, use the API for Retrieving the list of members for a folder's role
to see if the user belongs to the Manager Role.
Note : When a user/group is assigned to a new role, the old role is automatically deleted.
The following access roles are available:
|Reader||View a folder and all media in it.|
|Contributor||Add to a folder and delete items they added.|
|Manager||Add and remove any item; assign roles.|
The following error codes could appear in a response body for an invalid request:
|Unknown||Returned when the cause of an error is unknown|
|AccessDenied||Returned when the cause of an error is due to a permission restriction|
|ItemNotFound||Returned when the cause of an error is related to a resource not being found|
|ItemExists||Returned when the cause of an error is related to a conflict with an existing resource|
|Unsupported Operation||Returned when the operation is not supported|
|ConstraintViolation||Returned when a constraint is violated such as description or summary being too long|