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 8 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.

Calling the API

Authentication

Method

Explanation

Credentials assigned to a specific user or client.

userId and apiKey should passed using Basic 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.

PUT /events/{eventId}

Creates or updates an Event.

{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

{
    "ProgramId": "ProgramId",
    "ProgramMemberId": "joebob@example.com",
    "EventType": "Event Type indicator",
    "EventStartUTC": "UTC date/time",
    "EventEndUTC": "UTC date/time",
    "EventData": { JSON },
    "ReferenceEventId": "optional reference to another EventId"
}

Parameter

Description

{eventId}

The ID of the Event to create or update.

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

ProgramId

The Program that owns the Event.

The API Key must have access to this Program.

ProgramMemberId

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

EventType

The type of Event this record represents.

See the “Event Types” section, above.

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.

EventData

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

ReferenceEventId

Optional; used to reference another Event, if relevant.

Response

Response Code

200 OK

Headers

Location: /events/{eventId}

Body

Empty


Pulling events from the Registry

TODO

  • No labels