Canvas API course sections does not return students when included

lars-uva
Community Member

Hi there,

I am trying to get a list of all the students in all the sections connected to a course using the Canvas API. However, I cant seem to workout how the 'include[]' param should work. When using the following bash command:

 

curl http://canvas.docker/api/v1/courses/1/sections\?include\[\]\=students -H "Authorization: Bearer ACCESS_TOKEN"

 

I only get a list with the keys shown in the screenshot.

lars-uva_0-1599038640344.png

Also when trying other include[] values stated in https://canvas.instructure.com/doc/api/sections.html#method.sections.index, nothing seems to get me more information. The access token is taken from the admin account and there is a student connected to the section. What could I be doing wrong?

 

Thank you in advance.

Labels (1)
0 Likes