diff --git a/figures/urls.py b/figures/urls.py index 062abe65..b49b9805 100644 --- a/figures/urls.py +++ b/figures/urls.py @@ -77,12 +77,12 @@ base_name='courses-index') router.register( - r'courses/general', + r'courses-general', views.GeneralCourseDataViewSet, base_name='courses-general') router.register( - r'courses/detail', + r'courses-detail', views.CourseDetailsViewSet, base_name='courses-detail') diff --git a/frontend/src/apiConfig.js b/frontend/src/apiConfig.js index c5c381bc..1db3599d 100644 --- a/frontend/src/apiConfig.js +++ b/frontend/src/apiConfig.js @@ -4,8 +4,8 @@ const apiConfigĀ = { edxUserInfoApi: '/api/user/v1/accounts/', courseEnrollmentsApi: '/figures/api/course-enrollments/', generalSiteMetrics: '/figures/api/general-site-metrics/', - coursesGeneral: '/figures/api/courses/general/', - coursesDetailed: '/figures/api/courses/detail/', + coursesGeneral: '/figures/api/courses-general/', + coursesDetailed: '/figures/api/courses-detail/', learnersGeneral: '/figures/api/users/general/', learnersDetailed: '/figures/api/users/detail/', reportingCsvReportsApi: '/reporting/api/csv-reports/', diff --git a/old-docs/api-reference.md b/old-docs/api-reference.md index 468f5a1c..22ecceb8 100644 --- a/old-docs/api-reference.md +++ b/old-docs/api-reference.md @@ -278,7 +278,7 @@ To get the set of general site metrics: To get a list of all courses with general (summary) metrics for each: ``` -/figures/api/courses/general/ +/figures/api/courses-general/ ``` ### Course Details @@ -286,7 +286,7 @@ To get a list of all courses with general (summary) metrics for each: This endpoint provides a combination of course information and learner activity ``` -/figures/api/courses/detail/ +/figures/api/courses-detail/ ``` To get the data for a specific course: @@ -298,13 +298,13 @@ To get the data for a specific course: Example: ``` -/figures/api/courses/detail/course-v1:edX+DemoX+Demo_Course/ +/figures/api/courses-detail/course-v1:edX+DemoX+Demo_Course/ ``` You can also filter on org: ``` -/figures/api/courses/detail/?org=edX +/figures/api/courses-detail/?org=edX ``` diff --git a/tests/views/test_general_course_data_view.py b/tests/views/test_general_course_data_view.py index cb0a0172..01c3a1b7 100644 --- a/tests/views/test_general_course_data_view.py +++ b/tests/views/test_general_course_data_view.py @@ -101,7 +101,7 @@ class TestGeneralCourseDataViewSet(BaseViewTest): '''Tests the UserIndexView view class ''' - request_path = 'api/courses/general' + request_path = 'api/courses-general' view_class = GeneralCourseDataViewSet @pytest.fixture(autouse=True)