This Django app provides additional REST API endpoints for Open edX to enable advanced features such as analytics, course management, and role inspection. It is intended to be deployed inside an Open edX platform using Tutor.
Use the Tutor plugin from aulasneo to install and enable these APIs inside your Open edX deployment:
- Repository: https://github.com/aulasneo/tutor-contrib-owly
Quick start with Tutor:
Install the plugin
tutor plugins install git+https://github.com/aulasneo/tutor-contrib-owly.git
Enable and configure
tutor plugins enable owly tutor config saveApply and start
tutor images build openedx tutor local launch
Once enabled, the app is included in LMS and exposes endpoints under the paths registered by openedx_owly_apis/urls.py.
Base router registrations are defined in openedx_owly_apis/urls.py:
/owly-analytics/→OpenedXAnalyticsViewSet/owly-config/→OpenedXConfigViewSet/owly-courses/→OpenedXCourseViewSet/owly-roles/→OpenedXRolesViewSet
Authentication is supported via JWT/Bearer/Session. Specific permissions are enforced per endpoint (see notes below).
ViewSet: openedx_owly_apis/views/config_openedx.py
Requires: Authenticated user.
GET /owly-config/enable_owly_chatCheck if the Owly chat feature is enabled via waffle flag. Can check for a specific user by providing anemailquery parameter.
ViewSet: openedx_owly_apis/views/analytics.py
Requires: Admin or Course Staff permissions.
GET /owly-analytics/overview?course_id=<course-key>Returns overview analytics for a course or platform-wide stats.GET /owly-analytics/enrollments?course_id=<course-key>Returns detailed enrollment analytics for a course.GET /owly-analytics/discussions?course_id=<course-key>Returns forum analytics and configuration for a course.GET /owly-analytics/detailed?course_id=<course-key>Returns a comprehensive, combined analytics payload for a course.
ViewSet: openedx_owly_apis/views/courses.py
Requires: Authenticated user. Additional role-based permissions per action.
POST /owly-courses/createCreate a new course. Requires admin or course creator.POST /owly-courses/structureCreate or edit course structure. Requires admin, course creator, or course staff.POST /owly-courses/content/htmlAdd HTML content to a vertical. Requires admin, course creator, or course staff.POST /owly-courses/content/videoAdd video content to a vertical. Requires admin, course creator, or course staff.POST /owly-courses/content/problemAdd problems/exercises to a vertical using XML. Requires admin, course creator, or course staff.POST /owly-courses/content/problem/createCreate a problem component with structured data (e.g., multiple choice). Requires admin, course creator, or course staff.POST /owly-courses/content/discussionAdd discussion components to a vertical. Requires admin, course creator, or course staff.POST /owly-courses/content/publishPublish a course or course component (unit, subsection, etc.). Requires admin or course staff.POST /owly-courses/xblock/deleteDelete an XBlock component from a course. Requires admin or course staff.POST /owly-courses/settings/updateUpdate general course settings (dates, details, etc.). Requires admin or course staff.POST /owly-courses/settings/advancedUpdate advanced course settings. Requires admin or course staff.POST /owly-courses/certificates/configureConfigure or activate/deactivate course certificates. Requires admin or course staff.POST /owly-courses/units/availability/controlControl unit availability and due dates. Requires admin or course staff.
POST /owly-courses/staff/manageAdd or remove a user from a course staff role (stafforcourse_creator). Requires admin or course staff.GET /owly-courses/staff/list?course_id=<course-key>List users with staff roles for a given course. Requires admin or course staff.
ViewSet: openedx_owly_apis/views/roles.py
Requires: Authenticated user.
GET /owly-roles/me?course_id=<course-key>&org=<org-key>Returns the effective role of the authenticated user, including flags for:superadmin(Django superuser or global staff)course_staff(instructor/staff/limited_staff for given course)course_creator(global or org-specific according to platform settings)authenticated
- Authentication classes: JWT (
JwtAuthentication), Bearer (BearerAuthentication), Session. - Permissions:
- Analytics:
IsAdminOrCourseStaff - Courses: action-specific guards such as
IsAdminOrCourseCreator,IsAdminOrCourseCreatorOrCourseStaff,IsAdminOrCourseStaff - Roles:
IsAuthenticated
- Analytics:
- Source paths of interest:
- Views:
openedx_owly_apis/views/ - Operations logic:
openedx_owly_apis/operations/ - URL routing:
openedx_owly_apis/urls.py
- Views:
AGPL-3.0. See LICENSE.txt.