Pearson
Always Learning

Overview

When someone posts a response in a threaded discussion, LearningStudio sends 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.created

What Triggers This Event

This event is triggered when any user posts a response in a threaded discussion in the LearningStudio User Interface, or when these APIs are used to create thread 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.created
{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 created the response.
{Description} Description of response that was created.
{ResponseId} Response ID that was created.
{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 created.
{TopicId} ID of the topic that is the parent of the response that was created.
{ThreadId} ID of the thread that is the parent of the topic.
{actorId} LearningStudio user ID of user who created the response.
{actorType} Designates the type of user that generated the event.
user
Event was generated by the user action of creating a response.
{FirstName} First name of user who created the response.
{LastName} Last name of the user who created the response.
{EmailAddress} Email address of the user who created the response.
{Username} LearningStudio username (login ID) of the user who created the response.
{courseId} LearningStudio course ID that contains the relevant thread.
{courseTitle} Title of the course that contains the relevant thread.
{displayCourseCode} Display code for the course that contains the relevant thread.
{courseCallNumbers} Array of institution's call numbers assigned to the course that contains the relevant thread. 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.created",
  "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"
    "userName": "jsmithprof1"
  },
  "contexts": {
    "course": {
      "id": "2022425",
      "title": "What About Bob? 101",
      "displayCourseCode": "WAB - 101",
      "callNumbers": [],
      "nodes": ["402629"]
    },
  "ep": {
    "id": "987654",
    "clientString": "epsamplestring"
    }
  }
}
3868 reads
Always Learning
Pearson