AnsweredAssumed Answered

API - Set a students enrollment to 'inactive'

Question asked by Jeremiah Ellington on Aug 15, 2018
Latest reply on Aug 15, 2018 by Jeremiah Ellington



I'm attempting to 'drop' students from courses through the Canvas API. Currently when I run my drop php code the student is marked as 'Completed' but I would like to set the student as 'Inactive'.


I'm trying to follow the documentation for Conclude, deactivate, or delete an enrollment and pass the inactivate task. I believe the GUI option for this is 'Deactivate'.


Enrollments - Canvas LMS REST API Documentation 


$response = $client->request('DELETE', 'api/v1/courses/'.$course_id.'/enrollments/'.$enrollment_id ,

                                        'headers' => $headers,
                                        'body' => json_encode($enroll_array),


I'm not sure i'm reading the Docs correctly on how to provide the 'task' for this endpoint. The json body looks like this:



Thank you for your assistance!


Jeremiah Ellington

Holy Names University