Summary
The Enrollment REST API on edx-platform has been standardized under FC-0118 (ADRs 0025–0040) and re-released as /api/enrollment/v2/. frontend-app-learning is one of four MFEs that currently call the v1 endpoints and needs to migrate.
The v1 endpoints remain live (no immediate breakage). The v2 endpoints add a standardized error envelope, OpenAPI 3.x schemas, and consistent auth (JwtAuthentication + SessionAuthenticationAllowInactiveUser, no BearerAuthentication/OAuth2Authentication).
Endpoints to migrate
| Old URL |
New URL |
GET /api/enrollment/v1/enrollment |
GET /api/enrollment/v2/enrollment/ |
POST /api/enrollment/v1/enrollment |
POST /api/enrollment/v2/enrollment/ |
Call sites (grepped 2026-07-03)
GET /api/enrollment/v1/enrollment — list caller's enrollments
src/courseware/course/course-exit/data/api.js:32,35 — Course Exit / recommendations screen
POST /api/enrollment/v1/enrollment — enroll
src/alerts/enrollment-alert/data/api.js:6,7 — Enrollment Alert banner on the outline (postCourseEnrollment)
Tests referencing the v1 URL (update alongside):
src/course-home/outline-tab/OutlineTab.test.jsx
Notes on the response envelope
Errors now follow the ADR 0029 standardized format. Code that reads response.data.detail may need to read response.data.error.detail. Success payloads are unchanged.
References
- edx-platform PRs #38724, #38773, #38796
- FC-0118 ADRs:
docs/decisions/0025-* through 0040-* on edx-platform
Summary
The Enrollment REST API on
edx-platformhas been standardized under FC-0118 (ADRs 0025–0040) and re-released as/api/enrollment/v2/.frontend-app-learningis one of four MFEs that currently call the v1 endpoints and needs to migrate.The v1 endpoints remain live (no immediate breakage). The v2 endpoints add a standardized error envelope, OpenAPI 3.x schemas, and consistent auth (
JwtAuthentication+SessionAuthenticationAllowInactiveUser, noBearerAuthentication/OAuth2Authentication).Endpoints to migrate
GET /api/enrollment/v1/enrollmentGET /api/enrollment/v2/enrollment/POST /api/enrollment/v1/enrollmentPOST /api/enrollment/v2/enrollment/Call sites (grepped 2026-07-03)
GET
/api/enrollment/v1/enrollment— list caller's enrollmentssrc/courseware/course/course-exit/data/api.js:32,35— Course Exit / recommendations screenPOST
/api/enrollment/v1/enrollment— enrollsrc/alerts/enrollment-alert/data/api.js:6,7— Enrollment Alert banner on the outline (postCourseEnrollment)Tests referencing the v1 URL (update alongside):
src/course-home/outline-tab/OutlineTab.test.jsxNotes on the response envelope
Errors now follow the ADR 0029 standardized format. Code that reads
response.data.detailmay need to readresponse.data.error.detail. Success payloads are unchanged.References
docs/decisions/0025-*through0040-*on edx-platform