[ARCHIVED] Unresponsive API endpoint

Jump to solution
BartoszPrzybysz
Community Member

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

Labels (2)
0 Likes
1 Solution
BartoszPrzybysz
Community Member
Author

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"
    }
}

View solution in original post

0 Likes