Description
Proposal Date
2025-01-28
Target Ticket Acceptance Date
2025-02-11
Earliest Open edX Named Release Without This Functionality
Ulmo - 2025-10
Rationale
The HomePageCourses
API v1 will be replaced by v2, which offers improvements including pagination, filtering, and sorting. As of Sumac, v2 is the default API used to query the course listing from Studio.
Removal
To completely remove the API v1 in edx-platform
it’s necessary:
- Remove the URL from the urls.py file.
- Remove the View from the home.py file.
- Remove the View import from the __init__.py file.
- Remove the Serializer from the serializers.py file.
- Remove the Serializer import from the __init__py file.
- Remove the Tests from the test_home.py file.
Also, it's necessary to remove all references to API v1 in the Authoring MFE. This work is in progress:
Replacement
API v2 completely replaces API v1. The PRs related to functionality are as follows:
- feat: add paginated HomePageCoursesV2 view with filtering & ordering edx-platform#34173
- feat: add pagination to the HomePageCoursesV2 API edx-platform#34175
- fix: return empty list when no courses are found for request edx-platform#35942
Deprecation
API v1 will be marked as deprecated in the platform code in Teak. This will remain so until Ulmo, where it will be removed.
As the feature toggle to enable/disable API v2 will be removed, API v1 will have an internal change, as it will get the courses summary from CourseOverview.get_all_courses()
, which implies that it will not query the courses from Mongo, but from MySQL.
Migration
As of the Sumac release the default API v1 is not being used, the authoring MFE uses API v2. If for some reason you are still using v1 we recommend to start using v2 which was based on the previous one, but with some improvements.
It's important to note that the format of the API v2 response has changed a bit with respect to API v1. Previously, courses
and archived_courses
were returned in separate lists, now all courses are returned in the courses
property. Archived courses contain the is_active
property set to false
.
Additional Info
No response
Task List
- refactor!: remove
ENABLE_HOME_PAGE_COURSE_API_V2
feature toggle edx-platform#36181 - Mark API v1 as deprecated from
edx-platform
(Teak) - Remove API v1 from
edx-platform
(Ulmo) - Remove API v1 references from
frontend-app-authoring
refactor: remove references of ENABLE_HOME_PAGE_COURSE_API_V2 frontend-app-authoring#1611
Metadata
Metadata
Assignees
Type
Projects
Status