Canvas API course sections does not return students when included
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-02-2020
03:32 AM
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.
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.
This discussion post is outdated and has been archived. Please use the Community question forums and official documentation for the most current and accurate information.