[ARCHIVED] Changing a course description, for example, not working

Jump to solution
jpgorrono
Community Novice

I am able to get the course information via a cUrl call to

https://ourcampus.instructure.com/api/v1/courses/sis_course_id:jonstest1

However the 'public_description' is not in that returned document as this says it should: Courses - Canvas LMS REST API Documentation

I have a description in the 'Description box' in Settings for the course.

Also, if I try to change that value:

curl https:/ourcampus.instructure.com/api/v1/courses/sis_course_id:jonstest1 -d 'course[public_description]=This is the new descripton' -X PUT -H 'Authorization: Bearer REDACTED'

I get

{"errors":[{"message":"The specified resource does not exist."}],"error_report_id":(a number)}

( also tried with the internal course id: same result)

Do I have to include all the course properties in the update as if I were creating a new course? And if so, how do I update only one of them, if all of them are not returned by a get, without having an indedendent record of the values?

Thanks for reading

Labels (2)
1 Solution
jpgorrono
Community Novice
Author

Answering my own question once again. 😕

1) despite the implication of not having 'optional' in comments next it it in the Course object description, public_description needs to be explicitly requested in the GET call by adding the parameter key-value pair: include[]=public_description

2) once again I hit the wrong server for the PUT.... description gets updated just fine.

View solution in original post