[API] Update Courses API to Allow More User Enrollment States
For academic programs I help manage, we use the API to pull in a list of students in specific courses and format the data into a useable format. While I'm currently using Enrollments (https://canvas.instructure.com/doc/api/enrollments.html#method.enrollments_api.index) to create the list of students, there are some inefficacies in using that.
First, I need email addresses for each student but this can't be accessed in Enrollments - so I have to make additional API requests with the user's ID to get the email address.
Second, Enrollments returns the same user if they are enrolled in more than one section, so for some classes this is problematic since I only want the list of users and this effectively creates duplicate entries. While I'd like to use Users (https://canvas.instructure.com/doc/api/courses.html#method.courses.users) to accomplish what I'm looking to do, I'm currently not able to do that because some users have an enrollment state of "deleted" which is not an available enrollment state option under courses/users.
Enrollments (https://canvas.instructure.com/doc/api/enrollments.html#method.enrollments_api.index) and Course Users (https://canvas.instructure.com/doc/api/courses.html#method.courses.users) both include an option to select enrollment state. I would like to see the Allowed values for both to match.
If this is not an option, then at a minimum, it'd be nice to have Course Users allow the value of "deleted" for enrollment state. This would help solve both of my issues, having access to a complete list of users on a class, along with getting the email address more efficiently. For our program, we manage about 40 courses per term with about 30 students per course. Using Enrollments and having to also make an additional request to get email addresses, I have to make over 1,200 API requests in a short period of time to get a complete list as I need it. This could be reduced to 40 if I can use Course Users since email address is accessible there. Alternatively, email address could be added to Enrollments. I think this was there several years ago but was removed for some reason - and now I can't find the documentation on that but I think I read that several years ago.
admin