diff --git a/lms/djangoapps/mfe_config_api/docs/decisions/0001-mfe-config-api.rst b/lms/djangoapps/mfe_config_api/docs/decisions/0001-mfe-config-api.rst index f9bd7e6361..8e29899118 100644 --- a/lms/djangoapps/mfe_config_api/docs/decisions/0001-mfe-config-api.rst +++ b/lms/djangoapps/mfe_config_api/docs/decisions/0001-mfe-config-api.rst @@ -18,7 +18,7 @@ Decision - A lightweight API will be created that returns the mfe configuration variables from the site configuration or django settings. `PR Discussion about django settings`_ - The API will be enabled or disabled using the setting ``ENABLE_MFE_CONFIG_API``. - The API will take the mfe configuration in the ``MFE_CONFIG`` keyset in the site configuration (admin > site configuration > your domain) or in django settings. -- This API allows to consult the configurations by specific MFE. Making a request like ``/api/v1/mfe_config?mfe=mymfe`` will return the configuration defined in ``MFE_CONFIG_OVERRIDES["mymfe"]`` merged with the ``MFE_CONFIG`` configuration. +- This API allows to consult the configurations by specific MFE. Making a request like ``/api/mfe_config/v1?mfe=mymfe`` will return the configuration defined in ``MFE_CONFIG_OVERRIDES["mymfe"]`` merged with the ``MFE_CONFIG`` configuration. - The API will have a mechanism to cache the response with ``MFE_CONFIG_API_CACHE_TIMEOUT`` variable. - The API will live in lms/djangoapps because this is not something Studio needs to serve and it is a lightweight API. `PR Discussion`_ - The API will not require authentication or authorization. @@ -26,7 +26,7 @@ Decision Request:: - GET http://lms.base.com/api/v1/mfe_config?mfe=learning + GET http://lms.base.com/api/mfe_config/v1?mfe=learning Response:: diff --git a/lms/djangoapps/mfe_config_api/views.py b/lms/djangoapps/mfe_config_api/views.py index c124059406..da875393dc 100644 --- a/lms/djangoapps/mfe_config_api/views.py +++ b/lms/djangoapps/mfe_config_api/views.py @@ -35,10 +35,10 @@ class MFEConfigView(APIView): **Usage** Get common config: - GET /api/v1/mfe_config + GET /api/mfe_config/v1 Get app config (common + app-specific overrides): - GET /api/v1/mfe_config?mfe=name_of_mfe + GET /api/mfe_config/v1?mfe=name_of_mfe **GET Response Values** ``` diff --git a/lms/urls.py b/lms/urls.py index 33e167ec97..2857c7f1c8 100644 --- a/lms/urls.py +++ b/lms/urls.py @@ -1028,5 +1028,5 @@ urlpatterns += [ # MFE API urls urlpatterns += [ - path('api/v1/mfe_config', include(('lms.djangoapps.mfe_config_api.urls', 'lms.djangoapps.mfe_config_api'), namespace='mfe_config_api')) + path('api/mfe_config/v1', include(('lms.djangoapps.mfe_config_api.urls', 'lms.djangoapps.mfe_config_api'), namespace='mfe_config_api')) ]