Skip to main content

Package ingestion API

Upload Rise cmi5 exports and read ingestion results. Every request needs a signed-in user (401 otherwise). Only aztec_staff can use these routes (403 otherwise).

OperationRouteNotes
Upload a new ModulePOST /api/content/modulesBody: the .zip, Content-Type: application/zip. A JSON body to the same route still creates an empty Module.
Upload a new VersionPOST /api/content/modules/{id}/versionsBody: the .zip, Content-Type: application/zip. A JSON body to the same route still adds a Version by number.
Get an ingestionGET /api/content/ingestions/{id}Status and validation report.
RetryPOST /api/content/ingestions/{id}/retryOnly a Failed ingestion.
List ModulesGET /api/content/modules{ items: [{ id, name, courseId, status, latestVersionNumber, versionCount, updatedAt }] }, for the Module picker.

Ingestion JSON: id, kind (new_module or new_version), status (Uploaded, Scanning, Validating, Stored, Rejected, Failed), moduleId, versionId, courseId, checksum (SHA-256), sizeBytes, errors ([{ code, message }]) and timestamps.

StatusMeaning
201Stored. The body is the ingestion; Location points to it.
422Rejected (malware, invalid package) or a new-Version course ID mismatch. errors says why.
409Course ID already belongs to a Module, exact duplicate checksum, or a retry of an ingestion that is not Failed.
413Over 500 MB. No ingestion is recorded.
503Failed (scan timeout or storage failure). Retry it.

The upload request waits for the scan result and the storage of the package, so it can take up to the 5-minute scan timeout. A retry runs the ingestion again inside the request and returns the final ingestion record with 200 (the specification describes the record going back to Scanning; the endpoint does not return an intermediate state). It does not start a new Defender scan.

Configuration​

Uploads__BlobEndpoint, Uploads__ContainerName (default package-uploads), Uploads__ScanTimeoutSeconds (default 300) and Uploads__ScanPollSeconds (default 2). The identity needs Storage Blob Data Owner on the upload container to read the scan result tag.