Language Variants API
Manage the language Variants of a Module Version. Every request needs a signed-in user (401 otherwise). Only aztec_staff can use these routes (403 otherwise).
| Operation | Route | Notes |
|---|---|---|
| List | GET /api/content/modules/{id}/versions/{versionId}/variants | Returns versionStatus and one entry per enabled locale, English first, with readiness (Ready or Missing), status and the Variant if one exists. |
| Upload | POST /api/content/modules/{id}/versions/{versionId}/variants | Multipart form with repeated files and locales fields, matched by position (1 to 10 files). |
| Retry | POST …/variants/{variantId}/retry | Optional raw .zip body with a corrected package. Only a Failed Variant. |
| Discard | DELETE …/variants/{variantId} | Only a Failed Variant. Returns the locale as Missing. |
Upload result
Each file succeeds or fails on its own. The response lists one result per file with fileName, locale, statusCode, variant and errors. The response status is 201 when at least one Variant was created, otherwise the status of the first failure.
Errors
| Status | Cause |
|---|---|
| 409 | The locale already exists on the Version, the file repeats a locale in the upload, the Version is Retired, or the Variant is not Failed. |
| 413 | A file is too large. |
| 415 | The upload is not multipart. |
| 422 | Validation fails, the course ID or the assignable unit IDs do not match, a locale is not enabled, or files and locales do not pair up. |