Overview
Studio's v2/importmetadata checks that schema_version is between 5 and 6, then always serves the current kolibri_public columns and labels the response with the requested version. A request for schema_version=5 gets v6 columns marked as v5. Kolibri clients will start requesting the version they can read (learningequality/kolibri#15358), so Studio should serve the columns of the requested version, as Kolibri's endpoint does.
Complexity: Medium
Target branch: hotfixes
Context
The Change
For each table, v2/importmetadata should return exactly the columns of the requested schema version, and the latest version when none is requested.
Acceptance Criteria
General
Testing
AI usage
I asked Claude Code to compare Kolibri's and Studio's v2 public content APIs. It found this gap and drafted the sections. I set the scope and reviewed each section.
Overview
Studio's
v2/importmetadatachecks thatschema_versionis between 5 and 6, then always serves the currentkolibri_publiccolumns and labels the response with the requested version. A request forschema_version=5gets v6 columns marked as v5. Kolibri clients will start requesting the version they can read (learningequality/kolibri#15358), so Studio should serve the columns of the requested version, as Kolibri's endpoint does.Complexity: Medium
Target branch: hotfixes
Context
for_version:import_metadata.py#L125-L147import_metadata_view.py#L151-L176The Change
For each table,
v2/importmetadatashould return exactly the columns of the requested schema version, and the latest version when none is requested.Acceptance Criteria
General
schema_version(5 and 6), every table's rows have exactly the columns of Kolibri's frozen column map for that version.schema_version, the response is unchanged from today.schema_versionreturns 400 with the same JSON body as Kolibri, e.g.["Schema version is too high, exports only suported for versions 5 to 6"], instead of plain text.Testing
AI usage
I asked Claude Code to compare Kolibri's and Studio's v2 public content APIs. It found this gap and drafted the sections. I set the scope and reviewed each section.