Pearson
Always Learning

Overview

Whenever any user creates a new message in a dropbox basket, LearningStudio will send this event with details. You'll need to use the APIs to retrieve additional information as well as any attachments.

Message Type ID

Use this message type id to subscribe to this event and identify incoming instances of it: pearson.ls.dropbox.submission.created

What Triggers This Event

This event is triggered when a user (teacher, student, or teaching assistent) creates a new message in a dropbox through the LearningStudio User Interface, or by using the Messages in Dropbox Basket by Course API:

  • POST /courses/{courseId}/dropboxBaskets/{dropboxBasketId}/messages
  • POST /courses/{courseId}/dropboxBaskets/{dropboxBasketId}/messages/{messageId}

See Dropbox for the resources, use cases, and concepts for the Dropbox 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}",
    "submissionId": {SubmissionId},
    "userBasketId": {UserBasketId},
    "dropboxBasketId":{DropboxBasketId},
    "text": "{MessageText}",
    "submitDate": "{SubmitDate}",
    "isFirstSubmissionInUserBasket": {IsFirstSubmissionInUserBasketFlag},
    "submitterId": {SubmitterId},
    "submitterFirstName": "{SubmitterFirstName}",
    "submitterLastName": "{SubmitterLastName}",
    "submitterEmail": "{SubmitterEmail}"
  },
  "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.dropbox.
↳ submission.created
{objectId} Unique object ID for the specific event contract data.
pearson.ls.dropbox.
↳ submission_
↳ {objectSubmissionId}
.
{parentEventType} An ID that represents the category of events, less specific than this event message type.
pearson.ls.dropbox.
↳ submission
{SubmissionId} ID of message that was created.
{UserBasketId} Course or user dropbox basket ID for the dropbox basked in which the dropbox message was created.  
{DropboxBasketId} Dropbox basket ID for the dropbox basked in which the dropbox message was created.  
{MessageText} Body of the dropbox message that was created.
{SubmitDate} Date and time when the message was created in the dropbox basket. Time is in UTC (no timezone offset). Format is
YYYY-MM-DDTHH:MM:SS.SSSZ
.
{IsFirstSubmissionInUserBasketFlag} Designates whether message is the first message created in the user basket. Each user basket is created only after a message has been submitted to it.
true
Message was the first message created in the user basket.
false
User basket already contained messages when this message was created.
{SubmitterId} ID of the message author.
{SubmitterFirstName} First name of the message author.
{SubmitterLastName} Last name of the message author.
{SubmitterEmail} Email address of the message author.
{actorId} LearningStudio user ID of the user who created the topic.
{actorType} Type of user that generated the event.
user
Event was generated by the user action of creating a message in a dropbox basket.
{FirstName} First name of the user who created the message.
{LastName} Last name of the user who created the message.
{EmailAddress} Email address of the user who created the message.
{Username} LearningStudio username (login ID) of the user who created the message.
{courseId} LearningStudio ID of the course that contained the dropbox basket where the message was created.
{courseTitle} Title of the course that contained the dropbox basket where the message was created.
{displayCourseCode} Display code for the course that contained the dropbox basket where the message was created.
{courseCallNumbers} Array of institution's call numbers assigned to the course that contained the dropbox basket where the message was created. 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": "468fcf56-3fae-48f1-9bb2-3a1066639c0c",
  "eventDate": "2013-05-13T21:01:42.398Z",
  "eventType": "pearson.ls.dropbox.submission.created",
  "object": {
    "id": "pearson.ls.dropbox.submission_1535",
    "type": "pearson.ls.dropbox.submission",
    "submissionId": 1535,
    "userBasketId": 123,
    "dropboxBasketId": 141468,
    "text": "Sample text of submitted message.",
    "submitDate": "2013-05-13T21:01:41.281Z",
    "isFirstSubmissionInUserBasket": false,
    "submitterId": 9876543,
    "submitterFirstName": "John",
    "submitterLastName": "Smith",
    "submitterEmail": "jsmith@domain.com"
  },
  "actor": {
    "id": "9876543",
    "type": "user",
    "firstName": "John",
    "lastName": "Smith",
    "emailAddress": "jsmith@domain.com"
  },
  "contexts": {
    "course": {
      "id": "2026902",
      "title": "World History in the New Century",
      "displayCourseCode": "SELA1A1",
      "callNumbers": [],
      "nodes": ["123123"]
    },
    "ep": {
      "id": "54678",
      "clientString": "epsamplestring"
    }
  }
}
2339 reads
Always Learning
Pearson