Welcome to the Panopto Community

Using the Soap API looking for specific folder by name...getting an wildcard type response....

Hello there...using the code below to get back folders from a name based query. I don't need to see ALL the results...and it appears that this is limited to 25 anyway... If I want to see if there is a 'LAWS' folder I don't want to see LAWSS or BLAWSS I just want to see the LAWS folder...


When I do this I get a list of folders back which contain LAWS...I just want to see a LAWS folder..... any suggestions?


    public function get_folderid_by_foldername($name) {
        try {
            $param = new \Panopto\SessionManagement\GetFoldersList($this->auth, new \Panopto\SessionManagement\ListFoldersRequest(), $name);
            $folders = $this->smclient->GetFoldersList($param)->getGetFoldersListResult();
        } catch(Exception $e) {
            throw new SoapFault('client', $e->getMessage());
        }
        if ($folders->getTotalNumberResults() > 0) {
            $folder = $folders->getResults()->getFolder();
            $folder_id = $folder[0]->getId();
            return $folder_id. ' '.count($folder);
        }
        return false;
Tagged:

Answers

  • Joe MalmstenJoe Malmsten Panopto Employee

    Hi,


    I do not think we have a way to do exact name based searches at this time.

    If you are looking for a specific folder and you have access to the folder Id guid you could use the GetFoldersById endpoint.

    https://support.panopto.com/resource/APIDocumentation/Help/html/84301a09-177d-46ed-097e-0eeb6fce3584.htm


    Thanks,

    Joe Malmsten

Sign In or Register to comment.