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.

REST API: no result when home folder has no subfolders

Hi all!
We are currently developing a solution for a self-service video studio where videos automatically are uploaded to the correct user based on their Panopto username.

We have successfully used the REST API for this service, but there is another problem that forces us to use the SOAP API as it does not have the function in the REST API. The problem arises when a user for example, runehr has an empty home folder. Using the path /api/v1/folders/search in the REST API we are unable to find runehr home folder, when this folder does not contain any folders.

When looking on runehr MyFolder and it contains no subfolders, we are not able to retrive the Parentfolder ID for the user.

Without having to go great lengths to just create a folder in the runehr personal folder, and then having to wait ?? 10-15minutes before it's visible in the rest API, and THEN get the ParentFolder ID for runehr folder.

BUT since we don't know the ParentFolder ID for the user, we are not able to create the folder and find runehr ParentFolder ID.
This could have been solved if when searching for users in the API with path /api/v1/users/search, it would also return the ID for their MyFolder.

We can solve this using SOAP:
                AUTH = {
                    "UserKey": settings.PANOPTO_USERNAME,
                    "Password": settings.PANOPTO_PASSWORD
                client = Client(f"https://{settings.PANOPTO_SERVER_HOST}/Panopto/PublicAPI/4.6/SessionManagement.svc?wsdl")
                PersonalFolder = client.service.GetPersonalFolderForUser(auth=AUTH, userId=user_id, allowCreation ="false")
                user_parent_folder_id = PersonalFolder["Id"]

…but then again we can’t use the token, but are forced to use username and password login instead.
Are there anyone that might have a solution for this in the REST API?


Have a nice day! :-) 

Sign In or Register to comment.