Course
- class canvasapi.course.Course(requester, attributes)
- Parameters:
requester (
canvasapi.requester.Requester) – The requester to pass HTTP requests through.attributes (dict) – The JSON object to build this object with.
- add_grading_standards(title, grading_scheme_entry, **kwargs)
Create a new grading standard for the course.
- Calls:
- Parameters:
title (str) – The title for the Grading Standard
grading_scheme (list of dict) – A list of dictionaries containing keys for “name” and “value”
- Return type:
canvasapi.grading_standards.GradingStandard
- column_data_bulk_update(column_data, **kwargs)
Set the content of custom columns.
- Calls:
- Parameters:
column_data (list) – Content to put into the column
- Return type:
- conclude(**kwargs)
Mark this course as concluded.
- Calls:
- Returns:
True if the course was concluded, False otherwise.
- Return type:
bool
- create_assignment(assignment, **kwargs)
Create a new assignment for this course.
Note: The assignment is created in the active state.
- Calls:
- Parameters:
assignment (dict) – The attributes of the assignment
- Return type:
- create_assignment_group(**kwargs)
Create a new assignment group for this course.
- create_assignment_overrides(assignment_overrides, **kwargs)
Create the specified overrides for each assignment.
- Calls:
- Parameters:
assignment_overrides (list) – Attributes for the new assignment overrides.
- Return type:
canvasapi.paginated_list.PaginatedListofcanvasapi.assignment.AssignmentOverride
- create_content_migration(migration_type, **kwargs)
Create a content migration.
- Calls:
- Parameters:
migration_type (str or
canvasapi.content_migration.Migrator) – The migrator type to use in this migration- Return type:
- create_course_section(**kwargs)
Create a new section for this course.
- Calls:
- Return type:
canvasapi.course.Section
- create_custom_column(column, **kwargs)
Create a custom gradebook column.
- Calls:
- Parameters:
column (dict) – A dictionary representing the Custom Gradebook Column to create
- Return type:
- create_discussion_topic(attachment=None, **kwargs)
Creates a new discussion topic for the course or group.
- Calls:
- Parameters:
attachment (file or str) – (Optional) A file handler or path of the file to import.
- Return type:
- create_epub_export(**kwargs)
Create an ePub export for a course.
- create_external_feed(url, **kwargs)
Create a new external feed for the course.
- Calls:
- Parameters:
url (str) – The url of the external rss or atom feed
- Return type:
canvasapi.external_feed.ExternalFeed
- create_external_tool(**kwargs)
Create an external tool in the current course.
- Calls:
- Parameters:
name (str) – The name of the tool
- Return type:
- create_folder(name, **kwargs)
Creates a folder in this course.
- Calls:
- Parameters:
name (str) – The name of the folder.
- Return type:
- create_group_category(name, **kwargs)
Create a group category.
- Calls:
- Parameters:
name (str) – Name of the category.
- Return type:
- create_late_policy(**kwargs)
Create a late policy. If the course already has a late policy, a bad_request is returned since there can only be one late policy per course.
- Calls:
- Return type:
- create_lti_resource_link(url, title=None, custom=None, **kwargs)
Create a new LTI resource link.
- Calls:
- Parameters:
url (str) – The launch URL for the resource link.
title (str, optional) – The title of the resource link.
custom (dict, optional) – Custom parameters to send to the tool.
- Return type:
- create_module(module, **kwargs)
Create a new module.
- Calls:
- Parameters:
module (dict) – The attributes for the module.
- Returns:
The created module.
- Return type:
- create_new_quiz(**kwargs)
Create a new quiz for the course.
- Calls:
- Returns:
The newly-created New Quiz object
- Return type:
- create_page(wiki_page, **kwargs)
Create a new wiki page.
- Calls:
- Parameters:
wiki_page (dict) – The title for the page.
- Returns:
The created page.
- Return type:
- create_quiz(quiz, **kwargs)
Create a new quiz in this course.
- Calls:
- Parameters:
quiz (dict) – The attributes for the quiz.
- Return type:
- create_rubric(**kwargs)
Create a new rubric.
- Calls:
- Returns:
Returns a dictionary with rubric and rubric association.
- Return type:
dict
- create_rubric_association(**kwargs)
Create a new RubricAssociation.
- Calls:
- Returns:
Returns a RubricAssociation.
- Return type:
- delete(**kwargs)
Permanently delete this course.
- Calls:
- Returns:
True if the course was deleted, False otherwise.
- Return type:
bool
- delete_external_feed(feed, **kwargs)
Deletes the external feed.
- Calls:
DELETE /api/v1/courses/:course_id/external_feeds/:external_feed_id
- Parameters:
feed (
canvasapi.external_feed.ExternalFeedor int) – The object or ID of the feed to be deleted.- Return type:
canvasapi.external_feed.ExternalFeed
- edit_front_page(**kwargs)
Update the title or contents of the front page.
- Calls:
- Return type:
- edit_late_policy(**kwargs)
Patch a late policy. No body is returned upon success.
- Calls:
- Returns:
True if Late Policy was updated successfully. False otherwise.
- Return type:
bool
- enroll_user(user, enrollment_type=None, **kwargs)
Create a new user enrollment for a course or a section.
- Calls:
- Parameters:
user (
canvasapi.user.Useror int) – The object or ID of the user to enroll in this course.enrollment_type (str, optional) – The type of enrollment.
- Return type:
- export_content(export_type, **kwargs)
Begin a content export job for a course.
- Calls:
- Parameters:
export_type (str) – The type of content to export.
- Return type:
- get_all_outcome_links_in_context(**kwargs)
Get all outcome links for context - BETA
- Calls:
- Returns:
Paginated List of OutcomesLinks in the context.
- Return type:
canvasapi.paginated_list.PaginatedListofcanvasapi.outcome.OutcomeLink
- get_assignment(assignment, **kwargs)
Return the assignment with the given ID.
- Calls:
- Parameters:
assignment (
canvasapi.assignment.Assignmentor int) – The object or ID of the assignment to retrieve.- Return type:
- get_assignment_group(assignment_group, **kwargs)
Retrieve specified assignment group for the specified course.
- Calls:
GET /api/v1/courses/:course_id/assignment_groups/:assignment_group_id
- Parameters:
assignment_group (
canvasapi.assignment.AssignmentGroupor int) – object or ID of assignment group.- Return type:
- get_assignment_groups(**kwargs)
List assignment groups for the specified course.
- get_assignment_overrides(assignment_overrides, **kwargs)
- List the specified overrides in this course, providing they target
sections/groups/students visible to the current user.
- get_assignments(**kwargs)
List all of the assignments in this course.
- get_assignments_for_group(assignment_group, **kwargs)
Returns a paginated list of assignments for the given assignment group
- Calls:
GET /api/v1/courses/:course_id/assignment_groups/:assignment_group_id/assignments
- Parameters:
assignment_group – The object or id of the assignment group
- Return type:
canvasapi.paginated_list.PaginatedListofcanvasapi.assignment.Assignment
- get_blueprint(template='default', **kwargs)
Return the blueprint of a given ID.
- Calls:
GET /api/v1/courses/:course_id/blueprint_templates/:template_id
- Parameters:
template (int or
canvasapi.blueprint.BlueprintTemplate) – The object or ID of the blueprint template to get.- Return type:
- get_collaborations(**kwargs)
Return a list of collaborations for a given course ID.
- Calls:
- Return type:
- get_content_export(content_export, **kwargs)
Return information about a single content export.
- Calls:
- Parameters:
content_export (int or
canvasapi.content_export.ContentExport) – The object or ID of the content export to show.- Return type:
- get_content_exports(**kwargs)
Return a paginated list of the past and pending content export jobs for a course.
- get_content_migration(content_migration, **kwargs)
Retrive a content migration by its ID
- Calls:
- Parameters:
content_migration (int, str or
canvasapi.content_migration.ContentMigration) – The object or ID of the content migration to retrieve.- Return type:
- get_content_migrations(**kwargs)
List content migrations that the current account can view or manage.
- get_course_level_assignment_data(**kwargs)
Return a list of assignments for the course sorted by due date
- Calls:
- Return type:
dict
- get_course_level_participation_data(**kwargs)
Return page view hits and participation numbers grouped by day through the course’s history
- Calls:
- Return type:
dict
- get_course_level_student_summary_data(**kwargs)
Return a summary of per-user access information for all students in a course
- get_custom_columns(**kwargs)
List of all the custom gradebook columns for a course.
- get_discussion_topic(topic, **kwargs)
Return data on an individual discussion topic.
- Calls:
- Parameters:
topic (
canvasapi.discussion_topic.DiscussionTopicor int) – The object or ID of the discussion topic.- Return type:
- get_discussion_topics(**kwargs)
Returns the paginated list of discussion topics for this course or group.
- get_enabled_features(**kwargs)
Lists all enabled features in a course.
- Calls:
- Return type:
list of str
- get_enrollments(**kwargs)
List all of the enrollments in this course.
- get_epub_export(epub, **kwargs)
Get information about a single epub export.
- Calls:
- Parameters:
epub (int or
canvasapi.course_epub_export.CourseEpubExport) – Object or ID of ePub Export- Return type:
- get_external_feeds(**kwargs)
Returns the list of External Feeds this course.
- Calls:
- Return type:
canvasapi.paginated_list.PaginatedListofcanvasapi.external_feed.ExternalFeed
- get_external_tool(tool, **kwargs)
- Calls:
GET /api/v1/courses/:course_id/external_tools/:external_tool_id
- Parameters:
tool (
canvasapi.external_tool.ExternalToolor int) – The object or ID of the tool to retrieve.- Return type:
- get_external_tools(**kwargs)
- get_feature_flag(feature, **kwargs)
Return the feature flag that applies to given course.
- Calls:
- Parameters:
feature (
canvasapi.feature.Featureor str) – The feature object or name of the feature to retrieve.- Return type:
- get_features(**kwargs)
Lists all features of a course.
- get_file(file, **kwargs)
Return the standard attachment json object for a file.
- Calls:
- Parameters:
file (
canvasapi.file.Fileor int) – The object or ID of the file to retrieve.- Return type:
- get_file_quota(**kwargs)
Returns the total and used storage quota for the course.
- Calls:
- Return type:
dict
- get_files(**kwargs)
Returns the paginated list of files for the course.
- Calls:
- Return type:
canvasapi.paginated_list.PaginatedListofcanvasapi.file.File
- get_folder(folder, **kwargs)
Returns the details for a course folder
- Calls:
- Parameters:
folder (
canvasapi.folder.Folderor int) – The object or ID of the folder to retrieve.- Return type:
- get_folders(**kwargs)
Returns the paginated list of all folders for the given course. This will be returned as a flat list containing all subfolders as well.
- Calls:
- Return type:
canvasapi.paginated_list.PaginatedListofcanvasapi.folder.Folder
- get_full_discussion_topic(topic, **kwargs)
Return a cached structure of the discussion topic.
- Calls:
GET /api/v1/courses/:course_id/discussion_topics/:topic_id/view
- Parameters:
topic (
canvasapi.discussion_topic.DiscussionTopicor int) – The object or ID of the discussion topic.- Return type:
dict
- get_grade_change_events(**kwargs)
Returns the grade change events for the course.
- get_gradebook_history_dates(**kwargs)
Returns a map of dates to grader/assignment groups
- Calls:
- Return type:
canvasapi.paginated_list.PaginatedListofcanvasapi.grading_history.Day
- get_gradebook_history_details(date, **kwargs)
Returns the graders who worked on this day, along with the assignments they worked on. More details can be obtained by selecting a grader and assignment and calling the ‘submissions’ api endpoint for a given date.
- Calls:
- Parameters:
date (int) – The date for which you would like to see detailed information.
- Return type:
canvasapi.paginated_list.PaginatedListofcanvasapi.gradebook_history.Grader
- get_grading_period(grading_period, **kwargs)
Return a single grading period for the associated course and id.
- Calls:
- Parameters:
grading_period_id (int) – The ID of the rubric.
- Return type:
- get_grading_periods(**kwargs)
Return a list of grading periods for the associated course.
- get_grading_standards(**kwargs)
Get a PaginatedList of the grading standards available for the course
- Calls:
- Return type:
canvasapi.paginated_list.PaginatedListofcanvasapi.grading_standards.GradingStandard
- get_group_categories(**kwargs)
List group categories for a context.
- get_groups(**kwargs)
Return list of active groups for the specified course.
- Calls:
- Return type:
canvasapi.paginated_list.PaginatedListofcanvasapi.course.Course
- get_late_policy(**kwargs)
Returns the late policy for a course.
- Calls:
- Return type:
- get_licenses(**kwargs)
Returns a paginated list of the licenses that can be applied to the files under the course scope
- get_lti_resource_link(lti_resource_link, **kwargs)
Return details about the specified resource link.
- Calls:
- Parameters:
lti_resource_link (
canvasapi.lti_resource_link.LTIResourceLinkor int) – The object or ID of the LTI resource link.- Return type:
- get_lti_resource_links(**kwargs)
Returns all LTI resource links for this course as a PaginatedList.
- get_migration_systems(**kwargs)
Return a list of migration systems.
- get_module(module, **kwargs)
Retrieve a single module by ID.
- Calls:
- Parameters:
module (
canvasapi.module.Moduleor int) – The object or ID of the module to retrieve.- Return type:
- get_modules(**kwargs)
Return a list of modules in this course.
- Calls:
- Return type:
canvasapi.paginated_list.PaginatedListofcanvasapi.module.Module
- get_multiple_submissions(**kwargs)
List submissions for multiple assignments. Get all existing submissions for a given set of students and assignments.
- get_new_quiz(assignment, **kwargs)
Get details about a single new quiz.
- Calls:
- Parameters:
assignment (
canvasapi.assignment.Assignmentorcanvasapi.new_quiz.NewQuizor int) – The id of the assignment associated with the quiz.- Returns:
A New Quiz object.
- Return type:
- get_new_quizzes(**kwargs)
Get a list of new quizzes in this course.
- Calls:
- Returns:
A paginated list of New Quiz objects.
- Return type:
canvasapi.paginated_list.PaginatedListofcanvasapi.new_quiz.NewQuiz
- get_outcome_group(group, **kwargs)
Returns the details of the Outcome Group with the given id.
- Calls:
- Parameters:
group (
canvasapi.outcome.OutcomeGroupor int) – The outcome group object or ID to return.- Returns:
An outcome group object.
- Return type:
- get_outcome_groups_in_context(**kwargs)
Get all outcome groups for context - BETA
- Calls:
- Returns:
Paginated List of OutcomesGroups in the context.
- Return type:
canvasapi.paginated_list.PaginatedListofcanvasapi.outcome.OutcomeGroups
- get_outcome_import_status(outcome_import, **kwargs)
Get the status of an already created Outcome import. Pass ‘latest’ for the outcome import id for the latest import.
- Calls:
- Parameters:
outcome_import (
canvasapi.outcome_import.OutcomeImport, int, or string: “latest”) – The outcome import object or ID to get the status of.- Return type:
- get_outcome_result_rollups(**kwargs)
Get all outcome result rollups for context - BETA
- Calls:
- Returns:
List of outcome result rollups in the context.
- Return type:
dict
- get_outcome_results(**kwargs)
Get all outcome results for context - BETA
- get_page(url, **kwargs)
Retrieve the contents of a wiki page.
- Calls:
- Parameters:
url (str) – The url for the page.
- Returns:
The specified page.
- Return type:
- get_pages(**kwargs)
List the wiki pages associated with a course.
- Calls:
- Return type:
canvasapi.paginated_list.PaginatedListofcanvasapi.page.Page
- get_quiz(quiz, **kwargs)
Return the quiz with the given id.
- Calls:
- Parameters:
quiz (
canvasapi.quiz.Quizor int) – The object or ID of the quiz to retrieve.- Return type:
- get_quiz_overrides(**kwargs)
Retrieve the actual due-at, unlock-at, and available-at dates for quizzes based on the assignment overrides active for the current API user.
- get_quizzes(**kwargs)
Return a list of quizzes belonging to this course.
- Calls:
- Return type:
canvasapi.paginated_list.PaginatedListofcanvasapi.quiz.Quiz
- get_recent_students(**kwargs)
Return a list of students in the course ordered by how recently they have logged in.
- get_root_outcome_group(**kwargs)
Redirect to root outcome group for context
- Calls:
- Returns:
The OutcomeGroup of the context.
- Return type:
- get_rubric(rubric_id, **kwargs)
Get a single rubric, based on rubric id.
- Calls:
- Parameters:
rubric_id (int) – The ID of the rubric.
- Return type:
- get_rubrics(**kwargs)
Get the paginated list of active rubrics for the current course.
- Calls:
- Return type:
canvasapi.paginated_list.PaginatedListofcanvasapi.rubric.Rubric
- get_section(section, **kwargs)
Retrieve a section.
- Calls:
- Parameters:
section (
canvasapi.section.Sectionor int) – The object or ID of the section to retrieve.- Return type:
- get_sections(**kwargs)
List all sections in a course.
- get_settings(**kwargs)
Returns this course’s settings.
- Calls:
- Return type:
dict
- get_single_grading_standard(grading_standard_id, **kwargs)
Get a single grading standard from the course.
- Calls:
GET /api/v1/courses/:course_id/grading_standards/:grading_standard_id
- Parameters:
grading_standard_id (int) – The grading standard id
- Return type:
canvasapi.grading_standards.GradingStandard
- get_submission_history(date, grader_id, assignment_id, **kwargs)
Gives a nested list of submission versions.
- Calls:
- Parameters:
date – The date for which you would like to see submissions
grader_id (int) – The ID of the grader for which you want to see submissions.
assignment_id (int) – The ID of the assignment for which you want to see submissions
- Return type:
canvasapi.paginated_list.PaginatedListofcanvasapi.gradebook_history.SubmissionHistory
- get_tabs(**kwargs)
List available tabs for a course. Returns a list of navigation tabs available in the current context.
- Calls:
- Return type:
- get_todo_items(**kwargs)
Returns the current user’s course-specific todo items.
- Calls:
- Return type:
canvasapi.paginated_list.PaginatedListofcanvasapi.todo.Todo
- get_uncollated_submissions(**kwargs)
Gives a paginated, uncollated list of submission versions for all matching submissions in the context. This SubmissionVersion objects will not include the new_grade or previous_grade keys, only the grade; same for graded_at and grader.
- Calls:
- Return type:
canvasapi.paginated_list.PaginatedListofcanvasapi.gradebook_history.SubmissionVersion
- get_user(user, user_id_type=None, **kwargs)
Retrieve a user by their ID. user_id_type denotes which endpoint to try as there are several different ids that can pull the same user record from Canvas.
- Calls:
- Parameters:
user (
canvasapi.user.Useror int) – The object or ID of the user to retrieve.user_id_type (str) – The type of the ID to search for.
- Return type:
- get_user_in_a_course_level_assignment_data(user, **kwargs)
Return a list of assignments for the course sorted by due date
- Calls:
GET /api/v1/courses/:course_id/analytics/users/:student_id/assignments
- Parameters:
user (
canvasapi.user.Useror int) – The object or ID of the related user- Return type:
dict
- get_user_in_a_course_level_messaging_data(user, **kwargs)
Return messaging hits grouped by day through the entire history of the course
- Calls:
GET /api/v1/courses/:course_id/analytics/users/:student_id/communication
- Parameters:
user (
canvasapi.user.Useror int) – The object or ID of the related user- Return type:
dict
- get_user_in_a_course_level_participation_data(user, **kwargs)
Return page view hits grouped by hour and participation details through course’s history
- Calls:
GET /api/v1/courses/:course_id/analytics/users/:student_id/activity
- Parameters:
user (
canvasapi.user.Useror int) – The object or ID of the related user- Return type:
dict
- get_users(**kwargs)
List all users in a course.
- Calls:
- Return type:
canvasapi.paginated_list.PaginatedListofcanvasapi.user.User
- import_outcome(attachment, **kwargs)
Import outcome into canvas.
- Calls:
- Parameters:
attachment (file or str) – A file handler or path of the file to import.
- Return type:
- list_blueprint_subscriptions(**kwargs)
Return a list of blueprint subscriptions for the given course.
- preview_html(html, **kwargs)
Preview HTML content processed for this course.
- Calls:
- Parameters:
html (str) – The HTML code to preview.
- Return type:
str
- query_audit_by_course(**kwargs)
Lists course change events for a specific course.
- Calls:
- Return type:
- remove_usage_rights(**kwargs)
Removes the usage rights for specified files that are under the current course scope
- Calls:
- Return type:
dict
- reorder_pinned_topics(order, **kwargs)
Puts the pinned discussion topics in the specified order. All pinned topics should be included.
- Calls:
- Parameters:
order (string or iterable sequence of values) – The ids of the pinned discussion topics in the desired order. e.g. [104, 102, 103], (104, 102, 103), or “104,102,103”
- Return type:
canvasapi.paginated_list.PaginatedListofcanvasapi.discussion_topic.DiscussionTopic
- reset(**kwargs)
Delete the current course and create a new equivalent course with no content, but all sections and users moved over.
- Calls:
- Return type:
- resolve_path(full_path=None, **kwargs)
Returns the paginated list of all of the folders in the given path starting at the course root folder. Returns root folder if called with no arguments.
- Calls:
- Parameters:
full_path (string) – Full path to resolve, relative to course root.
- Return type:
canvasapi.paginated_list.PaginatedListofcanvasapi.folder.Folder
- set_new_quizzes_accommodations(accommodations, **kwargs)
Apply accommodations to New Quizzes at the course level for students enrolled in this course.
- Calls:
- Parameters:
accommodations (list of dict) – A list of dictionaries containing accommodation details for each user. Each dictionary must contain user_id and can optionally include extra_time, apply_to_in_progress_quiz_sessions, and/or reduce_choices_enabled.
- Returns:
AccommodationResponse object containing the status of the accommodation request.
- Return type:
- set_quiz_extensions(quiz_extensions, **kwargs)
Set extensions for student all quiz submissions in a course.
- Calls:
- Parameters:
quiz_extensions (list) – List of dictionaries representing extensions.
- Return type:
list of
canvasapi.quiz.QuizExtension
Example Usage:
>>> course.set_quiz_extensions([ ... { ... 'user_id': 1, ... 'extra_time': 60, ... 'extra_attempts': 1 ... }, ... { ... 'user_id': 2, ... 'extra_attempts': 3 ... }, ... { ... 'user_id': 3, ... 'extra_time': 20 ... } ... ])
- set_usage_rights(**kwargs)
Changes the usage rights for specified files that are under the current course scope
- Calls:
- Return type:
- show_front_page(**kwargs)
Retrieve the content of the front page.
- Calls:
- Return type:
- smartsearch(q, **kwargs)
AI-powered course content search.
- Calls:
- Parameters:
q (str) – The search query string.
kwargs (dict) – Optional query parameters (e.g., filter, per_page).
- Return type:
canvasapi.paginated_list.PaginatedListofcanvasapi.searchresult.SearchResult
- submissions_bulk_update(**kwargs)
Update the grading and comments on multiple student’s assignment submissions in an asynchronous job.
- Calls:
- Return type:
- update(**kwargs)
Update this course.
- Calls:
- Returns:
True if the course was updated, False otherwise.
- Return type:
bool
- update_assignment_overrides(assignment_overrides, **kwargs)
Update a list of specified overrides for each assignment.
Note: All current overridden values must be supplied if they are to be retained.
- Calls:
- Parameters:
assignment_overrides (list) – Attributes for the updated assignment overrides.
- Return type:
canvasapi.paginated_list.PaginatedListofcanvasapi.assignment.AssignmentOverride
- update_settings(**kwargs)
Update a course’s settings.
- Calls:
- Return type:
dict
- upload(file: PathLike | str | IOBase | FileIO, **kwargs)
Upload a file to this course.
- Calls:
- Parameters:
file (file or str) – The file or path of the file to upload.
- Returns:
True if the file uploaded successfully, False otherwise, and the JSON response from the API.
- Return type:
tuple
CourseNickname
- class canvasapi.course.CourseNickname(requester, attributes)
- Parameters:
requester (
canvasapi.requester.Requester) – The requester to pass HTTP requests through.attributes (dict) – The JSON object to build this object with.
- remove(**kwargs)
Remove the nickname for the given course. Subsequent course API calls will return the actual name for the course.
- Calls:
- Return type:
CourseStudentSummary
- class canvasapi.course.CourseStudentSummary(requester, attributes)
- Parameters:
requester (
canvasapi.requester.Requester) – The requester to pass HTTP requests through.attributes (dict) – The JSON object to build this object with.
LatePolicy
- class canvasapi.course.LatePolicy(requester, attributes)
- Parameters:
requester (
canvasapi.requester.Requester) – The requester to pass HTTP requests through.attributes (dict) – The JSON object to build this object with.