Course

circle-exclamation

Course

course_completed

Definition: The event is emitted when all of the module requirements in a course are met.

Trigger: Triggered when all the module requirements of a course have been met. Also gets triggered when a module has a set completion time or when the completion time gets updated.

Payload Example:

{
  "metadata": {
    "client_ip": "93.184.216.34",
    "context_account_id": "21070000000000079",
    "context_id": "21070000000000565",
    "context_role": "StudentEnrollment",
    "context_sis_source_id": "2017.100.101.101-1",
    "context_type": "Course",
    "developer_key_id": "170000000056",
    "event_name": "course_completed",
    "event_time": "2019-11-01T19:11:26.615Z",
    "hostname": "oxana.instructure.com",
    "http_method": "GET",
    "producer": "canvas",
    "referrer": null,
    "request_id": "1dd9dc6f-2fb0-4c19-a6c5-7ee1bf3ed295",
    "root_account_id": "21070000000000001",
    "root_account_lti_guid": "VicYj3cu5BIFpoZhDVU4DZumnlBrWi1grgJEzADs.oxana.instructure.com",
    "root_account_uuid": "VicYj3cu5BIFpoZhDVU4DZumnlBrWi1grgJEzADs",
    "session_id": "ef686f8ed684abf78cbfa1f6a58112b5",
    "time_zone": "America/New_York",
    "url": "https://oxana.instructure.com/api/v1/courses/565/modules?include%5B%5D=items&per_page=99",
    "user_account_id": "21070000000000001",
    "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.103 Safari/537.36",
    "user_id": "21070000000000123",
    "user_login": "[email protected]",
    "user_sis_id": "456-T45"
  },
  "body": {
    "course": {
      "account_id": "79",
      "id": "565",
      "name": "Computer Science I",
      "sis_source_id": "2017.100.101.101-1"
    },
    "progress": {
      "completed_at": "2019-11-05T13:38:00.218Z",
      "next_requirement_url": "http://oxana.instructure.com/courses/565/modules/items/12345",
      "requirement_completed_count": 6,
      "requirement_count": 6
    },
    "user": {
      "email": "[email protected]",
      "id": "123",
      "name": "Isaac Newton"
    }
  }
}

Event Body Schema

Field
Description

course

{"account_id" => "The local Canvas id of the course's account.", "id" => "The local Canvas id of the course.", "name" => "The name of the course.", "sis_source_id" => "The SIS identifier for the course, if defined."}

progress

{"completed_at" => "Timestamp when the course module progress item was completed. ", "next_requirement_url" => "Next module item on the module requirements list. Typically is null if student meets all requirements but also could have a value if there are more optional requirements left on the list.", "requirement_completed_count" => "Count of those requirements that are done. E.g. 7 total, 5 completed.", "requirement_count" => "Count of all the requirements in the course as a number"}

user

{"email" => "The students email", "id" => "The Canvas id of the student completing the course.", "name" => "The name of the student."}

course_created

Definition: The event is emitted anytime a new course is created by an end user or API request.

Trigger: Triggered when a new course is created (or copied).

Payload Example:

Event Body Schema

Field
Description

account_id

The Account id of the updated course.

course_id

The Canvas id of the updated course.

created_at

The time at which this course was created.

name

The name the updated course.

updated_at

The time at which this course was last modified in any way.

uuid

The unique id of the course.

workflow_state

The state of the course (available, claimed, completed, created, deleted).

course_progress

Definition: The event is emitted when a course module requirement is met.

Trigger: Triggered when a user makes progress in a course by completing a module requirement, unless the completed requirement is the last remaining requirement in the course (in this case, a course_completed event is emitted). The following setup should be enabled in Canvas in order for this event to get triggered:

  1. Module is set to be published

  2. Module has at least one requirement enabled

  3. Student completed at least one requirement in Module

Note that these events have a 2-minute debounce, meaning that a single course_progress event will be emitted per student per course 2 minutes after the student has finished completing requirements.

Payload Example:

Event Body Schema

Field
Description

course

