UVACanvasAccess
Classes | Public Types | Public Member Functions | List of all members
UVACanvasAccess.ApiParts.Api Class Reference

This class is the primary interface for interacting with the Canvas API.
More...

Inheritance diagram for UVACanvasAccess.ApiParts.Api:
Inheritance graph
[legend]
Collaboration diagram for UVACanvasAccess.ApiParts.Api:
Collaboration graph
[legend]

Classes

struct  ColumnEntryUpdate
 Represents one update to a custom column entry. More...
 
struct  QuotaInfo
 Contains the total storage quota and quota usage for a user. More...
 

Public Types

enum class  AccountIncludes : byte { Default = 0 , LtiGuid = 1 << 0 , RegistrationSettings = 1 << 1 , Services = 1 << 2 }
 Additional data which can be included in Account responses. More...
 
enum class  CourseEnrollmentTypes : byte {
  Teacher = 1 << 0 , Student = 1 << 1 , Ta = 1 << 2 , Observer = 1 << 3 ,
  Designer = 1 << 4 , StudentView = 1 << 5
}
 The types of enrollment a user can have in a course. More...
 
enum class  CourseStates : byte {
  Created = 1 << 0 , Claimed = 1 << 1 , Available = 1 << 2 , Completed = 1 << 3 ,
  Deleted = 1 << 4 , All = 1 << 5
}
 The types of states a course can have. More...
 
enum class  CourseStatesAlt { Unpublished = 1 << 0 , Available = 1 << 1 , Completed = 1 << 2 , Deleted = 1 << 3 }
 An alternate version of CourseStates used by StreamUserCourses(). More...
 
enum class  AccountLevelCourseIncludes : byte {
  SyllabusBody = 1 << 0 , Term = 1 << 1 , CourseProgress = 1 << 2 , StorageQuotaUsedMb = 1 << 3 ,
  TotalStudents = 1 << 4 , Teachers = 1 << 5 , AccountName = 1 << 6 , Concluded = 1 << 7 ,
  Everything = byte.MaxValue
}
 Optional account-related data to include with courses. More...
 
enum class  CourseSort : byte { CourseName , SisCourseId , Teacher , AccountName }
 Categories that courses can be sorted by. More...
 
enum class  CourseSearchBy : byte { Course , Teacher }
 Categories that courses can be searched by. More...
 
enum class  StudentCourseSummarySortColumn : byte {
  Name , NameDescending , Score , ScoreDescending ,
  Participations , ParticipationsDescending , PageViews , PageViewsDescending
}
 The columns which the data from Api.StreamCourseStudentSummary can be sorted by. More...
 
enum class  Order : byte { Ascending , Descending }
 Direction to sort by. More...
 
enum class  OnDuplicate : byte { Overwrite , Rename }
 Behavior when encountering a duplicate item. More...
 
enum class  AppointmentVisibilityScope : byte { Reservable , Manageable }
 The kind of relationship a user can have with an appointment group. More...
 
enum class  AppointmentGroupIncludes : byte {
  Appointments = 1 << 0 , Reservations = 1 << 1 , ParticipantCount = 1 << 2 , ReservedTimes = 1 << 3 ,
  AllContextCodes = 1 << 4 , Everything = byte.MaxValue
}
 Data that can be included in responses containing appointment groups. More...
 
enum class  AssignmentIncludes {
  Default = 0 , Submission = 1 << 0 , AssignmentVisibility = 1 << 1 , Overrides = 1 << 2 ,
  ObservedUsers = 1 << 3 , AllDates = 1 << 4
}
 Categories of optional data that can be requested for inclusion within Assignment objects. More...
 
enum class  AssignmentBucket {
  Past , Overdue , Undated , Ungraded ,
  Unsubmitted , Upcoming , Future
}
 Buckets that assignments can be sorted into. More...
 
enum class  IndividualLevelCourseIncludes : uint {
  SyllabusBody = 1 << 0 , Term = 1 << 1 , CourseProgress = 1 << 2 , StorageQuotaUsedMb = 1 << 3 ,
  TotalStudents = 1 << 4 , Teachers = 1 << 5 , AccountName = 1 << 6 , Concluded = 1 << 7 ,
  AllCourses = 1 << 8 , Permissions = 1 << 9 , ObservedUsers = 1 << 10 , CourseImage = 1 << 11 ,
  NeedsGradingCount = 1 << 12 , PublicDescription = 1 << 13 , TotalScores = 1 << 14 , CurrentGradingPeriodScores = 1 << 15 ,
  Account = 1 << 16 , Sections = 1 << 17 , PassbackStatus = 1 << 18 , Favorites = 1 << 19 ,
  Everything = uint.MaxValue
}
 Categories of optional data that can be included with Course objects, when fetched individually by ID. More...
 
enum class  CourseUserIncludes {
  Enrollments = 1 , Locked = 1 << 1 , AvatarUrl = 1 << 2 , TestStudent = 1 << 3 ,
  Bio = 1 << 4 , CustomLinks = 1 << 5 , CurrentGradingPeriodScores = 1 << 6 , Uuid = 1 << 7
}
 Optional data that can be included with results from StreamCourseUsers(). More...
 
enum class  DiscussionTopicIncludes {
  Default = 0 , AllDates = 1 << 0 , Sections = 1 << 1 , SectionsUserCount = 1 << 2 ,
  Overrides = 1 << 3
}
 Categories of optional data that can be requested for inclusion within DiscussionTopic objects. More...
 
enum class  DiscussionTopicOrdering { Position , RecentActivity , Title }
 An ordering that can be applied to sets of DiscussionTopic. More...
 
enum class  DiscussionTopicScopes { Locked = 1 << 0 , Unlocked = 1 << 1 , Pinned = 1 << 2 , Unpinned = 1 << 3 }
 Scopes that DiscussionTopics can be filtered by. More...
 
enum class  CourseEnrollmentRoleTypes {
  StudentEnrollment , TeacherEnrollment , TaEnrollment , ObserverEnrollment ,
  DesignerEnrollment
}
 The types of enrollment a user can have in a course, in terms of enrollment role. More...
 
enum class  CourseEnrollmentState {
  Active , Invited , Inactive , Rejected ,
  Completed
}
 The states of enrollment a user can have in a course. More...
 
enum class  CourseEnrollmentStateAlt { Active , InvitedOrPending , Completed }
 An alternate version of CourseEnrollmentState used by StreamUserCourses(). More...
 
enum class  CourseEnrollmentIncludes : byte {
  AvatarUrl = 1 << 0 , GroupIds = 1 << 1 , Locked = 1 << 2 , ObservedUsers = 1 << 3 ,
  CanBeRemoved = 1 << 4 , Uuid = 1 << 5
}
 Categories of optional data that can be requested for inclusion within Enrollment objects. More...
 
enum class  EnrollmentTermWorkflowStateFilter { Active , Deleted , All }
 Categories of workflow state to filter by when querying enrollment terms. More...
 
enum class  EnrollmentTermIncludes { Overrides }
 Optional data that can be included with EnrollmentTerm objects. More...
 
enum class  ExternalToolContextType : byte { Group , Course , Account }
 
enum class  ExternalToolPlacementType {
  AccountNavigation , CourseHomeSubNavigation , CourseNavigation , EditorButton ,
  HomeworkSubmission , MigrationSelection , ResourceSelection , LinkSelection ,
  ToolConfiguration , UserNavigation
}
 
enum class  FileIncludes : byte { User = 1 << 0 , UsageRights = 1 << 1 }
 Categories of optional data that can be requested for inclusion within CanvasFile objects. More...
 
enum class  FileSort : byte {
  Name , Size , CreatedAt , UpdatedAt ,
  ContentType , User
}
 Categories a CanvasFile can be sorted by. More...
 
enum class  ModuleIncludeType : byte { None , TryIncludeItems , TryIncludeItemsAndContentDetails }
 Include modes for API methods returning Module. More...
 
enum class  PageSort { Title , CreatedAt , UpdatedAt }
 Keys by which a Page can be sorted. More...
 
enum class  SectionIncludes : byte {
  Students = 1 << 0 , AvatarUrl = 1 << 1 , Enrollments = 1 << 2 , TotalStudents = 1 << 3 ,
  PassbackStatus = 1 << 4 , Everything = byte.MaxValue
}
 Additional data which can be included in Section responses. More...
 

Public Member Functions

async IAsyncEnumerable< AccountStreamAccounts (AccountIncludes includes=AccountIncludes.Default)
 Stream the accounts in this domain. More...
 
async Task< AccountGetAccount (ulong accountId)
 Get a single account by id. More...
 
async Task< BasicAccountPermissionsSetGetAccountPermissions (AccountRolePermissions checkedPermissions, ulong? accountId=null)
 Get the permissions set of an account. More...
 
async Task< TermsOfServiceGetTermsOfService (ulong? accountId=null)
 Get an account's Terms of Service. More...
 
async Task< HelpLinksGetHelpLinks (ulong? accountId=null)
 Get an account's set of help links. More...
 
async Task< IEnumerable< Course > > ListCourses (ulong? accountId=null, string searchTerm=null, bool? withEnrollmentsOnly=null, bool? published=null, bool? completed=null, bool? blueprint=null, bool? blueprintAssociated=null, ulong? enrollmentTermId=null, IEnumerable< ulong > byTeachers=null, IEnumerable< ulong > bySubaccounts=null, CourseEnrollmentTypes? enrollmentTypes=null, CourseStates? states=null, AccountLevelCourseIncludes? includes=null, CourseSort? sort=null, CourseSearchBy? searchBy=null, Order? order=null)
 Returns a list of courses associated with the account. More...
 
async IAsyncEnumerable< CourseStreamCourses (ulong? accountId=null, string searchTerm=null, bool? withEnrollmentsOnly=null, bool? published=null, bool? completed=null, bool? blueprint=null, bool? blueprintAssociated=null, ulong? enrollmentTermId=null, IEnumerable< ulong > byTeachers=null, IEnumerable< ulong > bySubaccounts=null, CourseEnrollmentTypes? enrollmentTypes=null, CourseStates? states=null, AccountLevelCourseIncludes? includes=null, CourseSort? sort=null, CourseSearchBy? searchBy=null, Order? order=null)
 Asynchronously streams the courses associated with this account. More...
 
Task< DepartmentParticipationGetDepartmentParticipationData (ulong termId, ulong? accountId=null)
 Gets the page view and participation counts across all courses in the department during the given term. More...
 
Task< DepartmentParticipationGetDefaultTermDepartmentParticipationData (bool currentCourses=true, ulong? accountId=null)
 Gets the page view and participation counts across all current or completed courses in the department during the default term. More...
 
Task< Dictionary< byte, ulong > > GetDepartmentGradeData (ulong termId, ulong? accountId=null)
 Gets the distribution of grades for students across all courses in the department during the given term. More...
 
Task< Dictionary< byte, ulong > > GetDefaultTermDepartmentGradeData (bool currentCourses=true, ulong? accountId=null)
 Gets the distribution of grades for students across all current or completed courses in the department during the default term. More...
 
Task< DepartmentStatisticsGetDepartmentStatistics (ulong termId, ulong? accountId=null)
 Gets some numeric statistics about the department relative to the given term. More...
 
Task< DepartmentStatisticsGetDefaultTermDepartmentStatistics (bool currentCourses=true, ulong? accountId=null)
 Gets some numeric statistics about the department relative to current ot completed courses in the default term. More...
 
async Task< UserParticipationGetUserCourseParticipationData (ulong userId, ulong courseId)
 Gets participation details for the user for the entire history of the course. More...
 
async IAsyncEnumerable< UserAssignmentDataGetUserCourseAssignmentData (ulong courseId, ulong userId)
 Returns a list of assignments for the course sorted by due date, along with assignment information, grade breakdown, and submission information if relevant. More...
 
async IAsyncEnumerable< CourseStudentSummaryStreamCourseStudentSummary (ulong courseId, ulong? studentId=null, StudentCourseSummarySortColumn? sortBy=null)
 Gets a summary of per-user access information for students in this course, including total page views, total participations, and a breakdown of late statuses for all submissions. More...
 
async IAsyncEnumerable< CourseAssignmentSummaryStreamCourseAssignmentSummary (ulong courseId)
 Gets a summary of per-assignment information for this course, including statistical analysis of assignment scores. More...
 
 Api (string token, string baseUrl, TimeSpan? timeout=null)
 Construct a new API instance. More...
 
void Dispose ()
 
void MasqueradeAs (ulong id)
 If the current user is an administrator, he can "act as" another user. When this is set, every API call will be made as if it came from this user's token, even if the user does not have any tokens generated. Audit logs will indicate if an action was made through masquerade, though.
More...
 
void StopMasquerading ()
 Stop "acting as" any user. More...
 
async IAsyncEnumerable< AppointmentGroupStreamAppointmentGroups (AppointmentVisibilityScope? scope=null, bool? includePast=null, AppointmentGroupIncludes? includes=null, IEnumerable< EventContext > contexts=null)
 Streams the appointment groups that can be managed or reserved by the current user. More...
 
AppointmentGroupBuilder CreateAppointmentGroup (string title, IEnumerable< EventContext > contexts)
 Returns an AppointmentGroupBuilder for creating a new appointment group. More...
 
AppointmentGroupBuilder CreateAppointmentGroup (string title, params EventContext[] contexts)
 Returns an AppointmentGroupBuilder for creating a new appointment group. More...
 
AppointmentGroupBuilder EditAppointmentGroup (AppointmentGroup appointmentGroup)
 Returns an AppointmentGroupBuilder for modifying an existing appointment group. More...
 
AppointmentGroupBuilder EditAppointmentGroup (AppointmentGroup appointmentGroup, IEnumerable< EventContext > contexts)
 Returns an AppointmentGroupBuilder for modifying an existing appointment group. More...
 
AppointmentGroupBuilder EditAppointmentGroup (AppointmentGroup appointmentGroup, params EventContext[] contexts)
 Returns an AppointmentGroupBuilder for modifying an existing appointment group. More...
 
async Task< AppointmentGroupGetAppointmentGroup (ulong id, AppointmentGroupIncludes includes=0)
 Gets a single appointment group. More...
 
async Task< AppointmentGroupDeleteAppointmentGroup (ulong id, string reason=null)
 Deletes an appointment group. More...
 
async IAsyncEnumerable< T > StreamAppointmentGroupParticipants< T > (ulong appointmentGroupId)
 Streams all registered participants in the assignment group. More...
 
async Task< IEnumerable< AssignmentOverride > > ListAssignmentOverrides (ulong courseId, ulong assignmentId)
 Lists the assignment overrides for a given assignment. More...
 
async IAsyncEnumerable< AssignmentOverrideStreamAssignmentOverrides (ulong courseId, ulong assignmentId)
 Streams the assignment overrides for a given assignment. More...
 
async Task< AssignmentOverrideGetAssignmentOverride (ulong courseId, ulong assignmentId, ulong overrideId)
 Gets an AssignmentOverride by the course, assignment, and override IDs. More...
 
async Task< IEnumerable< AssignmentOverride > > BatchGetAssignmentOverrides (ulong courseId, ILookup< ulong, ulong > assignmentsToOverrides)
 Gets a collection of AssignmentOverride objects, given a course id, a set of override ids, and the assignments they belong to. More...
 
AssignmentOverrideBuilder CreateAssignmentOverride (ulong courseId, ulong assignmentId)
 Returns an AssignmentOverrideBuilder for creating a new assignment override. More...
 
async Task< SubmissionSubmitCourseAssignment (ulong courseId, ulong assignmentId, [NotNull] INewSubmissionContent submissionContent, string comment=null)
 Make a submission under the current user for this assignment. More...
 
AssignmentBuilder CreateAssignment (ulong courseId)
 Returns a AssignmentBuilder for creating a new assignment. More...
 
AssignmentBuilder EditAssignment (ulong courseId, ulong assignmentId)
 Returns a AssignmentBuilder for editing an existing assignment. More...
 
async IAsyncEnumerable< AssignmentStreamCourseAssignments (ulong courseId, AssignmentIncludes includes=AssignmentIncludes.Default, string searchTerm=null, bool? overrideAssignmentDates=null, bool? needsGradingCountBySection=null, AssignmentBucket? bucket=null, IEnumerable< ulong > assignmentIds=null, string orderBy=null)
 Streams all assignments in this course that are visible to the current user. More...
 
async Task< AssignmentGetAssignment (ulong courseId, ulong assignmentId, AssignmentIncludes includes=AssignmentIncludes.Default, bool? overrideAssignmentDates=null, bool? needsGradingCountBySection=null, bool? allDates=null)
 Gets a single assignment from this course. More...
 
async IAsyncEnumerable< AuthenticationEventStreamUserAuthenticationEvents (ulong userId, DateTime? start=null, DateTime? end=null)
 Streams the list of authentication events recorded for the given user. More...
 
async IAsyncEnumerable< AuthenticationEventStreamAccountAuthenticationEvents (ulong? accountId=null, DateTime? start=null, DateTime? end=null)
 Streams the list of authentication events recorded for the given account. More...
 
async IAsyncEnumerable< CalendarEventStreamCalendarEvents (ulong? userId=null, EventType? type=null, DateTime? startDate=null, DateTime? endDate=null, bool? undated=null, bool? allEvents=null, IEnumerable< EventContext > contexts=null)
 Stream calendar events. More...
 
async Task< ContentShareCreateContentShare ([NotNull] IEnumerable< ulong > receivers, ContentShareType contentType, ulong contentId, ulong? senderId=null)
 Create a content share between one sender and one or more receivers. More...
 
