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.

Utilizing the Panopto Rest API for Reporting

Hi,

I have a few questions on the Panopto Rest API and I was hoping that some one could help. We're planning to use the REST API or recurring reports to retrieve student's session usage stats to import into our student information system.


Using the REST API. These are based on the documentation at Panopto Public API. From the API documentation, is appears that we can only get a subset of this information, but maybe we are missing some information. Specifically:

  • The /api/v1/sessions/{id}/viewers function appears to return some of the fields that we can get from the export (UserId, PercentCompleted, LastViewedDateTime, MostRecentViewPositionInSeconds), but not all of them. Is it possible to get more fields ?
  • The /api/v1/users/me/sessions/viewed function states that it only returns partly viewed sessions. Is there a way to get information about completed viewed sessions by user ?
  • Some calls accept a pageNumber parameter, but this doesn’t appear in the results. Can you clarify how this is used; should we continually increment the pageNumber until no results are returned ?
  • Our expected approach is to have a process that runs on a schedule (maybe every day) to query for which users have viewed which session. From what we can tell from the API, it looks like there is no way to filter based on the ViewedDateTime, so it looks like we’d have to retrieve all the data each time. Is this the case, or is there a means to filter to get only sessions viewed in a given time period ?
  • If there is no way to filter by date, it looks like we’d have to iterate through each session, then call the /api/v1/sessions/{id}/viewers function for each session. Is this viable in terms of the potential quantity of data

Thank you


Elspeth

Answers

  • Joe MalmstenJoe Malmsten Panopto Employee

    Hi,

    Have you looked into using our recurring reports for this? Those might be better suited for what you are looking for than the REST API currently.

    You can create recurring reports from within Panopto, or using our SOAP API. You can also use the SOAP API to download the reports once they have completed.

    For more information on the recurring reports, please see the following support article:

    https://support.panopto.com/resource/APIDocumentation/Help/html/fa25b91c-9b25-a5cf-7c68-d79cd748a05b.htm

    For information on using the SOAP API to create and download reports, please see our SOAP API documentation here:

    https://support.panopto.com/s/article/System-Usage-Report-Fields

    I'm also including answers to you other questions here below.

    q1. The /api/v1/sessions/{id}/viewers function appears to return some of the fields that we can get from the export (UserId, PercentCompleted, LastViewedDateTime, MostRecentViewPositionInSeconds), but not all of them. Is it possible to get more fields ?

    a1. Currently, we do not have any other fields that are not listed in the REST API documentation available for this endpoint. We may consider adding new fields in the future.

    https://demo.hosted.panopto.com/Panopto/Api/Docs/index.html#/Sessions/Sessions_GetSessionViewingStats

    q2. The /api/v1/users/me/sessions/viewed function states that it only returns partly viewed sessions. Is there a way to get information about completed viewed sessions by user?

    a2. At this time it is only possible to get results for partially viewed sessions using users/me/sessions/viewed.

    q3. Some calls accept a pageNumber parameter, but this doesn't appear in the results. Can you clarify how this is used; should we continually increment the pageNumber until no results are returned ?

    a3. Yes that is the case. Continue to increment the page number until no results are returned.

    q4. Our expected approach is to have a process that runs on a schedule (maybe every day) to query for which users have viewed which session. From what we can tell from the API, it looks like there is no way to filter based on the ViewedDateTime, so it looks like we'd have to retrieve all the data each time. Is this the case, or is there a means to filter to get only sessions viewed in a given time period ?

    If there is no way to filter by date, it looks like we'd have to iterate through each session, then call the /api/v1/sessions/{id}/viewers function for each session. Is this viable in terms of the potential quantity of data

    a4. That is correct. The REST API endpoint for getting users who have viewed a session does not currently allow filtering on date, and always returns a full list of users who have viewed the session. The Usage Reporting interface does support filtering by date/time.

  • Thanks very much Joe.


    Elspeth

  • Hi, how were you able to successfully return the fields for /api/v1/sessions/{id}/viewers function? I tried to do it in my code but it only it encounters error 429 and return that there are too many requests.

  • Joe MalmstenJoe Malmsten Panopto Employee

    Hi,


    The Public REST API has a limit on how many calls can be made per second/minute/hour so I would suggest limiting your polling to 1 api request per second and see if your error goes away.


    Thanks,

    Joe Malmsten

Sign In or Register to comment.