Element Published

Last modified on June 5, 2024 at 1:24 pm

Element Published Event Webhook Example

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

{
  "event" : "element_published",
  "date" : "2014-04-18T00:54:54Z",
  "element" : {
    "type" : "assignment",
    "id" : "06813b9f273349de9af81fd735384450",
    "title" : "Module 23",
    "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."
  },
  "course" : {
    "id" : "2ea91e147dd345c7aaf1cb17291fb629",
    "title" : "Sample Course",
    "instructor" : "Manik Brammer",
    "passingGrade" : 90.0
  }
}

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 segment them within your application.
datestringThe date and time when this event occurred. For more information on the format, see the Date/Time Format documentation.
elementobjectThe element that was published into 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.
courseobjectThe course in which this element exists.
course.idstringThe id of the course. This uniquely identifies the course within your organization.
course.titlestringThe title of the course.
course.instructorstringThe name of the instructor for this course.
course.passingGradenumberThe grade required to pass this course.