Courses API
This page documents the Courses API of Canvas, see https://canvas.instructure.com/doc/api/courses for details.
Canvas.activity_stream
Canvas.content_share_users
Canvas.course
Canvas.courses
Canvas.create_course
Canvas.delete_course
Canvas.effective_due_dates
Canvas.permissions
Canvas.preview_html
Canvas.recent_students
Canvas.reset_content
Canvas.settings
Canvas.todo
Canvas.update_course
Canvas.update_settings
Canvas.upload_file
Canvas.user
Canvas.users
Canvas.courses
— FunctionCanvas.courses(; kwargs...) -> Vector{Course}, page_data
Return a paginated list of courses for the authenticated user. Return a vector of Course
s and a dictionary with page data.
Canvas API documentation: List your courses (GET /api/v1/courses
)
Canvas.courses(user::User; kwargs...) -> Vector{Course}, page_data
Return a paginated list of courses for the specified user. Return a vector of Course
s and a dictionary with page data.
Canvas API documentation: List courses for a user (GET /api/v1/users/:user_id/courses
)
Canvas.course
— FunctionCanvas.course(course::Course; kwargs...) -> Course
Return details about a single course specified by id. Return a Course
.
Canvas API documentation: Get a single course (GET /api/v1/courses/:id
)
Canvas.create_course
— FunctionCanvas.create_course(acc::Account; kwargs...) -> Course
Create a new course. Return a Course
.
Canvas API documentation: Create a new course (POST /api/v1/accounts/:account_id/courses
)
Canvas.update_course
— FunctionCanvas.update_course(course::Course; kwargs...) -> Course
Update an existing course and return the new details. Return a Course
.
Canvas API documentation: Update a course (PUT /api/v1/courses/:id
)
Canvas.settings
— FunctionCanvas.settings(course::Course; kwargs...) -> Dict
Return course settings as a dictionary.
Canvas API documentation: Get course settings (GET /api/v1/courses/:course_id/settings
)
Canvas.update_settings
— FunctionCanvas.update_settings(course::Course; kwargs...) -> Dict
Update course settings. Return a dictionary.
Canvas API documentation: Update course settings (PUT /api/v1/courses/:course_id/settings
)
Canvas.delete_course
— FunctionCanvas.delete_course(course::Course; kwargs...) -> Dict
Delete or conclude an existing course.
Canvas API documentation: Delete/Conclude a course (DELETE /api/v1/courses/:id
)
Canvas.reset_content
— FunctionCanvas.reset_content(course::Course; kwargs...) -> Course
Delete the course and create a new equivalent course with no content but all sections and users moved overs. Return a Course
.
Canvas API documentation: Reset a course (POST /api/v1/courses/:course_id/reset_content
)
Canvas.users
— FunctionCanvas.users(course::Course; kwargs...) -> Vector{User}, page_data
Return a paginated list of users in the course. Return a vector of User
s and a dictionary with page data.
Canvas API documentation: List users in course (GET /api/v1/courses/:course_id/users
)
Canvas.user
— MethodCanvas.user(course::Course, user::User; kwargs...) -> User
Return information about a single user in the course. Return a User
.
Canvas API documentation: Get single user (GET /api/v1/courses/:course_id/users/:id
)
Canvas.recent_students
— FunctionCanvas.recent_students(course::Course; kwargs...) -> Vector{User}, page_data
Return a paginated list of users in the course ordered by how recently they have logged in. Return a vector of User
s and a dictionary of page data.
Canvas API documentation: List recently logged in students (GET /api/v1/courses/:course_id/recent_students
)
Canvas.upload_file
— MethodCanvas.upload_file(c::Course, file::String; kwargs...) -> File
Upload a file to the course. Return a File
.
Canvas API documentation: Upload a file to a course (POST /api/v1/courses/:course_id/files
)
Canvas.content_share_users
— FunctionCanvas.content_share_users(course::Course; kwargs...) -> Vector{User}, page_data
Return a paginated list of users you can share content with. Return a vector of User
s and a dictionary of page data.
Canvas API documentation: Search for content share users (GET /api/v1/courses/:course_id/content_share_users
)
Canvas.preview_html
— FunctionCanvas.preview_html(course::Course; kwargs...) -> Dict
Preview HTML content processed for this course. Return a dictionary.
Canvas API documentation: Preview processed html (POST /api/v1/courses/:course_id/preview_html
)
Canvas.activity_stream
— FunctionCanvas.activity_stream(course::Course; summary::Bool=false, kwargs...) -> Vector{Dict}, page_data
Return the authenticated users course-specific activity stream paginated.
Request endpoints:
GET /api/v1/courses/:course_id/activity_stream
GET /api/v1/courses/:course_id/activity_stream/summary
Canvas API documentation:
Canvas.todo
— FunctionCanvas.todo(course::Course; kwargs...) -> Vector{Dict}, page_data
Return the authenticated users course-specific todo items.
Canvas API documentation: Course TODO items (GET /api/v1/courses/:course_id/todo
)
Canvas.effective_due_dates
— FunctionCanvas.effective_due_dates(course::Course; kwargs...) -> Dict
For each assignment in the course, returns each assigned student's ID and their corresponding due date along with some grading period data.
Canvas API documentation: Get effective due dates (GET /api/v1/courses/:course_id/effective_due_dates
)
Canvas.permissions
— FunctionCanvas.permissions(course::Course; kwargs...) -> Dict
Return permissions for the authenticated user in the specified course. Return a dictionary.
Canvas API documentation: Permissions (GET /api/v1/courses/:course_id/permissions
)