Skip to main content

Content launch API

The server-side step between a learner pressing Start or Resume on an assigned Lesson and the content opening in the branded player. It checks the learner's Active assignment, resolves the Version and language Variant, starts or reuses the cmi5 registration, and returns a short-lived signed package URL with the LRS details. The LMS side of cmi5 is built in the platform's .NET API; no hosted cmi5 player or licensed engine is used.

OperationRouteNotes
LaunchPOST /api/launchlessonId or assignableUnitId (exactly one) and an optional preferredLocale. Returns launchUrl, packageUrl, packageUrlExpiresAt, registration, lrsEndpoint, fetchUrl, variant, fallbackUsed and notice.
cmi5 fetchPOST /api/launch/fetch?token=Called by the content, with no session cookie. Returns {"auth-token": "…"}.

Errors​

Launch: 401 not signed in. 403 not a student. 404 not assigned, or in another organization (existence is not revealed). 422 no launchable Version, an unusable request, or a unit without an activity ID. 503 the LRS or URL signing is unavailable, with friendly copy; nothing is created.

Fetch refusals are HTTP 200 with a cmi5 body: error-code 1 already used, 2 expired (5 minutes after launch), 3 invalid or unknown.

Rules​

  • The Version comes from the assignment's pin through the Version-resolution rule. A Retired pin or a mandatory move takes effect only at a launch where no session is live, and starts a new registration.
  • A live session never changes Version or Variant. ResolveVariant runs at the start of each attempt.
  • One registration per learner, assignment, assignable unit and Version. Start and Resume reuse it; each launch creates a new Launch session and fetch token.
  • The fetch token is 256 random bits; only its SHA-256 hash is stored. The first valid fetch sets used_at in one statement.
  • A new launch abandons the previous open session first and writes the LMS "abandoned" statement. A timer abandons sessions still open 8 hours after launch.
  • A registration with a "completed" or "passed" statement in the LRS is Completed; the next launch is a Retake on a new registration.
  • Each launch writes the LMS.LaunchData state document and a "launched" statement, with the organization in the statement context.

Telemetry​

Events: launch requested, succeeded, denied (with reason), Variant fallback used, Version moved at launch, fetch refused.