Skip to main content

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).

OperationRouteNotes
ListGET /api/content/modules/{id}/versions/{versionId}/variantsReturns versionStatus and one entry per enabled locale, English first, with readiness (Ready or Missing), status and the Variant if one exists.
UploadPOST /api/content/modules/{id}/versions/{versionId}/variantsMultipart form with repeated files and locales fields, matched by position (1 to 10 files).
RetryPOST …/variants/{variantId}/retryOptional raw .zip body with a corrected package. Only a Failed Variant.
DiscardDELETE …/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​

StatusCause
409The locale already exists on the Version, the file repeats a locale in the upload, the Version is Retired, or the Variant is not Failed.
413A file is too large.
415The upload is not multipart.
422Validation 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.