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.
Options

Calculating the exact number of views from the GetSessionExtendedDetailedUsage event stream

Hello,

I'm afraid I have another question regarding the SOAP API. We are trying to use GetSessionExtendedDetailedUsage to extract the number of views for a given session and user, to make sure that the number that is returned agrees with the online stats and reports.

I have attached an Excel file which contains an anonymised subset of the results for a specific session id and user id (f66049a8-6309-4618-a8b5-ae4300a5fdda and 6a1f52ea-2704-4495-b6bf-adc00161749c respectively,).

I have inserted empty lines in the XLS where my extraction strategy sets delimiters to isolate separate views based on the event stream player actions. The current strategy is as follows:

StartReason= Start (new view starts on same index)

StopReason= PlayerClose, End (new view start on next index)

If StartReason != Start on first event of a new view, add it anyway

As you can see, splitting the event stream in this manner returns 5 views instead of the 6 views shown in the online stats. In fact, I have manually inserted an extra line/view (at index 1019) based on visual inspection of the event time, otherwise the discrepancy would have been two views instead of one

This happens very often and for the life of me I cannot find the right way to reconcile my results with what's returned by the platform. The number of unique viewers and the total amount of time spent (the sum of SecondsViewed) is always in agreement, so I think I have all the events.

Would someone be able to share with us how you calculate the number of views and downloads from the event stream returned by GetSessionExtendedDetailedUsage?

Failing that, is there a straightforward way to get the number of views for a given session/user from a different API? I have tried most of the ones I thought were relevant (both REST and SOAP), in vain.

Thank you

Cristiano


Tagged:

Answers

  • Options

    A couple thoughts:

    1 - Panopto has identified a bug in their reporting dashboards. Based on what they say, in their report, it doesn't sound like it should be impacting reporting, but that may not be definitive. Full repair of the data won't be complete until the end of the month.

    2 - Apologies if this is a stupid question, but what's the goal here? Is there some reason you aren't able to only use or trust Panopto's canned reports? The Session views and downloads details per user contains:

    • UserName
    • User ID
    • Email
    • Session Name
    • Session ID
    • Minutes Delivered
    • Percent Completed

    You could schedule a one time report to run from the beginning of your time with Panopto to get all your viewing data (assuming it is not also impacted by the bug referenced above. Then you could run the report nightly to append new views to the existing data set. (Obviously this strategy wouldn't work if you needed real time data or data with less than a 24 hour lag.)

    If you're trying to reconcile the data returned by the API with the data from the reports and the 2 aren't in complete agreement, I would contact Panopto support directly.

    Any discrepancies could be related to the bug I mentioned above, or there may be small anomalies in the data. I've been told that they can't guarantee 100% accuracy of the playback data due to the complexities involved.

    We've been asking for a real time Caliper data feed for several years but it has yet to materialize.

  • Options

    Hi Chaz,

    Thank you for your contribution and apologies if I failed to supply additional context:

    • At our University, a project is underway to build comprehensive e-learning dashboards across our entire ecosystem (Blackboard, Collaborate, Panopto and our internal SIS) and do some modelling on the students' online behaviour, in order to discover correlations and early warning signs (the infamous "students at risk"), as well as improving course design etc..
    • Since Panopto lacks its own client-facing Data Warehouse, and reports are certainly comprehensive but are currently very, very asynchronous, we have invested quite heavily in building our own ETL using the SOAP and REST APIs in order to reduce latency. Moreover, some of the information available from the APIs is not present in the reports, or the online stats: for the case in point, GetSessionExtendedDetailedUsage returns the entire event stream, including player speed and Start/Stop actions, which we'd like to use as additional "behavioural" KPIs.
    • We already hit some roadblocks - for example the fact that APIs don't return archived or deleted sessions, whereas reports do, but that can be circumvented. In this case however, given that the number of views is an inferred measure, and that to the best of my knowledge there isn't an API which returns the views per student/session (we also mourn the lack of an API which can tell us which sessions have had new views in the last n days), we need to resort to using the Stats UI as the gold standard against which to compare our results.

    I appreciate that the complexities of the playback stream may be responsible for some of the discrepancies, but surely there has to be a single, central source of information (something like a Db) which feeds both the online stats, the reports and the API server. Of course, given my total ignorance of the infrastructure and architecture behind the scenes, this may be a gross approximation or just a plain mistake.

    I hope this goes a little way towards explaining our goal. Of course, we can always fall back on reports, but while we're at it it'd be nice to understand a bit better the general state of the Panopto APIs.

    Many thanks

    Cristiano

  • Options
    Nedim DeliahmetovicNedim Deliahmetovic Panopto Employee
    edited February 2023

    Hi Cristiano,

    Thank you for contacting us.

    I will list couple of endpoints that I think can help you.

    Have you tried to use SOAP API and "GetSessionDetailedUsage" endpoint?

    For request you need to provide: sessionId, beginRange and endRange

    In response you will get following objects:<a:DetailedUsageResponseItem><a:SecondsViewed>10.58666599999998</a:SecondsViewed><a:SessionId>79172b62-3027-4c57-be26-ae****</a:SessionId><a:StartPosition>20.00596</a:StartPosition><a:Time>2022-06-03T10:15:52.467Z</a:Time><a:UserId>1c5ac01c-cedc-4845-830c-ade80***</a:UserId></a:DetailedUsageResponseItem>

    With this response you can see unique users who watched session. You can count views per user id, when session is watched and how long.

    Additionally, you can use following two endpoints that can help you:

    GetSessionSummaryUsage - You can pull information how many unique users watched on daily, weekly or hourly granularity and total of session views.

    Request: <sessionId>79172b62-3027-4c57-***</sessionId><beginRange>2018-01-01</beginRange><endRange>2023-12-31</endRange><granularity>Weekly</granularity>

    Response:  <a:MinutesViewed>0</a:MinutesViewed><a:Time>2017-12-31T23:00:00Z</a:Time><a:UniqueUsers>0</a:UniqueUsers><a:Views>0</a:Views></a:SummaryUsageResponseItem>

    GetSessionUserDetailedUsage - You can get information when specific user watched session and how long

    Request: <sessionId>79172b62-3027-4c57-be26-ae9b00****</sessionId><userId>1c5ac01c-cedc-4845-830c-ade*****</userId><beginRange>2018-01-01</beginRange><endRange>2023-12-31</endRange>

    Response: <a:DetailedUsageResponseItem><a:SecondsViewed>31.670537481781491</a:SecondsViewed><a:SessionId>79172b62-3027-4c57-be26-ae9b00*</a:SessionId><a:StartPosition>0.078797018789916989</a:StartPosition><a:Time>2022-05-24T13:36:36.423Z</a:Time><a:UserId>1c5ac01c-cedc-4845-830c-ade***</a:UserId></a:DetailedUsageResponseItem>

    Unfortunately, we do not have exact API endpoint that returns data that you need but using those SOAP API endpoints you should be able to meet your goal.

    I hope this can help you.

    Kind regards,

    Nedim

  • Options

    Hello Nadim,

    Many thanks for contacting me. As I stated in the original post, I used precisely GetSessionDetailedUsage to return the detailed view stream for a given date range, then I infer the number of unique views per user by applying the reasoning I explained above, with the problem I outlined. (and a sample XLS attached)

    I am aware of the other two APIs but they don't work for me because I am looking for some fine-grained data such as player speed that can't be found elsewhere.

    I hope I have made myself clear now, please do not hesitate to ask for additional clarification.

    I look forward to hearing from you

    Kind regards

    Cristiano

  • Options

    Hi Cristiano,

    Thanks for your response.

    In the original post I think you mentioned GetSessionExtendedDetailedUsage endpoint which like you said can give you some data like player speed but unfortunately not other cumulative data that you need. I was hoping that you can use other 3 endpoints that I mentioned in my previous post to grab your needed information.

    Currently, we do not support other endpoints that can help you but feel free to open a support ticket with explanation what exact data you need from API response and our support team will handle further with that request.

    I am sorry because I cannot help you more about your issue.

    Kind regards,

    Nedim

  • Options

    Hi Nedim,

    Thanks again. I did try to open a support ticket, but it was closed and I got redirected to the forum :-)

    I do not really need a dedicated API for this problem, I'll get by with what I have, I'm only curious as to the cause of the discrepancy (on average about 5%, not a lot) between the views I aggregate from the event "stream" returned by GetSessionDetailedUsage and what's returned by Panopto in the GUI and in the reports.

    I imagine it's something that one of the developers might know, i.e. how you aggregate the player events in the fine-grained API to work out the individual views per user per session.

    Kind regards,

    Cristiano

  • Options

    Hi,

    Bumping this in the hope that it catches someone's eye in the Dev team

    Thanks

    Cristiano

  • Options

    Cristiano,

    I don't have an answer at this time, but reached out to the team to see if there is guidance on a more accurate approach to this, and what could account for the discrepancy. Will provide an update once I learn more.

    Thanks for your patience!

    Jim

  • Options

    Hi Jim,

    Thank you very much for liaising with the Dev team, I look forward to any and all updates on this!

    Regards

    Cristiano

Sign In or Register to comment.