Account
- class canvasapi.account.Account(requester, attributes)
- Parameters:
requester (
canvasapi.requester.Requester) – The requester to pass HTTP requests through.attributes (dict) – The JSON object to build this object with.
- abort_sis_imports_pending(**kwargs)
Aborts all pending (created, but not processed or processing) SIS imports for the current account.
- Calls:
PUT /api/v1/accounts/:account_id/sis_imports/abort_all_pending
- Returns:
True if the API responds with aborted=True, False otherwise.
- Return type:
bool
- activate_role(role, **kwargs)
Reactivate an inactive role.
- Calls:
- Parameters:
role (
canvasapi.account.Roleor int) – The object or ID of the role.- Return type:
- add_authentication_providers(**kwargs)
Add external authentication providers for the account
- add_grading_standards(title, grading_scheme_entry, **kwargs)
Create a new grading standard for the account.
- Calls:
- Parameters:
title (str) – The title for the Grading Standard
grading_scheme (list[dict]) – A list of dictionaries containing keys for “name” and “value”
- Return type:
canvasapi.grading_standards.GradingStandard
- close_notification_for_user(user, notification, **kwargs)
If the user no long wants to see a notification, it can be excused with this call.
- Calls:
DELETE /api/v1/accounts/:account_id/users/:user_id/account_notifications/:id
- Parameters:
user (
canvasapi.user.Useror int) – The user object or ID to close the notificaton for.notification (
canvasapi.account.AccountNotificationor int) – The notification object or ID to close.
- Return type:
- create_account(**kwargs)
Create a new root account.
- Calls:
- Return type:
- create_admin(user, **kwargs)
Flag an existing user as an admin of the current account.
- Calls:
- Parameters:
user (
canvasapi.user.Useror int) – The user object or ID to promote to admin.- Return type:
- 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(**kwargs)
Create a course.
- Calls:
- Return type:
- create_enrollment_term(**kwargs)
Create an enrollment term.
- Calls:
- Return type:
- create_external_tool(name, privacy_level, consumer_key, shared_secret, **kwargs)
Create an external tool in the current account.
- Calls:
- Parameters:
name (str) – The name of the tool
privacy_level (str) – What information to send to the external tool. Options are “anonymous”, “name_only”, “public”
consumer_key (str) – The consumer key for the external tool
shared_secret (str) – The shared secret with the external tool
- Return type:
- create_group_category(name, **kwargs)
Create a Group Category
- Calls:
- Parameters:
name (str) – Name of group category.
- Return type:
- create_notification(account_notification, **kwargs)
Create and return a new global notification for an account.
- Calls:
- Parameters:
account_notification (dict) – The notification to create.
- Return type:
- create_report(report_type, **kwargs)
Generates a report of a specific type for the account.
- Calls:
- Parameters:
report_type (str) – The type of report.
- Return type:
- create_role(label, **kwargs)
Create a new course-level or account-level role.
- Calls:
- Parameters:
label (str) – The label for the role.
- Return type:
- create_sis_import(attachment, **kwargs)
Create a new SIS import for the current account.
- Calls:
- Parameters:
attachment (file or str) – A file handler or path of the file to import.
- Return type:
- create_subaccount(account, **kwargs)
Add a new sub-account to a given account.
- Calls:
- Parameters:
account (str) – The name of the account
- Return type:
- create_user(pseudonym, **kwargs)
Create and return a new user and pseudonym for an account.
- Calls:
- Parameters:
pseudonym (dict) – The pseudonym of the account.
- Return type:
- create_user_login(user, login, **kwargs)
Create a new login for an existing user in the given account
- Calls:
- Parameters:
user (dict) – The attributes of the user to create a login for
login (dict) – The attributes of the login to create
- Return type:
- deactivate_role(role, **kwargs)
Deactivate a custom role.
- Calls:
- Parameters:
role (
canvasapi.account.Roleor int) – The object or ID of the role.- Return type:
- delete(**kwargs)
Delete the current account
Note: Cannot delete an account with active courses or active sub accounts. Cannot delete a root account.
- Calls:
- Returns:
True if successfully deleted; False otherwise.
- Return type:
bool
- delete_admin(user, **kwargs)
Remove an admin role from an existing user in the current account.
- Calls:
- Parameters:
user (
canvasapi.user.Useror int) – The user object or ID to remove as admin.- Return type:
- delete_grading_period(grading_period, **kwargs)
Delete a grading period for an account.
- Calls:
- Parameters:
grading_period (
canvasapi.grading_period.GradingPeriodor int) – The GradingPeriod object or ID to delete.- Returns:
True if the grading period was deleted, False otherwise.
- Return type:
bool
- delete_user(user, **kwargs)
Delete a user record from a Canvas root account.
If a user is associated with multiple root accounts (in a multi-tenant instance of Canvas), this action will NOT remove them from the other accounts.
WARNING: This API will allow a user to remove themselves from the account. If they do this, they won’t be able to make API calls or log into Canvas at that account.
- Calls:
- Parameters:
user (
canvasapi.user.Useror int) – The user object or ID to delete.- Return type:
- get_account_calendar(**kwargs)
Returns information about a single account calendar.
- Calls:
- Return type:
- get_admins(**kwargs)
Get the paginated list of admins for the current account.
- Calls:
- Return type:
canvasapi.paginated_list.PaginatedListofcanvasapi.account.Admin
- get_all_account_calendars(**kwargs)
Lists all account calendars available to the account given.
- Calls:
- Returns:
Paginated list of all account calendars for the provided account.
- Return type:
canvasapi.paginated_list.PaginatedListofcanvasapi.account_calendar.AccountCalendar
- 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_authentication_events(**kwargs)
List authentication events for a given account.
- get_authentication_provider(authentication_provider, **kwargs)
Get the specified authentication provider
- Calls:
GET /api/v1/accounts/:account_id/authentication_providers/:id
- Parameters:
authentication_provider (
canvasapi.authentication_provider.AuthenticationProvideror int) – The object or ID of the authentication provider- Return type:
- get_authentication_providers(**kwargs)
Return the list of authentication providers
- get_content_migration(content_migration, **kwargs)
Retrive a content migration by its ID
- Calls:
- Parameters:
content_migration – 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_courses(**kwargs)
Retrieve the list of courses in this account.
- get_department_level_grade_data_completed(**kwargs)
Return the distribution of all concluded grades in the default term
- Calls:
- Return type:
dict
- get_department_level_grade_data_current(**kwargs)
Return the distribution of all available grades in the default term
- Calls:
- Return type:
dict
- get_department_level_grade_data_with_given_term(term_id, **kwargs)
Return the distribution of all available or concluded grades with the given term
- Calls:
GET /api/v1/accounts/:account_id/analytics/terms/:term_id/grades
- Parameters:
term_id (int or str) – The ID of the term, or the strings “current” or “completed”
- Return type:
dict
- get_department_level_participation_data_completed(**kwargs)
Return page view hits all concluded courses in the default term
- Calls:
GET /api/v1/accounts/:account_id/analytics/completed/activity
- Return type:
dict
- get_department_level_participation_data_current(**kwargs)
Return page view hits all available courses in the default term
- Calls:
- Return type:
dict
- get_department_level_participation_data_with_given_term(term_id, **kwargs)
Return page view hits all available or concluded courses in the given term
- Calls:
GET /api/v1/accounts/:account_id/analytics/terms/:term_id/activity
- Parameters:
term_id (int or str) – The ID of the term, or the strings “current” or “completed”
- Return type:
dict
- get_department_level_statistics_completed(**kwargs)
Return all available numeric statistics about the department in the default term
- Calls:
GET /api/v1/accounts/:account_id/analytics/current/statistics
- Return type:
dict
- get_department_level_statistics_current(**kwargs)
Return all available numeric statistics about the department in the default term
- Calls:
GET /api/v1/accounts/:account_id/analytics/current/statistics
- Return type:
dict
- get_department_level_statistics_with_given_term(term_id, **kwargs)
Return numeric statistics about the department with the given term
- Calls:
GET /api/v1/accounts/:account_id/analytics/terms/:term_id/statistics
- Parameters:
term_id (int or str) – The ID of the term, or the strings “current” or “completed”
- Return type:
dict
- get_enabled_features(**kwargs)
Lists all enabled features in an account.
- Calls:
- Return type:
list of str
- get_enrollment(enrollment, **kwargs)
Get an enrollment object by ID.
- Calls:
- Parameters:
enrollment (
canvasapi.enrollment.Enrollmentor int) – The object or ID of the enrollment to retrieve.- Return type:
- get_enrollment_term(term, **kwargs)
Retrieve the details for an enrollment term in the account. Includes overrides by default.
- Calls:
- Parameters:
term (
canvasapi.enrollment_term.EnrollmentTermor int) – The object or ID of the enrollment term to retrieve.- Return type:
- get_enrollment_terms(**kwargs)
List enrollment terms for a context.
- get_external_tool(tool, **kwargs)
- Calls:
GET /api/v1/accounts/:account_id/external_tools/:external_tool_id
- Parameters:
tool (
canvasapi.external_tool.ExternalToolor int) – The object or ID of the tool- Return type:
- get_external_tools(**kwargs)
- get_feature_flag(feature, **kwargs)
Returns the feature flag that applies to the given account.
- Calls:
- Parameters:
feature (
canvasapi.feature.Featureor str) – The feature object or name of the feature to retrieve.- Return type:
- get_features(**kwargs)
Lists all of the features of an account.
- get_global_notification(notification_id, **kwargs)
Returns a global notification for the current user.
- Calls:
- Parameters:
notification_id (int) – The notification ID of the desired notification.
- Return type:
- get_grading_periods(**kwargs)
Return a list of grading periods for the associated account.
- get_grading_standards(**kwargs)
Get a PaginatedList of the grading standards available for the account.
- Calls:
- Return type:
canvasapi.paginated_list.PaginatedListofcanvasapi.grading_standards.GradingStandard
- get_group_categories(**kwargs)
List group categories for a context.
- get_groups(**kwargs)
Return a list of active groups for the specified account.
- Calls:
- Return type:
canvasapi.paginated_list.PaginatedListofcanvasapi.group.Group
- get_index_of_reports(report_type, **kwargs)
Retrieve all reports that have been run for the account of a specific type.
- Calls:
- Parameters:
report_type (str) – The type of report.
- Return type:
canvasapi.paginated_list.PaginatedListofcanvasapi.account.AccountReport
- get_migration_systems(**kwargs)
Return a list of migration systems.
- 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_report(report_type, report_id, **kwargs)
Return a report which corresponds to the given report type and ID.
- Calls:
- Parameters:
report_type (string) – The type of the report which is being looked up.
report_id (int) – The id for the report which is being looked up.
- Return type:
- get_reports(**kwargs)
Return a list of reports for the current context.
- get_role(role, **kwargs)
Retrieve a role by ID.
- Calls:
- Parameters:
role (
canvasapi.account.Roleor int) – The object or ID of the role.- Return type:
- get_roles(**kwargs)
List the roles available to an account.
- Calls:
- Return type:
canvasapi.paginated_list.PaginatedListofcanvasapi.account.Role
- 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 account.
- get_scopes(**kwargs)
Retrieve a paginated list of scopes.
- Calls:
- Return type:
canvasapi.paginated_list.PaginatedListofcanvasapi.scope.Scope
- get_single_grading_standard(grading_standard_id, **kwargs)
Get a single grading standard from the account.
- Calls:
GET /api/v1/accounts/:account_id/grading_standards/:grading_standard_id
- Parameters:
grading_standard_id (int) – The grading standard id
- Return type:
canvasapi.grading_standards.GradingStandard
- get_sis_import(sis_import, **kwargs)
Retrieve information on an individual SIS import from this account.
- Calls:
- Parameters:
sis_import (int, str or
canvasapi.sis_import.SisImport) – The object or ID of the sis_import to retrieve.- Return type:
- get_sis_imports(**kwargs)
Get the paginated list of SIS imports for the current account.
- get_sis_imports_running(**kwargs)
Get the paginated list of running SIS imports for the current account.
- get_subaccounts(recursive=False, **kwargs)
List accounts that are sub-accounts of the given account.
- Calls:
- Parameters:
recursive (bool) – If true, the entire account tree underneath this account will be returned. If false, only direct sub-accounts of this account will be returned.
- Return type:
canvasapi.paginated_list.PaginatedListofcanvasapi.account.Account
- get_user_logins(**kwargs)
Given a user ID, return that user’s logins for the given account.
- Calls:
- Return type:
canvasapi.paginated_list.PaginatedListofcanvasapi.login.Login
- get_user_notifications(user, **kwargs)
Return a list of all global notifications in the account for this user. Any notifications that have been closed by the user will not be returned.
- Calls:
GET /api/v1/accounts/:account_id/users/:user_id/account_notifications
- Parameters:
user (
canvasapi.user.Useror int) – The user object or ID to retrieve notifications for.- Return type:
canvasapi.paginated_list.PaginatedListofcanvasapi.account.AccountNotification
- get_users(**kwargs)
Retrieve a list of users associated with this account.
- 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:
- query_audit_by_account(**kwargs)
List course change events for a specific account.
- Calls:
- Return type:
- show_account_auth_settings(**kwargs)
Return the current state of each account level setting
- Calls:
- Return type:
- update(**kwargs)
Update an existing account.
- Calls:
- Returns:
True if the account was updated, False otherwise.
- Return type:
bool
- update_account_auth_settings(**kwargs)
Return the current state of account level after updated
- Calls:
- Return type:
- update_account_calendar_visibility(**kwargs)
Update one account calendar’s visibility.
- Calls:
- Return type:
- update_many_account_calendars_visibility(**kwargs)
Update many account calendars visibility at once.
- update_role(role, **kwargs)
Update permissions for an existing role.
- Calls:
- Parameters:
role (
canvasapi.account.Roleor int) – The object or ID of the role.- Return type:
AccountNotification
- class canvasapi.account.AccountNotification(requester, attributes)
- Parameters:
requester (
canvasapi.requester.Requester) – The requester to pass HTTP requests through.attributes (dict) – The JSON object to build this object with.
- update_global_notification(account_notification, **kwargs)
Updates a global notification.
- Calls:
- Parameters:
account_notification (dict) – The notification to update with.
- Return type:
AccountReport
- class canvasapi.account.AccountReport(requester, attributes)
- Parameters:
requester (
canvasapi.requester.Requester) – The requester to pass HTTP requests through.attributes (dict) – The JSON object to build this object with.
- delete_report(**kwargs)
Delete this report.
Admin
- class canvasapi.account.Admin(requester, attributes)
- Parameters:
requester (
canvasapi.requester.Requester) – The requester to pass HTTP requests through.attributes (dict) – The JSON object to build this object with.
Role
- class canvasapi.account.Role(requester, attributes)
- Parameters:
requester (
canvasapi.requester.Requester) – The requester to pass HTTP requests through.attributes (dict) – The JSON object to build this object with.
SSOSettings
- class canvasapi.account.SSOSettings(requester, attributes)
- Parameters:
requester (
canvasapi.requester.Requester) – The requester to pass HTTP requests through.attributes (dict) – The JSON object to build this object with.