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!
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.
Hi @joshkraemer,
I'm not able to reproduce this issue in my institution's Canvas instance. If I run the sections API, it's only returning active sections, with no way to return deleted ones that I see. I tried creating a new section, running the API to see it, then deleting that section, and re-running the API again and the section was indeed not returned for that last API call.
Is it possible that your API calls are getting cached or something? I'm fairly certain that API has only ever returned active sections, so something seems very weird here.
-Chris
-Chris
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