REST API to Delete User returns error
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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