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?
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?
You can restore a course using the restore courses feature in Canvas (How do I restore a deleted course in an account? ) 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!
Retrieving data ...