REST API to Delete User returns error

Jump to solution
talway
Community Contributor

I am trying to configure the following API to delete users from a course:  https://[my domain]:443/api/v1/courses/[courseid]/enrollments/[userid]?task=delete.  I am testing it on the TEST site by using both PostMan and the Canvas LIVE API.  However, regardless of which on that I use, I get the following message:  {"errors":[{"message":"The specified resource does not exist."}]}.  I have confirmed that the course ID, User ID are correct.  The authorization token is creating using an admin account.  What am I missing?

Thank you.

Labels (1)
0 Likes
1 Solution
JeffW
Instructure Alumni
Instructure Alumni

Hi @talway!

I believe the issue there is you need the enrollment_id, not the user_id.

 https://[my domain]:443/api/v1/courses/[courseid]/enrollments/[enrollmentid]?task=delete

 

I snagged the attached image from the API documentation here - https://canvas.instructure.com/doc/api/enrollments.html

View solution in original post

0 Likes