Skip to end of banner
Go to start of banner

Learning Hub: Event Store APIs

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this content. View the current version.

Compare with Current View Version History

« Previous Version 9 Next »

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.

Overview

RESTful APIs for the “Event Store” functionality of the Learning Hub, where the hub acts as a centralized “clearinghouse” of accomplishments and activities.

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

EventId

PRG-UUID
(26+128 chars)

{ProgramId}-{UUID}

The {ProgramId} helps guarantee uniqueness but also to make the IDs more human readable.

EventType

string (50 char)

The type of event as reported by the publisher.

For LearningBuilder this will be one of:

  • LPI_STARTED - FUTURE USE

  • LPI_COMP_UNSUCCESS - FUTURE USE

  • LPI_COMP_SUCCESS - FUTURE USE

  • LPI_REOPENED - FUTURE USE

  • AI_STARTED - FUTURE USE

  • AI_COMP_UNSUCCESS - FUTURE USE

  • AI_COMP_SUCCESS - MVP

  • AI_REOPENED - Recalled from complete to incomplete - FUTURE USE

PublisherProgramId

string (25 char)

Descriptive name for the Program that published this event.

PublisherEventId

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

PublisherParticipantId

string (200 char)

The Program’s unique identifier for the person, organization, or entity that the event relates to.

Each event contains the ID of the related party in the publisher’s system. It is up to subscribers and publishers to determine how those values should be mapped between their systems.

PublisherEventData

JSON blob

The Program’s representation of the event data

EventStartUtc

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)

EventEndUtc

UTC date/time

Nullable date/time that the event ended.

CreatedUtc

UTC date/time

UTC timestamp when this record was created.

Calling the API

API Hostnames

See https://heuristicsolutions.atlassian.net/wiki/spaces/DOCS/pages/3697770890/Learning+Hub#API-Hostnames

Authentication

See https://heuristicsolutions.atlassian.net/wiki/spaces/DOCS/pages/3697770890/Learning+Hub#Authentication

Event Type

TODO

Publishing Events into the Registry

“Events” are records of activity or accomplishment. These are published by a Program and other Programs can consume them.

POST /events

Creates a new Event using the client-supplied ID. Returns an error if the Event already exists.

{EventId} must be prefixed with the ProgramId and a hyphen, e.g. “FOO-ABC123”.

The API Key used for authentication must have rights to modify data for ProgramId.

JSON Payload

{
    "EventId": "PRG-UUID",
    "EventType": "Event Type indicator",
    "PublisherProgramId": "ProgramId",
    "PublisherParticipantId": "joebob@example.com",
    "PublisherEventData": { JSON },
    "EventStartUTC": "UTC date/time",
    "EventEndUTC": "UTC date/time"
}

Parameter

Description

{EventId}

The ID of the Event to create or update.

Must be prefixed with {ProgramId}- to ensure uniqueness.

EventType

The type of Event this record represents.

See the “Event Types” section, above.

PublisherProgramId

The Program that owns the Event.

The API Key must have access to this Program.

PublisherParticipantId

Email address or some other piece of information that uniquely identifiers the primary participant within the Program’s system.

PublisherEventData

JSON object representing the Event in the source Program’s system.

EventStartUTC

The UTC date/time when this Event occurred, or the time that the Event started.

EventEndUTC

The UTC date/time when this Event ended. For Events with only a single timestamp, rather than a range, set this equal to EventStartUTC.

Responses

Response Code

Headers and Body

201 (Created)

A new Program was created. No body is returned.

HTTP headers:

Location: /programs/{programId}


Pulling events from the Registry

TODO

  • No labels