Canvas component

The Canvas LMS component provides actions that offer functionality for Canvas API’s calendar events, courses, assignments, files, users, enrollments, announcements, sections and discussion topics. Read the Canvas API documentation for more information.

Credentials

The following credentials are required to authenticate the Squiz Connect Canvas component with your Canvas instance.

Title

The title of your credential.

Client ID

The client ID obtained from creating a developer key in your Canvas admin portal.

Client secret

The secret key generated from creating a developer key in your Canvas admin portal.

Authorization endpoint

The URI used by Connect to authenticate with Canvas.

Formatted as: https://<your.canvas.instance>/login/oauth2/auth.

Token URI

The URI used by Connect to generate tokens for authentication with Canvas.

Formatted as: https://<your.canvas.instance>/login/oauth2/token.

Scopes

Enter any scopes to limit Connect’s access to the LMS. Usually, offline_access is sufficient for this field. Read the Canvas GET login/oauth2/auth endpoint documentation for more information.

Additional parameters

Enter any additional parameters for the Oauth2 client. Usually, access_type:offline is sufficient for this field.

Pagination

The connector provides the 'Use pagination' option for all actions that may return more than one result.

Selecting this option tells the connector to retrieve the complete set of paginated results by making multiple requests to Canvas and emitting all of the results at once.

Due to platform limitations, the maximum paginated results that the connector can return is 1000. If your data set is larger than 1000, the connector provides the option to handle this within your flow.

If the Use pagination option is not selected, but the response is paginated, the connector emits a linkHeaders object along with the result of a single page. This object contains the details of the first, current, next, previous and last pages, which can be used in subsequent steps.

The connector also provides Page number and Per page fields for any action that can return paginated results. These fields should be used in conjunction with the linkHeaders data noted above to allow the flow to retrieve all necessary data.

The platform also provides a Max pagination values field. If using pagination, this is the maximum number of results the component attempts to process. If the result set exceeds this number, the connector throws an error. This field defaults to 1000 and has a maximum possible value of 5000.

Read the Canvas file.pagination documentation for more information on Canvas API pagination.

Split results

Some requests return a response with an array of objects as their top-level object. If the Split result if it’s an array checkbox is selected, the component emits one message for each array element. If it is not selected, the component emits the entire response as a single message.

Failed call errors

If the Don’t throw error on failed calls checkbox is selected, the component emits any error response from Canvas as a message and allows the flow to continue. If it is not selected, an error response from Canvas causes the component to throw an error, and the flow run fails.

For example, you may want a flow to continue even though the course data you requested from Canvas does not exist. Selecting this checkbox causes the component to emit a 404 response as a message so the flow can continue.

Canvas component actions

Calendar events

Create calendar event

This action creates and returns a new calendar event with the provided details.

Input fields
  • contextCode

  • title

  • startDate

  • endDate

  • description

  • location

Delete calendar event

This action deletes the calendar event with the specified ID.

Input fields
  • ID

  • cancelReason

Get calendar events

This action retrieves a paginated list of calendar events for the current user.

Input fields
  • startDate

  • endDate

  • contextCodes

Get calendar event by ID

This action retrieves the single calendar event with the provided ID.

Input fields
  • ID

Update calendar event

This action updates and returns the calendar event with the provided details.

Input fields
  • ID

  • contextCode

  • title

  • startDate

  • endDate

  • description

  • location

Courses

API documentation is available at https://canvas.instructure.com/doc/api/courses.html.

Get course (one only)

This action retrieves the course with the provided ID.

Input fields
  • courseId

Get courses

This action retrieves the paginated list of all courses for the selected account.

Input fields
  • accountId

  • state

Assignments

API documentation is available at https://canvas.instructure.com/doc/api/assignments.html.

Get assignment (one only)

This action retrieves the assignment with the provided ID for the specified course.

Input fields
  • courseId

  • assignmentId

  • include

Get assignments for course

This action retrieves the paginated list of all assignments for the specified course.

Input fields
  • courseId

Files

API documentation is available at https://canvas.instructure.com/doc/api/files.html.

Get file (one only)

This action retrieves the file with the provided ID for the specified course.

Input fields
  • courseId

  • fileId

Get files for course

This action retrieves the paginated list of all files for the specified course.

Input fields
  • courseId

Users

API documentation is available at https://canvas.instructure.com/doc/api/users.html.

Get user

This action retrieves the details of the specified user.

Input fields
  • userId

  • sisUserId

Search all users

This action retrieves a paginated list of all of the Users matching the specified criteria.

Input fields
  • accountId

  • searchTerm

  • enrollmentType

  • sortBy

  • order

  • resultsPerPage

Enrollments

API documentation is available at https://canvas.instructure.com/doc/api/enrollments.html.

Get user enrollments

This action retrieves a paginated list of all of the specified user’s enrollments.

Input fields
  • userId

  • sisUserId

  • state

Announcements

Get announcements

Returns the paginated list of announcements for the given courses and date range.

A context_code field is added to the responses to identify to which course each announcement belongs.
Input fields
  • startDate

  • endDate

  • contextCode

  • active_only

  • include

Sections

API documentation is available at https://canvas.instructure.com/doc/api/sections.html.

Get section by ID

Returns the specified section.

Input fields
  • sectionId

  • courseId

  • include

Discussion topics

Get discussion topics

Lists the discussion topics for the specified owning entity.

Input fields
  • owningEntityType

  • owningEntityId

  • include

  • orderBy

  • scope

  • onlyAnnouncements

  • filterBy

  • searchTerm

  • excludeContextModuleLockedTopics

  • perPage

  • page

Get discussion topic by topic ID

Returns the specified discussion topic.

Input fields
  • owningEntityType

  • owningEntityId

  • topicId

  • include