1

Webhook Data

Webhooks integrated with OpenLearning institutions via either the Webhook Connector or the Microsoft Power Automate Connector are sent with the following data:

{
  "action": "{actionName}",
  "actor": { ... },
  "context": {
    "courseId": "{courseId}",
    "classId": "{classId}",
    "ipAddress": "{ipAddress}"
  },
  "timestamp": "{iso8601_timestamp}",

  ... additional fields specific to the event
}

Actor Object

The "actor" object is as follows:

{
  "name": "Harry Potter",
  "id": "{user_id}",
  "enrolmentId": "{cohort_enrolment_id}",
  "externalId": "{institution_external_id}",
  "institutionEmail": "{institution_email}",
  "userEmail": "{user_email}"
}

institutionEmail corresponds to the email on record for the user for this institution/cohort. e.g. recorded when the user was invited to a course, or provisioned via the API. If this field is not available, it is omitted.

userEmail corresponds to the primary email on record for the user's account. This is only provided if the user has given email sharing consent for the course from which the event was generated. It is otherwise omitted.

 

Actions

Events are sent to webhooks with the following "action" names:

"pageViewed"

Triggered when a user visits a course page.

Actor: the user who viewed the page.

{
  "action": "pageViewed",
  "actor": {...},
  "page": {
    "title": "Page Title",
    "id": "{object_id}",
    "url": "https://www.openlearning.com/.../page_url"
  },
  "context": {
    "courseId": "{course_id}",
    "classId": "{class_id}",
    "ipAddress": "{user_ip_address}"
  },
  "timestamp": "{iso8601_timestamp}"
}

"pageCompleted"

Triggered when a user has completed all the requirements of a course page.

Actor: the user who completed the page.

{
  "action": "pageCompleted",
  "actor": {...},
  "page": {
    "title": "Page Title",
    "id": "{page_id}",
    "url": "https://www.openlearning.com/.../page_url"
  },
  "context": {
    "courseId": "{course_id}",
    "classId": "{class_id}",
    "ipAddress": "{user_ip_address}"
  },
  "timestamp": "{iso8601_timestamp}"
}

"pageCommented"

Triggered when a user comments on a course page.

Actor: the user who commented on the page.

{
  "action": "pageCommented",
  "actor": {...},
  "page": {
    "title": "Page Title",
    "id": "{page_id}",
    "url": "https://www.openlearning.com/.../page_url"
  },
  "comment": {
    "id": "{comment_id}",
    "content": "{comment_content}"
  },
  "context": {
    "courseId": "{course_id}",
    "classId": "{class_id}",
    "ipAddress": "{user_ip_address}"
  },
  "timestamp": "{iso8601_timestamp}"
}

"activityCompleted"

Triggers when a user has completed all the requirements of an activity section on a course page.

Actor: the user who completed the activity.

{
  "action": "activityCompleted",
  "actor": {...},
  "activity": {
    "id": "{block_id}"
  },
  "page": {
    "id": "{page_id}",
    "title": "Page Title",
    "url": "https://www.openlearning.com/.../page_url"
  },
  "context": {
    "courseId": "{course_id}",
    "classId": "{class_id}",
    "ipAddress": "{user_ip_address}"
  },
  "timestamp": "{iso8601_timestamp}"
}

"activitySubmitted"

Triggers when a user submits an answer to an activity section on a course page.

Actor: the user who submitted to an activity.

{
  "action": "activitySubmitted",
  "actor": {...},
  "activity": {
    "id": "{block_id}"
  },
  "page": {
    "id": "{page_id}",
    "title": "Page Title",
    "url": "https://www.openlearning.com/.../page_url"
  },
  "context": {
    "courseId": "{course_id}",
    "classId": "{class_id}",
    "ipAddress": "{user_ip_address}"
  },
  "submission": {
    ... submission data (widget specific)
  },
  "timestamp": "{iso8601_timestamp}"
}

"postPublished"

Triggers when a user publishes a post to an activity section on a course page.

Actor: the user who published a post.

{
  "action": "postPublished",
  "actor": {...},
  "post": {
    "id": "{post_id}",
    "text": "{post_text}",
    "data": { ... post data (widget specific) }
  },
  "activity": {
    "id": "{block_id}"
  },
  "page": {
    "id": "{page_id}",
    "title": "Page Title",
    "url": "https://www.openlearning.com/.../page_url"
  },
  "context": {
    "courseId": "{course_id}",
    "classId": "{class_id}",
    "ipAddress": "{user_ip_address}"
  },
  "timestamp": "{iso8601_timestamp}"
}

"postCommented"

Triggers when a user comments on a post.

Actor: the user who commented on the post.

{
  "action": "postCommented",
  "actor": {...},
  "post": {
    "id": "{post_id}"
  },
  "activity": {
    "id": "{block_id} that generated the post"
  },
  "page": {
    "id": "{page_id} of block id above",
    "title": "Page Title",
    "url": "https://www.openlearning.com/.../page_url"
  },
  "comment": {
    "id": "{comment_id}",
    "content": "{comment_content}"
  },
  "context": {
    "courseId": "{course_id}",
    "classId": "{class_id}",
    "ipAddress": "{user_ip_address}"
  },
  "timestamp": "{iso8601_timestamp}"
}

