Panopto API 205: Moving sessions to a new folder

Return to the Panopto API index page

I made this to for so it uses some parameters from the Panopto GitHub.

Most of this code is the paginated session list on page 203. We’ll be using MoveSessions, which requires a list of session guids and a folder ID to move the sessions to.

We create our variables and make a List

[Edit: 13/06/2014: This code was in the full code below, but it is important enough to mention]

We need to specify the Guid of the FolderID we want to pull sessions from. Without this code you will move every video from every folder.

And while we loop we add the Guids to the list

Convert the list to an array

Then call the command in a single line

Full code below

Return to the Panopto API index page

One Comment

  1. Graham

    After accidentally moving every video on my dev server into a folder, I’ve added a code snippet that specifically mentions how to search only in one folder.

    The full code hasn’t changed and was correct.

    8 years ago

Leave a Reply

Your email address will not be published. Required fields are marked *