Task< ContentShareCreateContentShare ([NotNull][ItemNotNull] IEnumerable< User > receivers, ContentShareType contentType, ulong contentId, ulong? senderId=null)
 Create a content share between one sender and one or more receivers. More...
 
async IAsyncEnumerable< ContentShareWithReceiversStreamSentContentShares (ulong? userId=null)
 Stream the content shares for which some user is a sender. More...
 
IAsyncEnumerable< ContentShareWithReceiversStreamSentContentShares ([NotNull] User sender)
 Stream the content shares for which some user is a sender. More...
 
async IAsyncEnumerable< ContentShareWithSenderStreamReceivedContentShares (ulong? userId=null)
 Stream the content shares for which some user is a receiver. More...
 
IAsyncEnumerable< ContentShareWithSenderStreamReceivedContentShares ([NotNull] User receiver)
 Stream the content shares for which some user is a receiver. More...
 
async Task< ContentShareGetContentShare (ulong shareId, ulong? userId=null)
 Get a single content share by its id and associated user. More...
 
Task< ContentShareGetContentShare (ulong shareId, [NotNull] User user)
 Get a single content share by its id and associated user. More...
 
async Task DeleteContentShare (ulong shareId, ulong? userId=null)
 Delete a single content share by its id from the list of a user. More...
 
async IAsyncEnumerable< ConversationCreateConversation (IEnumerable< QualifiedId > recipients, string body, string subject=null, bool? forceNew=null, bool? groupConversation=null, IEnumerable< string > attachmentIds=null, string mediaCommentId=null, string mediaCommentType=null, bool? addJournalEntry=null, QualifiedId? context=null)
 Creates and streams one or more conversations.
When creating a private conversation, if a private conversation already exists between the current user and the recipient, the existing one will be reused, unless forceNew is true. More...
 
async IAsyncEnumerable< ConversationStreamConversations (ConversationReadState? readState=null, IEnumerable< QualifiedId > filter=null, bool filterIntersection=false, bool includeParticipantAvatars=false)
 Streams the conversations visible to the current user. More...
 
async Task< DetailedConversationGetConversation (ulong conversationId, bool markAsRead=false)
 Gets a single conversation by id. More...
 
async Task< ConversationEditConversation (ulong conversationId, ConversationReadState? readState=null, bool? subscribed=null, bool? starred=null)
 Edits the current user's view of a conversation by id. More...
 
async Task< ConversationAddMessageToConversation (ulong conversationId, string body, IEnumerable< QualifiedId > specificRecipients=null, IEnumerable< ulong > includedMessages=null, IEnumerable< string > attachmentIds=null, string mediaCommentId=null, string mediaCommentType=null, bool? addJournalEntry=null)
 Adds a message to the given conversation. More...
 
async Task< CourseGetCourse (ulong courseId, ulong? accountId=null, IndividualLevelCourseIncludes? includes=null, uint? teacherLimit=null)
 Get a single course by id. More...
 
CourseBuilder CreateCourse (ulong? accountId=null)
 Return a new Builders.CourseBuilder. More...
 
CourseBuilder EditCourse (ulong courseId, ulong? accountId=null)
 Return a new Builders.CourseBuilder for editing. More...
 
async Task DeleteCourse (ulong courseId)
 Delete a course. More...
 
async Task ConcludeCourse (ulong courseId)
 End a course without deleting it. More...
 
async Task< CourseSettingsGetCourseSettings (ulong courseId)
 Get a course's settings. More...
 
async Task UpdateCourseSettings (ulong courseId, CourseSettings cs)
 Update a course's settings. More...
 
async IAsyncEnumerable< UserStreamCourseUsers (ulong courseId, string searchTerm=null, IEnumerable< CourseEnrollmentTypes > enrollmentTypes=null, ulong? enrollmentRole=null, CourseUserIncludes? includes=null, IEnumerable< ulong > userIds=null, IEnumerable< CourseEnrollmentState > enrollmentStates=null)
 Streams the list of users enrolled in a course.
All arguments except for courseId are optional, and serve to narrow (or broaden) the results. More...
 
async IAsyncEnumerable< CourseStreamUserCourses (ulong userId, IndividualLevelCourseIncludes? includes=null, CourseStatesAlt? courseStates=null, CourseEnrollmentStateAlt? enrollmentState=null, bool? homeroomCoursesOnly=null)
 Streams the list of courses a user is enrolled in. All arguments except userId are optional, and serve to narrow (or broaden) the results. More...
 
async IAsyncEnumerable< UserStreamRecentCourseUsers (ulong courseId)
 Streams the list of users enrolled in a course who have recently logged in. More...
 
async Task< UserGetCourseTestStudent (ulong courseId)
 Returns the test student associated with a course. If the course does not already have a test student, a new one is created. The test student is used for the 'Student View' function on the webpage. More...
 
async Task< CourseProgressGetUserCourseProgress (ulong courseId, ulong? userId=null)
 Returns progress information for a user in a course. More...
 
async IAsyncEnumerable< CustomColumnStreamCustomGradebookColumns (ulong courseId, bool? includeHidden=null)
 Streams the custom gradebook columns in the given course. More...
 
async Task< CustomColumnCreateCustomColumn (ulong courseId, string title, int? position=null, bool? hidden=null, bool? teacherNotes=null, bool? readOnly=null)
 Creates a new custom gradebook column in the given course. More...
 
async Task< CustomColumnUpdateCustomColumn (ulong columnId, ulong courseId, string title=null, int? position=null, bool? hidden=null, bool? teacherNotes=null, bool? readOnly=null)
 Updates an existing gradebook column. Any omitted optional parameter is unchanged. More...
 
async Task< CustomColumnDeleteCustomColumn (ulong columnId, ulong courseId)
 Deletes a gradebook column. More...
 
async IAsyncEnumerable< ColumnDatumStreamColumnEntries (ulong columnId, ulong courseId)
 Streams column entries. More...
 
async Task< ColumnDatumUpdateColumnCustomEntry (ulong columnId, ulong courseId, ulong userId, string content)
 Updates the content of a custom column entry. More...
 
async Task UpdateCustomColumnEntries (ulong courseId, IEnumerable< ColumnEntryUpdate > updates)
 Bulk update the contents of several custom column entries. More...
 
async Task< DiscussionTopicGetCourseDiscussionTopic (ulong courseId, ulong discussionId, DiscussionTopicIncludes includes=DiscussionTopicIncludes.Default)
 Gets a single course discussion topic by its id. More...
 
async Task< IEnumerable< DiscussionTopic > > ListCourseDiscussionTopics (ulong id, DiscussionTopicOrdering? orderBy=null, DiscussionTopicScopes? scopes=null, bool? onlyAnnouncements=null, bool filterByUnread=false, string searchTerm=null, bool? excludeContextModuleLockedTopics=null, DiscussionTopicIncludes includes=DiscussionTopicIncludes.Default)
 Returns the list of discussion topics for this course. More...
 
CreateDiscussionTopicBuilder CreateCourseDiscussionTopic (ulong courseId)
 Returns a CreateDiscussionTopicBuilder for building a new discussion topic for the course. More...
 
async Task< IEnumerable< TopicReply > > ListDiscussionEntryReplies (ulong courseId, ulong topicId, ulong entryId, string type="courses")
 Gets the list of replies to a discussion entry. More...
 
async Task< TopicEntryPostCourseDiscussionEntry (ulong courseId, ulong discussionId, string messageBody, byte[] attachment=null, string filePath=null)
 Creates a new entry in the discussion topic. More...
 
async Task< IEnumerable< TopicEntry > > ListCourseDiscussionTopicEntries (ulong courseId, ulong topicId)
 Returns the list of discussion topic entries for the course topic. More...
 
async Task< IEnumerable< TopicEntry > > ListGroupDiscussionTopicEntries (ulong groupId, ulong topicId)
 Gets a list of discussion topic entries for a group topic, given the group and topic IDs. More...
 
async Task< EnrollmentCreateEnrollment (ulong courseId, ulong userId, CourseEnrollmentRoleTypes enrollmentType, ulong? roleId=null, CourseEnrollmentState? enrollmentState=null, ulong? courseSectionId=null, bool? limitPrivilegesToSection=null, bool? notify=null, string selfEnrollmentCode=null, bool? selfEnrolled=null, ulong? associatedUserId=null)
 Enrolls a user in a course. More...
 
Task< EnrollmentConcludeEnrollment (ulong courseId, ulong enrollmentId)
 Concludes an enrollment without deleting it.
This is the same action that occurs automatically when the user reaches the end of their time in the course, such as at the end of the school year. More...
 
Task< EnrollmentDeleteEnrollment (ulong courseId, ulong enrollmentId)
 Irrecoverably deletes an enrollment. More...
 
Task< EnrollmentDeactivateEnrollment (ulong courseId, ulong enrollmentId)
 Sets an enrollment to CourseEnrollmentState.Inactive. More...
 
async Task< bool > AcceptEnrollmentInvitation (ulong courseId, ulong enrollmentId)
 If the current user has a pending enrollment invitation, accepts it. More...
 
async Task< bool > DeclineEnrollmentInvitation (ulong courseId, ulong enrollmentId)
 If the current user has a pending enrollment invitation, decline it. More...
 
async Task< EnrollmentReactivateEnrollment (ulong courseId, ulong enrollmentId)
 Reactivate an enrollment that is inactive. More...
 
async IAsyncEnumerable< EnrollmentStreamCourseEnrollments (ulong courseId, IEnumerable< CourseEnrollmentRoleTypes > types=null, IEnumerable< CourseEnrollmentState > states=null, CourseEnrollmentIncludes? includes=null, ulong? userId=null, ulong? gradingPeriodId=null, ulong? enrollmentTermId=null, string enrollmentTermSisId=null, IEnumerable< string > sisAccountIds=null, IEnumerable< string > sisCourseIds=null, IEnumerable< string > sisSectionIds=null, IEnumerable< string > sisUserIds=null, IEnumerable< bool > createdForSisId=null)
 Streams all enrollments for the course. More...
 
async IAsyncEnumerable< EnrollmentStreamUserEnrollments (ulong userId, IEnumerable< CourseEnrollmentRoleTypes > types=null, IEnumerable< CourseEnrollmentState > states=null, CourseEnrollmentIncludes? includes=null, ulong? gradingPeriodId=null, ulong? enrollmentTermId=null, string enrollmentTermSisId=null, IEnumerable< string > sisAccountIds=null, IEnumerable< string > sisCourseIds=null, IEnumerable< string > sisSectionIds=null, IEnumerable< string > sisUserIds=null, IEnumerable< bool > createdForSisId=null)
 Streams all enrollments for the user. More...
 
async IAsyncEnumerable< EnrollmentStreamSectionEnrollments (ulong sectionId, IEnumerable< CourseEnrollmentRoleTypes > types=null, IEnumerable< CourseEnrollmentState > states=null, CourseEnrollmentIncludes? includes=null, ulong? userId=null, ulong? gradingPeriodId=null, ulong? enrollmentTermId=null, string enrollmentTermSisId=null, IEnumerable< string > sisAccountIds=null, IEnumerable< string > sisCourseIds=null, IEnumerable< string > sisSectionIds=null, IEnumerable< string > sisUserIds=null, IEnumerable< bool > createdForSisId=null)
 Streams all enrollments for the section. More...
 
async IAsyncEnumerable< EnrollmentTermStreamEnrollmentTerms (ulong? accountId=null, EnrollmentTermWorkflowStateFilter? workflowState=null, EnrollmentTermIncludes? includes=null)
 Streams the enrollment terms for an account. More...
 
async Task< EnrollmentTermGetEnrollmentTerm (ulong termId, ulong? accountId=null)
 Gets an enrollment term by id. More...
 
async Task< EnrollmentTermDeleteEnrollmentTerm (ulong termId, ulong? accountId=null)
 Deletes an enrollment term. More...
 
async Task< EnrollmentTermCreateEnrollmentTerm (EnrollmentTermBuilder builder, ulong? accountId=null)
 Creates an enrollment term. More...
 
async Task< EnrollmentTermUpdateEnrollmentTerm (ulong enrollmentId, EnrollmentTermBuilder builder, ulong? accountId=null)
 Updates an enrollment term. More...
 
async IAsyncEnumerable< ExternalToolStreamExternalTools (ulong contextId, ExternalToolContextType contextType, string searchTerm=null, bool? filterSelectable=null, bool? includeParents=null, ExternalToolPlacementType? filterPlacement=null)
 
Task< CanvasFileUploadPersonalFile (byte[] file, string filePath, string parentFolderName=null)
 Uploads a file to the current user's personal files section. More...
 
async Task< FolderCreatePersonalFolder (string name, string parentFolderName=null, DateTime? lockDate=null, DateTime? unlockDate=null, bool? locked=null, bool? hidden=null, int? position=null)
 Create a folder in the current user's personal files section. More...
 
async Task< FolderGetPersonalFolder (ulong? folderId)
 Get a single personal folder for the current user. More...
 
async IAsyncEnumerable< FolderStreamPersonalFolders ()
 Stream the current user's personal folders. More...
 
async IAsyncEnumerable< CanvasFileStreamPersonalFiles (IEnumerable< ContentType > includeContentTypes=null, IEnumerable< ContentType > excludeContentTypes=null, string searchTerm=null, FileIncludes? includes=null, bool onlyIncludeFileNames=false, FileSort? sortBy=null, Order? order=null)
 Stream the current user's personal files. More...
 
async Task< CanvasFileGetPersonalFile (ulong fileId, FileIncludes? includes=null)
 Get a single personal file for the current user. More...
 
async Task< IEnumerable< Folder > > ResolvePersonalFolderPath (params string[] parts)
 Retrieve a hierarchy of personal folders from a path. More...
 
async Task< bool > PersonalFolderPathExists (params string[] parts)
 Determine if a personal folder exists at the given path. More...
 
async Task< QuotaInfo< ulong > > GetPersonalQuota ()
 Returns the storage quota in bytes of the current user, along with the amount currently used. More...
 
Task< QuotaInfo< decimal > > GetPersonalQuotaMiB ()
 Returns the storage quota in MiB of the current user, along with the amount currently used. More...
 
async Task< CanvasFileUpdatePersonalFile (ulong fileId, DateTime? lockAt=null, DateTime? unlockAt=null, bool? locked=null, bool? hidden=null)
 Updates a personal file for the current user. All arguments except for fileId are optional. More...
 
async Task< FolderUpdatePersonalFolder (ulong folderId, string name)
 Updates a personal folder for the current user. More...
 
async Task DeletePersonalFolder (ulong folderId, bool rf=false)
 Deletes a personal folder for the current user. More...
 
async Task< CanvasFileMovePersonalFile (ulong fileId, OnDuplicate onDuplicate, string name=null, ulong? destinationFolderId=null)
 Moves a personal file for the current user. More...
 
async Task< CanvasFileCopyPersonalFile (ulong fileId, ulong destinationFolderId, OnDuplicate onDuplicate)
 Copies a personal file for the current user. More...
 
async Task< CanvasFileDeletePersonalFile (ulong fileId, bool? replace=null)
 Deletes a personal file for the current user. More...
 
async Task< IEnumerable< Day > > GetGradebookDays (ulong courseId)
 Returns a list of days in the gradebook history for this course. More...
 
async Task< IEnumerable< Grader > > GetDailyGraders (ulong courseId, DateTime date)
 Returns a list of graders who worked this day, along with the assignments they worked on. More...
 
async Task< IEnumerable< SubmissionHistory > > GetDailySubmissionHistories (ulong courseId, DateTime date, ulong graderId, ulong assignmentId)
 Returns a list of submission histories for this day. More...
 
async IAsyncEnumerable< SubmissionVersionStreamSubmissionVersions (ulong courseId, ulong? assignmentId=null, ulong? userId=null, bool? ascending=null)
 Streams an uncollated list of submission versions for all matching submissions in the context. More...
 
async IAsyncEnumerable< GradeChangeEventStreamAssignmentGradeChangelog (ulong assignmentId, DateTime? start=null, DateTime? end=null)
 Streams the grade changelog for a single assignment. More...
 
async IAsyncEnumerable< GradeChangeEventStreamCourseGradeChangelog (ulong courseId, DateTime? start=null, DateTime? end=null)
 Streams the grade changelog for a single course. More...
 
async IAsyncEnumerable< GradeChangeEventStreamStudentGradeChangelog (ulong studentId, DateTime? start=null, DateTime? end=null)
 Streams the grade changelog for a single student. More...
 
async IAsyncEnumerable< GradeChangeEventStreamGraderGradeChangelog (ulong graderId, DateTime? start=null, DateTime? end=null)
 Streams the grade changelog for a single grader. More...
 
async IAsyncEnumerable< GradingPeriodStreamGradingPeriods (ulong courseId)
 Streams all grading periods in a course. More...
 
async IAsyncEnumerable< GradingPeriodStreamAccountGradingPeriods (ulong accountId)
 Streams all grading periods in an account. More...
 
async Task< GradingPeriodGetGradingPeriod (ulong courseId, ulong gradingPeriodId)
 Gets a grading period by its id. More...
 
async Task< GradingPeriodUpdateGradingPeriod (ulong courseId, ulong gradingPeriodId, DateTime? startDate=null, DateTime? endDate=null, double? weight=null)
 Updates a single grading period. More...
 
IAsyncEnumerable< GradingPeriodBatchUpdateGradingPeriods (ulong gradingPeriodSetId, IEnumerable< GradingPeriodUpdate > gradingPeriodUpdates)
 Perform a batch update on grading periods within a grading period set. Existing grading periods can be updated, and new ones created. More...
 
