Skip to main content

Content API

Read and write the content hierarchy and the Module registry. Levels, in strict order: Collection, Class, Subject, Unit, Lesson, Item. Every request needs a signed-in user (401 otherwise). Only aztec_staff can write (403 otherwise). Other users read Published records only; a Draft or Retired record is 404 for them.

Record JSON: id, parentId, title, sequence, ownerType (aztec or organization), ownerOrganizationId, status (Draft, Published, Retired), standardsTags ([{ "framework", "code" }]), timestamps and rowVersion. An Item also has type (cmi5_package) and moduleId. Records never carry a business unit.

OperationRouteNotes
List collectionsGET /api/content/collections
Get a recordGET /api/content/{level}/{id}The record and its direct children. {level} is collections, classes, subjects, units, lessons or items.
CreatePOST /api/content/{level}Body: parentId (not for collections), title, sequence, owner, standardsTags; an Item also takes type and moduleId. New records are Draft.
UpdatePATCH /api/content/{level}/{id}Body: rowVersion and the fields to change, including status.
Read a ModuleGET /api/content/modules/{id}Returns Variants, Versions (versionNumber, changeType) and Packages, including earlier Versions.

The registry write routes below are interim. The specification's API table covers only reading the registry, so these routes are not a confirmed contract and may change.

OperationRouteNotes
Create a ModulePOST /api/content/modules
Update a ModulePATCH /api/content/modules/{id}
Add a VariantPOST /api/content/modules/{id}/variants
Add a VersionPOST /api/content/modules/{id}/versionsversionNumber must be higher than every earlier one.
Publish or retire a VersionPOST .../versions/{versionId}/publish, .../retireSee Content publishing API.
Add a PackagePOST /api/content/modules/{id}/versions/{versionId}/packagesOne per Version and Variant.

There is no delete.

Status actions​

POST /api/content/{level}/{id}/publish, /retire and /restore (aztec_staff only) take { "rowVersion": "..." } and return the updated record. Draft to Published and Retired to Published need a Published parent. Published to Retired is always allowed. Publishing a Published record returns 200 with no change. PATCH refuses a status with 422. Learner reads return 404 for a record with a non-Published record above it.

StatusRoutesWhenBody
403publish, retire, restoreCaller is not aztec_staff.
404publish, retire, restoreThe record does not exist.
409publish, retire, restorerowVersion is stale.currentStatus and the current rowVersion.
422publish, restoreparent_not_published: the parent is not Published.parentLevel, parentTitle, parentStatus.
422publish, retire, restoreinvalid_transition: the move is not allowed, for example retiring a Draft.code
422publish, retire, restorerowVersion is missing or not a valid token.errors.rowVersion
422PATCHThe request includes status.errors.status

Errors​

The other content routes return: 401 not signed in, 403 not aztec_staff, 404 not found or not visible, 409 stale rowVersion, duplicate sequence, Variant, Package or versionNumber, 422 validation (wrong parent level, unknown Item type, missing or unknown Module, bad tag or owner, moving a Retired record, a status sent to PATCH). For the status routes see the table above.

Telemetry​

Meter Aztec.Platform.ContentManagement: content_record_created, content_record_updated and content_record_status_changed, each with level, owner and actor. Status actions add hierarchy_record_published, hierarchy_record_retired, hierarchy_record_restored and status_change_refused (with a reason).