API request to get a full list of students

Jump to solution
Community Novice


What would be the most efficient way to get the list of students (users with enrollment type = 'StudentEnrollment') from a course object?

Thank you

1 Solution
Community Champion

What language?

List users in course - Courses - Canvas LMS REST API Documentation 

// jquery
     url: '/api/v1/courses/:course_id/users',
     method: 'GET',
     data: {
          enrollment_role: 'StudentEnrollment',
          per_page: 100
}).done(function(r, x, s) { console.log(r) })‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

View solution in original post