Welcome to the Panopto Community

Please note: All new registrants to the Panopto Community Forum must be approved by a forum moderator or admin. As such, if you navigate to a feature that is members-only, you may receive an error page if your registration has not yet been approved. We apologize for any inconvenience and are approving new members as quickly as possible.
Options

Assigning Custom Roles via API

Is it possible to assign a user a custom role on a folder via the API? We're able to to assign the out-of-the-box roles like Creator and Viewer, but all custom roles return an error. The id assigning roles is an Admin so I don't think it's a permissions issue.

Answers

  • Options
    Kevin BaumKevin Baum Panopto Employee

    Hi Adam,

    It should be possible to assign a custom role for access for a user using the public REST API (https://demo.hosted.panopto.com/Panopto/api/docs/index.html#/Folders/Folders_CreatePermission). You will need to use the RoleId field instead of the RoleType field. We do not currently have an API to get the role IDs, however, you should be able to find them by logging into Panopto as an administrator, then going to System -> Roles, and clicking on the custom role you want. The ID of the role should appear in the URL after the hash mark (#) once you click on the role to expand it.

    You can use this ID as the RoleId in the call to the REST API to add permissions.

    If you are still seeing an error, or have any other questions, please let me know.

    Thanks,

    Kevin

  • Options

    We used the custom "RoleId" that we had pulled from an existing folder with that role. It returned an error of "Unsupported Role value". Using the same calls, we were able to assign Creator and Viewer roles, but not any of our custom roles.

  • Options
    Kevin BaumKevin Baum Panopto Employee

    Hi Adam,

    Thank you for sending me the error message you are seeing. I've taken a look, and it does appear that there is a bug causing you to see that error when you attempt to use a custom RoleId to set permissions on a folder or a session.

    I've filed an internal bug in our issue-tracking system to get this fixed as soon as we can.

    If you have any other questions, please let me know.

    Thanks,

    Kevin

Sign In or Register to comment.