Bulk Deletion of Sections from Courses in Brightspace (via API or Other Method)

What is the recommended and secure way to bulk delete sections from both current and historical courses in Brightspace? Is there a supported method using the Brightspace API or another automated approach for managing this at scale?
Any guidance, best practices, or documentation would be greatly appreciated.
Best Answer
-
Hello, Kabir, how are you?
Sounds good, thank you for the additional information and the clarification.
The Organisational Units Brightspace data set has the Section ID of every Section in your organization. The value under the "OrgUnitId" column is actually the Section ID for the Section in question. You can also filter the third column ("Type") to show only Sections and that will also help you find the necessary Section IDs.
I hope you have found this information to be useful. Should you have any additional questions, please, let us know and we will be more than glad to further assist you, okay?
Thank you kindly,
Piero de Sá
Bilingual Product Support Analyst
Answers
-
Hi Kabir👋,
Thank you for reaching out to Community with your question regarding bulk section deletion.
The recommended approach would always depend on your organization's specific configuration. For example, if your institution manages Org Units and course sections via IPSIS, it is preferable to delete those sections through your SIS to maintain consistency.
Another option to consider is the Data Purge tool, which is currently the only built-in functionality within Brightspace that allows for the bulk deletion of Org Units. You can learn more about it here: About Data Purge.
Alternatively, if you're comfortable using the API, there is an endpoint specifically designed for deleting sections, which can be automated with a list of Section IDs to perform the deletion in bulk:
- DELETE /d2l/api/lp/(version)/(orgUnitId)/sections/(sectionId)
This call deletes a section from the specified Org Unit. You can find more details in the Brightspace API documentation: Delete Section API Reference.
Please don't hesitate to reach out if you have any additional questions.
-Isidora
-
Thanks, Isidora.
I realise I should have included a bit more detail in my original question to help clarify what I was looking for. Yes, I'm aware of the DELETE API call available to remove sections, provided I have the Section IDs for each course.
However, aside from the Advanced Data Set (ADS), I haven’t found any other dataset that includes the Section ID linked to the Org Unit, which I could use in my API calls to bulk delete sections from both current and historical courses.
Do you have any suggestions or workarounds for retrieving Section IDs in bulk for this purpose?
Best regards,
Kabir
-
Thanks, Piero de Sá.