canvas_list_enrollments
List course enrollments to get the enrollment_id required for modifying or removing a user. Use this before changing enrollment records to avoid targeting the wrong user or receiving a 404.
Instructions
List enrollments, including the enrollment_id needed to change one.
canvas_list_students returns users; removing or modifying somebody needs the enrollment id, which is a different number. Fetch it here first — passing a user id to canvas_remove_enrollment silently targets the wrong record or 404s.
Args: course_id: numeric course id; defaults to CANVAS_DEFAULT_COURSE_ID. role: StudentEnrollment, TeacherEnrollment, TaEnrollment, ObserverEnrollment, DesignerEnrollment. Empty for all. state: active, invited, concluded, completed, inactive. Empty for all.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| role | No | ||
| state | No | active | |
| course_id | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |