Group
- class canvasapi.group.Group(requester, attributes)
- Parameters:
requester (
canvasapi.requester.Requester) – The requester to pass HTTP requests through.attributes (dict) – The JSON object to build this object with.
- 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_discussion_topic(**kwargs)
Creates a new discussion topic for the course or group.
- create_external_feed(url, **kwargs)
Create a new external feed for the group.
- Calls:
- Parameters:
url (str) – The urlof the external rss or atom feed
- Return type:
canvasapi.external_feed.ExternalFeed
- create_folder(name, **kwargs)
Creates a folder in this group.
- Calls:
- Parameters:
name (str) – The name of the folder.
- Return type:
- create_membership(user, **kwargs)
Join, or request to join, a group, depending on the join_level of the group. If the membership or join request already exists, then it is simply returned.
- Calls:
- Parameters:
user (
canvasapi.user.Useror int) – The object or ID of the user.- Return type:
- create_page(wiki_page, **kwargs)
Create a new wiki page.
- Calls:
- Parameters:
wiki_page (dict) – Details about the page to create.
- Returns:
The created page.
- Return type:
- delete(**kwargs)
Delete a group.
- Calls:
- Return type:
- delete_external_feed(feed, **kwargs)
Deletes the external feed.
- Calls:
DELETE /api/v1/groups/:group_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(**kwargs)
Edit a group.
- Calls:
- Return type:
- edit_front_page(**kwargs)
Update the title or contents of the front page.
- Calls:
- Return type:
- export_content(export_type, **kwargs)
Begin a content export job for a group.
- Calls:
- Parameters:
export_type (str) – The type of content to export.
- Return type:
- get_activity_stream_summary(**kwargs)
Return a summary of the current user’s global activity stream.
- Calls:
- Return type:
dict
- get_assignment_override(assignment, **kwargs)
Return override for the specified assignment for this group.
- Parameters:
assignment (
canvasapi.assignment.Assignmentor int) – The assignment to get an override for- Calls:
GET /api/v1/groups/:group_id/assignments/:assignment_id/override
- 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 group.
- 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_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_external_feeds(**kwargs)
Returns the list of External Feeds this group.
- Calls:
- Return type:
canvasapi.paginated_list.PaginatedListofcanvasapi.external_feed.ExternalFeed
- 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 group.
- Calls:
- Return type:
dict
- get_files(**kwargs)
Returns the paginated list of files for the group.
- Calls:
- Return type:
canvasapi.paginated_list.PaginatedListofcanvasapi.file.File
- get_folder(folder, **kwargs)
Returns the details for a group’s 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 group. 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/groups/:group_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_licenses(**kwargs)
Returns a paginated list of the licenses that can be applied to the files under the group scope
- get_membership(user, membership_type, **kwargs)
List users in a group.
- Calls:
- Parameters:
user (
canvasapi.user.Useror int) – list of user ids- Return type:
- get_memberships(**kwargs)
List users in a group.
- get_migration_systems(**kwargs)
Return a list of migration systems.
- 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:
canvasapi.groups.Group
- get_pages(**kwargs)
List the wiki pages associated with a group.
- Calls:
- Return type:
canvasapi.paginated_list.PaginatedListofcanvasapi.page.Page
- get_tabs(**kwargs)
List available tabs for a group. Returns a list of navigation tabs available in the current context.
- Calls:
- Return type:
- get_users(**kwargs)
List users in a group.
- Calls:
- Return type:
canvasapi.paginated_list.PaginatedListofcanvasapi.user.User
- invite(invitees, **kwargs)
Invite users to group.
- Calls:
- Parameters:
invitees (integer list) – list of user ids
- Return type:
canvasapi.paginated_list.PaginatedListofcanvasapi.group.GroupMembership
- preview_html(html, **kwargs)
Preview HTML content processed for this course.
- Calls:
- Parameters:
html (str) – The HTML code to preview.
- Return type:
str
- remove_usage_rights(**kwargs)
Removes the usage rights for specified files that are under the current group scope
- Calls:
- Return type:
dict
- remove_user(user, **kwargs)
Leave a group if allowed.
- Calls:
- Parameters:
user (
canvasapi.user.Useror int) – The user object or ID to remove from the group.- Return type:
- reorder_pinned_topics(order, **kwargs)
Puts the pinned discussion topics in the specified order. All pinned topics should be included.
- Calls:
- Parameters:
order (iterable sequence of values) – The ids of the pinned discussion topics in the desired order. e.g. [104, 102, 103]
- Return type:
canvasapi.paginated_list.PaginatedListofcanvasapi.discussion_topic.DiscussionTopic
- resolve_path(full_path=None, **kwargs)
Returns the paginated list of all of the folders in the given path starting at the group root folder. Returns root folder if called with no arguments.
- Calls:
- Parameters:
full_path (string) – Full path to resolve, relative to group root.
- Return type:
canvasapi.paginated_list.PaginatedListofcanvasapi.folder.Folder
- set_usage_rights(**kwargs)
Changes the usage rights for specified files that are under the current group scope
- Calls:
- Return type:
- show_front_page(**kwargs)
Retrieve the content of the front page.
- Calls:
- Return type:
- update_membership(user, **kwargs)
Accept a membership request, or add/remove moderator rights.
- Calls:
- Parameters:
user (
canvasapi.user.Useror int) – The object or ID of the user.- Return type:
- upload(file: PathLike | str | IOBase | FileIO, **kwargs)
Upload a file to the group. Only those with the ‘Manage Files’ permission on a group can upload files to the group. By default, this is anybody participating in the group, or any admin over the group.
- Calls:
- Parameters:
path (str) – The path of the file to upload.
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
GroupMembership
- class canvasapi.group.GroupMembership(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_self(**kwargs)
Leave a group if allowed.
- Calls:
- Returns:
An empty dictionary
- Return type:
dict
- remove_user(user, **kwargs)
Remove user from membership.
- Calls:
- Parameters:
user (
canvasapi.user.Useror int) – The user object or ID to remove from the group.- Returns:
An empty dictionary
- Return type:
dict
- update(**kwargs)
Accept a membership request, or add/remove moderator rights.
GroupCategory
- class canvasapi.group.GroupCategory(requester, attributes)
- Parameters:
requester (
canvasapi.requester.Requester) – The requester to pass HTTP requests through.attributes (dict) – The JSON object to build this object with.
- assign_members(sync=False, **kwargs)
Assign unassigned members.
- create_group(**kwargs)
Create a group.
- Calls:
- Return type:
- delete(**kwargs)
Delete a group category.
- Calls:
- Return type:
empty dict
- get_groups(**kwargs)
List groups in group category.
- get_users(**kwargs)
List users in group category.
- update(**kwargs)
Update a group category.
- Calls:
- Return type: