Pearson
Always Learning

Overview

When a user deletes an attachment from a thread post, 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.responseattachment.deleted

What Triggers This Event

This event is triggered by a user deleting an attachment from a thread post in the LearningStudio User Interface, or when an attachment is deleting using this API call:

  • DELETE /courses/{courseId}/threadedDiscussions/{threadedDiscussionId}/topics/{topicId}/ responses/{responseId}/attachments

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}",
    "responseattachmentvoid": {AttachmentID},
    "response_pk": {ResponsePk},
    "filemanager_pk": {FilemanagerPk},
    "filemanagerfilename": "{FilemanagerFilename}",
    "topic_id": {TopicId},
    "thread_id": {ThreadId}    
  },
  "actor": {
    "id": "{actorId}",
    "type": "{actorType}",
    "firstName": "{FirstName}",
    "lastName": "{LastName}",
    "emailAddress": "{EmailAddress}",
    "userName": "{Username}"
  },
  "contexts": {
    "course": {
      "id": "{courseId}",
      "title": "{courseTitle}",
      "displayCourseCode": "{courseDisplayCourseCode}",
      "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.
↳ responseattachment.
↳ deleted
{objectId} Unique object ID for the specific event contract data.
pearson.ls.threads.
↳ responseattachment_
↳ {AttachmentID}
.
{parentEventType} An ID that represents the category of events, less specific than this event message type.
pearson.ls.threads.
↳ responseattachment
{AttachmentID} Attachment ID that was deleted.
{ResponsePk} ID of the response that was the parent of the deleted attachment.
{FilemanagerPk} File ID of the deleted attachment within the attachment file manager system.
{FilemanagerFilename} Filename of the deleted attachment within the attachment file manager system.
{TopicId} Topic ID that is the parent of the response ID.
{ThreadId} Thread ID that is the parent of the topic ID.
{actorId} LearningStudio user ID of user who deleted the response attachment.
{actorType} Designates the type of user that generated the event.
user
Event was generated by the user action of deleting the attachment.
{FirstName} First name of user who deleted the attachment.
{LastName} Last name of the user who deleted the attachment.
{EmailAddress} Email address of the user who deleted the attachment.
{Username} Educational Partner username of the user who deleted the attachment.
{courseId} LearningStudio course ID that contains the relevant threaded discussion.
{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 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": "c331f5b4-34c0-4849-bb44-343be6e1a61d",
  "eventDate": "2013-01-12T14:55:12Z",
  "eventType": "pearson.ls.threads.responseattachment.deleted",
  "object": {
    "id": "pearson.ls.threads.responseattachment_25016",
    "type": "pearson.ls.threads.responseattachment",
    "responseattachmentvoid":25016,
    "response_pk":11111,
    "filemanager_pk":22222,
    "filemanagerfilename":"testfile.doc"
    },
  "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"
    }
  }
}
2759 reads
Always Learning
Pearson