UVACanvasAccess
|
This class is the primary interface for interacting with the Canvas API.
More...
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< Account > | StreamAccounts (AccountIncludes includes=AccountIncludes.Default) |
Stream the accounts in this domain. More... | |
async Task< Account > | GetAccount (ulong accountId) |
Get a single account by id. More... | |
async Task< BasicAccountPermissionsSet > | GetAccountPermissions (AccountRolePermissions checkedPermissions, ulong? accountId=null) |
Get the permissions set of an account. More... | |
async Task< TermsOfService > | GetTermsOfService (ulong? accountId=null) |
Get an account's Terms of Service. More... | |
async Task< HelpLinks > | GetHelpLinks (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< Course > | 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) |
Asynchronously streams the courses associated with this account. More... | |
Task< DepartmentParticipation > | GetDepartmentParticipationData (ulong termId, ulong? accountId=null) |
Gets the page view and participation counts across all courses in the department during the given term. More... | |
Task< DepartmentParticipation > | GetDefaultTermDepartmentParticipationData (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< DepartmentStatistics > | GetDepartmentStatistics (ulong termId, ulong? accountId=null) |
Gets some numeric statistics about the department relative to the given term. More... | |
Task< DepartmentStatistics > | GetDefaultTermDepartmentStatistics (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< UserParticipation > | GetUserCourseParticipationData (ulong userId, ulong courseId) |
Gets participation details for the user for the entire history of the course. More... | |
async IAsyncEnumerable< UserAssignmentData > | GetUserCourseAssignmentData (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< CourseStudentSummary > | StreamCourseStudentSummary (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< CourseAssignmentSummary > | StreamCourseAssignmentSummary (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< AppointmentGroup > | StreamAppointmentGroups (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< AppointmentGroup > | GetAppointmentGroup (ulong id, AppointmentGroupIncludes includes=0) |
Gets a single appointment group. More... | |
async Task< AppointmentGroup > | DeleteAppointmentGroup (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< AssignmentOverride > | StreamAssignmentOverrides (ulong courseId, ulong assignmentId) |
Streams the assignment overrides for a given assignment. More... | |
async Task< AssignmentOverride > | GetAssignmentOverride (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< Submission > | SubmitCourseAssignment (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< Assignment > | 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) |
Streams all assignments in this course that are visible to the current user. More... | |
async Task< Assignment > | GetAssignment (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< AuthenticationEvent > | StreamUserAuthenticationEvents (ulong userId, DateTime? start=null, DateTime? end=null) |
Streams the list of authentication events recorded for the given user. More... | |
async IAsyncEnumerable< AuthenticationEvent > | StreamAccountAuthenticationEvents (ulong? accountId=null, DateTime? start=null, DateTime? end=null) |
Streams the list of authentication events recorded for the given account. More... | |
async IAsyncEnumerable< CalendarEvent > | StreamCalendarEvents (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< ContentShare > | CreateContentShare ([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< ContentShare > | CreateContentShare ([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< ContentShareWithReceivers > | StreamSentContentShares (ulong? userId=null) |
Stream the content shares for which some user is a sender. More... | |
IAsyncEnumerable< ContentShareWithReceivers > | StreamSentContentShares ([NotNull] User sender) |
Stream the content shares for which some user is a sender. More... | |
async IAsyncEnumerable< ContentShareWithSender > | StreamReceivedContentShares (ulong? userId=null) |
Stream the content shares for which some user is a receiver. More... | |
IAsyncEnumerable< ContentShareWithSender > | StreamReceivedContentShares ([NotNull] User receiver) |
Stream the content shares for which some user is a receiver. More... | |
async Task< ContentShare > | GetContentShare (ulong shareId, ulong? userId=null) |
Get a single content share by its id and associated user. More... | |
Task< ContentShare > | GetContentShare (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< Conversation > | 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) |
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< Conversation > | StreamConversations (ConversationReadState? readState=null, IEnumerable< QualifiedId > filter=null, bool filterIntersection=false, bool includeParticipantAvatars=false) |
Streams the conversations visible to the current user. More... | |
async Task< DetailedConversation > | GetConversation (ulong conversationId, bool markAsRead=false) |
Gets a single conversation by id. More... | |
async Task< Conversation > | EditConversation (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< Conversation > | 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) |
Adds a message to the given conversation. More... | |
async Task< Course > | GetCourse (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< CourseSettings > | GetCourseSettings (ulong courseId) |
Get a course's settings. More... | |
async Task | UpdateCourseSettings (ulong courseId, CourseSettings cs) |
Update a course's settings. More... | |
async IAsyncEnumerable< User > | StreamCourseUsers (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< Course > | StreamUserCourses (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< User > | StreamRecentCourseUsers (ulong courseId) |
Streams the list of users enrolled in a course who have recently logged in. More... | |
async Task< User > | GetCourseTestStudent (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< CourseProgress > | GetUserCourseProgress (ulong courseId, ulong? userId=null) |
Returns progress information for a user in a course. More... | |
async IAsyncEnumerable< CustomColumn > | StreamCustomGradebookColumns (ulong courseId, bool? includeHidden=null) |
Streams the custom gradebook columns in the given course. More... | |
async Task< CustomColumn > | CreateCustomColumn (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< CustomColumn > | UpdateCustomColumn (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< CustomColumn > | DeleteCustomColumn (ulong columnId, ulong courseId) |
Deletes a gradebook column. More... | |
async IAsyncEnumerable< ColumnDatum > | StreamColumnEntries (ulong columnId, ulong courseId) |
Streams column entries. More... | |
async Task< ColumnDatum > | UpdateColumnCustomEntry (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< DiscussionTopic > | GetCourseDiscussionTopic (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< TopicEntry > | PostCourseDiscussionEntry (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< Enrollment > | 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) |
Enrolls a user in a course. More... | |
Task< Enrollment > | ConcludeEnrollment (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< Enrollment > | DeleteEnrollment (ulong courseId, ulong enrollmentId) |
Irrecoverably deletes an enrollment. More... | |
Task< Enrollment > | DeactivateEnrollment (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< Enrollment > | ReactivateEnrollment (ulong courseId, ulong enrollmentId) |
Reactivate an enrollment that is inactive. More... | |
async IAsyncEnumerable< Enrollment > | 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) |
Streams all enrollments for the course. More... | |
async IAsyncEnumerable< Enrollment > | 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) |
Streams all enrollments for the user. More... | |
async IAsyncEnumerable< Enrollment > | 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) |
Streams all enrollments for the section. More... | |
async IAsyncEnumerable< EnrollmentTerm > | StreamEnrollmentTerms (ulong? accountId=null, EnrollmentTermWorkflowStateFilter? workflowState=null, EnrollmentTermIncludes? includes=null) |
Streams the enrollment terms for an account. More... | |
async Task< EnrollmentTerm > | GetEnrollmentTerm (ulong termId, ulong? accountId=null) |
Gets an enrollment term by id. More... | |
async Task< EnrollmentTerm > | DeleteEnrollmentTerm (ulong termId, ulong? accountId=null) |
Deletes an enrollment term. More... | |
async Task< EnrollmentTerm > | CreateEnrollmentTerm (EnrollmentTermBuilder builder, ulong? accountId=null) |
Creates an enrollment term. More... | |
async Task< EnrollmentTerm > | UpdateEnrollmentTerm (ulong enrollmentId, EnrollmentTermBuilder builder, ulong? accountId=null) |
Updates an enrollment term. More... | |
async IAsyncEnumerable< ExternalTool > | StreamExternalTools (ulong contextId, ExternalToolContextType contextType, string searchTerm=null, bool? filterSelectable=null, bool? includeParents=null, ExternalToolPlacementType? filterPlacement=null) |
Task< CanvasFile > | UploadPersonalFile (byte[] file, string filePath, string parentFolderName=null) |
Uploads a file to the current user's personal files section. More... | |
async Task< Folder > | CreatePersonalFolder (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< Folder > | GetPersonalFolder (ulong? folderId) |
Get a single personal folder for the current user. More... | |
async IAsyncEnumerable< Folder > | StreamPersonalFolders () |
Stream the current user's personal folders. More... | |
async IAsyncEnumerable< CanvasFile > | StreamPersonalFiles (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< CanvasFile > | GetPersonalFile (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< CanvasFile > | UpdatePersonalFile (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< Folder > | UpdatePersonalFolder (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< CanvasFile > | MovePersonalFile (ulong fileId, OnDuplicate onDuplicate, string name=null, ulong? destinationFolderId=null) |
Moves a personal file for the current user. More... | |
async Task< CanvasFile > | CopyPersonalFile (ulong fileId, ulong destinationFolderId, OnDuplicate onDuplicate) |
Copies a personal file for the current user. More... | |
async Task< CanvasFile > | DeletePersonalFile (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< SubmissionVersion > | StreamSubmissionVersions (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< GradeChangeEvent > | StreamAssignmentGradeChangelog (ulong assignmentId, DateTime? start=null, DateTime? end=null) |
Streams the grade changelog for a single assignment. More... | |
async IAsyncEnumerable< GradeChangeEvent > | StreamCourseGradeChangelog (ulong courseId, DateTime? start=null, DateTime? end=null) |
Streams the grade changelog for a single course. More... | |
async IAsyncEnumerable< GradeChangeEvent > | StreamStudentGradeChangelog (ulong studentId, DateTime? start=null, DateTime? end=null) |
Streams the grade changelog for a single student. More... | |
async IAsyncEnumerable< GradeChangeEvent > | StreamGraderGradeChangelog (ulong graderId, DateTime? start=null, DateTime? end=null) |
Streams the grade changelog for a single grader. More... | |
async IAsyncEnumerable< GradingPeriod > | StreamGradingPeriods (ulong courseId) |
Streams all grading periods in a course. More... | |
async IAsyncEnumerable< GradingPeriod > | StreamAccountGradingPeriods (ulong accountId) |
Streams all grading periods in an account. More... | |
async Task< GradingPeriod > | GetGradingPeriod (ulong courseId, ulong gradingPeriodId) |
Gets a grading period by its id. More... | |
async Task< GradingPeriod > | UpdateGradingPeriod (ulong courseId, ulong gradingPeriodId, DateTime? startDate=null, DateTime? endDate=null, double? weight=null) |
Updates a single grading period. More... | |
IAsyncEnumerable< GradingPeriod > | BatchUpdateGradingPeriods (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< GradingPeriod > | BatchUpdateCourseGradingPeriods (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< GradingPeriodSet > | StreamGradingPeriodSets (ulong accountId) |
Streams all grading period sets in an account. More... | |
async Task< GradingPeriodSet > | CreateGradingPeriodSet (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< UserLogin > | StreamUserLogins (ulong userId) |
IAsyncEnumerable< UserLogin > | StreamAccountLogins (ulong accountId) |
async Task< IEnumerable< ActivityStreamObject > > | GetActivityStream (bool? onlyActiveCourses=null) |
Gets the activity stream for the current user. More... | |
async IAsyncEnumerable< ActivityStreamObject > | StreamActivityStream (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< PageView > | StreamUserPageViews (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< Module > | StreamModules (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< Module > | GetModule (ulong moduleId, ulong courseId, ulong? studentId=null, ModuleIncludeType includes=ModuleIncludeType.None) |
Gets a module by its id and course id. More... | |
async IAsyncEnumerable< ModuleItem > | StreamModuleItems (ulong moduleId, ulong courseId, bool includeContentDetails=true, [CanBeNull] string searchTerm=null, ulong? studentId=null) |
Streams the items in a module. More... | |
async Task< ModuleItemSequence > | GetModuleItemSequence (ulong courseId, ModuleAssetType assetType, ulong assetId) |
Given an asset, find the module item sequence it belongs to. More... | |
async IAsyncEnumerable< User > | StreamObservees (ulong observerId) |
Streams the observees associated with an observer. More... | |
async IAsyncEnumerable< User > | StreamObservers (ulong observeeId) |
Streams the observers associated with an observee. More... | |
async Task< User > | AddObservee (ulong observerId, ulong observeeId, ulong? rootAccountId=null) |
Set a user to be observed by another user. More... | |
async Task< User > | RemoveObservee (ulong observerId, ulong observeeId, ulong? rootAccountId=null) |
Set a user to stop being observed by another user. More... | |
async IAsyncEnumerable< Page > | StreamCoursePages (ulong courseId, PageSort? sort=null, Order? order=null, string searchTerm=null, bool? published=null) |
Stream all pages for a course. More... | |
async Task< Page > | GetCoursePage (ulong courseId, string url) |
Get a single course page by its URL. More... | |
async Task< Page > | GetCourseFrontPage (ulong courseId) |
Get a course's front page. More... | |
async IAsyncEnumerable< PageRevision > | StreamCoursePageRevisionHistory (ulong courseId, string url) |
Streams the history of course page revisions. More... | |
async Task< PageRevision > | GetCoursePageRevision (ulong courseId, string url, ulong revisionId, bool? omitDetails=null) |
Returns a single course page revision. More... | |
async Task< Proficiency > | GetProficiencyRatings (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< Report > | StartReport (string reportType, IEnumerable<(string, object)> parameters, ulong? accountId=null) |
Run a report. More... | |
async Task< Report > | GetReportStatus (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< Role > | CreateRole (string label, in RolePermissionsSet? permissions=null, string baseRoleType=null, ulong? accountId=null) |
Creates a new role. More... | |
async IAsyncEnumerable< Section > | StreamCourseSections (ulong courseId, SectionIncludes includes=0) |
Streams all sections in a course. More... | |
async Task< Section > | GetSection (ulong courseId, ulong sectionId) |
Gets a single section by course and section id. More... | |
async Task< Section > | CrossListSection (ulong sectionId, ulong targetCourseId) |
Cross-lists a section. More... | |
async Task< Section > | UnCrossListSection (ulong sectionId) |
Removes the cross-listing of a section. More... | |
async Task< SisImport > | ImportSisData ([NotNull] byte[] file, [NotNull] string filePath, ulong? accountId=null, bool batchMode=false, bool? overrideStickiness=null) |
Performs a SIS import. More... | |
async Task< SisImport > | GetSisImport (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< User > | EditUser (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< Profile > | GetUserProfile (ulong? id=null) |
Get the profile of a user. More... | |
async Task< User > | GetUser (ulong? id=null) |
Get details for a user, including a non-comprehensive list of permissions. More... | |
ValueTask< User > | GetUserBySis (string sis) |
Search for a user by SIS id. More... | |
ValueTask< User > | GetUserByLoginSis (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< User > | StreamUsers (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< User > | DeleteUser (ulong userId, ulong? accountId=null) |
Delete a user. More... | |
async IAsyncEnumerable< ToDoItem > | StreamToDoItems (bool includeUngradedQuizzes=false) |
Stream the current user's to-do items. More... | |
async IAsyncEnumerable< Assignment > | StreamMissingAssignments (ulong? userId=null, bool submittableOnly=false, bool includePlannerOverrides=false, bool includeCourse=false) |
Stream a user's past-due assignments which have no submissions. More... | |
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.
|
strong |
|
strong |
Optional account-related data to include with courses.
|
strong |
Data that can be included in responses containing appointment groups.
|
strong |
|
strong |
|
strong |
Categories of optional data that can be requested for inclusion within Assignment objects.
|
strong |
Categories of optional data that can be requested for inclusion within Enrollment objects.
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.
An alternate version of CourseEnrollmentState used by StreamUserCourses().
|
strong |
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. |
|
strong |
|
strong |
|
strong |
|
strong |
An alternate version of CourseStates used by StreamUserCourses().
|
strong |
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. |
Categories of optional data that can be requested for inclusion within DiscussionTopic objects.
Categories of workflow state to filter by when querying enrollment terms.
Enumerator | |
---|---|
Active | The term is active. |
Deleted | The term is deleted. |
All | All terms. |
|
strong |
|
strong |
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. |
|
strong |
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().
|
strong |
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.
Enumerator | |
---|---|
None | No additional includes requested. |
TryIncludeItems | Try to include module items. |
TryIncludeItemsAndContentDetails | Try to include module items and content details. |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
The columns which the data from Api.StreamCourseStudentSummary can be sorted by.
|
inline |
Construct a new API instance.
token | The token used to authenticate this API instance. |
baseUrl | The 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. |
|
inline |
If the current user has a pending enrollment invitation, accepts it.
courseId | The course. |
enrollmentId | The enrollment to accept. |
|
inline |
Adds a message to the given conversation.
conversationId | The conversation id. |
body | The 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. |
|
inline |
Set a user to be observed by another user.
observerId | The user to become the observer. |
observeeId | The user to become the observee. |
rootAccountId | (Optional) The id of the root account with which to associate the link. |
|
inline |
Gets a collection of AssignmentOverride objects, given a course id, a set of override ids, and the assignments they belong to.
courseId | The course id. |
assignmentsToOverrides | A mapping of assignment ids to override ids. |
|
inline |
Perform a batch update on grading periods within a course. Existing grading periods can be updated, and new ones created.
courseId | The course id. |
gradingPeriodUpdates | The list of updates. |
|
inline |
Perform a batch update on grading periods within a grading period set. Existing grading periods can be updated, and new ones created.
gradingPeriodSetId | The grading period set id. |
gradingPeriodUpdates | The list of updates. |
|
inline |
End a course without deleting it.
courseId | The course id. |
|
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.
courseId | The course. |
enrollmentId | The enrollment. |
|
inline |
Copies a personal file for the current user.
fileId | The file id. |
destinationFolderId | The id of the folder to copy the file into. |
onDuplicate | The action taken to resolve a duplicate. |
|
inline |
Returns an AppointmentGroupBuilder for creating a new appointment group.
title | The title of the appointment group. |
contexts | The event contexts relevant to the appointment group. |
|
inline |
Returns an AppointmentGroupBuilder for creating a new appointment group.
title | The title of the appointment group. |
contexts | The event contexts relevant to the appointment group. |
|
inline |
Returns a AssignmentBuilder for creating a new assignment.
courseId | The course id. |
|
inline |
Returns an AssignmentOverrideBuilder for creating a new assignment override.
courseId | The course id. |
assignmentId | The assignment id. |
|
inline |
Create a content share between one sender and one or more receivers.
receivers | The list of receiver ids. |
contentType | The type of the content being shared. |
contentId | The id of the content being shared. |
senderId | (Optional) The id of the sender. Self by default. |
|
inline |
Create a content share between one sender and one or more receivers.
receivers | The list of receivers. |
contentType | The type of the content being shared. |
contentId | The id of the content being shared. |
senderId | (Optional) The id of the sender. Self by default. |
|
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.
recipients | The recipients of the created conversations(s). |
body | The 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 (???). |
|
inline |
Return a new Builders.CourseBuilder.
accountId | (Optional) The account id. |
|
inline |
Returns a CreateDiscussionTopicBuilder for building a new discussion topic for the course.
courseId | The course id. |
|
inline |
Creates a new custom gradebook column in the given course.
courseId | The course id. |
title | The 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. |
|
inline |
Enrolls a user in a course.
courseId | The course id. |
userId | The user id. |
enrollmentType | The enrollment type. |
roleId | An optional course-level role to assign to the user. |
enrollmentState | The enrollment state. CourseEnrollmentState.Invited by default. If CourseEnrollmentState.Invited, the user will be sent a course invite. |
courseSectionId | Optionally, the course section to enroll in. |
limitPrivilegesToSection | Optionally, only allow this user to interact with users in the same section. |
notify | Whether or not this user should be notified to changes in the course. Disabled by default. |
selfEnrollmentCode | If self-enrolling, the self-enrollment code. |
selfEnrolled | Whether or not this is a self-enrollment. |
associatedUserId | If this is an observer enrollment, the id of the target student. |
|
inline |
Creates an enrollment term.
builder | The completed EnrollmentTermBuilder. |
accountId | The account id. Defaults to the current account. |
|
inline |
Creates a new grading period set.
accountId | The id of the account under which to create the grading period set. |
title | The title of the set. |
termIds | Optional; Term ids to associate with the set. |
weighted | Optional; Whether the set is weighted. |
displayTotalsForAllGradingPeriods | Optional; Whether the totals for all grading periods in the set are displayed. |
|
inline |
Create a folder in the current user's personal files section.
name | The 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. |
|
inline |
Creates a new role.
label | The role's name/label. |
permissions | The role's permissions. |
baseRoleType | The existing role type to inherit from. |
accountId | The account id. Defaults to the current account. |
|
inline |
Returns a CreateUserBuilder
for creating a new user.
accountId | The account to create the user under. self by default. |
|
inline |
Cross-lists a section.
sectionId | The section id. |
targetCourseId | The course to cross-list with. |
|
inline |
Sets an enrollment to CourseEnrollmentState.Inactive.
courseId | The course. |
enrollmentId | The enrollment. |
|
inline |
If the current user has a pending enrollment invitation, decline it.
courseId | The course. |
enrollmentId | The enrollment to accept. |
|
inline |
Deletes a grading period in an account.
accountId | The id of the account the grading period belongs to. |
gradingPeriodId | The id of the grading period. |
|
inline |
Deletes an appointment group.
id | The id of the group. |
reason | An optional reason. |
|
inline |
Delete a single content share by its id from the list of a user.
shareId | The id of the share. |
userId | (Optional) The user whose view of the share will be deleted. Self by default. |
The share will still be visible to other users.
|
inline |
Delete a course.
courseId | The course id. |
|
inline |
Deletes a gradebook column.
columnId | The column id. |
courseId | The course id. |
|
inline |
Delete arbitrary user data stored with StoreCustomJson. Corresponds to the API endpoint DELETE /api/v1/users/:user_id/custom_data(/*scope)
.
ns | The namespace under which the data is stored. |
scopes | The scope, and optionally subscopes, under which the data is stored. Omit scope to delete all custom data. |
userId | The id of the user. |
Exception |
|
inline |
Irrecoverably deletes an enrollment.
courseId | The course. |
enrollmentId | The enrollment. |
|
inline |
Deletes an enrollment term.
termId | The term id. |
accountId | The account id. Defaults to the current account. |
|
inline |
Deletes a grading period in a course.
courseId | The id of the course the grading period belongs to. |
gradingPeriodId | The id of the grading period. |
|
inline |
Deletes a grading period set.
accountId | The id of the account the grading period set belongs to. |
gradingPeriodSetId | The id of the grading period set. |
|
inline |
Deletes a personal file for the current user.
fileId | The file id. |
replace | (Optional) If true, the file and all generated previews will be replaced with a blank placeholder. |
|
inline |
Deletes a personal folder for the current user.
folderId | The folder id. |
rf | (Optional) If true, the folder does not need to be empty. |
|
inline |
Delete a user.
userId | The user id. |
accountId | The account the user is under. self by default. |
|
inline |
Returns an AppointmentGroupBuilder for modifying an existing appointment group.
appointmentGroup | The AppointmentGroup to edit. |
|
inline |
Returns an AppointmentGroupBuilder for modifying an existing appointment group.
appointmentGroup | The AppointmentGroup to edit. |
contexts | The new set of event contexts; these will replace the previous event contexts. |
|
inline |
Returns an AppointmentGroupBuilder for modifying an existing appointment group.
appointmentGroup | The AppointmentGroup to edit. |
contexts | The new set of event contexts; these will replace the previous event contexts. |
|
inline |
Returns a AssignmentBuilder for editing an existing assignment.
courseId | The course id. |
assignmentId | The assignment id. |
|
inline |
Edits the current user's view of a conversation by id.
conversationId | The 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. |
|
inline |
Return a new Builders.CourseBuilder for editing.
courseId | The course id. |
accountId | (Optional) The account id. |
|
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
fields | The set of field-value tuples to modify. |
id | The id of the user. A null id is interpreted as self . |
Exception | Thrown if the API returns a failing response code. |
|
inline |
Get a single account by id.
accountId | The account id. |
|
inline |
Get the permissions set of an account.
checkedPermissions | The permissions to test. |
accountId | (Optional; default = self) The account id. |
|
inline |
Gets the activity stream for the current user.
onlyActiveCourses | If true, only entries for active courses will be returned. |
|
inline |
Returns the summary of activity stream entries for the current user.
|
inline |
Gets a single appointment group.
id | The id of the group. |
includes | Optional data to include in the result. |
|
inline |
Gets a single assignment from this course.
courseId | The course id. |
assignmentId | The assignment id. |
includes | Optional extra data to include in the assignment response. |
overrideAssignmentDates | Apply assignment overrides to dates. Defaults to true. |
needsGradingCountBySection | Split the NeedsGradingCount key into sections. Defaults to false. |
allDates | Return all dates associated with the assignment, if applicable. |
|
inline |
Gets an AssignmentOverride by the course, assignment, and override IDs.
courseId | The course id. |
assignmentId | The assignment id. |
overrideId | The override id. |
|
inline |
Get a single content share by its id and associated user.
shareId | The id of the share. |
user | The user with whom the share is associated with. |
The current user must be an observer of user , or an administrator.
|
inline |
Get a single content share by its id and associated user.
shareId | The id of the share. |
userId | (Optional) The user with whom the share is associated with. Self by default. |
The current user must be an observer of userId , or an administrator.
|
inline |
Gets a single conversation by id.
conversationId | The conversation id. |
markAsRead | (Optional, default false) If true, mark the conversation as read. |
DoesNotExistException | If the conversation with the given id does not exist or is not visible to the current user. |
|
inline |
Get a single course by id.
courseId | The course id. |
accountId | (Optional) The account id. |
includes | Additional data to include. |
teacherLimit |
|
inline |
Gets a single course discussion topic by its id.
courseId | The course id. |
discussionId | The discussion id. |
includes | Extra data to include in the result. See DiscussionTopicIncludes. |
|
inline |
Get a course's front page.
courseId | The course id. |
|
inline |
Get a single course page by its URL.
courseId | The course id. |
url | The page URL. |
|
inline |
Returns a single course page revision.
courseId | The course id. |
url | The page URL. |
revisionId | The revision id. |
omitDetails | (Optional) If true, omits page contents. |
|
inline |
Get a course's settings.
courseId | The course id. |
|
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.
courseId | The course id. |
|
inline |
Returns a list of graders who worked this day, along with the assignments they worked on.
courseId | The course id. |
date | The day. |
|
inline |
Returns a list of submission histories for this day.
courseId | The course id. |
date | The date. |
graderId | The grader id. |
assignmentId | The assignment id. |
|
inline |
Gets the distribution of grades for students across all current or completed courses in the department during the default term.
currentCourses | If true, the data returned will be across current courses. Otherwise, it will be across completed courses. True by default. |
accountId | The account. self by default. |
|
inline |
Gets the page view and participation counts across all current or completed courses in the department during the default term.
currentCourses | If true, the data returned will be across current courses. Otherwise, it will be across completed courses. True by default. |
accountId | The account. self by default. |
|
inline |
Gets some numeric statistics about the department relative to current ot completed courses in the default term.
currentCourses | If true, the data returned will be across current courses. Otherwise, it will be across completed courses. True by default. |
accountId | The account. self by default. |
|
inline |
Gets the distribution of grades for students across all courses in the department during the given term.
termId | The term to get data for. |
accountId | The account. self by default. |
|
inline |
Gets the page view and participation counts across all courses in the department during the given term.
termId | The term to get data for. |
accountId | The account. self by default. |
|
inline |
Gets some numeric statistics about the department relative to the given term.
termId | The term to get data for. |
accountId | The account. self by default. |
|
inline |
Gets an enrollment term by id.
termId | The term id. |
accountId | The account id. Defaults to the current account. |
|
inline |
Returns a list of days in the gradebook history for this course.
courseId | The course id. |
|
inline |
Gets a grading period by its id.
courseId | The id of the course the grading period belongs to. |
gradingPeriodId | The id of the grading period. |
|
inline |
Get an account's set of help links.
accountId | (Optional; default = self) The account id. |
|
inline |
Gets a module by its id and course id.
moduleId | The module id. |
courseId | The 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. |
Canvas does not guarantee that includes requested in includes will actually be included. Consider using StreamModuleItems.
|
inline |
Given an asset, find the module item sequence it belongs to.
courseId | The course id. |
assetType | The asset type. |
assetId | The asset id. |
|
inline |
Get a single personal file for the current user.
fileId | The file id. |
includes | (Optional) Extra data to include with the result. |
|
inline |
Get a single personal folder for the current user.
folderId | (Optional) The folder id. By default, root. |
|
inline |
Returns the storage quota in bytes of the current user, along with the amount currently used.
|
inline |
Returns the storage quota in MiB of the current user, along with the amount currently used.
|
inline |
Gets the proficiency ratings for an account.
accountId | The account id. Defaults to the current account. |
|
inline |
Get a set of reports for an account, given the report type.
reportType | The report type. |
accountId | The account id. Defaults to the current account. |
|
inline |
Gets the status of a report by id.
reportType | The report type. |
reportId | The report id. |
accountId | The account id the report was run under; defaults to self. |
|
inline |
Gets a single section by course and section id.
courseId | The course id. |
sectionId | The section id. |
|
inline |
Gets a previously performed SIS import.
id | The import ID. |
accountId | The account id. Defaults to the current account. |
|
inline |
Get an account's Terms of Service.
accountId | (Optional; default = self) The account id. |
|
inline |
Get details for a user, including a non-comprehensive list of permissions.
id | The id of the user. A null id is interpreted as self . |
Exception | Thrown if the API returns a failing response code. |
|
inline |
Search for a user by SIS id, using user login records.
sis | The SIS id to search for. |
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.
|
inline |
Search for a user by SIS id.
sis | The SIS id to search for. |
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.
|
inline |
Returns a list of assignments for the course sorted by due date, along with assignment information, grade breakdown, and submission information if relevant.
courseId | The course id. |
userId | The user id. |
|
inline |
Gets participation details for the user for the entire history of the course.
userId | The user id. |
courseId | The course id. |
|
inline |
Returns progress information for a user in a course.
courseId | The course id. |
userId | The user id. Defaults to 'self'. |
|
inline |
Get the profile of a user.
id | The id of the user. A null id is interpreted as self . |
Exception | Thrown if the API returns a failing response code. |
|
inline |
Performs a SIS import.
file | The file containing the import data. |
filePath | The file path. |
accountId | The account id. Defaults to the current account. |
batchMode | Whether 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. |
overrideStickiness | Whether the import should override SIS stickiness. |
|
inline |
Lists the assignment overrides for a given assignment.
courseId | The course id. |
assignmentId | The assignment id. |
|
inline |
Get a list of available report types and parameters for a given account.
accountId | The account id. Defaults to self. |
|
inline |
Returns the list of discussion topic entries for the course topic.
courseId | The course id. |
topicId | The course topic. |
|
inline |
Returns the list of discussion topics for this course.
id | The course id. |
orderBy | The order of the list. DiscussionTopicOrdering.Position is the default. |
scopes | Filter the results by those that match all of these states. No filtering by default. |
onlyAnnouncements | Only return announcements. |
filterByUnread | Only return unread by the current user. |
searchTerm | An optional search term. |
excludeContextModuleLockedTopics | For students, exclude topics that are locked by module progression. |
includes | Extra data to include in the result. See DiscussionTopicIncludes. |
|
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.
accountId | The account id. |
searchTerm | A search term, searching either by course or teacher name as according to searchBy . |
withEnrollmentsOnly | If true, only include courses with at least 1 enrollment. If false, only include courses with no enrollments. If omitted, no-op. |
published | If true, only include courses that are published. If false, only include courses that are not published. If omitted, no-op. |
completed | If true, only include courses that are completed. If false, only include courses that are not completed. If omitted, no-op. |
blueprint | If true, only include courses that are blueprints. If false, only include courses that are not blueprints. If omitted, no-op. |
blueprintAssociated | If 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. |
enrollmentTermId | If present, only include courses from this term. |
byTeachers | If present, only include courses taught by these teachers. |
bySubaccounts | If present, only include course associated with these subaccounts. |
enrollmentTypes | If present, only include courses that have at least user enrolled with one of these enrollment types. |
states | If present, only include courses that are in one of these states. If omitted, all states except CourseStates.Deleted are included. |
includes | Additional data to include in the returned objects. |
sort | The column to sort by. |
searchBy | The column that searchTerm searches by. |
order | The order of results when sorted by sort . |
|
inline |
Gets the list of replies to a discussion entry.
courseId | The course id. |
topicId | The topic id. |
entryId | The discussion entry id. |
type | (Optional; default = 'courses') The type of discussion entry. |
|
inline |
Gets a list of discussion topic entries for a group topic, given the group and topic IDs.
groupId | The group id. |
topicId | The topic id. |
|
inline |
|
inline |
Get the list of users associated with the account. Corresponds to the API endpoint GET /api/v1/accounts/:account_id/users
.
searchTerm | The partial name or full ID of the users to match. |
accountId | The account to search. self by default. |
sort | The column to sort results by. Allowed values are username, email, sis_id, last_login . |
order | The order to sort the given column by. Allowed values are asc, desc . |
Exception | Thrown if the API returns a failing response code. |
|
inline |
Retrieve arbitrary user data as JSON. Corresponds to the API endpoint GET /api/v1/users/:user_id/custom_data(/*scope)
.
ns | The namespace under which the data is stored. |
scopes | The scope, and optionally subscopes, under which the data is stored. |
userId | The id of the user. |
Exception |
|
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.
id | The 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.
|
inline |
Moves a personal file for the current user.
fileId | The file id. |
onDuplicate | The 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. |
|
inline |
Determine if a personal folder exists at the given path.
parts | Each folder in the path, in order. |
|
inline |
Creates a new entry in the discussion topic.
courseId | The course id. |
discussionId | The discussion id. |
messageBody | The message body to post. |
attachment | (Optional) The attachment to post. |
filePath | The filename with its extension, required if uploading an attachment. |
|
inline |
Reactivate an enrollment that is inactive.
courseId | The course. |
enrollmentId | The enrollment. |
|
inline |
Set a user to stop being observed by another user.
observerId | The observer. |
observeeId | The observee. |
rootAccountId | (Optional) The id of the root account from which to remove the link. |
|
inline |
Retrieve a hierarchy of personal folders from a path.
parts | Each folder in the path, in order. |
DoesNotExistException | If the path given does not exist or is not visible. |
|
inline |
Run a report.
reportType | The type of report to run, as given by ListAvailableReports. |
parameters | The optional set of report parameters. The name, type, and semantics of these parameters are specific to each report type. |
accountId | The account id. Defaults to self. |
|
inline |
Stop "acting as" any user.
|
inline |
Store arbitrary user data as JSON. Corresponds to the API endpoint PUT /api/v1/users/:user_id/custom_data(/*scope)
.
ns | The namespace under which to store the data. |
scopes | The scope, and optionally subscopes, under which to store the data. |
data | The JSON data. |
userId | The id of the user. |
Exception |
|
inline |
Streams the list of authentication events recorded for the given account.
accountId | The account id. Defaults to self . |
start | The beginning of the date range to search in. |
end | The end of the date range to search in. |
The authentication log keeps any given event for 1 year.
|
inline |
Streams all grading periods in an account.
accountId | The account id. |
|
inline |
Stream the accounts in this domain.
includes | (Optional) Extra data to include in the response. |
|
inline |
Streams the activity stream for the current user.
onlyActiveCourses | If true, only entries for active courses will be returned. |
|
inline |
Streams all registered participants in the assignment group.
appointmentGroupId | The id of the appointment group. |
T | The participant type. Either User or Group. |
T | : | IAppointmentGroupParticipant | |
T | : | IPrettyPrint |
|
inline |
Streams the appointment groups that can be managed or reserved by the current user.
scope | The kind of relationship the current user must have with the returned groups. AppointmentVisibilityScope.Reservable by default. |
includePast | Whether or not to include past appointments. |
includes | Additional data to include. |
contexts | Any contexts to filter the results by. |
|
inline |
Streams the grade changelog for a single assignment.
assignmentId | The assignment id. |
start | The beginning of the range to search. |
end | The end of the range to search. |
|
inline |
Streams the assignment overrides for a given assignment.
courseId | The course id. |
assignmentId | The assignment id. |
|
inline |
Stream calendar events.
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. |
contexts | Event contexts to search. |
|
inline |
Streams column entries.
columnId | The column id. |
courseId | The course id. |
|
inline |
Streams the conversations visible to the current user.
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. |
|
inline |
Streams all assignments in this course that are visible to the current user.
courseId | The course id. |
includes | Optional extra data to include in the assignment response. |
searchTerm | An optional search term. |
overrideAssignmentDates | Apply assignment overrides to dates. Defaults to true. |
needsGradingCountBySection | Split the NeedsGradingCount key into sections. Defaults to false. |
bucket | An optional bucket to filter the returned assignments by. |
assignmentIds | An optional list of ids to filter the returned assignments by. |
orderBy | An optional string determining the order of assignments. |
|
inline |
Gets a summary of per-assignment information for this course, including statistical analysis of assignment scores.
courseId | The course id. |
|
inline |
Streams all enrollments for the course.
courseId | The 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. |
|
inline |
Streams the grade changelog for a single course.
courseId | The course id. |
start | The beginning of the range to search. |
end | The end of the range to search. |
|
inline |
Streams the history of course page revisions.
courseId | The course id. |
url | The page URL. |
|
inline |
Stream all pages for a course.
courseId | The 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. |
|
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.
accountId | The account id. |
searchTerm | A search term, searching either by course or teacher name as according to searchBy . |
withEnrollmentsOnly | If true, only include courses with at least 1 enrollment. If false, only include courses with no enrollments. If omitted, no-op. |
published | If true, only include courses that are published. If false, only include courses that are not published. If omitted, no-op. |
completed | If true, only include courses that are completed. If false, only include courses that are not completed. If omitted, no-op. |
blueprint | If true, only include courses that are blueprints. If false, only include courses that are not blueprints. If omitted, no-op. |
blueprintAssociated | If 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. |
enrollmentTermId | If present, only include courses from this term. |
byTeachers | If present, only include courses taught by these teachers. |
bySubaccounts | If present, only include course associated with these subaccounts. |
enrollmentTypes | If present, only include courses that have at least user enrolled with one of these enrollment types. |
states | If present, only include courses that are in one of these states. If omitted, all states except CourseStates.Deleted are included. |
includes | Additional data to include in the returned objects. |
sort | The column to sort by. |
searchBy | The column that searchTerm searches by. |
order | The order of results when sorted by sort . |
|
inline |
Streams all sections in a course.
courseId | The course id. |
includes | Optional data to include with each Section object. |
|
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.
courseId | The course id. |
studentId | Optionally, a student id to filter by. |
sortBy | An optional column to sort by. |
|
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.
courseId | The 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. |
includes | Optional data to include with the results. See CourseUserIncludes. |
userIds | (Optional) User ids to filter by. |
enrollmentStates | (Optional) The enrollment states to filter by. |
|
inline |
Streams the custom gradebook columns in the given course.
courseId | The course id. |
includeHidden | (Optional; default = false) If true, include hidden columns. |
|
inline |
Streams the enrollment terms for an account.
accountId | The account id. Defaults to the current account. |
workflowState | An optional workflow state to filter by. |
includes | Optional data to include with the results. |
|
inline |
Streams the grade changelog for a single grader.
graderId | The grader id. |
start | The beginning of the range to search. |
end | The end of the range to search. |
|
inline |
Streams all grading periods in a course.
courseId | The course id. |
|
inline |
Streams all grading period sets in an account.
accountId | The account id. |
|
inline |
Stream a user's past-due assignments which have no submissions.
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. |
If not calling this method on self
, the caller must be an admin or observer.
|
inline |
Streams the items in a module.
moduleId | The module id. |
courseId | The 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. |
|
inline |
Streams the list of modules for the given course.
courseId | The 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. |
Canvas does not guarantee that includes requested in includes will actually be included. Consider using StreamModuleItems.
|
inline |
Streams the observees associated with an observer.
observerId | The observer. |
|
inline |
Streams the observers associated with an observee.
observeeId | The observee. |
|
inline |
Stream the current user's personal files.
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. |
|
inline |
Stream the current user's personal folders.
|
inline |
Stream the content shares for which some user is a receiver.
receiver | The receiver. |
The current user must be an observer of receiver , or an administrator.
|
inline |
Stream the content shares for which some user is a receiver.
userId | (Optional) The id of the receiver. Self by default. |
If userId is not Self, the current user must be an observer of the user, or an administrator.
|
inline |
Streams the list of users enrolled in a course who have recently logged in.
courseId | The course id. |
|
inline |
Streams all enrollments for the section.
sectionId | The 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. |
|
inline |
Stream the content shares for which some user is a sender.
sender | The sender. |
The current user must be an observer of sender , or an administrator.
|
inline |
Stream the content shares for which some user is a sender.
userId | (Optional) The id of the sender. Self by default. |
If userId is not Self, the current user must be an observer of the user, or an administrator.
|
inline |
Streams the grade changelog for a single student.
studentId | The student id. |
start | The beginning of the range to search. |
end | The end of the range to search. |
|
inline |
Streams an uncollated list of submission versions for all matching submissions in the context.
courseId | The course id. |
assignmentId | An optional assignment id to filter by. |
userId | An optional user id to filter by. |
ascending | Sorts the list in ascending order by date. |
The returned objects will be missing the properties NewGrade
and PreviousGrade
.
|
inline |
Stream the current user's to-do items.
includeUngradedQuizzes | (Optional) If true, include ungraded quizzes. |
|
inline |
Streams the list of authentication events recorded for the given user.
userId | The user id. |
start | The beginning of the date range to search in. |
end | The end of the date range to search in. |
The authentication log keeps any given event for 1 year.
|
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.
userId | The user id. |
includes | Optional 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. |
|
inline |
Streams all enrollments for the user.
userId | The 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. |
|
inline |
Streams the user's page view history. Page views are returned in descending order; newest to oldest.
userId | The id of the user. Defaults to self . |
startTime | The beginning of the date-time range to retrieve page views from. Defaults to unbounded. |
endTime | The end of the date-time range to retrieve page views from. Defaults to unbounded. |
|
inline |
Stream the list of users associated with the account. Corresponds to the API endpoint GET /api/v1/accounts/:account_id/users
.
searchTerm | The partial name or full ID of the users to match. |
accountId | The account to search. self by default. |
sort | The column to sort results by. Allowed values are username, email, sis_id, last_login . |
order | The order to sort the given column by. Allowed values are asc, desc . |
Exception | Thrown if the API returns a failing response code. |
|
inline |
Make a submission under the current user for this assignment.
courseId | The course id. |
assignmentId | The assignment id. |
submissionContent | The content to submit. |
comment | An optional comment to include with the submission. |
|
inline |
Removes the cross-listing of a section.
sectionId | The section id. |
|
inline |
Updates the content of a custom column entry.
columnId | The column id. |
courseId | The course id. |
userId | The user id. |
content | The content. |
|
inline |
Update a course's settings.
courseId | The course id. |
cs | The new settings. |
|
inline |
Updates an existing gradebook column. Any omitted optional parameter is unchanged.
columnId | The column id. |
courseId | The 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. |
|
inline |
Bulk update the contents of several custom column entries.
courseId | The column id. |
updates | The updates. |
|
inline |
Updates an enrollment term.
enrollmentId | The enrollment id. |
builder | The completed EnrollmentTermBuilder. |
accountId | The account id. Defaults to the current account. |
|
inline |
Updates a single grading period.
courseId | The id of the course the grading period belongs to. |
gradingPeriodId | The id of the grading period. |
startDate | Optional; The new start date. |
endDate | Optional; The new end date. |
weight | Optional; The new weight. |
|
inline |
Updates an existing grading period set.
accountId | The account id. |
gradingPeriodSetId | The grading period set id. |
title | Optional; The new title. |
termIds | Optional; The new list of term ids to associate with the set. |
weighted | Optional; The new value of this setting. |
displayTotalsForAllGradingPeriods | Optional; The new value of this setting. |
|
inline |
Updates a personal file for the current user. All arguments except for fileId are optional.
fileId | The file id. |
lockAt | When the file should lock. |
unlockAt | When the file should unlock. |
locked | Whether or not the file is locked. |
hidden | Whether or not the file is hidden. |
|
inline |
Updates a personal folder for the current user.
folderId | The folder id. |
name | The folder name. |
|
inline |
Uploads a file to the current user's personal files section.
file | The data. |
filePath | The URI of the file on the local system. Must include, at a minimum, the name and the extension. |
parentFolderName |