Pearson
Always Learning

Overview

When a user deletes a topic from 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.deleted

What Triggers This Event

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

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}",
    "ishierarchydeleted": {IsHierarchyDeletedFlag},
    "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 Sub/Pub 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.deleted
{objectId} Unique object ID for the specific event contract data.
pearson.ls.threads.
↳ topic_{TopicId}
.
{TopicId} Topic ID that was deleted.
{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 deleted.
{IsHierarchyDeletedFlag} Designates whether topic was deleted because it was a child of another topic .
true
Topic was deleted because its parent topic was deleted.
false
Topic was deleted individually.
{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 deleted topic.
{ThreadId} ID of the thread that is the parent of the topic that was deleted.
{actorId} LearningStudio user ID of user who deleted the topic.
{actorType} Type of user that generated the event.
user
Event was generated by the user action of deleting a topic.
{FirstName} First name of user who deleted the topic.
{LastName} Last name of the user who deleted the topic.
{EmailAddress} Email address of the user who deleted the topic.
{Username} LearningStudio username (login ID) of the user who deleted 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.deleted",
  "object": {
    "id": "pearson.ls.threads.topic_188620",
    "topic": 188620,
    "type": "pearson.ls.threads.topic",
    "description": "test description 1",
    "ishierarchydeleted": false,
    "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"
    }
  }
}
2948 reads
Always Learning
Pearson