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.

Identify Empty Folders with API

Not sure if this is a question or a feature request.

The result of our retention policy deletion causes a number of folders to be emptied. I am trying to work out a way to easily delete these orphaned folders.

The REST API endpoint /api/v1/folders/{id}/sessions only returns active recordings and does not include archived recordings (I only want to delete a folder if there are also no archived recordings).

I can generate a regular usage report for folders which returns active + archived recordings and can retrieve these using the /api/v1/reports/{id} enpoint. The issue with this method is that each instance of a report has its own report ID and there does not seem to be a method to get a list of available report ids via the API so would require me to physically login to get the individual ID of the report. At which point I might as well just download the report while I'm there.

Am I missing something or is there a way for me to obtain this information?

Tagged:

Best Answer

  • Kevin BaumKevin Baum Panopto Employee
    Answer ✓

    Hi Tim,

    We do not currently have a public REST API endpoint to get a list of reports, however we do offer that ability in our SOAP API:

    • IUsageReporting.GetRecurringReports - This endpoint enables you to get a list of all recurring reports that are scheduled or recently completed. You can also filter it by report type. The output of this call will include the report IDs as well, which you can use in the REST API to download the report.
    • IUsageReporting.GetRecentReports - This endpoint enables you to get a list of recently requested or completed reports that may not be recurring reports. It can also be filtered by report type, and includes the report IDs in the output which can be used in the REST API to download the report.

    I have also gone ahead and filed two requests for enhancing our REST API:

    1. Add the ability to get a list of reports using the Public REST API.
    2. Add the ability to get non-active videos in a folder with the REST API.

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

    Thanks,

    Kevin

Answers

  • My understanding is that if you delete a folder which contained only Archived recordings and subsequently restore one of them, the folder will be re-created. I don't think the permissions come back but the folder itself does.

    Of course you could probably use the System session storage report to determine the status of all videos in a given folder and whether it contains any archived content. Actually, if you queried the System session storage report for a folderID and it returned no results, that probably means the folder contains no active or archived content.

  • Thank you both. Having all as part of the REST API would be great.

Sign In or Register to comment.