Community

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
saelterman
New Member

Retrieving users in course with email does not work

Jump to solution

I have the following (relative) URL to retrieve students from a course and include their email address. The student users are returned, but the email attribute is missing from the JSON. I may be using the include parameter incorrectly, but I can't think of another way to do it.

courses/sis_course_id:341466/users?enrollment_type=student&include=email&per_page=40

Thanks for any help.

Labels (1)
1 Solution

Accepted Solutions
MattHanes
Community Champion

You were very close! It should be like this with square brackets after include:

courses/sis_course_id:341466/users?enrollment_type=student&include[]=email&per_page=40

View solution in original post

3 Replies
MattHanes
Community Champion

You were very close! It should be like this with square brackets after include:

courses/sis_course_id:341466/users?enrollment_type=student&include[]=email&per_page=40

Thanks Matt! This was indeed the issue. Sorry for the late reply, it took me a while to get back to this project.

Always happy to help my local higher ed institutions! I like to encourage my teachers to use Canvas by listing all the nearby colleges and universities that use Canvas too. Troy is always in my list!