lms.djangoapps.mfe_config_api package#

Submodules#

lms.djangoapps.mfe_config_api.urls module#

URLs configuration for the mfe api.

lms.djangoapps.mfe_config_api.views module#

MFE API Views for useful information related to mfes.

class lms.djangoapps.mfe_config_api.views.MFEConfigView(**kwargs)#

Bases: APIView

Provides an API endpoint to get the MFE configuration from settings (or site configuration).

get(request)#

Return the MFE configuration, optionally including MFE-specific overrides.

This configuration currently also pulls specific settings from site configuration or django settings. This is a temporary change as a part of the migration of some legacy pages to MFEs. This is a temporary compatibility layer which will eventually be deprecated.

See [DEPR ticket](openedx/edx-platform#37210) for more details.

The compatability means that settings from the legacy locations will continue to work but the settings listed below in the _get_legacy_config function should be added to the MFE config by operators.

Usage

Get common config: GET /api/mfe_config/v1

Get app config (common + app-specific overrides): GET /api/mfe_config/v1?mfe=name_of_mfe

GET Response Values ``` {

“BASE_URL”: “https://name_of_mfe.example.com”, “LANGUAGE_PREFERENCE_COOKIE_NAME”: “example-language-preference”, “CREDENTIALS_BASE_URL”: “https://credentials.example.com”, “DISCOVERY_API_BASE_URL”: “https://discovery.example.com”, “LMS_BASE_URL”: “https://courses.example.com”, “LOGIN_URL”: “https://courses.example.com/login”, “LOGOUT_URL”: “https://courses.example.com/logout”, “STUDIO_BASE_URL”: “https://studio.example.com”, “LOGO_URL”: “https://courses.example.com/logo.png”, “ENABLE_COURSE_SORTING_BY_START_DATE”: True, “HOMEPAGE_COURSE_MAX”: 10, … and so on

}#

Module contents#