Submit a request
Submit a request

Using Amazon Kinesis Data Firehose to Stream Session Events and Scores

Please note: this is a premium feature, and may not be included in your product license. If you need more information, please reach out to your Learnosity Account Manager.
 
This article explains the Firehose push service of Data API.

The Data API Firehose service is provided as an alternative to integrating with Data API directly. It allows all response data to be pushed into your system in near-real time using Amazon Kinesis.

Listed below are the types of data that can be configured to be sent to your Kinesis stream.

When a session is completed and has been scored by Learnosity, the results for that session from the Data API sessions/scores endpoint will be sent to your Kinesis stream as a single message. If there are any updates or changes to the results for that session, a further Kinesis message will be sent reflecting the latest data.

Example of a single Kinesis message

{
    "user_id": "brianmoser",
    "activity_id": "EU3NXTCV",
    "session_id": "340BF0ED-77B0-45D0-A81EBE2F69DB51C1",
    "score": 10,
    "max_score": 40,
    "course_id": "example_course_id",
    "subscores": [
        {
            "id": "subscore-1",
            "title": "Informational Text",
            "num_questions": 20,
            "num_attempted": 0,
            "score": 0,
            "max_score": 20,
            "attempted_max_score": 0,
            "items": [
                "293486384",
                "293481468",
                "293475858",
                "293475234",
                "292922805"
            ]
        }
    ],
    "status": "Completed"
}

The following events can be configured to be pushed to your Kinesis stream. The Kinesis message will contain the name of the event, the metadata related to the session, as well as the time of the event.

  • session-started: The user started a session.
  • session-resumed: The user resumed a previously saved session.
  • session-completed: The user completed a session.

In rare cases, it is possible that events are not sent in chronological order. It is also possible that the same event can be sent more than once. Your system should allow for these scenarios.

Note: Session events are currently only supported with Items API in assess mode, with Assess API v2.32.0 and Questions API v2.68.0 or later.

Example of a single Kinesis message

{
    "event": "session-started",
    "session_id": "f4e854f4-3324-4395-beec-1650b522007a",
    "activity_id": "demo",
    "user_id": "brianmoser",
    "time": "2015-06-20 15:03:23"
}
Was this article helpful?
0 out of 0 found this helpful

Did you arrive here by accident? If so, learn more about Learnosity by clicking here.