cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
BartoszPrzybysz
Community Member

Unresponsive API endpoint

Jump to solution

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 Kudos
1 Solution

Accepted Solutions
BartoszPrzybysz
Community Member

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 Kudos
1 Reply
BartoszPrzybysz
Community Member

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 Kudos