"classJoined"

Triggers when a user joins (enrols in) a class.

Actor: the user who joined a class.

{
  "action": "classProgressed",
  "actor": {...},
  "class": {
    "title": "Class Title",
    "courseTitle": "Course Title",
    "id": "{class_id}"
  },
  "context": {
    "courseId": "{course_id}",
    "classId": "{class_id}",
    "ipAddress": "{user_ip_address}"
  },
  "progress": {
    "completed": 40,
    "total": 80
  },
  "timestamp": "{iso8601_timestamp}"
}

"classProgressed"

Triggers when a user's class progress changes.

Actor: the user who progressed in a course.

{
  "action": "classJoined",
  "actor": {...},
  "class": {
    "title": "Class Title",
    "courseTitle": "Course Title",
    "id": "{class_id}"
  },
  "context": {
    "courseId": "{course_id}",
    "classId": "{class_id}",
    "ipAddress": "{user_ip_address}"
  },
  "timestamp": "{iso8601_timestamp}"
}

"courseCompleted"

Triggers when a user has completed all the requirements of a course.

Actor: the user who completed the course.

{
  "action": "courseCompleted",
  "actor": {...},
  "course": {
    "title": "Course Title",
    "id": "{course_id}"
  },
  "context": {
    "courseId": "{course_id}",
    "classId": "{class_id}",
    "enrolDate": "{iso8601_timestamp}",
    "ipAddress": "{user_ip_address}"
  },
  "score": {
    "max": 80,
    "min": 0,
    "raw": 40,
    "scaled": 0.5
  },
  "timestamp": "{iso8601_timestamp}"
}

"certificateIssued"

Triggers when a user is issued a certificate.

Actor: the user who is issued a certificate.

{
  "action": "certificateIssued",
  "actor": {...},
  "certificate": {
    "id": "{certificate_id}",
    "url": "{certificate_url}"
  },
  "context": {
    "courseId": "{course_id}",
    "classId": "{class_id}",
    "ipAddress": "{user_ip_address}"
  },
  "timestamp": "{iso8601_timestamp}"
}

"reportReleased"

Triggered whenever a report is released.

Actor: the user who released the grades

{
  "action": "reportReleased",
  "actor": {...},
  "report": {
    "id": "{reportRevisionId}",
    "title": string,
    "type": "outcomes",
    "maxScore": Number,
    "created": "{iso8601_timestamp}"
  },
  "context": {
    "courseId": "{course_id}",
    "classId": "{class_id}",
    "ipAddress": "{user_ip_address}"
  },
  "timestamp": "{iso8601_timestamp}"
}

 

"reportResultChanged"

Triggered when a report result is changed for a particular user.

Actor: the user who changed the grade.

Recipient: the user whose result was changed.

{
  "action": "reportResultChanged",
  "actor": {...},
  "recipient": {... (same as actor, only the user whose result was changed)},
  "report": {
    "id": "{reportRevisionId}",
    "title": string,
    "type": "outcomes",
    "maxScore": Number,
    "created": "{iso8601_timestamp}"
  },
  "result": {
    "id": "{resultId}",
    "score": Number,
    "scaled": Number
  },
  "class": {
    "title": "Class Title",
    "courseTitle": "Course Title",
    "id": "{class_id}"
  },
  "context": {
    "courseId": "{course_id}",
    "classId": "{class_id}",
    "ipAddress": "{user_ip_address}"
  },
  "timestamp": "{iso8601_timestamp}"
}

 

"reportModified"

Triggered when a report is modified.

Actor: the user who modified the report.

{
  "action": "reportModified",
  "actor": {...},
  "report": {
    "id": "{reportRevisionId}",
    "title": string,
    "type": "outcomes",
    "maxScore": Number,
    "created": "{iso8601_timestamp}"
  },
  "context": {
    "courseId": "{course_id}",
    "enrolDate": "{iso8601_timestamp}",
    "ipAddress": "{user_ip_address}"
  },
  "timestamp": "{iso8601_timestamp}"
}

 

"courseScoreChanged"

Triggered when a user’s course grade changes.

Actor: the user whose grade changed.

{
  "action": "courseScoreChanged",
  "actor": {...},
  "score": {
    "max": 80,
    "min": 0,
    "raw": 40,
    "scaled": 0.5
  },
  "course": {
    "title": "Course Title",
    "id": "{course_id}"
  }
  "class": {
    "title": "Class Title",
    "courseTitle": "Course Title",
    "id": "{class_id}"
  },
  "context": {
    "courseId": "{course_id}",
    "classId": "{class_id}",
    "ipAddress": "{user_ip_address}"
  },
  "timestamp": "{iso8601_timestamp}"
}

Reply

null

Content aside

  • 1 Likes
  • 2 mths agoLast active
  • 29Views
  • 2 Following