API request to get a full list of students

Jump to solution
kj460
Community Novice

Hi,

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
robotcars
Community Champion

What language?

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

// jquery
$.ajax({
     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