Pearson
Always Learning

Overview

When a post in a threaded discussion is deleted, 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.deleted

What Triggers This Event

This event is triggered when a user deletes a post in a threaded discussion. Most of the time, this is a teacher deleting a post, as many courses or schools do not allow students to delete a post. This event is also triggered when a post is deleted via the APIs:

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},
    "ishierarchydeleted": {IsHierarchyDeletedFlag},
    "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.deleted
{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 deleted the response.
{Description} Description of response that was deleted.
{ResponseId} Response ID that was deleted.
{IsHierarchyDeletedFlag} Designates whether response was deleted because it was a child of a topic or another response that was deleted.
true
Response was deleted because its parent response or topic was deleted.
false
Response was deleted individually.
{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 deleted.
{TopicId} ID of the topic that is the parent of the response that was deleted.
{ThreadId} ID of the thread that is the parent of the topic.
{actorId} LearningStudio user ID of user who deleted the response.
{actorType} Designates the type of user that generated the event.
user
Event was generated by the user action of deleting a response.
{FirstName} First name of user who deleted the response.
{LastName} Last name of the user who deleted the response.
{EmailAddress} Email address of the user who deleted 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.
{courseDisplayCourseCode} 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.deleted",
  "object": {
    "id": "pearson.ls.threads.response_123456",
    "type": "pearson.ls.threads.response",
    "authorid": 888888,
    "description": "Response Description 1 - Deleted",
    "responseid": 123456,
    "ishierarchydeleted": false,
    "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"
    }
  }
}
2646 reads
Always Learning
Pearson