{"account_id" => "The local Canvas id of the course's account.", "id" => "The local Canvas id of the course.", "name" => "The name of the course.", "sis_source_id" => "The SIS identifier for the course, if defined."}

progress

{"completed_at" => "If the course has been completed, the timestamp (in ISO8601 format) when all requirements have been completed.", "next_requirement_url" => "Link to the module item that is next in the order of requirements to complete.", "requirement_completed_count" => "The count of those requirements that are done.", "requirement_count" => "Count of all the requirements in the course as a number."}

user

{"email" => "The student's email.", "id" => "The Canvas id of the student completing the course.", "name" => "The name of the student."}

course_section_created

Definition: The event is emitted anytime a new course section is created by an end user or API request.

Trigger: Triggered when a new section is created in a course.

Payload Example:

Event Body Schema

Field
Description

accepting_enrollments

True if this section is open for enrollment. False or null otherwise.

can_manually_enroll

Deprecated, will always be null.

course_id

The Canvas id of the course that this section belongs to.

course_section_id

The local Canvas id of the created course section.

default_section

True if this is the default section for the course. False or null otherwise.

end_at

Section end date in ISO8601 format.

enrollment_term_id

The Canvas id of the enrollment term.

integration_id

The integration id of the section.

name

The name of this section.

nonxlist_course_id

The unique identifier of the original course of a cross-listed section.

restrict_enrollments_to_section_dates

True when 'Users can only participate in the course between these dates' is checked.

root_account_id

Canvas id of the root account that this section is in.

sis_batch_id

The SIS Batch id of the section.

sis_source_id

Correlated id for the record for this course in the SIS system (assuming SIS integration is configured).

start_at

Section start date in ISO8601 format.

stuck_sis_fields

Array of strings of field names with the SIS stickiness field set, indicating they will not be replaced by SIS imports.

workflow_state

The workflow state of the section.

course_section_updated

Definition: The event is emitted anytime a course section is updated by an end user or API request. Only changes to the fields included in the body of the event payload will emit the updated event.

Trigger: Triggered when a course section has been modified.

Payload Example:

Event Body Schema

Field
Description

accepting_enrollments

True if this section is open for enrollment. False or null otherwise.

can_manually_enroll

Deprecated, will always be null.

course_id

The Canvas id of the course that this section belongs to.

course_section_id

The local Canvas id of the created course section.

default_section

True if this is the default section for the course.

end_at

Section end date in ISO8601 format.

enrollment_term_id

The Canvas id of the enrollment term.

integration_id

The integration id of the section.

name

The name of this section.

nonxlist_course_id

The unique identifier of the original course of a cross-listed section.

restrict_enrollments_to_section_dates

True when 'Users can only participate in the course between these dates' is checked.

root_account_id

Canvas id of the root account that this section is in.

sis_batch_id

The SIS Batch id of the section.

sis_source_id

Correlated id for the record for this course in the SIS system (assuming SIS integration is configured).

start_at

Section start date in ISO8601 format.

stuck_sis_fields

Array of strings of field names with the SIS stickiness field set, indicating they will not be replaced by SIS imports.

workflow_state

The workflow state of the section.

course_updated

Definition: The event is emitted anytime a course is updated by an end user or API request. Only changes to the fields included in the body of the event payload will emit the updated event.

Trigger: Triggered when the course is renamed, deleted, or other properties (except for syllabus) of a course are modified.

Payload Example:

Event Body Schema

Field
Description

account_id

The Account id of the updated course.

course_id

The Canvas id of the updated course.

created_at

The time at which this course was created.

name

The name the updated course.

updated_at

The time at which this course was last modified in any way.

uuid

The unique id of the course.

workflow_state

The state of the course (available, claimed, completed, created, deleted).

Note: Timestamps will be in ISO8601 format, including an offset. Be sure to take that into account when parsing, since it’s unspecified which offset timestamps will use, and the offset may even change between different timestamps within a single event.


This documentation is generated directly from the Canvas LMS source code, available on Githubarrow-up-right.

Last updated

Was this helpful?