The Instructure Community will enter a read-only state on November 22, 2025 as we prepare to migrate to our new Community platform in early December. Read our blog post for more info about this change.
Found this content helpful? Log in or sign up to leave a like!
I'm making this GET call and including the students and enrollments values - the API docs suggest this should "return the section enrollment for each student" see here: Sections - Canvas LMS REST API Documentation
This is the GET call I'm making:
https://XXX.instructure.com/api/v1/sections/sis_section_id:XXX?include[]=students&include[]=enrollments
and this is the response I get:
{
"errors": [
{
"message": "An error occurred.",
"error_code": "internal_server_error"
}
],
"error_report_id": XXX
}
...am I misinterpreting something, or is this a glitch?
Maybe try /api/v1/courses/sis_course_id:XXX/sections?include[]=students&include[]=enrollments
This would give you the students in the copurse along with their sections
https://canvas.instructure.com/doc/api/sections.html
"enrollments": If 'students' is also included, return the section enrollment for each student
or /api/v1/sections/sis_section_id:XXX?include[]=students
Since you already have the section, you just need the students
Thanks for these Andrea!
Interestingly this one ran fine and returned the expected data:
/api/v1/courses/sis_course_id:XXX/sections?include[]=students&include[]=enrollments
but the second one returned the same 500 error:
or /api/v1/sections/sis_section_id:XXX?include[]=students
There is something about 'students' in the get section information call that is just not happy! ![]()
One other thing to try is
/api/v1/sections/sis_section_id:XXX?include%5B%5D=students
Also, try your call in the browser when you're logged in and see if it returns anything.
I have calls that I have been making for the last couple of years and all of a sudden the [] do no work in the call anymore. The API has gotten a little finicky lately.
Also, if you're executing it from the front end, make sure that the role of the user who is executing the call has access to view/etc the sections.
Community helpTo interact with Panda Bot, our automated chatbot, you need to sign up or log in:
Sign inTo interact with Panda Bot, our automated chatbot, you need to sign up or log in:
Sign in