Stages 4 to 6 of the testing sequence

Video & Progress

Play a lesson video for the enrolled student, record the result and read the course progress back, then cancel access and see the refusal. The course, the student and the enrollment come from Catalog & Enrollment and are kept in this browser.

Ids used by every call on this screen
Carried over from Catalog & Enrollment. Change one here and every request below uses the new value.
not enrolled yet

Issued by the server when you enroll. Configuration can replace it.

Flat-course id or legacy numeric id.

Stage 4 · Play video
Videos of this enrollment
One call lists every video of the enrolled course with its address. The enrollment is checked on every call. Select a video to play it and to keep its id for the next steps.
GET/enrollments/{enrollment_id}/videos/
Enroll this student in the course first
Stage 4 · Play video
Player
Nothing is selected yet. Select a video in the list, or request one item's address below.

Sandbox videos use COSQOOL's demonstration clip instead of real lesson content. Different lessons may show the same clip. Each lesson keeps its own identifiers, access checks and progress records.

The API calls and their answers are real: you are testing your integration with demonstration media in place of the lesson recordings.

No video selectedEnroll this student in the course first
Stage 4 · Play video
Request one item's address
The delivery call your platform makes when a student presses play: one call per item, for a student with an active enrollment. A video answers its hls_url, a file a short-lived signed url, and a native quiz 409 quiz_not_iframe because its questions travel in the flat course.
GET/students/{sid}/courses/27/videos/{item_id}/
Generate a test student first (Catalog & Enrollment → Enrollment)
Stage 4 · Play video
Free previews (no student needed)
The course's free preview videos, the ones the public website offers (is_free in the flat course), each with a playable address, for a key COSQOOL staff enabled for it. No student and no enrollment are needed and nothing is recorded. Any other video answers 403 not_a_free_preview; a key without the capability answers 403 preview_delivery_not_enabled.
GET/courses/27/previews/

Empty: the course's whole list. An item id from the flat course (or its legacy numeric id): that preview only.

Stage 5 · Record progress
Record a result and read the course progress
Report each completed item once; the course progress is 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. Each lesson item has its own record, whichever clip its address played.

Record an item result

POST/students/{sid}/courses/27/progress/

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

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

Request body (exactly what will be sent)
{
  "item_id": "",
  "type": "video",
  "completed": true
}
Generate a test student first (Catalog & Enrollment → Enrollment)

A result you post here is stored and never echoed back as a course.progress event (that event is reserved for content completed inside a COSQOOL iframe); course.completed is queued for your key when the last item is done. Events reach your server only once a receiver is connected; that needs details from your side.

Read the course progress

GET/students/{sid}/courses/27/progress/
Generate a test student first (Catalog & Enrollment → Enrollment)
Stage 6 · Cancel access
Check or cancel the enrollment
Cancelling ends the student's access at once. It blocks new requests; it does not withdraw a video address that was already issued.
Enrollmentnot enrolled yet
GET/enrollments/{enrollment_id}/
POST/enrollments/{enrollment_id}/cancel/body {}
Enroll this student in the course first
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 test student first (Catalog & Enrollment → Enrollment)