AnsweredAssumed Answered

How do I move a course to a different term using the API?

Question asked by Parsa Nikpour ITS Admin on Oct 27, 2016
Latest reply on Aug 13, 2017 by Peter Love

I have been reading up on how to use the PUT method, and have been wanting to automate making bulk changes to courses. When constructing my web request (I am using PowerShell for this) I run said request, but the term attribute does not change for the course, despite the return block stating it went through. I refresh the course and see it is in the same term it was before.

Is there something I am missing? Any help is greatly appreciated. Many thanks.

The command I am using is:

invoke-webrequest "https://<canvas_instance>/api/v1/courses/:course_id" -method put -headers @{"Authorization" = "Bearer $auth"} -body `
  @{"course[term_id]"=:destination_term}

Outcomes