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:POST /api/v1/accounts/:account_id/roles/:id/activate
Parameters:role (canvasapi.account.Role or int) – The object or ID of the role.
Return type:canvasapi.account.Role
add_authentication_providers(**kwargs)

Add external authentication providers for the account

Calls:POST /api/v1/accounts/:account_id/authentication_providers
Return type:canvasapi.authentication_provider.AuthenticationProvider
add_grading_standards(title, grading_scheme_entry, **kwargs)

Create a new grading standard for the account.

Calls:

POST /api/v1/accounts/:account_id/grading_standards

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:
Return type:

canvasapi.account.AccountNotification

create_account(**kwargs)

Create a new root account.

Calls:POST /api/v1/accounts/:account_id/root_accounts
Return type:canvasapi.account.Account
create_admin(user, **kwargs)

Flag an existing user as an admin of the current account.

Calls:POST /api/v1/accounts/:account_id/admins
Parameters:user (canvasapi.user.User or int) – The user object or ID to promote to admin.
Return type:canvasapi.account.Admin
create_content_migration(migration_type, **kwargs)

Create a content migration.

Calls:POST /api/v1/accounts/:account_id/content_migrations
Parameters:migration_type (str or canvasapi.content_migration.Migrator) – The migrator type to use in this migration
Return type:canvasapi.content_migration.ContentMigration
create_course(**kwargs)

Create a course.

Calls:POST /api/v1/accounts/:account_id/courses
Return type:canvasapi.course.Course
create_enrollment_term(**kwargs)

Create an enrollment term.

Calls:POST /api/v1/accounts/:account_id/terms
Return type:canvasapi.enrollment_term.EnrollmentTerm
create_external_tool(name, privacy_level, consumer_key, shared_secret, **kwargs)

Create an external tool in the current account.

Calls:

POST /api/v1/accounts/:account_id/external_tools

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:

canvasapi.external_tool.ExternalTool

create_group_category(name, **kwargs)

Create a Group Category

Calls:POST /api/v1/accounts/:account_id/group_categories
Parameters:name (str) – Name of group category.
Return type:canvasapi.group.GroupCategory
create_notification(account_notification, **kwargs)

Create and return a new global notification for an account.

Calls:POST /api/v1/accounts/:account_id/account_notifications
Parameters:account_notification (dict) – The notification to create.
Return type:canvasapi.account.AccountNotification
create_report(report_type, **kwargs)

Generates a report of a specific type for the account.

Calls:POST /api/v1/accounts/:account_id/reports/:report
Parameters:report_type (str) – The type of report.
Return type:canvasapi.account.AccountReport
create_role(label, **kwargs)

Create a new course-level or account-level role.

Calls:POST /api/v1/accounts/:account_id/roles
Parameters:label (str) – The label for the role.
Return type:canvasapi.account.Role
create_sis_import(attachment, **kwargs)

Create a new SIS import for the current account.

Calls:POST /api/v1/accounts/:account_id/sis_imports
Parameters:attachment (file or str) – A file handler or path of the file to import.
Return type:canvasapi.sis_import.SisImport
create_subaccount(account, **kwargs)

Add a new sub-account to a given account.

Calls:POST /api/v1/accounts/:account_id/sub_accounts
Parameters:account (str) – The name of the account
Return type:canvasapi.account.Account
create_user(pseudonym, **kwargs)

Create and return a new user and pseudonym for an account.

Calls:POST /api/v1/accounts/:account_id/users
Parameters:pseudonym (dict) – The pseudonym of the account.
Return type:canvasapi.user.User
create_user_login(user, login, **kwargs)

Create a new login for an existing user in the given account

Calls:

POST /api/v1/accounts/:account_id/logins

Parameters:
  • user (dict) – The attributes of the user to create a login for
  • login (dict) – The attributes of the login to create
Return type:

canvasapi.login.Login

deactivate_role(role, **kwargs)

Deactivate a custom role.

Calls:DELETE /api/v1/accounts/:account_id/roles/:id
Parameters:role (canvasapi.account.Role or int) – The object or ID of the role.
Return type:canvasapi.account.Role
delete(**kwargs)

Delete the current account

