I am having trouble with the API editing an assignment. I can create an assignment without any trouble by posting
this message
{assignment:{
name:`${name}`,
submission_type:'online_url',
points_possible:...,
published:...,
due_at:...
}}
to `https://${url}/api/v1/courses/${course_id}/assignments`;
I get back an assignment object and one of the fields is an integer labeled "id". I can check in canvas and the assignment is successfully created. However I can't edit, based on the documentation I've be trying to "PUT" a request e.g.
{assignment:{
name:`${newname}`,
}}
to `https://${url}/api/v1/courses/${course_id}/assignments/${assignment_id}`;
where assignment_id is the "id" I got back from the creation request.
When I do this I get the following response
{ errors: [ { message: 'assignment is missing' } ] }
Any ideas what I'm doing wrong? Thanks!