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've been testing course creation/deletion via API. So far so good, except when I attempt to assign a value to the sis_course_id that was used for a course that I previously created/deleted.
What is the best way to overcome this hurdle?
Solved! Go to Solution.
Hi shawn,
Even though you are calling the delete course api, you're not actually deleting the course, Canvas simply marks the course as delete and hides it from you being able to view or search for it through the gui. This is done so that if you delete a course accidentally, you're able to use the restore course feature to retrieve the course and mark it active again.
Unless you're changing or removing the #sis_course_id prior to marking the course as deleted you're not going to be able to reuse the same #sis_course_id again.
Hope this helps.
Hi shawn,
Even though you are calling the delete course api, you're not actually deleting the course, Canvas simply marks the course as delete and hides it from you being able to view or search for it through the gui. This is done so that if you delete a course accidentally, you're able to use the restore course feature to retrieve the course and mark it active again.
Unless you're changing or removing the #sis_course_id prior to marking the course as deleted you're not going to be able to reuse the same #sis_course_id again.
Hope this helps.
Thanks for the feedback, Brian.
Can the attribute of a deleted course be modified?
Or can a deleted course be restored long enough to modify the attribute, before deleting the course again?
Hi shawn,
You can restore a course using the restore courses feature in Canvas (https://community.canvaslms.com/docs/DOC-10861-4214106683 ) and once restored you can go into the course and modify the #sis_course_id. Or if you're just testing #api calls I would recommend just using a generic #sis_course_id (ex. test1, test2) until you're ready truly use your code to push courses into Canvas for production.
Exactly what I needed.
Thanks again, Brian!
Hi Brian - I just ran into this issue as well.
It would be helpful for the API to respond with a more clear message than that the `sis_id` 'is already in use' - if the sis_id is attached to a 'deleted' course - wouldn't it not be 'in use' ?
Additionally - using an API GET request with sis_id on the same deleted course returns 'The specified resource does not exist' - but this is also factually incorrect. The course does exist, but is 'deleted'. This response could also be made more clear.
With this combination, it's very difficult to determine why a course with a duplicate sis_id is failing to be created, when the API returns contrasting messages: it's in use, but also does not exist.
Thanks for any improvements here
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