Video Played Tracking
Saves how much of a video a learner has watched in the current playback session. Call it regularly while a learner watches a video so their watch time and resume position are kept.
POST
/students/material/{id}/secondsplayedVideo Played Tracking
curl --request POST \
--url 'https://<your-api-host>/nuSource/api/v1/students/material/{id}/secondsplayed' \
--header 'APIKEY: <your-api-key>' \
--header 'ORGID: <your-org-id>' \
--form 'JSONString={"class_id":"182884","unique_session_id":"91139236-622957-1783069869","seconds_played":2,"last_watched_second":73,"resource_type":4}'{
"code": 200,
"message": "Success"
}Access: Learners. Institute admins can also call it.
Request body: form-data with one field, JSONString, containing this JSON:
Body
JSONStringOne ID per playback session, for example
{user_id}-{material_id}-{unix_time}. Reuse it for every update in the same session. Missing: "Invalid unique session id."Batch (class) ID the video is watched in.
Total seconds watched in this session so far (not since the last call).
Position in the video, in seconds, to resume from.
4 for a teaching material.Path: the numeric ID is the teaching material ID.
Notes: Updates are saved at most about every 35 seconds, or sooner when watched time grew by 45 seconds or more; calls in between return "Success" without saving. Each session is stored once and overwritten by later calls. Rate limit: 30 requests per 1 minute; going over locks you out for 30 minutes.