Get a list of active only sections in a course

joshkraemer
Community Member

Hi- We're trying to pull a list of active sections for a course through the API. https://canvas.instructure.com/doc/api/sections.html#Section 

Canvas is returning all sections for the course, even the deleted ones. But the section object returned doesn't tell us if the section has been deleted. Is there a way to exclude the deleted sections?

The only way this seems possible is to rely on the Canvas data stream (https://community.canvaslms.com/t5/Admin-Guide/How-do-I-subscribe-to-Live-Events-using-Canvas-Data-S...) which tells us if a section was deleted. But then we have to maintain a list of all sections that were deleted for a course outside of Canvas every time we pull the list of sections.

0 Likes