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.
Data mis-matched of 2 Rest API
Mike Peterson
Tyro
in API
We have a requirement to calculate the total minutes spent, for all Panopto videos, for that we have used the below Panopto public REST API for a specific user to get all Panopto video information.
But we have found that the above REST API is not provided all Panopto videos that the user has already viewed.
Here is one session “40d920c3-2515-4476-b079-ad6b0178f2db” which is not shown in the user’s REST API request, but here is strange that when we call session REST API as per below this specific user comes.
https://tiu.hosted.panopto.com/Panopto/api/v1/sessions/40d920c3-2515-4476-b079-ad6b0178f2db/viewers
Can you please assist us with how to get all Panopto video information for a specific user without missing any sessions?
Tagged:
0
Answers
Hi.
Did you iterate the pageNumber parameter from 0 and up until no more results? I believe the call returns a maximum of 50 sessions per page.
Watching this...
@Vegard Wallin Thanks for the reply, yes you are correct that API calls return max 50 sessions per page, we have already checked with all page numbers until the return blank array.
https://tiu.hosted.panopto.com/Panopto/api/v1/users/487b922d-776f-46f1-96af-ae86002df7ea/sessions/viewed?includeCompleted=true&pageNumber=1
https://tiu.hosted.panopto.com/Panopto/api/v1/users/487b922d-776f-46f1-96af-ae86002df7ea/sessions/viewed?includeCompleted=true&pageNumber=2
https://tiu.hosted.panopto.com/Panopto/api/v1/users/487b922d-776f-46f1-96af-ae86002df7ea/sessions/viewed?includeCompleted=true&pageNumber=3
Hi.
In your example URLs you start at page1, but I assume you start at page0 in your actual implementation. I think a Panopto employee should have a look at this, perhaps create a ticket if needed.