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

Property JSON Data Type Description
event string This 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.
date string The date and time when this event occurred. For more information on the format, see the Date/Time Format documentation.
source string The 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.
user object The user that completed the course element.
user.id object The id of the user. This uniquely identifies the user and can be used to query our API for more information about the user.
user.firstName string The first name of the user.
user.lastName string The last name of the user.
user.email string The email address of the user.
user.username string This 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.locale string This is the locale preference set on the user’s account
element object The element that was completed in the course.
element.id string The ID of the element. This is a unique ID identifying the element in the course.
element.type string The type of element. Element type will be one of the following: chalkboard, test, file, assignment, sco, webarchive.
element.title string The title of the element.
element.question string In the case where the element type is an assignment, the question property will be exposed and contain the question on the assignment.
element.response string In 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.
offering object The offering that the user is registered into containing this element.
offering.id string The ID of the offering. This uniquely identifies the offering and can be used to query our API for more information about the offering.
offering.title string The title of the offering