Inconsistencies in PercentCompleted and Missing LastViewedDateTime in Session APIs
Hello,
I understand that there are two APIs available to check a session’s PercentCompleted:
- GET /api/v1/sessions/{id}/viewers
- GET /api/v1/users/{id}/sessions/viewed
The first API, /api/v1/sessions/{id}/viewers, provides "LastViewedDateTime": "2025-03-24T04:33:58.541Z".
However, the second one, /api/v1/users/{id}/sessions/viewed, only provides the StartTime and does not return the LastViewedDateTime.
We would like to request that LastViewedDateTime be added to the /api/v1/users/{id}/sessions/viewed endpoint.
Is it possible to support this in a future update?
Additionally, there is a data consistency issue:
- In /api/v1/sessions/{id}/viewers,PercentCompletedis a float
- In /api/v1/users/{id}/sessions/viewed,PercentCompletedis an integer
This inconsistency makes development quite difficult.
Currently, to retrieve a student's PercentCompleted, we are forced to call /api/v1/sessions/{id}/viewers each time, which could potentially cause a significant performance load.
It would be very helpful if there were a more efficient and consistent way to retrieve PercentCompleted.
Thank you!
 
                             
                            
Answers
Hello Kiwon,
doubleand theintas a value between 0-100 as a percent value of the session viewed. We will work on the inconsistency issue. I believe theintvalue is more accurate.Thanks and regards,
Aish
Thank you for your response, Aishwarya Harpale.
I will go ahead and submit a request for an API that takes
sessionIdanduserIdas arguments and returns the percent completed.This is essential for improving performance.