Refactors downstream links API to handle multiple filters using a single API. Also adds a new route to return summary of library links for a given course.
37 lines
946 B
Python
37 lines
946 B
Python
"""Contenstore API v2 URLs."""
|
|
|
|
from django.conf import settings
|
|
from django.urls import path, re_path
|
|
|
|
from cms.djangoapps.contentstore.rest_api.v2.views import downstreams, home
|
|
|
|
app_name = "v2"
|
|
|
|
urlpatterns = [
|
|
path(
|
|
"home/courses",
|
|
home.HomePageCoursesViewV2.as_view(),
|
|
name="courses",
|
|
),
|
|
re_path(
|
|
r'^downstreams/$',
|
|
downstreams.DownstreamListView.as_view(),
|
|
name="downstreams_list",
|
|
),
|
|
re_path(
|
|
fr'^downstreams/{settings.USAGE_KEY_PATTERN}$',
|
|
downstreams.DownstreamView.as_view(),
|
|
name="downstream"
|
|
),
|
|
re_path(
|
|
f'^downstreams/{settings.COURSE_KEY_PATTERN}/summary$',
|
|
downstreams.DownstreamSummaryView.as_view(),
|
|
name='upstream-summary-list'
|
|
),
|
|
re_path(
|
|
fr'^downstreams/{settings.USAGE_KEY_PATTERN}/sync$',
|
|
downstreams.SyncFromUpstreamView.as_view(),
|
|
name="sync_from_upstream"
|
|
),
|
|
]
|