Skip to content

Support learner data export in non-LIF formats #906

@cbeach47

Description

@cbeach47

Currently, the LIF system consumes learner data in disparate schemas and outputs that data in the "Org LIF" format via the LIF API .

There is a desire for the LIF ecosystem to export learner data in formats other than the Org LIF data model.

Requires two new abilities:

  • An endpoint needs to consume a learnerId and dataModel, and return data, for that learner, in that data model format
  • We need a way for an adopter to enumerate the available "Org LIF to other data models" that have a transformation group setup in MDR.

Notes:

  • MDR already supports managing the definitions of various data models
  • MDR already supports managing the transformations to convert learner data from a source data model to a target data model.

Design:

Image
  • Leave the LIF API endpoint as-is:
    • A learner ID is passed in, the data is returned in the Org LIF data model format.
  • Create a new REST-like API micro-service LIF Learner Data Export that is open to the external web:
    • Depends at least on LIF Query Planner, MDR API, and LIF Translator.
    • AuthN / AuthZ for both endpoints:
      • Uses the authorization header whose Bearer token is a JWT token.
      • This token is created from a call to the MDR or Advisor.
      • Data access is dependent on the logged in user's tenant schema.
    • Endpoints:
      • GET [lif-learner-data-export]/available-data-formats?urlEscaped=true|false
        • Enumerates the available data models that have the Org LIF as a transformation source.
        • The response are sets of tuples. All values are URL escaped based on the query parameter urlEscaped:
[
  {
    "name": str,
    "version": str,
    "contributorOrganization":str,
    "transformationVersions": list[str],
  },
  ...
]
- `GET [lif-learner-data-export]?learnerId={LEARNER_ID}&dataModelName={DATA_MODEL_NAME}&dataModelVersion={DATA_MODEL_VERSION}&dataModelContributorOrganization={DATA_MODEL_CONTRIBUTOR_ORGANIZATION}&transformationId={TRANSFORMATION_ID}`
    - Return available data, for that learner, for that data model, using the given transformation version.
    - Does not filter out parts of the schema (as opposed to the LIF API (graphql) endpoint)
    - Internal call flow:
        - Use `MDR API` to confirm the data model is known for the tenant.
        - Use `MDR API` to confirm there is a transformation from Org LIF to the desired data model for that tenant.
        - Call `LIF Query Planner`to retrieve the LIF formatted data 
        - Capture the response and use `LIF Translator` to translate the data into the target schema
        - Return the result

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions