Canvas LMS icon

Canvas LMS

Work with Canvas LMS API and receive events

Overview

This node interacts with the Canvas LMS API to retrieve multiple courses based on specified filters and parameters. The "Get Many" operation for the "Course" resource allows users to fetch a list of courses, optionally filtered by enrollment type, course state, and whether to include completed courses. It supports pagination and limits the number of results returned.

Common scenarios where this node is beneficial include:

  • Retrieving all available courses for a user or institution.
  • Filtering courses by user roles such as Teacher, Student, TA, etc.
  • Fetching courses that are currently active, completed, unpublished, or all states.
  • Limiting the number of courses retrieved for performance or display purposes.

Practical example:

  • An educational administrator wants to generate a report of all active courses where they are enrolled as a teacher.
  • A learning platform integration needs to sync all available courses for a student, including those completed.

Properties

Name Meaning
Additional Fields Collection of optional filters and settings:
- Enrollment Type Filter courses by user enrollment type: Teacher, Student, TA, Observer, Designer
- Include Completed Courses Boolean flag to include courses marked as completed
- State Filter courses by their state: Available, Completed, Unpublished, All
- Limit Maximum number of courses to return (minimum 1)

Output

The output JSON contains a single field data which is an array of course objects returned from the Canvas LMS API. Each object represents a course with its details as provided by the API.

Example structure:

{
  "data": [
    {
      "id": 123,
      "name": "Introduction to Biology",
      "start_at": "2023-01-10T00:00:00Z",
      "end_at": "2023-06-10T00:00:00Z",
      "enrollment_type": "teacher",
      "workflow_state": "available",
      ...
    },
    ...
  ]
}

No binary data output is produced by this operation.

Dependencies

  • Requires an API key credential for authenticating with the Canvas LMS API.
  • The node uses the Canvas API base URL and access token from the configured credentials.
  • Network connectivity to the Canvas LMS instance is required.
  • Pagination is handled internally by following API response links until all pages are fetched or the limit is reached.

Troubleshooting

  • Common issues:

    • Invalid or expired API token: The node will fail to authenticate; ensure the API key is valid and has sufficient permissions.
    • Incorrect filter values: Using unsupported enrollment types or states may result in empty responses.
    • Exceeding rate limits: Frequent polling or large requests might hit Canvas API rate limits causing errors.
    • Missing required parameters: Although "Get Many" requires no mandatory IDs, other operations do; ensure correct parameters are set.
  • Error messages:

    • "Error in "course" operation "getAll": <message>": Indicates an issue during the API request; check network, credentials, and parameter correctness.
    • "Failed to poll Canvas API": Occurs during trigger polling; verify API availability and credentials.
  • Resolutions:

    • Verify and refresh API credentials.
    • Adjust filters to valid options.
    • Reduce polling frequency or result limits.
    • Check Canvas LMS API status and permissions.

Links and References

Discussion