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.

GetCreatorFoldersList and GetCreatorFoldersWithExternalContextList

edited February 21 in API

Hi,

I need to collect a list of all the folders the user is a creator in.

It seems that this API GetCreatorFoldersList should do that but passing the username I receive an emply list

I'm sure that the user has the creator rights on several folders.

I add an information:

for some users the API return a list of folders (but not all)

for other users the API return an empty list

I can' understand the differences between those users, they seems to have same definition and rights


Thanx for any help

Tagged:

Answers

  • Kevin BaumKevin Baum Panopto Employee

    Hi Roberto,

    Without seeing the request it is difficult for me to be sure what could be causing that. If the user you are using for authentication does have creator rights within Panopto, then this API call should be returning a list of folders.

    Is it possible that you are using a searchQuery value that is limiting the results, or are you further limiting the list using the request property? If possible, would you be able to send part of the XML you are sending in the request, most notably the request and searchQuery sections of the XML (removing the auth section entirely)? That may help me see what could be causing this.

    Please let me know if you have any other questions.

    Thanks,

    Kevin

  • Hi Kevin,

    this is c# code:

      PanoptoSessionManagement.Pagination pagination = new PanoptoSessionManagement.Pagination { MaxNumberResults = resultsPerPage, PageNumber = page };

      PanoptoSessionManagement.AuthenticationInfo sessionAuthInfo

      this contains UserKey/Password of the user i created in order to call the API, so this user has all required rights

    then I call those 2 API passing searchQuery="usr1" (for example) and "unified/[email protected]" and then "[email protected]"       

     ListFoldersResponseWithExternalContext response1 = new ListFoldersResponseWithExternalContext();

     response1 = sessionMgr.GetCreatorFoldersWithExternalContextList(sessionAuthInfo,

       new ListFoldersRequest { Pagination = pagination, SortBy = FolderSortField.Name }, searchQuery);

     ListFoldersResponse response;

     response = sessionMgr.GetCreatorFoldersList(sessionAuthInfo,

       new ListFoldersRequest { Pagination = pagination, SortBy = FolderSortField.Name }, searchQuery);

       

    What happens is that in the first case I have a list of folder where "usr1" has creator right,

    in the second case I receive an empty list even if this "unified/[email protected]" is me and I have all rights.

    in the third case I receive an empty list even if this "[email protected]" is me and I have all rights.


    thanks for your help

  • Kevin BaumKevin Baum Panopto Employee

    Hi Roberto,

    Thank you for the additional information. There are still a few possibilities for what could be causing this.

    First, I would double check that you are starting on page number 0, since that is used to get the first page of data instead of page number 1.

    Second, when you use the user names in the search query, that will search for folder names that contain that particular value with the exception of personal folders. Personal folders are generally not searchable through this API endpoint, however you can use the ISessionManagement.GetPersonalFolderForUser with an admin user as the caller, or with the user who owns that personal folder, if you need to retrieve the personal folder for a user.

    I hope that this helps. Please let me know if you have any other questions.

    Thanks,

    Kevin

  • edited February 23

    Hi Kevin,

    Thanks but I don't need to get the personal folder of an User, for this I know I need to use ISessionManagement.GetPersonalFolderForUser and actually I use this for other purpose.

    Now I need to collect all folders where the user can create sessions.

    It's a bit different, because those folders are others that subfolders of the user's personal folder.

    If the user has the right or he is an Admin (as my user for example) I expect to get all existing folders because I can create sessions everywhere

    thanks for your help

  • Kevin BaumKevin Baum Panopto Employee

    Hi Roberto,

    I think I see what you're trying to get to now. Using GetCreatorFoldersList will return a list of folders that the current user (the user whose information is sent in the AuthenticationInfo section) has creator access to, but will not get a list of folders that any other user has creator access to. Sending the user name in the searchQuery parameter will limit the folders returned based on finding that term in the folder name only.

    What you can use, as an administrator, is the IAccessManagement.GetUserAccessDetails API call instead. This SOAP endpoint accepts a user ID, and will return a detailed list of folders and sessions that the given user has access to. For your purposes, it returns a property called FoldersWithCreatorAccess, which is a list of folder IDs that the specific user has creator access to.

    I hope that this helps, please let me know if you have any other questions, or if there is still something I'm missing.

    Thanks,

    Kevin

Sign In or Register to comment.