Skip to main content

Content publishing API

Publish and retire Module Versions. Only aztec_staff can call these routes (401 not signed in, 403 other roles). A Version moves Draft, Published, Retired; Retired is final and there is no delete or restore.

OperationRouteBody
List VersionsGET /api/content/modules/{id}/versionsNewest first, with currentVersionId, status, changeType, suggestedChangeType, isCurrent, who published and when.
PublishPOST /api/content/modules/{id}/versions/{versionId}/publishchangeType (minor, major, mandatory), changeNote, reason (required for mandatory), rowVersion.
RetirePOST /api/content/modules/{id}/versions/{versionId}/retirerowVersion.

Publishing makes the Version the Module's current Version; older Published Versions stay launchable for pinned learners.

Errors​

404 module or Version not found, 409 stale rowVersion or a concurrent publish, 422 a Variant without a Package (listed under packages), a missing change type, note or mandatory reason, an invalid transition, or retiring the current Version with no newer Published one.

Suggested change type​

major for a first Version, an added or removed assignable unit, or changed moveOn or mastery score; otherwise minor. mandatory is never suggested.

Version resolution​

Callers (content-assignment, content-launch) use IVersionResolver.ResolveAsync(moduleId, pinnedVersionId, openAttemptVersionId). An open attempt keeps its Version. Otherwise a missing or Retired pin, or any later mandatory Version, resolves to the current Version; a later minor Version applies until a major one; otherwise the pin stays.

Audit and telemetry​

Each publish and retire writes a row to ContentVersionAudit. Meter Aztec.Platform.ContentPublishing: version_published (change type, suggested, chosen), version_retired, publish_blocked (reason).