IAsyncEnumerable< GradingPeriodBatchUpdateCourseGradingPeriods (ulong courseId, IEnumerable< GradingPeriodUpdate > gradingPeriodUpdates)
 Perform a batch update on grading periods within a course. Existing grading periods can be updated, and new ones created. More...
 
async Task DeleteGradingPeriod (ulong courseId, ulong gradingPeriodId)
 Deletes a grading period in a course. More...
 
async Task DeleteAccountGradingPeriod (ulong accountId, ulong gradingPeriodId)
 Deletes a grading period in an account. More...
 
async IAsyncEnumerable< GradingPeriodSetStreamGradingPeriodSets (ulong accountId)
 Streams all grading period sets in an account. More...
 
async Task< GradingPeriodSetCreateGradingPeriodSet (ulong accountId, string title, [CanBeNull] IEnumerable< ulong > termIds=null, bool? weighted=null, bool? displayTotalsForAllGradingPeriods=null)
 Creates a new grading period set. More...
 
async Task UpdateGradingPeriodSet (ulong accountId, ulong gradingPeriodSetId, [CanBeNull] string title=null, [CanBeNull] IEnumerable< ulong > termIds=null, bool? weighted=null, bool? displayTotalsForAllGradingPeriods=null)
 Updates an existing grading period set. More...
 
async Task DeleteGradingPeriodSet (ulong accountId, ulong gradingPeriodSetId)
 Deletes a grading period set. More...
 
IAsyncEnumerable< UserLoginStreamUserLogins (ulong userId)
 
IAsyncEnumerable< UserLoginStreamAccountLogins (ulong accountId)
 
async Task< IEnumerable< ActivityStreamObject > > GetActivityStream (bool? onlyActiveCourses=null)
 Gets the activity stream for the current user. More...
 
async IAsyncEnumerable< ActivityStreamObjectStreamActivityStream (bool? onlyActiveCourses=null)
 Streams the activity stream for the current user. More...
 
async Task< Dictionary< string, ActivityStreamSummaryEntry > > GetActivityStreamSummary ()
 Returns the summary of activity stream entries for the current user. More...
 
async IAsyncEnumerable< PageViewStreamUserPageViews (ulong? userId=null, DateTime? startTime=null, DateTime? endTime=null)
 Streams the user's page view history. Page views are returned in descending order; newest to oldest. More...
 