Note: Cannot delete an account with active courses or active sub accounts. Cannot delete a root account.

Calls:DELETE /api/v1/accounts/:account_id/sub_accounts/:id
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:DELETE /api/v1/accounts/:account_id/admins/:user_id
Parameters:user (canvasapi.user.User or int) – The user object or ID to remove as admin.
Return type:canvasapi.account.Admin
delete_grading_period(grading_period, **kwargs)

Delete a grading period for an account.

Calls:DELETE /api/v1/accounts/:account_id/grading_periods/:id
Parameters:grading_period (canvasapi.grading_period.GradingPeriod or 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:DELETE /api/v1/accounts/:account_id/users/:user_id
Parameters:user (canvasapi.user.User or int) – The user object or ID to delete.
Return type:canvasapi.user.User
get_admins(**kwargs)

Get the paginated list of admins for the current account.

Calls:GET /api/v1/accounts/:account_id/admins
Return type:canvasapi.paginated_list.PaginatedList of canvasapi.account.Admin

Get all outcome links for context - BETA

Calls:GET /api/v1/accounts/:account_id/outcome_group_links
Returns:Paginated List of OutcomesLinks in the context.
Return type:canvasapi.paginated_list.PaginatedList of canvasapi.outcome.OutcomeLink
get_authentication_events(**kwargs)

List authentication events for a given account.

Calls:GET /api/v1/audit/authentication/accounts/:account_id
Return type:canvasapi.paginated_list.PaginatedList of canvasapi.authentication_event.AuthenticationEvent
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.AuthenticationProvider or int) – The object or ID of the authentication provider
Return type:canvasapi.authentication_provider.AuthenticationProvider
get_authentication_providers(**kwargs)

Return the list of authentication providers

Calls:GET /api/v1/accounts/:account_id/authentication_providers
Return type:canvasapi.paginated_list.PaginatedList of canvasapi.authentication_provider.AuthenticationProvider
get_content_migration(content_migration, **kwargs)

Retrive a content migration by its ID

Calls:GET /api/v1/accounts/:account_id/content_migrations/:id
Parameters:content_migration – The object or ID of the content migration to retrieve.
Return type:canvasapi.content_migration.ContentMigration
get_content_migrations(**kwargs)

List content migrations that the current account can view or manage.

Calls:GET /api/v1/accounts/:account_id/content_migrations/
Return type:canvasapi.paginated_list.PaginatedList of canvasapi.content_migration.ContentMigration
get_courses(**kwargs)

Retrieve the list of courses in this account.

Calls:GET /api/v1/accounts/:account_id/courses
Return type:canvasapi.paginated_list.PaginatedList of canvasapi.course.Course
get_department_level_grade_data_completed(**kwargs)

Return the distribution of all concluded grades in the default term

Calls:GET /api/v1/accounts/:account_id/analytics/completed/grades
Return type:dict
get_department_level_grade_data_current(**kwargs)

Return the distribution of all available grades in the default term

Calls:GET /api/v1/accounts/:account_id/analytics/current/grades
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:GET /api/v1/accounts/:account_id/analytics/current/activity
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:GET /api/v1/accounts/:account_id/features/enabled
Return type:canvasapi.paginated_list.PaginatedList of canvasapi.feature.Feature
get_enrollment(enrollment, **kwargs)

Get an enrollment object by ID.

Calls:GET /api/v1/accounts/:account_id/enrollments/:id
Parameters:enrollment (canvasapi.enrollment.Enrollment or int) – The object or ID of the enrollment to retrieve.
Return type:canvasapi.enrollment.Enrollment
get_enrollment_term(term, **kwargs)

Retrieve the details for an enrollment term in the account. Includes overrides by default.

Calls:GET /api/v1/accounts/:account_id/terms/:id
Parameters:term (canvasapi.enrollment_term.EnrollmentTerm or int) – The object or ID of the enrollment term to retrieve.
Return type:canvasapi.enrollment_term.EnrollmentTerm
get_enrollment_terms(**kwargs)

List enrollment terms for a context.

Calls:GET /api/v1/accounts/:account_id/terms
Return type:canvasapi.paginated_list.PaginatedList of canvasapi.enrollment_term.EnrollmentTerm
get_external_tool(tool, **kwargs)
Calls:GET /api/v1/accounts/:account_id/external_tools/:external_tool_id
Parameters:tool (canvasapi.external_tool.ExternalTool or int) – The object or ID of the tool
Return type:canvasapi.external_tool.ExternalTool
get_external_tools(**kwargs)
Calls:GET /api/v1/accounts/:account_id/external_tools
Return type:canvasapi.paginated_list.PaginatedList of canvasapi.external_tool.ExternalTool
get_feature_flag(feature, **kwargs)

Returns the feature flag that applies to the given account.

Calls:GET /api/v1/accounts/:account_id/features/flags/:feature
Parameters:feature (canvasapi.feature.Feature or str) – The feature object or name of the feature to retrieve.
Return type:canvasapi.feature.FeatureFlag
get_features(**kwargs)

Lists all of the features of an account.

Calls:GET /api/v1/accounts/:account_id/features
Return type:canvasapi.paginated_list.PaginatedList of canvasapi.feature.Feature
get_global_notification(notification_id, **kwargs)

Returns a global notification for the current user.

Calls:GET /api/v1/accounts/:account_id/account_notifications/:id
Parameters:notification_id (int) – The notification ID of the desired notification.
Return type:canvasapi.account.AccountNotification
get_grading_periods(**kwargs)

Return a list of grading periods for the associated account.

Calls:GET /api/v1/accounts/:account_id/grading_periods
Return type:canvasapi.paginated_list.PaginatedList of canvasapi.grading_period.GradingPeriod
get_grading_standards(**kwargs)

Get a PaginatedList of the grading standards available for the account.

Calls:GET /api/v1/accounts/:account_id/grading_standards
Return type:canvasapi.paginated_list.PaginatedList of canvasapi.grading_standards.GradingStandard
get_group_categories(**kwargs)

List group categories for a context.

Calls:GET /api/v1/accounts/:account_id/group_categories
Return type:canvasapi.paginated_list.PaginatedList of canvasapi.group.GroupCategory
get_groups(**kwargs)

Return a list of active groups for the specified account.

Calls:GET /api/v1/accounts/:account_id/groups
Return type:canvasapi.paginated_list.PaginatedList of canvasapi.group.Group
get_index_of_reports(report_type, **kwargs)

Retrieve all reports that have been run for the account of a specific type.

Calls:GET /api/v1/accounts/:account_id/reports/:report
Parameters:report_type (str) – The type of report.
Return type:canvasapi.paginated_list.PaginatedList of canvasapi.account.AccountReport
get_migration_systems(**kwargs)

Return a list of migration systems.

Calls:GET /api/v1/accounts/:account_id/content_migrations/migrators
Return type:canvasapi.paginated_list.PaginatedList of canvasapi.content_migration.Migrator
get_outcome_group(group, **kwargs)

Returns the details of the Outcome Group with the given id.

Calls:GET /api/v1/accounts/:account_id/outcome_groups/:id
Parameters:group (canvasapi.outcome.OutcomeGroup or int) – The outcome group object or ID to return.
Returns:An outcome group object.
Return type:canvasapi.outcome.OutcomeGroup
get_outcome_groups_in_context(**kwargs)

Get all outcome groups for context - BETA

Calls:GET /api/v1/accounts/:account_id/outcome_groups
Returns:Paginated List of OutcomesGroups in the context.
Return type:canvasapi.paginated_list.PaginatedList of canvasapi.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:GET /api/v1/accounts/:account_id/outcome_imports/:id
Parameters:outcome_import (canvasapi.outcome_import.OutcomeImport, int, or string: “latest”) – The outcome import object or ID to get the status of.
Return type:canvasapi.outcome_import.OutcomeImport
get_report(report_type, report_id, **kwargs)

Return a report which corresponds to the given report type and ID.

Calls:

GET /api/v1/accounts/:account_id/reports/:report/:id

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:

canvasapi.account.AccountReport

get_reports(**kwargs)

Return a list of reports for the current context.

Calls:GET /api/v1/accounts/:account_id/reports
Return type:canvasapi.paginated_list.PaginatedList of canvasapi.account.AccountReport
get_role(role, **kwargs)

Retrieve a role by ID.

Calls:GET /api/v1/accounts/:account_id/roles/:id
Parameters:role (canvasapi.account.Role or int) – The object or ID of the role.
Return type:canvasapi.account.Role
get_roles(**kwargs)

List the roles available to an account.

Calls:GET /api/v1/accounts/:account_id/roles
Return type:canvasapi.paginated_list.PaginatedList of canvasapi.account.Role
get_root_outcome_group(**kwargs)

Redirect to root outcome group for context

Calls:GET /api/v1/accounts/:account_id/root_outcome_group
Returns:The OutcomeGroup of the context.
Return type:canvasapi.outcome.OutcomeGroup
get_rubric(rubric_id, **kwargs)

Get a single rubric, based on rubric id.

Calls:GET /api/v1/accounts/:account_id/rubrics/:id
Parameters:rubric_id (int) – The ID of the rubric.
Return type:canvasapi.rubric.Rubric
get_rubrics(**kwargs)

Get the paginated list of active rubrics for the current account.

Calls:GET /api/v1/accounts/:account_id/rubrics
Return type:canvasapi.paginated_list.PaginatedList of canvasapi.rubric.Rubric
get_scopes(**kwargs)

Retrieve a paginated list of scopes.

Calls:GET /api/v1/accounts/:account_id/scopes
Return type:canvasapi.paginated_list.PaginatedList of canvasapi.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:GET /api/v1/accounts/:account_id/sis_imports/:id
Parameters:sis_import (int, str or canvasapi.sis_import.SisImport) – The object or ID of the sis_import to retrieve.
Return type:canvasapi.sis_import.SisImport
get_sis_imports(**kwargs)

Get the paginated list of SIS imports for the current account.

Calls:GET /api/v1/accounts/:account_id/sis_imports
Return type:canvasapi.paginated_list.PaginatedList of canvasapi.sis_import.SisImport
get_sis_imports_running(**kwargs)

Get the paginated list of running SIS imports for the current account.

Calls:GET /api/v1/accounts/:account_id/sis_imports/importing
Return type:canvasapi.paginated_list.PaginatedList of canvasapi.sis_import.SisImport
get_subaccounts(recursive=False, **kwargs)

List accounts that are sub-accounts of the given account.

Calls:GET /api/v1/accounts/:account_id/sub_accounts
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.PaginatedList of canvasapi.account.Account
get_user_logins(**kwargs)

Given a user ID, return that user’s logins for the given account.

Calls:GET /api/v1/accounts/:account_id/logins
Return type:canvasapi.paginated_list.PaginatedList of canvasapi.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.User or int) – The user object or ID to retrieve notifications for.
Return type:canvasapi.paginated_list.PaginatedList of canvasapi.account.AccountNotification
get_users(**kwargs)

Retrieve a list of users associated with this account.

Calls:GET /api/v1/accounts/:account_id/users
Return type:canvasapi.paginated_list.PaginatedList of canvasapi.user.User
import_outcome(attachment, **kwargs)

Import outcome into canvas.

Calls:POST /api/v1/accounts/:account_id/outcome_imports
Parameters:attachment (file or str) – A file handler or path of the file to import.
Return type:canvasapi.outcome_import.OutcomeImport
show_account_auth_settings(**kwargs)

Return the current state of each account level setting

Calls:GET /api/v1/accounts/:account_id/sso_settings
Return type:canvasapi.account.SSOSettings
update(**kwargs)

Update an existing account.

Calls:PUT /api/v1/accounts/:id
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:PUT /api/v1/accounts/:account_id/sso_settings
Return type:canvasapi.account.SSOSettings
update_role(role, **kwargs)

Update permissions for an existing role.

Calls:PUT /api/v1/accounts/:account_id/roles/:id
Parameters:role (canvasapi.account.Role or int) – The object or ID of the role.
Return type:canvasapi.account.Role

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:PUT /api/v1/accounts/:account_id/account_notifications/:id
Parameters:account_notification (dict) – The notification to update with.
Return type:canvasapi.account.AccountNotification

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.

Calls:DELETE /api/v1/accounts/:account_id/reports/:report/:id
Return type:canvasapi.account.AccountReport

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.