Element CompletedBeta

Last modified on September 11, 2023 at 6:02 pm

Element Completed Event Webhook Example

The following is an example of a JSON representation of an Element Completed event. This illustrates how this event will be represented in the callback to your server.

{
  "event" : "element_completed",
  "date" : "2014-04-18T00:59:12Z",
  "source" : "SELF",
  "user" : {
    "id" : "9f56e3ad46d94063bb9985d9ee6143cf",
    "firstName" : "Pierre",
    "lastName" : "Cloyd",
    "username" : "pi-cloyd@carmag.com",
    "email" : "pi-cloyd@carmag.com",
    "locale" : "en"
  },
  "element" : {
    "type" : "assignment",
    "id" : "1f12c8ace96c47d98a03f11dbcbb396d",
    "title" : "Module 19",
    "grade" : 95.0,
    "passed" : true,
    "question" : "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",
    "response" : "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.\n\nVelit aptent semper curae eget facilisis,consequat non senectus parturient curabitur diam auctor justo vitae turpis,molestie euismod nulla molestie eros. Tempus non dictum metus facilisi,volutpat et duis ad aptent,fringilla auctor condimentum ac. Suscipit sem platea metus condimentum non. Morbi nascetur dui laoreet ridiculus maecenas ipsum natoque."
  },
  "offering" : {
    "id" : "47576555f7934792a006183c4e820c20",
    "title" : "Sample Course"
  }
}

Property Details

PropertyJSON Data TypeDescription
eventstringThis is the event type that is being sent to this callback. If you are using the same callback URL for all events, you can use this to segement them within your application.
datestringThe date and time when this event occurred. For more information on the format, see the Date/Time Format documentation.
sourcestringThe source indicates how this element was triggered to be completed. In most cases, students complete their own course elements and the source will be set to SELF. In the case that the instructor manually completes the student through the gradebook, the source will appear as ADMIN.
userobjectThe user that completed the course element.
user.idobjectThe id of the user. This uniquely identifies the user and can be used to query our API for more information about the user.
user.firstNamestringThe first name of the user.
user.lastNamestringThe last name of the user.
user.emailstringThe email address of the user.
user.usernamestringThis is the username for this user. If an organization uses username instead of email for login, this can be different than the email address.
user.localestringThis is the locale preference set on the user’s account
elementobjectThe element that was completed in the course.
element.idstringThe ID of the element. This is a unique ID identifying the element in the course.
element.typestringThe type of element. Element type will be one of the following: chalkboard, test, file, assignment, sco, webarchive.
element.titlestringThe title of the element.
element.questionstringIn the case where the element type is an assignment, the question property will be exposed and contain the question on the assignment.
element.responsestringIn the case where the element type is an assignment, the response property will be exposed and contain the response from the user on the assignment.
offeringobjectThe offering that the user is registered into containing this element.
offering.idstringThe ID of the offering. This uniquely identifies the offering and can be used to query our API for more information about the offering.
offering.titlestringThe title of the offering