Change course_code through Canvas API - not updating?

Jump to solution
cdeville
Community Participant

I am using the Update a Course API to attempt to update a course_code (the course's shortname).

https://canvas.beta.instructure.com/doc/api/courses.html#method.courses.update

Using Postman, it builds this request (I am using PUT as specified):
https://uccs.instructure.com/api/v1/courses/:id?course_code='New course code set by API'

There are no errors returned, but the course code does not change either. It returns the course object - no changes.

Anyone been able to get anything under update a course to work? I tried some other fields but they don't update either.

Labels (1)
0 Likes
1 Solution
BrianLester
Community Contributor

Something like this works for me:

https://yourschool.instructure.com/api/v1/courses/id?&course[course_code]=SampleNewCourseCode

Note: the sample course code is not in quotes.

You could try running your script in the Canvas Live API before postman...

View solution in original post