Register & Enrolling Students API

I have found some code to register and enroll a student using a .csv list. The location is at:

lms/djangoapps/instructor/views/api.py

The function I want to use is:

def register_and_enroll_students (request, course_id)

I was wondering how to use this function? Is there a location on the lms panel?
Any advice would be greatly appreciated.

@JavaMatt, this API is exposed via the instructor application urls configuration. This is incorporated in the instructor app configuration..

The final URL you’d want to use is like so: https://your.lms.url/courses/course-v1:edX+DemoX+Demo_Course/instructor/api/register_and_enroll_students

1 Like

Thank you for the response!

I was able to enable the functionality by adding ‘ALLOW_AUTOMATED_SIGNUPS’ = True; in features on lms.env.json and under common.py. When enabled it shows a section in the membership tab of the instructor dashboard to allow an upload of a CSV file that contains a list of new accounts to create and register for course.