Pearson
Always Learning

Overview

When a user edits one of their existing posts in a threaded disucssion, LearningStudio will send this event.

Message Type ID

Use this message type id to subscribe to this event and identify incoming instances of it: pearson.ls.threads.response.updated

What Triggers This Event

This event is triggered when a user edits a post via the LearningStudio User Interface, or when an application uses the following APIs to allow users to read and respond to threaded discussions:

The updater ("actor" in the payload) may be the original poster or a teacher. Not all LearningStudio campuses allow students to edit their posts.

See Threads for the resources, use cases, and concepts for the Threads API resources.

Event Payload

Here is the structure of the event's payload. Text directly surrounded by curly brackets (e.g., {eventId}) are parameters that are defined in the table below.

{
  "eventId": "{eventId}",
  "eventDate": "{eventDate}",
  "eventType": "{eventType}",
  "object": {
    "id": "{objectId}",
    "type": "{parentEventType}",
    "authorid": {AuthorId},
    "description": "{Description}",
    "responseid": {ResponseId},
    "lastmodifieddateutc": "{LastModifiedDateUtc}",
    "posteddateutc": "{PostedDateUtc}",
    "title": "{ResponseTitle}",
    "topicid": {TopicId},
    "thread_id": {ThreadId}    
  },
  "actor": {
    "id": "{actorId}",
    "type": "{actorType}",
    "firstName": "{FirstName}",
    "lastName": "{LastName}",
    "emailAddress": "{EmailAddress}",
    "userName": "{Username}"
  },
  "contexts": {
    "course": {
      "id": "{courseId}",
      "title": "{courseTitle}",
      "displayCourseCode": "{displayCourseCode}",
      "callNumbers": [{courseCallNumbers}],
      "nodes": ["{courseNode}"]
    },
    "ep": {
      "id": "{epId}",
      "clientString": "{clientString}"
    }
  }
}

Event Payload Parameter Descriptions

Name Description Valid Values
{eventId} Unique ID assigned to the specific event.
{eventDate} Date and time when the event was published to the eventing message queue. Time is in UTC (no timezone offset). Format is
YYYY-MM-DDTHH:MM:SS.SSSZ
.
{eventType} Event type of the event object.
pearson.ls.threads.
↳ response.updated
{objectId} Unique object ID for the specific event contract data.
pearson.ls.threads.
↳ response_{ResponseId}
.
{parentEventType} An ID that represents the category of events, less specific than this event message type.
pearson.ls.threads.
↳ response
{AuthorId} LearningStudio user ID that updated the response.
{Description} Description of response that was updated.
{ResponseId} Response ID that was updated.
{LastModifiedDateUtc} Date and time when the response was last modified. Time is in UTC (no timezone offset). Format is
YYYY-MM-DDTHH:MM:SS.SSSZ
.
{PostedDateUtc} Date and time when the response was originally posted. Time is in UTC (no timezone offset). Format is
YYYY-MM-DDTHH:MM:SS.SSSZ
.
{ResponseTitle} Title of response that was updated.
{TopicId} ID of the topic where the response was posted.
{ThreadId} ID of the thread where the response was posted.
{actorId} LearningStudio user ID of user who updated the response.
{actorType} Designates the type of user that generated the event.
user
Event was generated by the user action of updating a response.
{FirstName} First name of user who updated the response.
{LastName} Last name of the user who updated the response.
{EmailAddress} Email address of the user who updated the response.
{Username} LearningStudio username (login ID) of the user who updated the response.
{courseId} LearningStudio course ID that contained the threaded discussion whose response was updated.
{courseTitle} Title of the course that contains the relevant threaded discussion.
{displayCourseCode} Display code for the course that contains the relevant threaded discussion.
{courseCallNumbers} Array of insitution's call numbers assigned to the course that contains the relevant threaded discussion. Zero or more IDs written as strings.
{courseNode} Array of IDs of the nodes for which this course is associated. Zero or more IDs written as strings.
{epId} The numeric ID of the institution (the LearningStudio campus or instance).
{clientString} The institution's client string (primary identifier for campuses).

Example

{
  "eventId": "03de4e64-fd89-48ba-be92-fed6ada8e51d",
  "eventDate": "2013-05-17T15:26:55.069Z",
  "eventType": "pearson.ls.threads.response.updated",
  "object": {
    "id": "pearson.ls.threads.response_123456",
    "type": "pearson.ls.threads.response",
    "authorid": 888888,
    "description": "Response Description 1 - Updated",
    "responseid": 123456,
    "lastmodifieddateutc": "2013-05-17T15:24:43.647Z",
    "posteddateutc": "2013-05-17T15:24:43.647Z",
    "title": "Response Title 1",
    "topicid": 188556
  },
  "actor": {
    "id": "888888",
    "type": "user",
    "firstName": "John",
    "lastName": "Smith",
    "emailAddress": "jsmith1@domain.com"
  },
  "contexts": {
    "course": {
      "id": "2022425",
      "title": "What About Bob? 101",
      "displayCourseCode": "WAB - 101",
      "callNumbers": [],
      "nodes": ["402629"]
    },
  "ep": {
    "id": "987654",
    "clientString": "epsamplestring"
    }
  }
}
3064 reads
Always Learning
Pearson