Learning Hub: Event Store APIs
The “Event Store” feature of the Learning Hub is designed to capture learning “events”, such as when someone completes a course or earns a credential.
These APIs will be called by individual “Programs” to put data into, or get data out of, the Event Store.
Overview
RESTful APIs for the “Event Store” functionality of the Learning Hub, where the hub acts as a centralized “clearinghouse” of accomplishments and activities.
These APIs are called by Publishers to put data into the Learning Hub.
Data model
EVENT | ||
---|---|---|
An Event is the thing being recorded in the hub: user completed a course, earned a credential, etc. This design is influenced by the idea of a Learning Record Store in xAPI, but with less complexity. | ||
Field | Type | Notes |
| UUID (universally unique Identifier)
|
The Event Ids are assigned by the Learning Hub. |
| string (25 char) | Descriptive name for the Program that published this event. |
| string (25 char) | Identifier for the type of system that published this data. Currently, only the value “LB” is supported, for LearningBuilder. |
| string (50 char) | The type of event as reported by the Publisher. |
| string (200 char) | The Program’s unique identifier for the source event. For LearningBuilder this will be something like “AI:1234”, which would be the Activity Instance WFI #1234 |
| string (200 char) | The Program’s unique identifier for the person, organization, or entity that the event relates to. |
| JSON object | High level classification of this event, within the Publisher’s system. {
"value": "some constant value",
"label": "some human readable value"
} The The The |
| JSON blob | The Publisher’s representation of the event data. |
| UTC date/time | Non-null date/time the event started. (If only a single date/time is associated with the event, it is stored here). |
| UTC date/time | Nullable date/time that the event ended. |
| UTC date/time | UTC timestamp when this record was created. |
| string |
Gathers the year, month, and date from the Identifier used by the LearningHub query that gathers events to process.
|
EventType
vs PublisherEventCategory
EventType
is a system concept that indicates if data is being reported, updated, deleted, etc. These are fixed values that have specific meaning to the Hub.
PublisherEventCategory
is a Publisher concept that differentiates different types of events in their system, such as “Course” or “Exam Result”. These are NOT fixed values and will vary by Publisher. (For LearningBuilder Publishers, this will usually be the Activity Type)
Subscribers can subscribe to specific event categories for specific Publishers, with separate mapping templates for each category.
Calling the API
API Hostnames
See Learning Hub | API Hostnames
Authentication
See Learning Hub | Authentication
Publishing Events into the Registry
POST /api/events
JSON Payload
{
"PublisherProgramId": "YourProgramId",
"PublisherSystemId": "YourSystemName",
"PublisherEventId": "some_key_from_your_system",
"EventType": "AI_COMP_SUCCESS",
"PublisherParticipantId": "joebob@example.com",
"PublisherEventCategory": { "value": "some_key", "label": "friendly description" },
"PublisherEventData": { JSON },
"EventStartUtc": "UTC date/time",
"EventEndUtc": "UTC date/time"
}
Parameter | Description |
---|---|
| The Program that owns the Event. The API Key must have access to this Program. |
| The type of system that published the event. This is an arbitrary string provided by the Publisher. Can be used when a Publisher has multiple systems pushing data into the Hub. |
| The type of Learning Hub Event this record represents. For now, the only supported value is “AI_COMP_SUCCESS” |
| A value that uniquely identifies this event in the Publisher’s system. For LearningBuilder Publishers, this will be an “entity-scoped identifier” such as |
| Email address or some other piece of information that uniquely identifiers the primary participant within the Publisher's system. Ideally, this is an email address or some other identifier that is shared with the Subscribers. |
| JSON object containing information about the type of Event, according to the source Program’s system. The The { value: "ABC123", label: "Online Course" } |
| JSON object representing the Event in the source Program’s system. When calling |
| The UTC date/time when this Event occurred, or the time that the Event started. |
| The UTC date/time when this Event ended. For Events with only a single timestamp, rather than a range, set this equal to |
PublisherEventData Node Example
The exact fields and field names in the PublisherEventData
node will be determined as part of the implementation process, as these are determined by the LearningBuilder instance configuration and that data the Publisher is providing to the LearningHub.
Responses
Response Code | Headers and Body |
---|---|
201 (Created) | A new Event was created. No body is returned. HTTP headers:
|
DELETE /api/events/{eventId}
Responses
Response Code | Headers and Body |
---|---|
204 (No Content) | Delete was performed successfully. No body is returned. |
Pulling events from the Registry
GET /api/events/{programId}
Querystring parameters
Parameter | Description |
---|---|
| (required) The created-on date to match. Date format |
Responses
Response Code | Headers and Body |
---|---|
200 (Ok) |