[ARCHIVED] Unresponsive API endpoint
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi all!
I am currently maintaining an LTI application that toggles the publish status of Canvas courses.
Recently we've started having an issue with the API endpoint for updating course info (PUT /api/v1/courses/:id). When attempting to unpublish a course, we send a PUT request to this endpoint with the following JSON body: {"course[event]": "claim"}. A status 200 is then returned but the "workflow_state" attribute of the course remains unchanged at "available" and the course remains published in Canvas.
While troubleshooting this issue, we have discovered that the endpoint does not appear to make any changes to our course. When the same request is made with the content {"course[name]": "New Name"}, again, a status 200 is returned but no change is made.
The issue has only been reported today but we have been using this endpoint with expected results for more than a year. Have any changes been made to the API recently that could explain this issue?
Thanks,
Bartosz
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I was able to resolve the issue with the help of Canvas Support. The solution is to change the body format to look like this:
{
"course": {
"event": "claim"
}
}
This discussion post is outdated and has been archived. Please use the Community question forums and official documentation for the most current and accurate information.