Pearson
Always Learning

This API allows you to store student accomplishments or other activity as a free text string in LearningStudio's analytics engine. You can store virtually any type of event information, from signing into your application, to a student's activity in that application, to their accomplishments in an application. The specifics will need to be determined between your application and the needs of the institution. This is similar in concept to the Tin Can API or IMS Global's Caliper Analytics initiative.

Note: Data written with this API cannot be retrieved via API. However, an event is dispatched whenever this API is used, so you can subscribe to that event if you need to retrieve information.

Best Practice: The minimum best use of this API is to record the timestamp of whenever a user accesses your application, storing the application name as the free-text option. Additional records are at your discretion or at the request of the institution.



Supported Roles and Authentication Protocols

Type Supported Values
Authentication Protocols OAuth 1.0a
Valid for Roles (OAuth 2): (OAuth 2 not supported)

API Request

API Endpoints

HTTP Verbs and URIs

POST /users/{userId}/courses/{courseId}/attendances{.format}
  • Creates a record for activity tracking and reporting.

Parameters

Parameter Description Valid Values
{userId} LearningStudio User ID or relevant user overload.
  • Numeric ID issued by LearningStudio
  • loginid={clientString}%7C{username}
  • or replace /users/{userId} with /me
    (OAuth 2 only)
{courseId} LearningStudio Course ID or relevant course overload.
  • Numeric ID issued by LearningStudio
  • ccn={callNumber}
{.format} Desired format of response data. See Response Formats. .json , .xml , or Blank

Query String Parameters

No query string parameters are supported.

Request Body

Format

{
  "attendance":{
    "epoch" : "{dateTime}",
    "applicationName" : "{text}"
  }
}

Property Descriptions

Name Description Valid Values
{dateTime} Date and time to be saved as when the event occurred. Can be any desired time to be logged (for example, can be in user's local time zone). ISO-8601 formatted time stamp, e.g., YYYY-MM-DDTHH:MM:SSZ
{text} String of data to be saved. The best practice minimum use is to record the name of your application whenever a student accesses it. There is no validation for this value - it is saved as a literal string. Any string

API Response

Response Headers

This API returns the standard HTTP Status Codes used by the LearningStudio APIs. There are no special headers returned by the API.

Response Body

Format

{
  "attendance":{
    "attendanceId":{attendanceId},
    "userId":{userId},
    "courseId":{courseId},
    "epoch":"{dateTime}",
    "applicationId":"{applicationId}",
    "applicationName":"{applicationName}"
}}

Property Descriptions

Name Description
{attendanceId} Unique ID assigned by LearningStudio to the attendance tracking record.
{userId} LearningStudio User ID.
{courseId} LearningStudio Course ID.
{dateTime} Date and time that was saved as when the user accessed the application in the course.
{applicationId} Application ID ("API Key") assigned to the application that made the API request.
{textStored} The text that was stored.

Examples

Request

Endpoint

POST /users/2120913/courses/2026902/attendances

Body

{
  "attendance":{
    "epoch" : "2013-02-15T11:28:54Z",
    "applicationName" : "Power Exams"
  }
}

Response

Body

{
  "attendance":{
    "attendanceId":25,
    "userId":123456,
    "courseId":9876543,
    "epoch":"2013-02-15T11:28:54Z",
    "applicationId":"081ad520-1234-5678-ABCD-123456789000",
    "applicationName":"Power Exams"
  }
}
3346 reads
Always Learning
Pearson