async Task< JObject > DeleteCustomJson (string ns, string scopes="", ulong? userId=null)
 Delete arbitrary user data stored with StoreCustomJson. Corresponds to the API endpoint DELETE /api/v1/users/:user_id/custom_data(/*scope). More...
 
async Task< JObject > LoadCustomJson (string ns, string scopes, ulong? userId=null)
 Retrieve arbitrary user data as JSON. Corresponds to the API endpoint GET /api/v1/users/:user_id/custom_data(/*scope). More...
 
async Task< JObject > StoreCustomJson (string ns, string scopes, JObject data, ulong? userId=null)
 Store arbitrary user data as JSON. Corresponds to the API endpoint PUT /api/v1/users/:user_id/custom_data(/*scope). More...
 
async IAsyncEnumerable< ModuleStreamModules (ulong courseId, [CanBeNull] string searchTerm=null, ulong? studentId=null, ModuleIncludeType includes=ModuleIncludeType.None)
 Streams the list of modules for the given course. More...
 
async Task< ModuleGetModule (ulong moduleId, ulong courseId, ulong? studentId=null, ModuleIncludeType includes=ModuleIncludeType.None)
 Gets a module by its id and course id. More...
 
async IAsyncEnumerable< ModuleItemStreamModuleItems (ulong moduleId, ulong courseId, bool includeContentDetails=true, [CanBeNull] string searchTerm=null, ulong? studentId=null)
 Streams the items in a module. More...
 
async Task< ModuleItemSequenceGetModuleItemSequence (ulong courseId, ModuleAssetType assetType, ulong assetId)
 Given an asset, find the module item sequence it belongs to. More...
 
async IAsyncEnumerable< UserStreamObservees (ulong observerId)
 Streams the observees associated with an observer. More...
 
async IAsyncEnumerable< UserStreamObservers (ulong observeeId)
 Streams the observers associated with an observee. More...
 
async Task< UserAddObservee (ulong observerId, ulong observeeId, ulong? rootAccountId=null)
 Set a user to be observed by another user. More...
 
async Task< UserRemoveObservee (ulong observerId, ulong observeeId, ulong? rootAccountId=null)
 Set a user to stop being observed by another user. More...
 
async IAsyncEnumerable< PageStreamCoursePages (ulong courseId, PageSort? sort=null, Order? order=null, string searchTerm=null, bool? published=null)
 Stream all pages for a course. More...
 
async Task< PageGetCoursePage (ulong courseId, string url)
 Get a single course page by its URL. More...
 
async Task< PageGetCourseFrontPage (ulong courseId)
 Get a course's front page. More...
 
async IAsyncEnumerable< PageRevisionStreamCoursePageRevisionHistory (ulong courseId, string url)
 Streams the history of course page revisions. More...
 
async Task< PageRevisionGetCoursePageRevision (ulong courseId, string url, ulong revisionId, bool? omitDetails=null)
 Returns a single course page revision. More...
 
async Task< ProficiencyGetProficiencyRatings (ulong? accountId=null)
 Gets the proficiency ratings for an account. More...
 
async Task< IEnumerable< ReportDescription > > ListAvailableReports (ulong? accountId=null)
 Get a list of available report types and parameters for a given account. More...
 
async Task< ReportStartReport (string reportType, IEnumerable<(string, object)> parameters, ulong? accountId=null)
 Run a report. More...
 
async Task< ReportGetReportStatus (string reportType, ulong reportId, ulong? accountId=null)
 Gets the status of a report by id. More...
 
async Task< IEnumerable< Report > > GetReportIndex (string reportType, ulong? accountId=null)
 Get a set of reports for an account, given the report type. More...
 
async Task< IEnumerable< Role > > ListRoles (RoleState states=0, bool? showInherited=null, ulong? accountId=null)
 Returns a list of roles under a given account. More...
 
Task< RoleCreateRole (string label, in RolePermissionsSet? permissions=null, string baseRoleType=null, ulong? accountId=null)
 Creates a new role. More...
 
async IAsyncEnumerable< SectionStreamCourseSections (ulong courseId, SectionIncludes includes=0)
 Streams all sections in a course. More...
 
async Task< SectionGetSection (ulong courseId, ulong sectionId)
 Gets a single section by course and section id. More...
 
async Task< SectionCrossListSection (ulong sectionId, ulong targetCourseId)
 Cross-lists a section. More...
 
async Task< SectionUnCrossListSection (ulong sectionId)
 Removes the cross-listing of a section. More...
 
async Task< SisImportImportSisData ([NotNull] byte[] file, [NotNull] string filePath, ulong? accountId=null, bool batchMode=false, bool? overrideStickiness=null)
 Performs a SIS import. More...
 
async Task< SisImportGetSisImport (ulong id, ulong? accountId=null)
 Gets a previously performed SIS import. More...
 
CreateUserBuilder CreateUser (string accountId="self")
 Returns a CreateUserBuilder for creating a new user. More...
 
async Task< UserEditUser (IEnumerable< ValueTuple< string, string >> fields, ulong? id=null)
 Modify an existing user. The fields that can be modified are: {name, short_name, sortable_name, time_zone, email, locale, title, bio}. Corresponds to the API endpoint PUT /api/v1/users/:id More...
 
async Task< ProfileGetUserProfile (ulong? id=null)
 Get the profile of a user. More...
 
async Task< UserGetUser (ulong? id=null)
 Get details for a user, including a non-comprehensive list of permissions. More...
 
ValueTask< UserGetUserBySis (string sis)
 Search for a user by SIS id. More...
 
ValueTask< UserGetUserByLoginSis (string sis)
 Search for a user by SIS id, using user login records. More...
 
async Task< IEnumerable< User > > ListUsers (string searchTerm=null, string sort=null, string order=null, string accountId="self")
 Get the list of users associated with the account. Corresponds to the API endpoint GET /api/v1/accounts/:account_id/users. More...
 
async IAsyncEnumerable< UserStreamUsers (string searchTerm=null, string sort=null, string order=null, string accountId="self")
 Stream the list of users associated with the account. Corresponds to the API endpoint GET /api/v1/accounts/:account_id/users. More...
 
async Task< UserDeleteUser (ulong userId, ulong? accountId=null)
 Delete a user. More...
 
async IAsyncEnumerable< ToDoItemStreamToDoItems (bool includeUngradedQuizzes=false)
 Stream the current user's to-do items. More...
 
async IAsyncEnumerable< AssignmentStreamMissingAssignments (ulong? userId=null, bool submittableOnly=false, bool includePlannerOverrides=false, bool includeCourse=false)
 Stream a user's past-due assignments which have no submissions. More...
 

Detailed Description

This class is the primary interface for interacting with the Canvas API.

API instances are intended to be be reused between calls, and should only be constructed once per token, per thread.
The only internal state maintained by this class is HttpClient, which is thread safe; and the masquerade state, which is not thread safe. Do not share the same instance of this class between threads if any thread will call MasqueradeAs or StopMasquerading.

Member Enumeration Documentation

◆ AccountIncludes

Additional data which can be included in Account responses.

Enumerator
Default 

No additional data.

LtiGuid 

Include LTI GUID.

RegistrationSettings 

Include registration settings.

Services 

Include services.

◆ AccountLevelCourseIncludes

Optional account-related data to include with courses.

Enumerator
SyllabusBody 

Include the course syllabus body.

Term 

Include the course term.

CourseProgress 

Include the course progress.

StorageQuotaUsedMb 

Include the storage quota used by the course.

TotalStudents 

Include the total amount of students in the course.

Teachers 

Include course teacher data.

AccountName 

Include the account name.

Concluded 

Include the course's conclusion status.

Everything 

Include everything.

◆ AppointmentGroupIncludes

Data that can be included in responses containing appointment groups.

Enumerator
Appointments 

The individual calendar events representing each time slot.

Reservations 

The individual reservations, if any exist.

ParticipantCount 

The number of reservations.

ReservedTimes 

The id, start time, and end time of reservations the current user has made in the appointment group.

AllContextCodes 

All context codes associated with the appointment group.

Everything 

Include all optional data for the appointment group.

◆ AppointmentVisibilityScope

The kind of relationship a user can have with an appointment group.

Enumerator
Reservable 

The user can make a reservation in the appointment group.

Manageable 

The user can manage the appointment group.

◆ AssignmentBucket

Buckets that assignments can be sorted into.

Enumerator
Past 

Past assignments.

Overdue 

Overdue assignments.

Undated 

Undated assignments.

Ungraded 

Ungraded assignments.

Unsubmitted 

Unsubmitted assignments.

Upcoming 

Upcoming assignments.

Future 

Future assignments.

◆ AssignmentIncludes

Categories of optional data that can be requested for inclusion within Assignment objects.

Enumerator
Default 

Include no extra data.

Submission 

Include the assignment's submissions.

AssignmentVisibility 

Include the assignment's visibility information.

Overrides 

Include any applicable assignment overrides.

ObservedUsers 

Include any observed users.

AllDates 

Include all relevant dates.

◆ CourseEnrollmentIncludes

Categories of optional data that can be requested for inclusion within Enrollment objects.

Enumerator
AvatarUrl 

Include avatar URLs.

GroupIds 

Include group ids.

Locked 

Include locked status.

ObservedUsers 

Include observation information.

CanBeRemoved 

Include whether the enrollment is removable.

Uuid 

Include UUIDs.

◆ CourseEnrollmentRoleTypes

The types of enrollment a user can have in a course, in terms of enrollment role.

These are distinct, in Canvas, from the values of CourseEnrollmentTypes.

Enumerator
StudentEnrollment 

The user is a student.

TeacherEnrollment 

The user is a teacher.

TaEnrollment 

The user is a TA.

ObserverEnrollment 

The user is an observer.

DesignerEnrollment 

The user is a designer.

◆ CourseEnrollmentState

The states of enrollment a user can have in a course.

Enumerator
Active 

The user can participate in the course.

Invited 

The user has been sent a course invitation, and will become Active once they accept.

Inactive 

The student appears in the course roster, but is unable to participate in the course.

◆ CourseEnrollmentStateAlt

An alternate version of CourseEnrollmentState used by StreamUserCourses().

◆ CourseEnrollmentTypes

The types of enrollment a user can have in a course.

These are distinct, in Canvas, from the values of CourseEnrollmentRoleTypes.

Enumerator
Teacher 

The user is a teacher.

Student 

The user is a student.

Ta 

The user is a TA.

Observer 

The user is an observer.

Designer 

The user is a course designer.

StudentView 

The user is a test student.

◆ CourseSearchBy

Categories that courses can be searched by.

Enumerator
Course 

Search by course.

Teacher 

Search by teacher.

◆ CourseSort

Categories that courses can be sorted by.

Enumerator
CourseName 

Sort by course name.

SisCourseId 

Sort by course SIS id.

Teacher 

Sort by teacher.

AccountName 

Sort by the account the course is under.

◆ CourseStates

The types of states a course can have.

Enumerator
Created 

The course is freshly created.

Claimed 

The course is claimed.

Available 

The course is available.

Completed 

The course has concluded.

Deleted 

The course has been deleted.

All 

All states; used for searching and filtering.

◆ CourseStatesAlt

An alternate version of CourseStates used by StreamUserCourses().

◆ CourseUserIncludes

Optional data that can be included with results from StreamCourseUsers().

Enumerator
Enrollments 

Include each user's course enrollment.

Locked 

Include whether the enrollment is locked.

AvatarUrl 

Include each user's avatar url.

TestStudent 

Include the course's test student with the overall list.

Bio 

Include each user's bio.

CustomLinks 

Include each user's custom links supplied by plugins.

CurrentGradingPeriodScores 

Depends on CourseUserIncludes.Enrollments. Modifies the grades and scores returned with the enrollment objects to be for the current grading period.

Uuid 

Include each user's UUID.

◆ DiscussionTopicIncludes

Categories of optional data that can be requested for inclusion within DiscussionTopic objects.

Enumerator
Default 

Include no optional data.

AllDates 

Include relevant dates.

Sections 

Include section information.

SectionsUserCount 

Include quantitative section information.

Overrides 

Include any overrides.

◆ DiscussionTopicOrdering

An ordering that can be applied to sets of DiscussionTopic.

Enumerator
Position 

Order by the topic position.

RecentActivity 

Order by recent activity.

Title 

Order by the topic title.

◆ DiscussionTopicScopes

Scopes that DiscussionTopics can be filtered by.

Enumerator
Locked 

The topic is locked.

Unlocked 

The topic is unlocked.

Pinned 

The discussion is pinned to the top.

Unpinned 

The discussion is not pinned.

◆ EnrollmentTermIncludes

Optional data that can be included with EnrollmentTerm objects.

Enumerator
Overrides 

Include any term overrides.

◆ EnrollmentTermWorkflowStateFilter

Categories of workflow state to filter by when querying enrollment terms.

See also
Api.StreamEnrollmentTerms, EnrollmentTerm
Enumerator
Active 

The term is active.

Deleted 

The term is deleted.

All 

All terms.

◆ FileIncludes

Categories of optional data that can be requested for inclusion within CanvasFile objects.

Enumerator
User 

Include the file's owner as a complete user object.

UsageRights 

Include usage rights/licensing information for the file.

◆ FileSort

Categories a CanvasFile can be sorted by.

Enumerator
Name 

Sort by name.

Size 

Sort by size.

CreatedAt 

Sort by creation time.

UpdatedAt 

Sort by update time.

ContentType 

Sort by content type.

User 

Sort by the file owner.

◆ IndividualLevelCourseIncludes

Categories of optional data that can be included with Course objects, when fetched individually by ID.

These options are generally unavailable when fetching courses in bulk, such as by StreamCourses().

Enumerator
SyllabusBody 

Include the syllabus body.

Term 

Include the course term.

CourseProgress 

Include the course progress.

StorageQuotaUsedMb 

Include the amount of storage quota this course has used.

TotalStudents 

Include the total number of students in the course.

Teachers 

Include the teachers of the course.

AccountName 

Include the name of the account or subaccount the course is associated with.

Concluded 

Include whether the course is concluded.

AllCourses 

Include related courses.

Permissions 

Include course permissions.

ObservedUsers 

Include observed users.

CourseImage 

Include the course image.

NeedsGradingCount 

Include the count of how many assignments need grading.

PublicDescription 

Include the course's public description.

TotalScores 

Include the course's overall scores.

CurrentGradingPeriodScores 

Include the course's scores for the current grading period.

Account 

Include the account or subaccount the course is associated with.

Sections 

Include the course's sections.

PassbackStatus 

Include the course's passback status.

Favorites 

Include the course's favorites.

Everything 

Include all possible data.

◆ ModuleIncludeType

Include modes for API methods returning Module.

Canvas allows these includes to be omitted even if requested if they exceed an unspecified size. Consider using StreamModuleItems for this data instead of relying on includes.

See also
Api.StreamModules, Api.GetModule
Enumerator
None 

No additional includes requested.

TryIncludeItems 

Try to include module items.

TryIncludeItemsAndContentDetails 

Try to include module items and content details.

◆ OnDuplicate

Behavior when encountering a duplicate item.

Enumerator
Overwrite 

Overwrite the previous item with the new item.

Rename 

Rename the new item.

◆ Order

Direction to sort by.

Enumerator
Ascending 

Sort in ascending order.

Descending 

Sort in descending order.

◆ PageSort

Keys by which a Page can be sorted.

Enumerator
Title 

Sort by the page title/

CreatedAt 

Sort by the page creation date.

UpdatedAt 

Sort by the page update date.

◆ SectionIncludes

Additional data which can be included in Section responses.

Enumerator
Students 

Include the students.

AvatarUrl 

Include avatar URLs.

Enrollments 

Include the enrollments.

TotalStudents 

Include the count of students.

PassbackStatus 

Include the passback status.

Everything 

Include all optional data.

◆ StudentCourseSummarySortColumn

The columns which the data from Api.StreamCourseStudentSummary can be sorted by.

Enumerator
Name 

Sort by name, ascending.

NameDescending 

Sort by name, descending.

Score 

Sort by score, ascending.

ScoreDescending 

Sort by score, descending.

Participations 

Sort by participation, ascending.

ParticipationsDescending 

Sort by participation, descending.

PageViews 

Sort by page views, ascending.

PageViewsDescending 

Sort by page views, descending.

Constructor & Destructor Documentation

◆ Api()

UVACanvasAccess.ApiParts.Api.Api ( string  token,
string  baseUrl,
TimeSpan?  timeout = null 
)
inline

Construct a new API instance.

Parameters
tokenThe token used to authenticate this API instance.
baseUrlThe base API url, e.g. https://YOUR_ORGANIZATION.instructure.com/api/v1/
timeout(Optional) The maximum amount of time one request may take before it is cancelled.

Member Function Documentation

◆ AcceptEnrollmentInvitation()

async Task<bool> UVACanvasAccess.ApiParts.Api.AcceptEnrollmentInvitation ( ulong  courseId,
ulong  enrollmentId 
)
inline

If the current user has a pending enrollment invitation, accepts it.

Parameters
courseIdThe course.
enrollmentIdThe enrollment to accept.
Returns
Whether or not the operation was successful.

◆ AddMessageToConversation()

async Task<Conversation> UVACanvasAccess.ApiParts.Api.AddMessageToConversation ( ulong  conversationId,
string  body,
IEnumerable< QualifiedId specificRecipients = null,
IEnumerable< ulong >  includedMessages = null,
IEnumerable< string >  attachmentIds = null,
string  mediaCommentId = null,
string  mediaCommentType = null,
bool?  addJournalEntry = null 
)
inline

Adds a message to the given conversation.

Parameters
conversationIdThe conversation id.
bodyThe message to send.
specificRecipients(Optional) Specific recipients to send the message to.
includedMessages(Optional) The set of past messages to send to recipients not already present in the conversation.
attachmentIds(Optional) Attachment ids. Attachments must have been uploaded to the current user's attachments folder.
mediaCommentId(Optional) Media comment id.
mediaCommentType(Optional) Media comment type.
addJournalEntry(Optional) If true, a faculty journal entry will be created to record this conversation.
Returns
The conversation.

◆ AddObservee()

async Task<User> UVACanvasAccess.ApiParts.Api.AddObservee ( ulong  observerId,
ulong  observeeId,
ulong?  rootAccountId = null 
)
inline

Set a user to be observed by another user.

Parameters
observerIdThe user to become the observer.
observeeIdThe user to become the observee.
rootAccountId(Optional) The id of the root account with which to associate the link.
Returns
The observee.

◆ BatchGetAssignmentOverrides()

async Task<IEnumerable<AssignmentOverride> > UVACanvasAccess.ApiParts.Api.BatchGetAssignmentOverrides ( ulong  courseId,
ILookup< ulong, ulong >  assignmentsToOverrides 
)
inline

Gets a collection of AssignmentOverride objects, given a course id, a set of override ids, and the assignments they belong to.

Parameters
courseIdThe course id.
assignmentsToOverridesA mapping of assignment ids to override ids.
Returns
The collection of AssignmentOverrides.

◆ BatchUpdateCourseGradingPeriods()

IAsyncEnumerable<GradingPeriod> UVACanvasAccess.ApiParts.Api.BatchUpdateCourseGradingPeriods ( ulong  courseId,
IEnumerable< GradingPeriodUpdate gradingPeriodUpdates 
)
inline

Perform a batch update on grading periods within a course. Existing grading periods can be updated, and new ones created.

Parameters
courseIdThe course id.
gradingPeriodUpdatesThe list of updates.
Returns
The stream of new and updated grading periods.

◆ BatchUpdateGradingPeriods()

IAsyncEnumerable<GradingPeriod> UVACanvasAccess.ApiParts.Api.BatchUpdateGradingPeriods ( ulong  gradingPeriodSetId,
IEnumerable< GradingPeriodUpdate gradingPeriodUpdates 
)
inline

Perform a batch update on grading periods within a grading period set. Existing grading periods can be updated, and new ones created.

Parameters
gradingPeriodSetIdThe grading period set id.
gradingPeriodUpdatesThe list of updates.
Returns
The stream of new and updated grading periods.

◆ ConcludeCourse()

async Task UVACanvasAccess.ApiParts.Api.ConcludeCourse ( ulong  courseId)
inline

End a course without deleting it.

Parameters
courseIdThe course id.
Returns
The concluded course.

◆ ConcludeEnrollment()

Task<Enrollment> UVACanvasAccess.ApiParts.Api.ConcludeEnrollment ( ulong  courseId,
ulong  enrollmentId 
)
inline

Concludes an enrollment without deleting it.
This is the same action that occurs automatically when the user reaches the end of their time in the course, such as at the end of the school year.

Parameters
courseIdThe course.
enrollmentIdThe enrollment.
Returns
The concluded enrollment.

◆ CopyPersonalFile()

async Task<CanvasFile> UVACanvasAccess.ApiParts.Api.CopyPersonalFile ( ulong  fileId,
ulong  destinationFolderId,
OnDuplicate  onDuplicate 
)
inline

Copies a personal file for the current user.

Parameters
fileIdThe file id.
destinationFolderIdThe id of the folder to copy the file into.
onDuplicateThe action taken to resolve a duplicate.
Returns
The new file.

◆ CreateAppointmentGroup() [1/2]

AppointmentGroupBuilder UVACanvasAccess.ApiParts.Api.CreateAppointmentGroup ( string  title,
IEnumerable< EventContext contexts 
)
inline

Returns an AppointmentGroupBuilder for creating a new appointment group.

Parameters
titleThe title of the appointment group.
contextsThe event contexts relevant to the appointment group.
Returns
The AppointmentGroupBuilder.

◆ CreateAppointmentGroup() [2/2]

AppointmentGroupBuilder UVACanvasAccess.ApiParts.Api.CreateAppointmentGroup ( string  title,
params EventContext[]  contexts 
)
inline

Returns an AppointmentGroupBuilder for creating a new appointment group.

Parameters
titleThe title of the appointment group.
contextsThe event contexts relevant to the appointment group.
Returns
The AppointmentGroupBuilder.

◆ CreateAssignment()

AssignmentBuilder UVACanvasAccess.ApiParts.Api.CreateAssignment ( ulong  courseId)
inline

Returns a AssignmentBuilder for creating a new assignment.

Parameters
courseIdThe course id.
Returns
The builder.

◆ CreateAssignmentOverride()

AssignmentOverrideBuilder UVACanvasAccess.ApiParts.Api.CreateAssignmentOverride ( ulong  courseId,
ulong  assignmentId 
)
inline

Returns an AssignmentOverrideBuilder for creating a new assignment override.

Parameters
courseIdThe course id.
assignmentIdThe assignment id.
Returns
The AssignmentOverrideBuilder.

◆ CreateContentShare() [1/2]

async Task<ContentShare> UVACanvasAccess.ApiParts.Api.CreateContentShare ( [NotNull] IEnumerable< ulong >  receivers,
ContentShareType  contentType,
ulong  contentId,
ulong?  senderId = null 
)
inline

Create a content share between one sender and one or more receivers.

Parameters
receiversThe list of receiver ids.
contentTypeThe type of the content being shared.
contentIdThe id of the content being shared.
senderId(Optional) The id of the sender. Self by default.
Returns
The created content share.

◆ CreateContentShare() [2/2]

Task<ContentShare> UVACanvasAccess.ApiParts.Api.CreateContentShare ( [ItemNotNull] IEnumerable< User receivers,
ContentShareType  contentType,
ulong  contentId,
ulong?  senderId = null 
)
inline

Create a content share between one sender and one or more receivers.

Parameters
receiversThe list of receivers.
contentTypeThe type of the content being shared.
contentIdThe id of the content being shared.
senderId(Optional) The id of the sender. Self by default.
Returns
The created content share.

◆ CreateConversation()

async IAsyncEnumerable<Conversation> UVACanvasAccess.ApiParts.Api.CreateConversation ( IEnumerable< QualifiedId recipients,
string  body,
string  subject = null,
bool?  forceNew = null,
bool?  groupConversation = null,
IEnumerable< string >  attachmentIds = null,
string  mediaCommentId = null,
string  mediaCommentType = null,
bool?  addJournalEntry = null,
QualifiedId context = null 
)
inline

Creates and streams one or more conversations.
When creating a private conversation, if a private conversation already exists between the current user and the recipient, the existing one will be reused, unless forceNew is true.

Parameters
recipientsThe recipients of the created conversations(s).
bodyThe message to send.
subject(Optional) The subject of the conversation. This is ignored when a conversation is reused.
forceNew(Optional) If true, prevents conversations from being reused.
groupConversation(Optional) If true, a group conversation will be created with all recipients.
attachmentIds(Optional) Attachment ids. Attachments must have been uploaded to the current user's attachments folder.
mediaCommentId(Optional) Media comment id.
mediaCommentType(Optional) Media comment type.
addJournalEntry(Optional) If true, a faculty journal entry will be created to record this conversation.
context(Optional) The context of this conversation (???).
Returns
The created conversations.

◆ CreateCourse()

CourseBuilder UVACanvasAccess.ApiParts.Api.CreateCourse ( ulong?  accountId = null)
inline

Return a new Builders.CourseBuilder.

Parameters
accountId(Optional) The account id.
Returns
The course builder.

◆ CreateCourseDiscussionTopic()

CreateDiscussionTopicBuilder UVACanvasAccess.ApiParts.Api.CreateCourseDiscussionTopic ( ulong  courseId)
inline

Returns a CreateDiscussionTopicBuilder for building a new discussion topic for the course.

Parameters
courseIdThe course id.
Returns
The builder.

◆ CreateCustomColumn()

async Task<CustomColumn> UVACanvasAccess.ApiParts.Api.CreateCustomColumn ( ulong  courseId,
string  title,
int?  position = null,
bool?  hidden = null,
bool?  teacherNotes = null,
bool?  readOnly = null 
)
inline

Creates a new custom gradebook column in the given course.

Parameters
courseIdThe course id.
titleThe title of the column.
position(Optional) The position of the column relative to other columns.
hidden(Optional; default = false) If true, this column will be hidden.
teacherNotes(Optional; default = false) If true, this column will be considered a teacher notes column.
readOnly(Optional; default = false) If true, this column will not be editable through the UI.
Returns
The newly created column.

◆ CreateEnrollment()

async Task<Enrollment> UVACanvasAccess.ApiParts.Api.CreateEnrollment ( ulong  courseId,
ulong  userId,
CourseEnrollmentRoleTypes  enrollmentType,
ulong?  roleId = null,
CourseEnrollmentState enrollmentState = null,
ulong?  courseSectionId = null,
bool?  limitPrivilegesToSection = null,
bool?  notify = null,
string  selfEnrollmentCode = null,
bool?  selfEnrolled = null,
ulong?  associatedUserId = null 
)
inline

Enrolls a user in a course.

Parameters
courseIdThe course id.
userIdThe user id.
enrollmentTypeThe enrollment type.
roleIdAn optional course-level role to assign to the user.
enrollmentStateThe enrollment state. CourseEnrollmentState.Invited by default.
If CourseEnrollmentState.Invited, the user will be sent a course invite.
courseSectionIdOptionally, the course section to enroll in.
limitPrivilegesToSectionOptionally, only allow this user to interact with users in the same section.
notifyWhether or not this user should be notified to changes in the course. Disabled by default.
selfEnrollmentCodeIf self-enrolling, the self-enrollment code.
selfEnrolledWhether or not this is a self-enrollment.
associatedUserIdIf this is an observer enrollment, the id of the target student.
Returns
The new enrollment.

◆ CreateEnrollmentTerm()

async Task<EnrollmentTerm> UVACanvasAccess.ApiParts.Api.CreateEnrollmentTerm ( EnrollmentTermBuilder  builder,
ulong?  accountId = null 
)
inline

Creates an enrollment term.

Parameters
builderThe completed EnrollmentTermBuilder.
accountIdThe account id. Defaults to the current account.
Returns
The newly created EnrollmentTerm.

◆ CreateGradingPeriodSet()

async Task<GradingPeriodSet> UVACanvasAccess.ApiParts.Api.CreateGradingPeriodSet ( ulong  accountId,
string  title,
[CanBeNull] IEnumerable< ulong >  termIds = null,
bool?  weighted = null,
bool?  displayTotalsForAllGradingPeriods = null 
)
inline

Creates a new grading period set.

Parameters
accountIdThe id of the account under which to create the grading period set.
titleThe title of the set.
termIdsOptional; Term ids to associate with the set.
weightedOptional; Whether the set is weighted.
displayTotalsForAllGradingPeriodsOptional; Whether the totals for all grading periods in the set are displayed.
Returns
The newly created set.

◆ CreatePersonalFolder()

async Task<Folder> UVACanvasAccess.ApiParts.Api.CreatePersonalFolder ( string  name,
string  parentFolderName = null,
DateTime?  lockDate = null,
DateTime?  unlockDate = null,
bool?  locked = null,
bool?  hidden = null,
int?  position = null 
)
inline

Create a folder in the current user's personal files section.

Parameters
nameThe folder name.
parentFolderName(Optional) The path to create the folder in. By default, root.
lockDate(Optional) The date to lock the folder on.
unlockDate(Optional) The date to unlock the folder on.
locked(Optional) Lock the folder.
hidden(Optional) Hide the folder.
position(Optional) The folder's position in the list of folders.
Returns
The new folder.

◆ CreateRole()

Task<Role> UVACanvasAccess.ApiParts.Api.CreateRole ( string  label,
in RolePermissionsSet permissions = null,
string  baseRoleType = null,
ulong?  accountId = null 
)
inline

Creates a new role.

Parameters
labelThe role's name/label.
permissionsThe role's permissions.
baseRoleTypeThe existing role type to inherit from.
accountIdThe account id. Defaults to the current account.
Returns
The newly created Role.

◆ CreateUser()

CreateUserBuilder UVACanvasAccess.ApiParts.Api.CreateUser ( string  accountId = "self")
inline

Returns a CreateUserBuilder for creating a new user.

Parameters
accountIdThe account to create the user under. self by default.
Returns
The builder.

◆ CrossListSection()

async Task<Section> UVACanvasAccess.ApiParts.Api.CrossListSection ( ulong  sectionId,
ulong  targetCourseId 
)
inline

Cross-lists a section.

Parameters
sectionIdThe section id.
targetCourseIdThe course to cross-list with.
Returns
The section.

◆ DeactivateEnrollment()

Task<Enrollment> UVACanvasAccess.ApiParts.Api.DeactivateEnrollment ( ulong  courseId,
ulong  enrollmentId 
)
inline

Sets an enrollment to CourseEnrollmentState.Inactive.

Parameters
courseIdThe course.
enrollmentIdThe enrollment.
Returns
The inactivated enrollment.

◆ DeclineEnrollmentInvitation()

async Task<bool> UVACanvasAccess.ApiParts.Api.DeclineEnrollmentInvitation ( ulong  courseId,
ulong  enrollmentId 
)
inline

If the current user has a pending enrollment invitation, decline it.

Parameters
courseIdThe course.
enrollmentIdThe enrollment to accept.
Returns
Whether or not the operation was successful.

◆ DeleteAccountGradingPeriod()

async Task UVACanvasAccess.ApiParts.Api.DeleteAccountGradingPeriod ( ulong  accountId,
ulong  gradingPeriodId 
)
inline

Deletes a grading period in an account.

Parameters
accountIdThe id of the account the grading period belongs to.
gradingPeriodIdThe id of the grading period.

◆ DeleteAppointmentGroup()

async Task<AppointmentGroup> UVACanvasAccess.ApiParts.Api.DeleteAppointmentGroup ( ulong  id,
string  reason = null 
)
inline

Deletes an appointment group.

Parameters
idThe id of the group.
reasonAn optional reason.
Returns
The deleted appointment group.

◆ DeleteContentShare()

async Task UVACanvasAccess.ApiParts.Api.DeleteContentShare ( ulong  shareId,
ulong?  userId = null 
)
inline

Delete a single content share by its id from the list of a user.

Parameters
shareIdThe id of the share.
userId(Optional) The user whose view of the share will be deleted. Self by default.
Returns
A void task.

The share will still be visible to other users.

◆ DeleteCourse()

async Task UVACanvasAccess.ApiParts.Api.DeleteCourse ( ulong  courseId)
inline

Delete a course.

Parameters
courseIdThe course id.
Returns
The deleted course.

◆ DeleteCustomColumn()

async Task<CustomColumn> UVACanvasAccess.ApiParts.Api.DeleteCustomColumn ( ulong  columnId,
ulong  courseId 
)
inline

Deletes a gradebook column.

Parameters
columnIdThe column id.
courseIdThe course id.
Returns
The deleted column.

◆ DeleteCustomJson()

async Task<JObject> UVACanvasAccess.ApiParts.Api.DeleteCustomJson ( string  ns,
string  scopes = "",
ulong?  userId = null 
)
inline

Delete arbitrary user data stored with StoreCustomJson. Corresponds to the API endpoint DELETE /api/v1/users/:user_id/custom_data(/*scope).

Parameters
nsThe namespace under which the data is stored.
scopesThe scope, and optionally subscopes, under which the data is stored. Omit scope to delete all custom data.
userIdThe id of the user.
Returns
The JSON data that was deleted.
Exceptions
Exception
See also
StoreCustomJson

◆ DeleteEnrollment()

Task<Enrollment> UVACanvasAccess.ApiParts.Api.DeleteEnrollment ( ulong  courseId,
ulong  enrollmentId 
)
inline

Irrecoverably deletes an enrollment.

Parameters
courseIdThe course.
enrollmentIdThe enrollment.
Returns
The deleted enrollment.

◆ DeleteEnrollmentTerm()

async Task<EnrollmentTerm> UVACanvasAccess.ApiParts.Api.DeleteEnrollmentTerm ( ulong  termId,
ulong?  accountId = null 
)
inline

Deletes an enrollment term.

Parameters
termIdThe term id.
accountIdThe account id. Defaults to the current account.
Returns
The now-deleted EnrollmentTerm.

◆ DeleteGradingPeriod()

async Task UVACanvasAccess.ApiParts.Api.DeleteGradingPeriod ( ulong  courseId,
ulong  gradingPeriodId 
)
inline

Deletes a grading period in a course.

Parameters
courseIdThe id of the course the grading period belongs to.
gradingPeriodIdThe id of the grading period.

◆ DeleteGradingPeriodSet()

async Task UVACanvasAccess.ApiParts.Api.DeleteGradingPeriodSet ( ulong  accountId,
ulong  gradingPeriodSetId 
)
inline

Deletes a grading period set.

Parameters
accountIdThe id of the account the grading period set belongs to.
gradingPeriodSetIdThe id of the grading period set.

◆ DeletePersonalFile()

async Task<CanvasFile> UVACanvasAccess.ApiParts.Api.DeletePersonalFile ( ulong  fileId,
bool?  replace = null 
)
inline

Deletes a personal file for the current user.

Parameters
fileIdThe file id.
replace(Optional) If true, the file and all generated previews will be replaced with a blank placeholder.
Returns
The file.

◆ DeletePersonalFolder()

async Task UVACanvasAccess.ApiParts.Api.DeletePersonalFolder ( ulong  folderId,
bool  rf = false 
)
inline

Deletes a personal folder for the current user.

Parameters
folderIdThe folder id.
rf(Optional) If true, the folder does not need to be empty.
Returns

◆ DeleteUser()

async Task<User> UVACanvasAccess.ApiParts.Api.DeleteUser ( ulong  userId,
ulong?  accountId = null 
)
inline

Delete a user.

Parameters
userIdThe user id.
accountIdThe account the user is under. self by default.
Returns
The deleted user.

◆ EditAppointmentGroup() [1/3]

AppointmentGroupBuilder UVACanvasAccess.ApiParts.Api.EditAppointmentGroup ( AppointmentGroup  appointmentGroup)
inline

Returns an AppointmentGroupBuilder for modifying an existing appointment group.

Parameters
appointmentGroupThe AppointmentGroup to edit.
Returns
The AppointmentGroupBuilder.

◆ EditAppointmentGroup() [2/3]

AppointmentGroupBuilder UVACanvasAccess.ApiParts.Api.EditAppointmentGroup ( AppointmentGroup  appointmentGroup,
IEnumerable< EventContext contexts 
)
inline

Returns an AppointmentGroupBuilder for modifying an existing appointment group.

Parameters
appointmentGroupThe AppointmentGroup to edit.
contextsThe new set of event contexts; these will replace the previous event contexts.
Returns
The AppointmentGroupBuilder.

◆ EditAppointmentGroup() [3/3]

AppointmentGroupBuilder UVACanvasAccess.ApiParts.Api.EditAppointmentGroup ( AppointmentGroup  appointmentGroup,
params EventContext[]  contexts 
)
inline

Returns an AppointmentGroupBuilder for modifying an existing appointment group.

Parameters
appointmentGroupThe AppointmentGroup to edit.
contextsThe new set of event contexts; these will replace the previous event contexts.
Returns
The AppointmentGroupBuilder.

◆ EditAssignment()

AssignmentBuilder UVACanvasAccess.ApiParts.Api.EditAssignment ( ulong  courseId,
ulong  assignmentId 
)
inline

Returns a AssignmentBuilder for editing an existing assignment.

Parameters
courseIdThe course id.
assignmentIdThe assignment id.
Returns
The builder.

◆ EditConversation()

async Task<Conversation> UVACanvasAccess.ApiParts.Api.EditConversation ( ulong  conversationId,
ConversationReadState readState = null,
bool?  subscribed = null,
bool?  starred = null 
)
inline

Edits the current user's view of a conversation by id.

Parameters
conversationIdThe conversation id.
readState(Optional) Changes the read state of the conversation.
subscribed(Optional) Changes the subscribed state of this conversation.
starred(Optional) Changes the starred state of this conversation.
Returns
The edited conversation.

◆ EditCourse()

CourseBuilder UVACanvasAccess.ApiParts.Api.EditCourse ( ulong  courseId,
ulong?  accountId = null 
)
inline

Return a new Builders.CourseBuilder for editing.

Parameters
courseIdThe course id.
accountId(Optional) The account id.
Returns
The course builder.

◆ EditUser()

async Task<User> UVACanvasAccess.ApiParts.Api.EditUser ( IEnumerable< ValueTuple< string, string >>  fields,
ulong?  id = null 
)
inline

Modify an existing user. The fields that can be modified are: {name, short_name, sortable_name, time_zone, email, locale, title, bio}. Corresponds to the API endpoint PUT /api/v1/users/:id

Parameters
fieldsThe set of field-value tuples to modify.
idThe id of the user. A null id is interpreted as self.
Returns
The edited user.
Exceptions
ExceptionThrown if the API returns a failing response code.

◆ GetAccount()

async Task<Account> UVACanvasAccess.ApiParts.Api.GetAccount ( ulong  accountId)
inline

Get a single account by id.

Parameters
accountIdThe account id.
Returns
The account.

◆ GetAccountPermissions()

async Task<BasicAccountPermissionsSet> UVACanvasAccess.ApiParts.Api.GetAccountPermissions ( AccountRolePermissions  checkedPermissions,
ulong?  accountId = null 
)
inline

Get the permissions set of an account.

Parameters
checkedPermissionsThe permissions to test.
accountId(Optional; default = self) The account id.
Returns
The account permissions set.

◆ GetActivityStream()

async Task<IEnumerable<ActivityStreamObject> > UVACanvasAccess.ApiParts.Api.GetActivityStream ( bool?  onlyActiveCourses = null)
inline

Gets the activity stream for the current user.

Parameters
onlyActiveCoursesIf true, only entries for active courses will be returned.
Returns
The list of activity stream entries.

◆ GetActivityStreamSummary()

async Task<Dictionary<string, ActivityStreamSummaryEntry> > UVACanvasAccess.ApiParts.Api.GetActivityStreamSummary ( )
inline

Returns the summary of activity stream entries for the current user.

Returns
The map of activity stream types to their counts.

◆ GetAppointmentGroup()

async Task<AppointmentGroup> UVACanvasAccess.ApiParts.Api.GetAppointmentGroup ( ulong  id,
AppointmentGroupIncludes  includes = 0 
)
inline

Gets a single appointment group.

Parameters
idThe id of the group.
includesOptional data to include in the result.
Returns
The appointment group.

◆ GetAssignment()

async Task<Assignment> UVACanvasAccess.ApiParts.Api.GetAssignment ( ulong  courseId,
ulong  assignmentId,
AssignmentIncludes  includes = AssignmentIncludes.Default,
bool?  overrideAssignmentDates = null,
bool?  needsGradingCountBySection = null,
bool?  allDates = null 
)
inline

Gets a single assignment from this course.

Parameters
courseIdThe course id.
assignmentIdThe assignment id.
includesOptional extra data to include in the assignment response.
overrideAssignmentDatesApply assignment overrides to dates. Defaults to true.
needsGradingCountBySectionSplit the NeedsGradingCount key into sections. Defaults to false.
allDatesReturn all dates associated with the assignment, if applicable.
Returns
The assignment.
See also
AssignmentIncludes

◆ GetAssignmentOverride()

async Task<AssignmentOverride> UVACanvasAccess.ApiParts.Api.GetAssignmentOverride ( ulong  courseId,
ulong  assignmentId,
ulong  overrideId 
)
inline

Gets an AssignmentOverride by the course, assignment, and override IDs.

Parameters
courseIdThe course id.
assignmentIdThe assignment id.
overrideIdThe override id.
Returns
The AssignmentOverride.

◆ GetContentShare() [1/2]

Task<ContentShare> UVACanvasAccess.ApiParts.Api.GetContentShare ( ulong  shareId,
[NotNull] User  user 
)
inline

Get a single content share by its id and associated user.

Parameters
shareIdThe id of the share.
userThe user with whom the share is associated with.
Returns
The share.

The current user must be an observer of user , or an administrator.

◆ GetContentShare() [2/2]

async Task<ContentShare> UVACanvasAccess.ApiParts.Api.GetContentShare ( ulong  shareId,
ulong?  userId = null 
)
inline

Get a single content share by its id and associated user.

Parameters
shareIdThe id of the share.
userId(Optional) The user with whom the share is associated with. Self by default.
Returns
The share.

The current user must be an observer of userId , or an administrator.

◆ GetConversation()

async Task<DetailedConversation> UVACanvasAccess.ApiParts.Api.GetConversation ( ulong  conversationId,
bool  markAsRead = false 
)
inline

Gets a single conversation by id.

Parameters
conversationIdThe conversation id.
markAsRead(Optional, default false) If true, mark the conversation as read.
Exceptions
DoesNotExistExceptionIf the conversation with the given id does not exist or is not visible to the current user.
Returns
The conversation.

◆ GetCourse()

async Task<Course> UVACanvasAccess.ApiParts.Api.GetCourse ( ulong  courseId,
ulong?  accountId = null,
IndividualLevelCourseIncludes includes = null,
uint?  teacherLimit = null 
)
inline

Get a single course by id.

Parameters
courseIdThe course id.
accountId(Optional) The account id.
includesAdditional data to include.
teacherLimit
Returns

◆ GetCourseDiscussionTopic()

async Task<DiscussionTopic> UVACanvasAccess.ApiParts.Api.GetCourseDiscussionTopic ( ulong  courseId,
ulong  discussionId,
DiscussionTopicIncludes  includes = DiscussionTopicIncludes.Default 
)
inline

Gets a single course discussion topic by its id.

Parameters
courseIdThe course id.
discussionIdThe discussion id.
includesExtra data to include in the result. See DiscussionTopicIncludes.
Returns
The discussion topic.

◆ GetCourseFrontPage()

async Task<Page> UVACanvasAccess.ApiParts.Api.GetCourseFrontPage ( ulong  courseId)
inline

Get a course's front page.

Parameters
courseIdThe course id.
Returns
The page.

◆ GetCoursePage()

async Task<Page> UVACanvasAccess.ApiParts.Api.GetCoursePage ( ulong  courseId,
string  url 
)
inline

Get a single course page by its URL.

Parameters
courseIdThe course id.
urlThe page URL.
Returns
The page.

◆ GetCoursePageRevision()

async Task<PageRevision> UVACanvasAccess.ApiParts.Api.GetCoursePageRevision ( ulong  courseId,
string  url,
ulong  revisionId,
bool?  omitDetails = null 
)
inline

Returns a single course page revision.

Parameters
courseIdThe course id.
urlThe page URL.
revisionIdThe revision id.
omitDetails(Optional) If true, omits page contents.
Returns
The page revision.

◆ GetCourseSettings()

async Task<CourseSettings> UVACanvasAccess.ApiParts.Api.GetCourseSettings ( ulong  courseId)
inline

Get a course's settings.

Parameters
courseIdThe course id.
Returns
The course settings.

◆ GetCourseTestStudent()

async Task<User> UVACanvasAccess.ApiParts.Api.GetCourseTestStudent ( ulong  courseId)
inline

Returns the test student associated with a course. If the course does not already have a test student, a new one is created. The test student is used for the 'Student View' function on the webpage.

Parameters
courseIdThe course id.
Returns
The test student.

◆ GetDailyGraders()

async Task<IEnumerable<Grader> > UVACanvasAccess.ApiParts.Api.GetDailyGraders ( ulong  courseId,
DateTime  date 
)
inline

Returns a list of graders who worked this day, along with the assignments they worked on.

Parameters
courseIdThe course id.
dateThe day.
Returns
The list of graders.

◆ GetDailySubmissionHistories()

async Task<IEnumerable<SubmissionHistory> > UVACanvasAccess.ApiParts.Api.GetDailySubmissionHistories ( ulong  courseId,
DateTime  date,
ulong  graderId,
ulong  assignmentId 
)
inline

Returns a list of submission histories for this day.

Parameters
courseIdThe course id.
dateThe date.
graderIdThe grader id.
assignmentIdThe assignment id.
Returns
The list of submission histories.

◆ GetDefaultTermDepartmentGradeData()

Task<Dictionary<byte, ulong> > UVACanvasAccess.ApiParts.Api.GetDefaultTermDepartmentGradeData ( bool  currentCourses = true,
ulong?  accountId = null 
)
inline

Gets the distribution of grades for students across all current or completed courses in the department during the default term.

Parameters
currentCoursesIf true, the data returned will be across current courses. Otherwise, it will be across completed courses. True by default.
accountIdThe account. self by default.
Returns
The grade data.

◆ GetDefaultTermDepartmentParticipationData()

Task<DepartmentParticipation> UVACanvasAccess.ApiParts.Api.GetDefaultTermDepartmentParticipationData ( bool  currentCourses = true,
ulong?  accountId = null 
)
inline

Gets the page view and participation counts across all current or completed courses in the department during the default term.

Parameters
currentCoursesIf true, the data returned will be across current courses. Otherwise, it will be across completed courses. True by default.
accountIdThe account. self by default.
Returns
The participation data.

◆ GetDefaultTermDepartmentStatistics()

Task<DepartmentStatistics> UVACanvasAccess.ApiParts.Api.GetDefaultTermDepartmentStatistics ( bool  currentCourses = true,
ulong?  accountId = null 
)
inline

Gets some numeric statistics about the department relative to current ot completed courses in the default term.

Parameters
currentCoursesIf true, the data returned will be across current courses. Otherwise, it will be across completed courses. True by default.
accountIdThe account. self by default.
Returns
The statistics.

◆ GetDepartmentGradeData()

Task<Dictionary<byte, ulong> > UVACanvasAccess.ApiParts.Api.GetDepartmentGradeData ( ulong  termId,
ulong?  accountId = null 
)
inline

Gets the distribution of grades for students across all courses in the department during the given term.

Parameters
termIdThe term to get data for.
accountIdThe account. self by default.
Returns
The grade data.

◆ GetDepartmentParticipationData()

Task<DepartmentParticipation> UVACanvasAccess.ApiParts.Api.GetDepartmentParticipationData ( ulong  termId,
ulong?  accountId = null 
)
inline

Gets the page view and participation counts across all courses in the department during the given term.

Parameters
termIdThe term to get data for.
accountIdThe account. self by default.
Returns
The participation data.

◆ GetDepartmentStatistics()

Task<DepartmentStatistics> UVACanvasAccess.ApiParts.Api.GetDepartmentStatistics ( ulong  termId,
ulong?  accountId = null 
)
inline

Gets some numeric statistics about the department relative to the given term.

Parameters
termIdThe term to get data for.
accountIdThe account. self by default.
Returns
The statistics.

◆ GetEnrollmentTerm()

async Task<EnrollmentTerm> UVACanvasAccess.ApiParts.Api.GetEnrollmentTerm ( ulong  termId,
ulong?  accountId = null 
)
inline

Gets an enrollment term by id.

Parameters
termIdThe term id.
accountIdThe account id. Defaults to the current account.
Returns
The EnrollmentTerm.

◆ GetGradebookDays()

async Task<IEnumerable<Day> > UVACanvasAccess.ApiParts.Api.GetGradebookDays ( ulong  courseId)
inline

Returns a list of days in the gradebook history for this course.

Parameters
courseIdThe course id.
Returns
The list of days.

◆ GetGradingPeriod()

async Task<GradingPeriod> UVACanvasAccess.ApiParts.Api.GetGradingPeriod ( ulong  courseId,
ulong  gradingPeriodId 
)
inline

Gets a grading period by its id.

Parameters
courseIdThe id of the course the grading period belongs to.
gradingPeriodIdThe id of the grading period.
Returns
The grading period.

◆ GetHelpLinks()

async Task<HelpLinks> UVACanvasAccess.ApiParts.Api.GetHelpLinks ( ulong?  accountId = null)
inline

Get an account's set of help links.

Parameters
accountId(Optional; default = self) The account id.
Returns
The set of help links.

◆ GetModule()

async Task<Module> UVACanvasAccess.ApiParts.Api.GetModule ( ulong  moduleId,
ulong  courseId,
ulong?  studentId = null,
ModuleIncludeType  includes = ModuleIncludeType.None 
)
inline

Gets a module by its id and course id.

Parameters
moduleIdThe module id.
courseIdThe course id.
studentId(Optional) A student id. Returns module completion information for this student if specified.
includes(Optional) Additional data to request in the result.
Returns
The module.

Canvas does not guarantee that includes requested in includes will actually be included. Consider using StreamModuleItems.

◆ GetModuleItemSequence()

async Task<ModuleItemSequence> UVACanvasAccess.ApiParts.Api.GetModuleItemSequence ( ulong  courseId,
ModuleAssetType  assetType,
ulong  assetId 
)
inline

Given an asset, find the module item sequence it belongs to.

Parameters
courseIdThe course id.
assetTypeThe asset type.
assetIdThe asset id.
Returns
The item sequence.

◆ GetPersonalFile()

async Task<CanvasFile> UVACanvasAccess.ApiParts.Api.GetPersonalFile ( ulong  fileId,
FileIncludes includes = null 
)
inline

Get a single personal file for the current user.

Parameters
fileIdThe file id.
includes(Optional) Extra data to include with the result.
Returns
The file.

◆ GetPersonalFolder()

async Task<Folder> UVACanvasAccess.ApiParts.Api.GetPersonalFolder ( ulong?  folderId)
inline

Get a single personal folder for the current user.

Parameters
folderId(Optional) The folder id. By default, root.
Returns
The folder.

◆ GetPersonalQuota()

async Task<QuotaInfo<ulong> > UVACanvasAccess.ApiParts.Api.GetPersonalQuota ( )
inline

Returns the storage quota in bytes of the current user, along with the amount currently used.

Returns
The quota information.

◆ GetPersonalQuotaMiB()

Task<QuotaInfo<decimal> > UVACanvasAccess.ApiParts.Api.GetPersonalQuotaMiB ( )
inline

Returns the storage quota in MiB of the current user, along with the amount currently used.

Returns
The quota information.

◆ GetProficiencyRatings()

async Task<Proficiency> UVACanvasAccess.ApiParts.Api.GetProficiencyRatings ( ulong?  accountId = null)
inline

Gets the proficiency ratings for an account.

Parameters
accountIdThe account id. Defaults to the current account.
Returns
The Proficiency.

◆ GetReportIndex()

async Task<IEnumerable<Report> > UVACanvasAccess.ApiParts.Api.GetReportIndex ( string  reportType,
ulong?  accountId = null 
)
inline

Get a set of reports for an account, given the report type.

Parameters
reportTypeThe report type.
accountIdThe account id. Defaults to the current account.
Returns
The collection of Reports.

◆ GetReportStatus()

async Task<Report> UVACanvasAccess.ApiParts.Api.GetReportStatus ( string  reportType,
ulong  reportId,
ulong?  accountId = null 
)
inline

Gets the status of a report by id.

Parameters
reportTypeThe report type.
reportIdThe report id.
accountIdThe account id the report was run under; defaults to self.
Returns
The task containing the report.

◆ GetSection()

async Task<Section> UVACanvasAccess.ApiParts.Api.GetSection ( ulong  courseId,
ulong  sectionId 
)
inline

Gets a single section by course and section id.

Parameters
courseIdThe course id.
sectionIdThe section id.
Returns
The section.

◆ GetSisImport()

async Task<SisImport> UVACanvasAccess.ApiParts.Api.GetSisImport ( ulong  id,
ulong?  accountId = null 
)
inline

Gets a previously performed SIS import.

Parameters
idThe import ID.
accountIdThe account id. Defaults to the current account.
Returns
The SisImport.

◆ GetTermsOfService()

async Task<TermsOfService> UVACanvasAccess.ApiParts.Api.GetTermsOfService ( ulong?  accountId = null)
inline

Get an account's Terms of Service.

Parameters
accountId(Optional; default = self) The account id.
Returns
The Terms of Service.

◆ GetUser()

async Task<User> UVACanvasAccess.ApiParts.Api.GetUser ( ulong?  id = null)
inline

Get details for a user, including a non-comprehensive list of permissions.

Parameters
idThe id of the user. A null id is interpreted as self.
Returns
The User object.
Exceptions
ExceptionThrown if the API returns a failing response code.

◆ GetUserByLoginSis()

ValueTask<User> UVACanvasAccess.ApiParts.Api.GetUserByLoginSis ( string  sis)
inline

Search for a user by SIS id, using user login records.

Parameters
sisThe SIS id to search for.
Returns
The user with the matching SIS id, or null if none exists.

In the event that a user has more than one SIS id, the faster GetUserBySis method may fail because User.SisUserId can only return one value. In that case, use this method.

See also
GetUserBySis

◆ GetUserBySis()

ValueTask<User> UVACanvasAccess.ApiParts.Api.GetUserBySis ( string  sis)
inline

Search for a user by SIS id.

Parameters
sisThe SIS id to search for.
Returns
The user with the matching SIS id, or null if none exists.

In the event that a user has more than one SIS id, this method may fail because User.SisUserId can only return one value. In that case, use the slower GetUserByLoginSis method.

See also
GetUserByLoginSis

◆ GetUserCourseAssignmentData()

async IAsyncEnumerable<UserAssignmentData> UVACanvasAccess.ApiParts.Api.GetUserCourseAssignmentData ( ulong  courseId,
ulong  userId 
)
inline

Returns a list of assignments for the course sorted by due date, along with assignment information, grade breakdown, and submission information if relevant.

Parameters
courseIdThe course id.
userIdThe user id.
Returns
The data.

◆ GetUserCourseParticipationData()

async Task<UserParticipation> UVACanvasAccess.ApiParts.Api.GetUserCourseParticipationData ( ulong  userId,
ulong  courseId 
)
inline

Gets participation details for the user for the entire history of the course.

Parameters
userIdThe user id.
courseIdThe course id.
Returns
The data.

◆ GetUserCourseProgress()

async Task<CourseProgress> UVACanvasAccess.ApiParts.Api.GetUserCourseProgress ( ulong  courseId,
ulong?  userId = null 
)
inline

Returns progress information for a user in a course.

Parameters
courseIdThe course id.
userIdThe user id. Defaults to 'self'.
Returns
The course progress.

◆ GetUserProfile()

async Task<Profile> UVACanvasAccess.ApiParts.Api.GetUserProfile ( ulong?  id = null)
inline

Get the profile of a user.

Parameters
idThe id of the user. A null id is interpreted as self.
Returns
The user profile.
Exceptions
ExceptionThrown if the API returns a failing response code.

◆ ImportSisData()

async Task<SisImport> UVACanvasAccess.ApiParts.Api.ImportSisData ( [NotNull] byte[]  file,
[NotNull] string  filePath,
ulong?  accountId = null,
bool  batchMode = false,
bool?  overrideStickiness = null 
)
inline

Performs a SIS import.

Parameters
fileThe file containing the import data.
filePathThe file path.
accountIdThe account id. Defaults to the current account.
batchModeWhether the import should be run in batch mode. Normally, when the import file is missing an entry currently present in Canvas, the entry is left alone. In batch mode, it will be deleted instead. Defaults to false.
overrideStickinessWhether the import should override SIS stickiness.
Returns
The SisImport.

◆ ListAssignmentOverrides()

async Task<IEnumerable<AssignmentOverride> > UVACanvasAccess.ApiParts.Api.ListAssignmentOverrides ( ulong  courseId,
ulong  assignmentId 
)
inline

Lists the assignment overrides for a given assignment.

Parameters
courseIdThe course id.
assignmentIdThe assignment id.
Returns
The list of overrides.

◆ ListAvailableReports()

async Task<IEnumerable<ReportDescription> > UVACanvasAccess.ApiParts.Api.ListAvailableReports ( ulong?  accountId = null)
inline

Get a list of available report types and parameters for a given account.

Parameters
accountIdThe account id. Defaults to self.
Returns
The list of available report types.

◆ ListCourseDiscussionTopicEntries()

async Task<IEnumerable<TopicEntry> > UVACanvasAccess.ApiParts.Api.ListCourseDiscussionTopicEntries ( ulong  courseId,
ulong  topicId 
)
inline

Returns the list of discussion topic entries for the course topic.

Parameters
courseIdThe course id.
topicIdThe course topic.
Returns
The list of discussion topic entries.

◆ ListCourseDiscussionTopics()

async Task<IEnumerable<DiscussionTopic> > UVACanvasAccess.ApiParts.Api.ListCourseDiscussionTopics ( ulong  id,
DiscussionTopicOrdering orderBy = null,
DiscussionTopicScopes scopes = null,
bool?  onlyAnnouncements = null,
bool  filterByUnread = false,
string  searchTerm = null,
bool?  excludeContextModuleLockedTopics = null,
DiscussionTopicIncludes  includes = DiscussionTopicIncludes.Default 
)
inline

Returns the list of discussion topics for this course.

Parameters
idThe course id.
orderByThe order of the list. DiscussionTopicOrdering.Position is the default.
scopesFilter the results by those that match all of these states. No filtering by default.
onlyAnnouncementsOnly return announcements.
filterByUnreadOnly return unread by the current user.
searchTermAn optional search term.
excludeContextModuleLockedTopicsFor students, exclude topics that are locked by module progression.
includesExtra data to include in the result. See DiscussionTopicIncludes.
Returns
The list of discussion topics.
See also
DiscussionTopicIncludes, DiscussionTopicOrdering, DiscussionTopicScopes

◆ ListCourses()

async Task<IEnumerable<Course> > UVACanvasAccess.ApiParts.Api.ListCourses ( ulong?  accountId = null,
string  searchTerm = null,
bool?  withEnrollmentsOnly = null,
bool?  published = null,
bool?  completed = null,
bool?  blueprint = null,
bool?  blueprintAssociated = null,
ulong?  enrollmentTermId = null,
IEnumerable< ulong >  byTeachers = null,
IEnumerable< ulong >  bySubaccounts = null,
CourseEnrollmentTypes enrollmentTypes = null,
CourseStates states = null,
AccountLevelCourseIncludes includes = null,
CourseSort sort = null,
CourseSearchBy searchBy = null,
Order order = null 
)
inline

Returns a list of courses associated with the account.

accountId , when omitted, defaults to self. All other parameters are optional and serve to narrow the search or change the included data.

Parameters
accountIdThe account id.
searchTermA search term, searching either by course or teacher name as according to searchBy .
withEnrollmentsOnlyIf true, only include courses with at least 1 enrollment. If false, only include courses with no enrollments. If omitted, no-op.
publishedIf true, only include courses that are published. If false, only include courses that are not published. If omitted, no-op.
completedIf true, only include courses that are completed. If false, only include courses that are not completed. If omitted, no-op.
blueprintIf true, only include courses that are blueprints. If false, only include courses that are not blueprints. If omitted, no-op.
blueprintAssociatedIf true, only include courses that inherit from a blueprint. If false, only include courses that do not inherit from a blueprint.. If omitted, no-op.
enrollmentTermIdIf present, only include courses from this term.
byTeachersIf present, only include courses taught by these teachers.
bySubaccountsIf present, only include course associated with these subaccounts.
enrollmentTypesIf present, only include courses that have at least user enrolled with one of these enrollment types.
statesIf present, only include courses that are in one of these states. If omitted, all states except CourseStates.Deleted are included.
includesAdditional data to include in the returned objects.
sortThe column to sort by.
searchByThe column that searchTerm searches by.
orderThe order of results when sorted by sort .
Returns
The list of courses.

◆ ListDiscussionEntryReplies()

async Task<IEnumerable<TopicReply> > UVACanvasAccess.ApiParts.Api.ListDiscussionEntryReplies ( ulong  courseId,
ulong  topicId,
ulong  entryId,
string  type = "courses" 
)
inline

Gets the list of replies to a discussion entry.

Parameters
courseIdThe course id.
topicIdThe topic id.
entryIdThe discussion entry id.
type(Optional; default = 'courses') The type of discussion entry.
Returns
The list of replies.

◆ ListGroupDiscussionTopicEntries()

async Task<IEnumerable<TopicEntry> > UVACanvasAccess.ApiParts.Api.ListGroupDiscussionTopicEntries ( ulong  groupId,
ulong  topicId 
)
inline

Gets a list of discussion topic entries for a group topic, given the group and topic IDs.

Parameters
groupIdThe group id.
topicIdThe topic id.
Returns
The list of TopicEntry.

◆ ListRoles()

async Task<IEnumerable<Role> > UVACanvasAccess.ApiParts.Api.ListRoles ( RoleState  states = 0,
bool?  showInherited = null,
ulong?  accountId = null 
)
inline

Returns a list of roles under a given account.

Parameters
statesOnly roles with these states will be returned. Defaults to RoleState.Active.
showInheritedIf true, include roles inherited from parent accounts.
accountIdThe account id. Defaults to self.
Returns
The list of roles.

◆ ListUsers()

async Task<IEnumerable<User> > UVACanvasAccess.ApiParts.Api.ListUsers ( string  searchTerm = null,
string  sort = null,
string  order = null,
string  accountId = "self" 
)
inline

Get the list of users associated with the account. Corresponds to the API endpoint GET /api/v1/accounts/:account_id/users.

Parameters
searchTermThe partial name or full ID of the users to match.
accountIdThe account to search. self by default.
sortThe column to sort results by. Allowed values are username, email, sis_id, last_login.
orderThe order to sort the given column by. Allowed values are asc, desc.
Returns
The list of users found in the search.
Exceptions
ExceptionThrown if the API returns a failing response code.

◆ LoadCustomJson()

async Task<JObject> UVACanvasAccess.ApiParts.Api.LoadCustomJson ( string  ns,
string  scopes,
ulong?  userId = null 
)
inline

Retrieve arbitrary user data as JSON. Corresponds to the API endpoint GET /api/v1/users/:user_id/custom_data(/*scope).

Parameters
nsThe namespace under which the data is stored.
scopesThe scope, and optionally subscopes, under which the data is stored.
userIdThe id of the user.
Returns
The JSON data.
Exceptions
Exception
See also
StoreCustomJson

◆ MasqueradeAs()

void UVACanvasAccess.ApiParts.Api.MasqueradeAs ( ulong  id)
inline

If the current user is an administrator, he can "act as" another user. When this is set, every API call will be made as if it came from this user's token, even if the user does not have any tokens generated. Audit logs will indicate if an action was made through masquerade, though.

Masquerading is not thread safe, so do not share Api between threads if using masquerading.

Parameters
idThe user to masquerade as.

Certain endpoints, for example those relating to the activity stream and personal files, can only be called on self. Masquerading makes it possible to bypass this restriction.

◆ MovePersonalFile()

async Task<CanvasFile> UVACanvasAccess.ApiParts.Api.MovePersonalFile ( ulong  fileId,
OnDuplicate  onDuplicate,
string  name = null,
ulong?  destinationFolderId = null 
)
inline

Moves a personal file for the current user.

Parameters
fileIdThe file id.
onDuplicateThe action taken to resolve a duplicate.
name(Optional) The new name. If none given, the previous name will be kept.
destinationFolderId(Optional) The id of the folder to move the file into. If none give, the file will remain in place.
Returns
The file.

◆ PersonalFolderPathExists()

async Task<bool> UVACanvasAccess.ApiParts.Api.PersonalFolderPathExists ( params string[]  parts)
inline

Determine if a personal folder exists at the given path.

Parameters
partsEach folder in the path, in order.
Returns
Whether or not the personal folder exists.

◆ PostCourseDiscussionEntry()

async Task<TopicEntry> UVACanvasAccess.ApiParts.Api.PostCourseDiscussionEntry ( ulong  courseId,
ulong  discussionId,
string  messageBody,
byte[]  attachment = null,
string  filePath = null 
)
inline

Creates a new entry in the discussion topic.

Parameters
courseIdThe course id.
discussionIdThe discussion id.
messageBodyThe message body to post.
attachment(Optional) The attachment to post.
filePathThe filename with its extension, required if uploading an attachment.
Returns
The entry.

◆ ReactivateEnrollment()

async Task<Enrollment> UVACanvasAccess.ApiParts.Api.ReactivateEnrollment ( ulong  courseId,
ulong  enrollmentId 
)
inline

Reactivate an enrollment that is inactive.

Parameters
courseIdThe course.
enrollmentIdThe enrollment.
Returns
The reactivated enrollment.

◆ RemoveObservee()

async Task<User> UVACanvasAccess.ApiParts.Api.RemoveObservee ( ulong  observerId,
ulong  observeeId,
ulong?  rootAccountId = null 
)
inline

Set a user to stop being observed by another user.

Parameters
observerIdThe observer.
observeeIdThe observee.
rootAccountId(Optional) The id of the root account from which to remove the link.
Returns
The former observee.

◆ ResolvePersonalFolderPath()

async Task<IEnumerable<Folder> > UVACanvasAccess.ApiParts.Api.ResolvePersonalFolderPath ( params string[]  parts)
inline

Retrieve a hierarchy of personal folders from a path.

Parameters
partsEach folder in the path, in order.
Returns
The list of folders, starting from root and ending with the deepest subfolder.
Exceptions
DoesNotExistExceptionIf the path given does not exist or is not visible.

◆ StartReport()

async Task<Report> UVACanvasAccess.ApiParts.Api.StartReport ( string  reportType,
IEnumerable<(string, object)>  parameters,
ulong?  accountId = null 
)
inline

Run a report.

Parameters
reportTypeThe type of report to run, as given by ListAvailableReports.
parametersThe optional set of report parameters. The name, type, and semantics of these parameters are specific to each report type.
accountIdThe account id. Defaults to self.
Returns
The task containing the initial report instance.
See also
ListAvailableReports

◆ StopMasquerading()

void UVACanvasAccess.ApiParts.Api.StopMasquerading ( )
inline

Stop "acting as" any user.

◆ StoreCustomJson()

async Task<JObject> UVACanvasAccess.ApiParts.Api.StoreCustomJson ( string  ns,
string  scopes,
JObject  data,
ulong?  userId = null 
)
inline

Store arbitrary user data as JSON. Corresponds to the API endpoint PUT /api/v1/users/:user_id/custom_data(/*scope).

Parameters
nsThe namespace under which to store the data.
scopesThe scope, and optionally subscopes, under which to store the data.
dataThe JSON data.
userIdThe id of the user.
Returns
A copy of the stored json.
Exceptions
Exception
See also
LoadCustomJson

◆ StreamAccountAuthenticationEvents()

async IAsyncEnumerable<AuthenticationEvent> UVACanvasAccess.ApiParts.Api.StreamAccountAuthenticationEvents ( ulong?  accountId = null,
DateTime?  start = null,
DateTime?  end = null 
)
inline

Streams the list of authentication events recorded for the given account.

Parameters
accountIdThe account id. Defaults to self.
startThe beginning of the date range to search in.
endThe end of the date range to search in.
Returns
The stream of events.

The authentication log keeps any given event for 1 year.

◆ StreamAccountGradingPeriods()

async IAsyncEnumerable<GradingPeriod> UVACanvasAccess.ApiParts.Api.StreamAccountGradingPeriods ( ulong  accountId)
inline

Streams all grading periods in an account.

Parameters
accountIdThe account id.
Returns
The stream of GradingPeriods.

◆ StreamAccounts()

async IAsyncEnumerable<Account> UVACanvasAccess.ApiParts.Api.StreamAccounts ( AccountIncludes  includes = AccountIncludes.Default)
inline

Stream the accounts in this domain.

Parameters
includes(Optional) Extra data to include in the response.
Returns
The stream of accounts.

◆ StreamActivityStream()

async IAsyncEnumerable<ActivityStreamObject> UVACanvasAccess.ApiParts.Api.StreamActivityStream ( bool?  onlyActiveCourses = null)
inline

Streams the activity stream for the current user.

Parameters
onlyActiveCoursesIf true, only entries for active courses will be returned.
Returns
The activity stream.

◆ StreamAppointmentGroupParticipants< T >()

async IAsyncEnumerable<T> UVACanvasAccess.ApiParts.Api.StreamAppointmentGroupParticipants< T > ( ulong  appointmentGroupId)
inline

Streams all registered participants in the assignment group.

Parameters
appointmentGroupIdThe id of the appointment group.
Template Parameters
TThe participant type. Either User or Group.
Returns
The stream of participants.
Type Constraints
T :IAppointmentGroupParticipant 
T :IPrettyPrint 

◆ StreamAppointmentGroups()

async IAsyncEnumerable<AppointmentGroup> UVACanvasAccess.ApiParts.Api.StreamAppointmentGroups ( AppointmentVisibilityScope scope = null,
bool?  includePast = null,
AppointmentGroupIncludes includes = null,
IEnumerable< EventContext contexts = null 
)
inline

Streams the appointment groups that can be managed or reserved by the current user.

Parameters
scopeThe kind of relationship the current user must have with the returned groups. AppointmentVisibilityScope.Reservable by default.
includePastWhether or not to include past appointments.
includesAdditional data to include.
contextsAny contexts to filter the results by.
Returns
The stream of appointment groups.

◆ StreamAssignmentGradeChangelog()

async IAsyncEnumerable<GradeChangeEvent> UVACanvasAccess.ApiParts.Api.StreamAssignmentGradeChangelog ( ulong  assignmentId,
DateTime?  start = null,
DateTime?  end = null 
)
inline

Streams the grade changelog for a single assignment.

Parameters
assignmentIdThe assignment id.
startThe beginning of the range to search.
endThe end of the range to search.
Returns
The changelog.

◆ StreamAssignmentOverrides()

async IAsyncEnumerable<AssignmentOverride> UVACanvasAccess.ApiParts.Api.StreamAssignmentOverrides ( ulong  courseId,
ulong  assignmentId 
)
inline

Streams the assignment overrides for a given assignment.

Parameters
courseIdThe course id.
assignmentIdThe assignment id.
Returns
The stream of overrides.

◆ StreamCalendarEvents()

async IAsyncEnumerable<CalendarEvent> UVACanvasAccess.ApiParts.Api.StreamCalendarEvents ( ulong?  userId = null,
EventType?  type = null,
DateTime?  startDate = null,
DateTime?  endDate = null,
bool?  undated = null,
bool?  allEvents = null,
IEnumerable< EventContext contexts = null 
)
inline

Stream calendar events.

Parameters
userId(Optional) The user to filter by.
type(Optional) The event type to filter by.
startDate(Optional) The beginning of the date range to search.
endDate(Optional) The end of the date range to search.
undated(Optional) Allow undated events.
allEvents(Optional) Include all events.
contextsEvent contexts to search.
Returns

◆ StreamColumnEntries()

async IAsyncEnumerable<ColumnDatum> UVACanvasAccess.ApiParts.Api.StreamColumnEntries ( ulong  columnId,
ulong  courseId 
)
inline

Streams column entries.

Parameters
columnIdThe column id.
courseIdThe course id.
Returns
The stream of entries.

◆ StreamConversations()

async IAsyncEnumerable<Conversation> UVACanvasAccess.ApiParts.Api.StreamConversations ( ConversationReadState readState = null,
IEnumerable< QualifiedId filter = null,
bool  filterIntersection = false,
bool  includeParticipantAvatars = false 
)
inline

Streams the conversations visible to the current user.

Parameters
readState(Optional) The read state to filter by.
filter(Optional) The qualified ids to filter by.
filterIntersection(Optional) If true, the predicate in filter is an AND instead of an OR.
includeParticipantAvatars(Optional) If true, include the participant avatars in the result.
Returns
The stream of conversations.

◆ StreamCourseAssignments()

async IAsyncEnumerable<Assignment> UVACanvasAccess.ApiParts.Api.StreamCourseAssignments ( ulong  courseId,
AssignmentIncludes  includes = AssignmentIncludes.Default,
string  searchTerm = null,
bool?  overrideAssignmentDates = null,
bool?  needsGradingCountBySection = null,
AssignmentBucket bucket = null,
IEnumerable< ulong >  assignmentIds = null,
string  orderBy = null 
)
inline

Streams all assignments in this course that are visible to the current user.

Parameters
courseIdThe course id.
includesOptional extra data to include in the assignment response.
searchTermAn optional search term.
overrideAssignmentDatesApply assignment overrides to dates. Defaults to true.
needsGradingCountBySectionSplit the NeedsGradingCount key into sections. Defaults to false.
bucketAn optional bucket to filter the returned assignments by.
assignmentIdsAn optional list of ids to filter the returned assignments by.
orderByAn optional string determining the order of assignments.
Returns
The stream of assignments.
See also
AssignmentIncludes, AssignmentBucket

◆ StreamCourseAssignmentSummary()

async IAsyncEnumerable<CourseAssignmentSummary> UVACanvasAccess.ApiParts.Api.StreamCourseAssignmentSummary ( ulong  courseId)
inline

Gets a summary of per-assignment information for this course, including statistical analysis of assignment scores.

Parameters
courseIdThe course id.
Returns
The stream of CourseAssignmentSummary objects.

◆ StreamCourseEnrollments()

async IAsyncEnumerable<Enrollment> UVACanvasAccess.ApiParts.Api.StreamCourseEnrollments ( ulong  courseId,
IEnumerable< CourseEnrollmentRoleTypes types = null,
IEnumerable< CourseEnrollmentState states = null,
CourseEnrollmentIncludes includes = null,
ulong?  userId = null,
ulong?  gradingPeriodId = null,
ulong?  enrollmentTermId = null,
string  enrollmentTermSisId = null,
IEnumerable< string >  sisAccountIds = null,
IEnumerable< string >  sisCourseIds = null,
IEnumerable< string >  sisSectionIds = null,
IEnumerable< string >  sisUserIds = null,
IEnumerable< bool >  createdForSisId = null 
)
inline

Streams all enrollments for the course.

Parameters
courseIdThe course id.
types(Optional) The set of enrollment types to filter by.
states(Optional) The set of enrollment states to filter by.
includes(Optional) Data to include in the result.
userId(Optional) The user id to filter by.
gradingPeriodId(Optional) The grading period id to filter by.
enrollmentTermId(Optional) The enrollment term id to filter by. Cannot be used with enrollmentTermSisId.
enrollmentTermSisId(Optional) The enrollment term SIS id to filter by. Cannot be used with enrollmentTermId.
sisAccountIds(Optional) The set of account SIS ids to filter by.
sisCourseIds(Optional) The set of course SIS ids to filter by.
sisSectionIds(Optional) The set of section SIS ids to filter by.
sisUserIds(Optional) The set of user SIS ids to filter by.
createdForSisId(Optional) If using sisUserIds, restrict the filtering per SIS id to only include enrollments made for that exact SIS id. This is relevant when a user has multiple SIS ids.
Returns
The stream of enrollments.

◆ StreamCourseGradeChangelog()

async IAsyncEnumerable<GradeChangeEvent> UVACanvasAccess.ApiParts.Api.StreamCourseGradeChangelog ( ulong  courseId,
DateTime?  start = null,
DateTime?  end = null 
)
inline

Streams the grade changelog for a single course.

Parameters
courseIdThe course id.
startThe beginning of the range to search.
endThe end of the range to search.
Returns
The changelog.

◆ StreamCoursePageRevisionHistory()

async IAsyncEnumerable<PageRevision> UVACanvasAccess.ApiParts.Api.StreamCoursePageRevisionHistory ( ulong  courseId,
string  url 
)
inline

Streams the history of course page revisions.

Parameters
courseIdThe course id.
urlThe page URL.
Returns
The revision history.

◆ StreamCoursePages()

async IAsyncEnumerable<Page> UVACanvasAccess.ApiParts.Api.StreamCoursePages ( ulong  courseId,
PageSort sort = null,
Order order = null,
string  searchTerm = null,
bool?  published = null 
)
inline

Stream all pages for a course.

Parameters
courseIdThe course id.
sort(Optional) Which field to sort results by.
order(Optional) The order of sorted results; defaults to Order.Ascending.
searchTerm(Optional) A search term.
published(Optional) If true, only return published courses. If false, exclude published pages.
Returns
The pages.

◆ StreamCourses()

async IAsyncEnumerable<Course> UVACanvasAccess.ApiParts.Api.StreamCourses ( ulong?  accountId = null,
string  searchTerm = null,
bool?  withEnrollmentsOnly = null,
bool?  published = null,
bool?  completed = null,
bool?  blueprint = null,
bool?  blueprintAssociated = null,
ulong?  enrollmentTermId = null,
IEnumerable< ulong >  byTeachers = null,
IEnumerable< ulong >  bySubaccounts = null,
CourseEnrollmentTypes enrollmentTypes = null,
CourseStates states = null,
AccountLevelCourseIncludes includes = null,
CourseSort sort = null,
CourseSearchBy searchBy = null,
Order order = null 
)
inline

Asynchronously streams the courses associated with this account.

accountId , when omitted, defaults to self. All other parameters are optional and serve to narrow the search or change the included data.

Parameters
accountIdThe account id.
searchTermA search term, searching either by course or teacher name as according to searchBy .
withEnrollmentsOnlyIf true, only include courses with at least 1 enrollment. If false, only include courses with no enrollments. If omitted, no-op.
publishedIf true, only include courses that are published. If false, only include courses that are not published. If omitted, no-op.
completedIf true, only include courses that are completed. If false, only include courses that are not completed. If omitted, no-op.
blueprintIf true, only include courses that are blueprints. If false, only include courses that are not blueprints. If omitted, no-op.
blueprintAssociatedIf true, only include courses that inherit from a blueprint. If false, only include courses that do not inherit from a blueprint.. If omitted, no-op.
enrollmentTermIdIf present, only include courses from this term.
byTeachersIf present, only include courses taught by these teachers.
bySubaccountsIf present, only include course associated with these subaccounts.
enrollmentTypesIf present, only include courses that have at least user enrolled with one of these enrollment types.
statesIf present, only include courses that are in one of these states. If omitted, all states except CourseStates.Deleted are included.
includesAdditional data to include in the returned objects.
sortThe column to sort by.
searchByThe column that searchTerm searches by.
orderThe order of results when sorted by sort .
Returns
The stream of courses.

◆ StreamCourseSections()

async IAsyncEnumerable<Section> UVACanvasAccess.ApiParts.Api.StreamCourseSections ( ulong  courseId,
SectionIncludes  includes = 0 
)
inline

Streams all sections in a course.

Parameters
courseIdThe course id.
includesOptional data to include with each Section object.
Returns
The stream of sections.

◆ StreamCourseStudentSummary()

async IAsyncEnumerable<CourseStudentSummary> UVACanvasAccess.ApiParts.Api.StreamCourseStudentSummary ( ulong  courseId,
ulong?  studentId = null,
StudentCourseSummarySortColumn sortBy = null 
)
inline

Gets a summary of per-user access information for students in this course, including total page views, total participations, and a breakdown of late statuses for all submissions.

Parameters
courseIdThe course id.
studentIdOptionally, a student id to filter by.
sortByAn optional column to sort by.
Returns
The stream of CourseStudentSummary objects.

◆ StreamCourseUsers()

async IAsyncEnumerable<User> UVACanvasAccess.ApiParts.Api.StreamCourseUsers ( ulong  courseId,
string  searchTerm = null,
IEnumerable< CourseEnrollmentTypes enrollmentTypes = null,
ulong?  enrollmentRole = null,
CourseUserIncludes includes = null,
IEnumerable< ulong >  userIds = null,
IEnumerable< CourseEnrollmentState enrollmentStates = null 
)
inline

Streams the list of users enrolled in a course.
All arguments except for courseId are optional, and serve to narrow (or broaden) the results.

Parameters
courseIdThe course id.
searchTerm(Optional) The string or numeric id to search by.
enrollmentTypes(Optional) The enrollment types to filter by.
enrollmentRole(Optional) The role id to filter by.
includesOptional data to include with the results. See CourseUserIncludes.
userIds(Optional) User ids to filter by.
enrollmentStates(Optional) The enrollment states to filter by.
Returns
The stream of users.

◆ StreamCustomGradebookColumns()

async IAsyncEnumerable<CustomColumn> UVACanvasAccess.ApiParts.Api.StreamCustomGradebookColumns ( ulong  courseId,
bool?  includeHidden = null 
)
inline

Streams the custom gradebook columns in the given course.

Parameters
courseIdThe course id.
includeHidden(Optional; default = false) If true, include hidden columns.
Returns
The stream of gradebook columns.

◆ StreamEnrollmentTerms()

async IAsyncEnumerable<EnrollmentTerm> UVACanvasAccess.ApiParts.Api.StreamEnrollmentTerms ( ulong?  accountId = null,
EnrollmentTermWorkflowStateFilter workflowState = null,
EnrollmentTermIncludes includes = null 
)
inline

Streams the enrollment terms for an account.

Parameters
accountIdThe account id. Defaults to the current account.
workflowStateAn optional workflow state to filter by.
includesOptional data to include with the results.
Returns
The stream of EnrollmentTerms.

◆ StreamGraderGradeChangelog()

async IAsyncEnumerable<GradeChangeEvent> UVACanvasAccess.ApiParts.Api.StreamGraderGradeChangelog ( ulong  graderId,
DateTime?  start = null,
DateTime?  end = null 
)
inline

Streams the grade changelog for a single grader.

Parameters
graderIdThe grader id.
startThe beginning of the range to search.
endThe end of the range to search.
Returns
The changelog.

◆ StreamGradingPeriods()

async IAsyncEnumerable<GradingPeriod> UVACanvasAccess.ApiParts.Api.StreamGradingPeriods ( ulong  courseId)
inline

Streams all grading periods in a course.

Parameters
courseIdThe course id.
Returns
The stream of GradingPeriods.

◆ StreamGradingPeriodSets()

async IAsyncEnumerable<GradingPeriodSet> UVACanvasAccess.ApiParts.Api.StreamGradingPeriodSets ( ulong  accountId)
inline

Streams all grading period sets in an account.

Parameters
accountIdThe account id.
Returns
The stream of grading period sets.

◆ StreamMissingAssignments()

async IAsyncEnumerable<Assignment> UVACanvasAccess.ApiParts.Api.StreamMissingAssignments ( ulong?  userId = null,
bool  submittableOnly = false,
bool  includePlannerOverrides = false,
bool  includeCourse = false 
)
inline

Stream a user's past-due assignments which have no submissions.

Parameters
userId(Optional) The user id. Self by default.
submittableOnly(Optional) Only return assignments which still accept submissions.
includePlannerOverrides(Optional) Include planner overrides in the assignments.
includeCourse(Optional) Include courses in the assignments.
Returns
The stream of assignments.

If not calling this method on self, the caller must be an admin or observer.

◆ StreamModuleItems()

async IAsyncEnumerable<ModuleItem> UVACanvasAccess.ApiParts.Api.StreamModuleItems ( ulong  moduleId,
ulong  courseId,
bool  includeContentDetails = true,
[CanBeNull] string  searchTerm = null,
ulong?  studentId = null 
)
inline

Streams the items in a module.

Parameters
moduleIdThe module id.
courseIdThe course id.
includeContentDetails(Optional; default = true) Whether or not to include content details.
searchTerm(Optional) A search term.
studentId(Optional) A student id. Returns module completion information for this student if specified.
Returns

◆ StreamModules()

async IAsyncEnumerable<Module> UVACanvasAccess.ApiParts.Api.StreamModules ( ulong  courseId,
[CanBeNull] string  searchTerm = null,
ulong?  studentId = null,
ModuleIncludeType  includes = ModuleIncludeType.None 
)
inline

Streams the list of modules for the given course.

Parameters
courseIdThe course id.
searchTerm(Optional) A search term.
studentId(Optional) A student id. Returns module completion information for this student if specified.
includes(Optional) Additional data to request in the result.
Returns
The stream of modules.

Canvas does not guarantee that includes requested in includes will actually be included. Consider using StreamModuleItems.

◆ StreamObservees()

async IAsyncEnumerable<User> UVACanvasAccess.ApiParts.Api.StreamObservees ( ulong  observerId)
inline

Streams the observees associated with an observer.

Parameters
observerIdThe observer.
Returns
The stream of observees.

◆ StreamObservers()

async IAsyncEnumerable<User> UVACanvasAccess.ApiParts.Api.StreamObservers ( ulong  observeeId)
inline

Streams the observers associated with an observee.

Parameters
observeeIdThe observee.
Returns
The stream of observers.

◆ StreamPersonalFiles()

async IAsyncEnumerable<CanvasFile> UVACanvasAccess.ApiParts.Api.StreamPersonalFiles ( IEnumerable< ContentType >  includeContentTypes = null,
IEnumerable< ContentType >  excludeContentTypes = null,
string  searchTerm = null,
FileIncludes includes = null,
bool  onlyIncludeFileNames = false,
FileSort sortBy = null,
Order order = null 
)
inline

Stream the current user's personal files.

Parameters
includeContentTypes(Optional) Content types to include.
excludeContentTypes(Optional) Content type to exclude.
searchTerm(Optional) A search term.
includes(Optional) Extra data to include with the results.
onlyIncludeFileNames(Optional) Only include file names with the results.
sortBy(Optional) The category to sort the results by.
order(Optional) The order to sort the results by.
Returns
The stream of files.

◆ StreamPersonalFolders()

async IAsyncEnumerable<Folder> UVACanvasAccess.ApiParts.Api.StreamPersonalFolders ( )
inline

Stream the current user's personal folders.

Returns
The stream of folders.

◆ StreamReceivedContentShares() [1/2]

IAsyncEnumerable<ContentShareWithSender> UVACanvasAccess.ApiParts.Api.StreamReceivedContentShares ( [NotNull] User  receiver)
inline

Stream the content shares for which some user is a receiver.

Parameters
receiverThe receiver.
Returns
The stream of shares.

The current user must be an observer of receiver , or an administrator.

◆ StreamReceivedContentShares() [2/2]

async IAsyncEnumerable<ContentShareWithSender> UVACanvasAccess.ApiParts.Api.StreamReceivedContentShares ( ulong?  userId = null)
inline

Stream the content shares for which some user is a receiver.

Parameters
userId(Optional) The id of the receiver. Self by default.
Returns
The stream of shares.

If userId is not Self, the current user must be an observer of the user, or an administrator.

◆ StreamRecentCourseUsers()

async IAsyncEnumerable<User> UVACanvasAccess.ApiParts.Api.StreamRecentCourseUsers ( ulong  courseId)
inline

Streams the list of users enrolled in a course who have recently logged in.

Parameters
courseIdThe course id.
Returns
The stream of users, sorted by User.LastLogin.

◆ StreamSectionEnrollments()

async IAsyncEnumerable<Enrollment> UVACanvasAccess.ApiParts.Api.StreamSectionEnrollments ( ulong  sectionId,
IEnumerable< CourseEnrollmentRoleTypes types = null,
IEnumerable< CourseEnrollmentState states = null,
CourseEnrollmentIncludes includes = null,
ulong?  userId = null,
ulong?  gradingPeriodId = null,
ulong?  enrollmentTermId = null,
string  enrollmentTermSisId = null,
IEnumerable< string >  sisAccountIds = null,
IEnumerable< string >  sisCourseIds = null,
IEnumerable< string >  sisSectionIds = null,
IEnumerable< string >  sisUserIds = null,
IEnumerable< bool >  createdForSisId = null 
)
inline

Streams all enrollments for the section.

Parameters
sectionIdThe section id.
types(Optional) The set of enrollment types to filter by.
states(Optional) The set of enrollment states to filter by.
includes(Optional) Data to include in the result.
userId(Optional) The user id to filter by.
gradingPeriodId(Optional) The grading period id to filter by.
enrollmentTermId(Optional) The enrollment term id to filter by. Cannot be used with enrollmentTermSisId.
enrollmentTermSisId(Optional) The enrollment term SIS id to filter by. Cannot be used with enrollmentTermId.
sisAccountIds(Optional) The set of account SIS ids to filter by.
sisCourseIds(Optional) The set of course SIS ids to filter by.
sisSectionIds(Optional) The set of section SIS ids to filter by.
sisUserIds(Optional) The set of user SIS ids to filter by.
createdForSisId(Optional) If using sisUserIds, restrict the filtering per SIS id to only include enrollments made for that exact SIS id. This is relevant when a user has multiple SIS ids.
Returns
The stream of enrollments.

◆ StreamSentContentShares() [1/2]

IAsyncEnumerable<ContentShareWithReceivers> UVACanvasAccess.ApiParts.Api.StreamSentContentShares ( [NotNull] User  sender)
inline

Stream the content shares for which some user is a sender.

Parameters
senderThe sender.
Returns
The stream of shares.

The current user must be an observer of sender , or an administrator.

◆ StreamSentContentShares() [2/2]

async IAsyncEnumerable<ContentShareWithReceivers> UVACanvasAccess.ApiParts.Api.StreamSentContentShares ( ulong?  userId = null)
inline

Stream the content shares for which some user is a sender.

Parameters
userId(Optional) The id of the sender. Self by default.
Returns
The stream of shares.

If userId is not Self, the current user must be an observer of the user, or an administrator.

◆ StreamStudentGradeChangelog()

async IAsyncEnumerable<GradeChangeEvent> UVACanvasAccess.ApiParts.Api.StreamStudentGradeChangelog ( ulong  studentId,
DateTime?  start = null,
DateTime?  end = null 
)
inline

Streams the grade changelog for a single student.

Parameters
studentIdThe student id.
startThe beginning of the range to search.
endThe end of the range to search.
Returns
The changelog.

◆ StreamSubmissionVersions()

async IAsyncEnumerable<SubmissionVersion> UVACanvasAccess.ApiParts.Api.StreamSubmissionVersions ( ulong  courseId,
ulong?  assignmentId = null,
ulong?  userId = null,
bool?  ascending = null 
)
inline

Streams an uncollated list of submission versions for all matching submissions in the context.

Parameters
courseIdThe course id.
assignmentIdAn optional assignment id to filter by.
userIdAn optional user id to filter by.
ascendingSorts the list in ascending order by date.
Returns
The stream of submission versions.

The returned objects will be missing the properties NewGrade and PreviousGrade.

◆ StreamToDoItems()

async IAsyncEnumerable<ToDoItem> UVACanvasAccess.ApiParts.Api.StreamToDoItems ( bool  includeUngradedQuizzes = false)
inline

Stream the current user's to-do items.

Parameters
includeUngradedQuizzes(Optional) If true, include ungraded quizzes.
Returns
The stream of to-do items.

◆ StreamUserAuthenticationEvents()

async IAsyncEnumerable<AuthenticationEvent> UVACanvasAccess.ApiParts.Api.StreamUserAuthenticationEvents ( ulong  userId,
DateTime?  start = null,
DateTime?  end = null 
)
inline

Streams the list of authentication events recorded for the given user.

Parameters
userIdThe user id.
startThe beginning of the date range to search in.
endThe end of the date range to search in.
Returns
The stream of events.

The authentication log keeps any given event for 1 year.

◆ StreamUserCourses()

async IAsyncEnumerable<Course> UVACanvasAccess.ApiParts.Api.StreamUserCourses ( ulong  userId,
IndividualLevelCourseIncludes includes = null,
CourseStatesAlt courseStates = null,
CourseEnrollmentStateAlt enrollmentState = null,
bool?  homeroomCoursesOnly = null 
)
inline

Streams the list of courses a user is enrolled in. All arguments except userId are optional, and serve to narrow (or broaden) the results.

Parameters
userIdThe user id.
includesOptional data to include with the results. See IndividualLevelCourseIncludes.
courseStates(Optional) The course states to filter by.
enrollmentState(Optional) The enrollment state to filter by.
homeroomCoursesOnly(Optional) If true, only return homeroom courses.
Returns

◆ StreamUserEnrollments()

async IAsyncEnumerable<Enrollment> UVACanvasAccess.ApiParts.Api.StreamUserEnrollments ( ulong  userId,
IEnumerable< CourseEnrollmentRoleTypes types = null,
IEnumerable< CourseEnrollmentState states = null,
CourseEnrollmentIncludes includes = null,
ulong?  gradingPeriodId = null,
ulong?  enrollmentTermId = null,
string  enrollmentTermSisId = null,
IEnumerable< string >  sisAccountIds = null,
IEnumerable< string >  sisCourseIds = null,
IEnumerable< string >  sisSectionIds = null,
IEnumerable< string >  sisUserIds = null,
IEnumerable< bool >  createdForSisId = null 
)
inline

Streams all enrollments for the user.

Parameters
userIdThe user id.
types(Optional) The set of enrollment types to filter by.
states(Optional) The set of enrollment states to filter by.
includes(Optional) Data to include in the result.
gradingPeriodId(Optional) The grading period id to filter grades by.
enrollmentTermId(Optional) The enrollment term id to filter by. Cannot be used with enrollmentTermSisId.
enrollmentTermSisId(Optional) The enrollment term SIS id to filter by. Cannot be used with enrollmentTermId.
sisAccountIds(Optional) The set of account SIS ids to filter by.
sisCourseIds(Optional) The set of course SIS ids to filter by.
sisSectionIds(Optional) The set of section SIS ids to filter by.
sisUserIds(Optional) The set of user SIS ids to filter by.
createdForSisId(Optional) If using sisUserIds, restrict the filtering per SIS id to only include enrollments made for that exact SIS id. This is relevant when a user has multiple SIS ids.
Returns
The stream of enrollments.

◆ StreamUserPageViews()

async IAsyncEnumerable<PageView> UVACanvasAccess.ApiParts.Api.StreamUserPageViews ( ulong?  userId = null,
DateTime?  startTime = null,
DateTime?  endTime = null 
)
inline

Streams the user's page view history. Page views are returned in descending order; newest to oldest.

Parameters
userIdThe id of the user. Defaults to self.
startTimeThe beginning of the date-time range to retrieve page views from. Defaults to unbounded.
endTimeThe end of the date-time range to retrieve page views from. Defaults to unbounded.
Returns
The stream of page views.

◆ StreamUsers()

async IAsyncEnumerable<User> UVACanvasAccess.ApiParts.Api.StreamUsers ( string  searchTerm = null,
string  sort = null,
string  order = null,
string  accountId = "self" 
)
inline

Stream the list of users associated with the account. Corresponds to the API endpoint GET /api/v1/accounts/:account_id/users.

Parameters
searchTermThe partial name or full ID of the users to match.
accountIdThe account to search. self by default.
sortThe column to sort results by. Allowed values are username, email, sis_id, last_login.
orderThe order to sort the given column by. Allowed values are asc, desc.
Returns
The stream of users found in the search.
Exceptions
ExceptionThrown if the API returns a failing response code.

◆ SubmitCourseAssignment()

async Task<Submission> UVACanvasAccess.ApiParts.Api.SubmitCourseAssignment ( ulong  courseId,
ulong  assignmentId,
[NotNull] INewSubmissionContent  submissionContent,
string  comment = null 
)
inline

Make a submission under the current user for this assignment.

Parameters
courseIdThe course id.
assignmentIdThe assignment id.
submissionContentThe content to submit.
commentAn optional comment to include with the submission.
Returns
The completed submission.
See also
OnlineTextEntrySubmission, OnlineUrlSubmission, OnlineUploadSubmission

◆ UnCrossListSection()

async Task<Section> UVACanvasAccess.ApiParts.Api.UnCrossListSection ( ulong  sectionId)
inline

Removes the cross-listing of a section.

Parameters
sectionIdThe section id.
Returns
The section.

◆ UpdateColumnCustomEntry()

async Task<ColumnDatum> UVACanvasAccess.ApiParts.Api.UpdateColumnCustomEntry ( ulong  columnId,
ulong  courseId,
ulong  userId,
string  content 
)
inline

Updates the content of a custom column entry.

Parameters
columnIdThe column id.
courseIdThe course id.
userIdThe user id.
contentThe content.
Returns
The updated entry.

◆ UpdateCourseSettings()

async Task UVACanvasAccess.ApiParts.Api.UpdateCourseSettings ( ulong  courseId,
CourseSettings  cs 
)
inline

Update a course's settings.

Parameters
courseIdThe course id.
csThe new settings.
Returns
A void task.

◆ UpdateCustomColumn()

async Task<CustomColumn> UVACanvasAccess.ApiParts.Api.UpdateCustomColumn ( ulong  columnId,
ulong  courseId,
string  title = null,
int?  position = null,
bool?  hidden = null,
bool?  teacherNotes = null,
bool?  readOnly = null 
)
inline

Updates an existing gradebook column. Any omitted optional parameter is unchanged.

Parameters
columnIdThe column id.
courseIdThe course id.
title(Optional) The title of the column.
position(Optional) The position of the column relative to other columns.
hidden(Optional) If true, this column will be hidden.
teacherNotes(Optional) If true, this column will be considered a teacher notes column.
readOnly(Optional) If true, this column will not be editable through the UI.
Returns
The newly updated column.

◆ UpdateCustomColumnEntries()

async Task UVACanvasAccess.ApiParts.Api.UpdateCustomColumnEntries ( ulong  courseId,
IEnumerable< ColumnEntryUpdate updates 
)
inline

Bulk update the contents of several custom column entries.

Parameters
courseIdThe column id.
updatesThe updates.
Returns

◆ UpdateEnrollmentTerm()

async Task<EnrollmentTerm> UVACanvasAccess.ApiParts.Api.UpdateEnrollmentTerm ( ulong  enrollmentId,
EnrollmentTermBuilder  builder,
ulong?  accountId = null 
)
inline

Updates an enrollment term.

Parameters
enrollmentIdThe enrollment id.
builderThe completed EnrollmentTermBuilder.
accountIdThe account id. Defaults to the current account.
Returns
The updated EnrollmentTerm.

◆ UpdateGradingPeriod()

async Task<GradingPeriod> UVACanvasAccess.ApiParts.Api.UpdateGradingPeriod ( ulong  courseId,
ulong  gradingPeriodId,
DateTime?  startDate = null,
DateTime?  endDate = null,
double?  weight = null 
)
inline

Updates a single grading period.

Parameters
courseIdThe id of the course the grading period belongs to.
gradingPeriodIdThe id of the grading period.
startDateOptional; The new start date.
endDateOptional; The new end date.
weightOptional; The new weight.
Returns
The updated grading period.

◆ UpdateGradingPeriodSet()

async Task UVACanvasAccess.ApiParts.Api.UpdateGradingPeriodSet ( ulong  accountId,
ulong  gradingPeriodSetId,
[CanBeNull] string  title = null,
[CanBeNull] IEnumerable< ulong >  termIds = null,
bool?  weighted = null,
bool?  displayTotalsForAllGradingPeriods = null 
)
inline

Updates an existing grading period set.

Parameters
accountIdThe account id.
gradingPeriodSetIdThe grading period set id.
titleOptional; The new title.
termIdsOptional; The new list of term ids to associate with the set.
weightedOptional; The new value of this setting.
displayTotalsForAllGradingPeriodsOptional; The new value of this setting.

◆ UpdatePersonalFile()

async Task<CanvasFile> UVACanvasAccess.ApiParts.Api.UpdatePersonalFile ( ulong  fileId,
DateTime?  lockAt = null,
DateTime?  unlockAt = null,
bool?  locked = null,
bool?  hidden = null 
)
inline

Updates a personal file for the current user. All arguments except for fileId are optional.

Parameters
fileIdThe file id.
lockAtWhen the file should lock.
unlockAtWhen the file should unlock.
lockedWhether or not the file is locked.
hiddenWhether or not the file is hidden.
Returns
The file.

◆ UpdatePersonalFolder()

async Task<Folder> UVACanvasAccess.ApiParts.Api.UpdatePersonalFolder ( ulong  folderId,
string  name 
)
inline

Updates a personal folder for the current user.

Parameters
folderIdThe folder id.
nameThe folder name.
Returns
The folder.

◆ UploadPersonalFile()

Task<CanvasFile> UVACanvasAccess.ApiParts.Api.UploadPersonalFile ( byte[]  file,
string  filePath,
string  parentFolderName = null 
)
inline

Uploads a file to the current user's personal files section.

Parameters
fileThe data.
filePathThe URI of the file on the local system. Must include, at a minimum, the name and the extension.
parentFolderName
Returns
The uploaded file.

The documentation for this class was generated from the following files: