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).
| Operation | Route | Notes |
|---|---|---|
| Upload a new Module | POST /api/content/modules | Body: the .zip, Content-Type: application/zip. A JSON body to the same route still creates an empty Module. |
| Upload a new Version | POST /api/content/modules/{id}/versions | Body: the .zip, Content-Type: application/zip. A JSON body to the same route still adds a Version by number. |
| Get an ingestion | GET /api/content/ingestions/{id} | Status and validation report. |
| Retry | POST /api/content/ingestions/{id}/retry | Only a Failed ingestion. |
| List Modules | GET /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.
| Status | Meaning |
|---|---|
| 201 | Stored. The body is the ingestion; Location points to it. |
| 422 | Rejected (malware, invalid package) or a new-Version course ID mismatch. errors says why. |
| 409 | Course ID already belongs to a Module, exact duplicate checksum, or a retry of an ingestion that is not Failed. |
| 413 | Over 500 MB. No ingestion is recorded. |
| 503 | Failed (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.