Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Excerpt
nameSummaryForParentPage

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

...

Handy status macro
set36399
isLabeledfalse
historySnapshotIdac74f399-bd5a-4c94-85f2-fa2f46fde05c
status185953
historyChainId06a50fca-cffb-4e87-a2d5-1da3fcb525a0

...

Credentials assigned to a specific user or client.

userId and apiKey should passed using Basic Authentication

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 -

    Status
    titleFUTURE USE

  • LPI_COMP_UNSUCCESS -

    Status
    titleFUTURE USE

  • LPI_COMP_SUCCESS -

    Status
    titleFUTURE USE

  • LPI_REOPENED -

    Status
    titleFUTURE USE

  • AI_STARTED -

    Status
    titleFUTURE USE

  • AI_COMP_UNSUCCESS -

    Status
    titleFUTURE USE

  • AI_COMP_SUCCESS -

    Status
    colourBlue
    titleMVP

  • AI_REOPENED - Recalled from complete to incomplete -

    Status
    titleFUTURE 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.

Info

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

Info

TODO

Publishing Events into the Registry

Info

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

...

POST /events

...

Handy status macro
set36399
isLabeledfalse
historySnapshotId7cfb151d-d309-448c-9e11-ef4dcd1953cc
status185953
historyChainId995d84a4-485f-470b-9882-e5f4d573912a

Info

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

{eventIdEventId} 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

Code Block
{
    "ProgramIdEventId": "ProgramIdPRG-UUID",

   "ProgramMemberId": "joebob@example.com",
    "EventType": "Event Type indicator",
    "EventStartUTCPublisherProgramId": "UTC date/timeProgramId",
    "EventEndUTCPublisherParticipantId": "UTC date/timejoebob@example.com",
    "EventDataPublisherEventData": { JSON },
    "ReferenceEventIdEventStartUTC": "optional reference to another EventId"UTC date/time",
    "EventEndUTC": "UTC date/time"
}

Parameter

Description

{eventIdEventId}

The ID of the Event to create or update.

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

ProgramIdEventType

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.

ProgramMemberIdPublisherParticipantId

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, abovePublisherEventData

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

...

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

Response Code

Headers and Body

201 (Created)

A new Program was created. No body is returned.

HTTP headers:

Location: /

events

programs/{

eventId

programId}

Body

Empty

...

Pulling events from the Registry

...