Video & Progress

Steps 5–9 of the sequence: list the enrollment's videos, fetch one item's secure stream URL, play it, record an item result and retrieve the course progress. The ids come from Catalog & Enrollment and are kept in this browser.

Ids in use on this screen
Retained from Catalog & Enrollment; editing here updates every call below. The enrollment id is server-issued (Configuration can override it).
— not enrolled yet

Flat-course id or legacy numeric id.

Step 5 · Enrollment videos
GET /enrollments/{enrollment_id}/videos/ — every video of the enrolled course with its iframe_url and hls_url; the enrollment is re-checked on every call and `signed` says whether the stream URL itself is signed (false on this deployment). Click a video to play it and retain its id.
Enroll this student in the course first
Step 7 · Player
Nothing selected yet — click a video in the enrollment list (step 5) or fetch an item's secure URL (step 6).
No video selectedEnroll this student in the course first
Step 6 · Item delivery — secure video URL
GET /students/{sid}/courses/{cid}/videos|files|quizzes/{item_id}/ — one call per item for an actively enrolled student. Video → hls_url + expires_at (the same GET renews an expired link); file → a short-lived signed url; native quiz → 409 quiz_not_iframe (its questions travel in the flat course).
Generate a synthetic student first (Catalog & Enrollment → Enrollment)
Steps 8–9 · Item progress — the authoritative course progress
POST then GET /students/{sid}/courses/{cid}/progress/. progress_pct = completed eligible items ÷ eligible items (videos and quizzes with deliverable questions; files never count) — metric edumatch_item_completion_v1. This is the one number to show a student; the v1 counters further down are legacy and count watched videos only.

Step 8 · Record an item result

ISO-8601, not in the future; omitted = now.

Your event id; the same id with a different body answers 409 event_conflict.

Request body

{
  "item_id": "",
  "type": "video",
  "completed": true
}
Generate a synthetic student first (Catalog & Enrollment → Enrollment)

Step 9 · Retrieve course progress

Generate a synthetic student first (Catalog & Enrollment → Enrollment)
Legacy video counters (v1) — secondary
GET /students/{sid}/progress/?course_id= and the counters answered by POST /enrollments/{id}/videos/{video_id}/complete/. They count watched videos only; exam fields are null and overall_progress_pct stays null until exam data exists. Not the course progress — the authoritative number is the item-completion metric above.
Generate a synthetic student first (Catalog & Enrollment → Enrollment)