Pearson
Always Learning

Overview

When a user updates/changes a topic 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.topic.updated

What Triggers This Event

This event is triggered when someone changes a topic in a threaded discussion. Each threaded discussion content item can have multiple topics, and responses are posted to topics. Only a teacher can update a topic, and topics can only be updated via the LearningStudio User Interface.

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}",
    "topic": {TopicId},
    "type": "{parentEventType}",
    "description": "{Description}",
    "lastmodifieddateutc": "{LastModifiedDateUtc}",
    "posteddateutc": "{PostedDateUtc}",
    "ordernumber": {OrderNumber}
    "title": "{TopicTitle}",
    "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.
↳ topic.updated
{objectId} Unique object ID for the specific event contract data.
pearson.ls.threads.
↳ topic_{TopicId}
.
{TopicId} Topic ID that was updated.  
{parentEventType} An ID that represents the category of events, less specific than this event message type.
pearson.ls.threads.
↳ topic
{Description} Description of topic that was updated.
{LastModifiedDateUtc} Date and time when the topic was last modified. Time is in UTC (no timezone offset). Format is
YYYY-MM-DDTHH:MM:SS.SSSZ
.
{PostedDateUtc} Date and time when the topic was originally posted. Time is in UTC (no timezone offset). Format is
YYYY-MM-DDTHH:MM:SS.SSSZ
.
{OrderNumber} Sort order position that was assigned to the topic.
{TopicTitle} Topic title for the updated topic.
{ThreadId} ID of the thread that is the parent of the topic that was updated.
{actorId} LearningStudio user ID of user who updated the topic.
{actorType} Type of user that generated the event.
user
Event was generated by the user action of updating a topic.
{FirstName} First name of user who updated the topic.
{LastName} Last name of the user who updated the topic.
{EmailAddress} Email address of the user who updated the topic.
{Username} LearningStudio username (login ID) of the user who updated the topic.
{courseId} LearningStudio course ID that contains the relevant threaded discussion.
{courseTitle} Title of the course that contains the relevant threaded discussion.
{courseDisplayCourseCode} Display code for the course that contains the relevant threaded discussion.
{courseCallNumbers} Array of institution'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": "9c9a2c6c-4656-4454-8a09-592acab5dd3e",
  "eventDate": "2013-05-17T14:49:35.013Z",
  "eventType": "pearson.ls.threads.topic.updated",
  "object": {
    "id": "pearson.ls.threads.topic_188620",
    "topic": 188620,
    "type": "pearson.ls.threads.topic",
    "description": "test description 1",
 
    "lastmodifieddateutc": "2013-05-17T14:49:34.600Z",
    "posteddateutc": "2013-05-17T14:49:34.600Z",
    "ordernumber": 0,
    "title": "test title 1"
  },
  "actor": {
    "id": "2116922",
    "type": "user",
    "firstName": "bob",
    "lastName": "prof1",
    "emailAddress": "bobs@domain.com",
    "userName": "bobprof1"
  },
  "contexts": {
    "course": {
      "id": "2022425",
      "title": "What About Bob? 101",
      "displayCourseCode": "WAB - 101",
      "callNumbers": [],
      "nodes": ["402629"]
    },
    "ep": {
      "id": "987654",
      "clientString": "epsamplestring"
    }
  }
}
2603 reads
Always Learning
Pearson