Changing the Canvas_Course_ID using API

Jump to solution
mvogt1
Community Participant

Has anyone had any success changing the course ID that appears in the URL to a different course ID? One of our Catalog courses got reset and now the catalog listing is broken. We could create a new listing and course, but we had 30 students already enrolled in the current listing, however, since the course reset also changes the course ID number to a new value, the existing listing in Canvas is now tied to a course URL that no longer exists. 

Instructure Support said we could change it using an API PUT call, but I have tried a number of variations on the below PUT call they sent over and none of them have been successful in changing the ID. Using Postman, I have successfully changed the course name using PUT calls, but the ID seems to either not be editable or requires some additional command.

https://**********.test.instructure.com/api/v1/courses/3968?course[id]=9781

Any ideas?

Thanks!

Labels (1)
1 Solution
jsavage2
Community Contributor

 @mvogt1 ‌,

Also, just to clarify: you need to use the Catalog API and hit the endpoint for the catalog course, not the Canvas API endpoint for the canvas course:

https://<your-catalog-url>/api/v1/courses/<catalog_course_id>?course[canvas_course_id]=9781

You're not changing the url of the Canvas course, you're pointing Catalog at the course you want. If you now have two courses with enrollments that you need to combine, you can crosslist to bring the enrollments from the new/wrong course into the old/correct course...or vice versa...

View solution in original post