canvas enrollments list
canvas enrollments list¶
List enrollments
Synopsis¶
List enrollments in a course or for a user.
You must specify one of --course-id or --user-id to indicate the context.
Course context: canvas enrollments list --course-id 123 # All enrollments in course canvas enrollments list --course-id 123 --type StudentEnrollment canvas enrollments list --course-id 123 --state active
User context: canvas enrollments list --user-id 456 # All enrollments for user canvas enrollments list --user-id 456 --state active
Examples:
canvas enrollments list --course-id 123
canvas enrollments list --user-id 456
canvas enrollments list --course-id 123 --type TeacherEnrollment
canvas enrollments list --course-id 123 --state active,invited
canvas enrollments list --user-id 456 --include current_points
Options¶
--course-id int Course ID (for course enrollments)
-h, --help help for list
--include strings Additional data to include (avatar_url, group_ids, locked, observed_users, can_be_removed, uuid, current_points)
--state strings Filter by enrollment state (active, invited, creation_pending, deleted, rejected, completed, inactive)
--type strings Filter by enrollment type (StudentEnrollment, TeacherEnrollment, TaEnrollment, ObserverEnrollment, DesignerEnrollment)
--user-id int User ID (for user enrollments)
Options inherited from parent commands¶
--as-user int Masquerade as another user (admin feature, requires permission)
--columns strings Select specific columns to display (comma-separated)
--config string config file (default is $HOME/.canvas-cli/config.yaml)
--dry-run Print curl commands instead of executing requests
--filter string Filter results by text (case-insensitive substring match)
--instance string Canvas instance URL (overrides config)
--limit int Limit number of results for list operations (0 = unlimited)
--no-cache Disable caching of API responses
-o, --output string Output format: table, json, yaml, csv (default "table")
--show-token Show actual token in dry-run output (default: redacted)
--sort string Sort results by field (prefix with - for descending, e.g., -name)
-v, --verbose Enable verbose output
SEE ALSO¶
- canvas enrollments - Manage Canvas enrollments