Skip to content

Data Flows — OL Analytics API

Generated 2026-10-14 15:27 UTC · c4gen dev

Each scenario below replays one interaction as a C4 Dynamic diagram. Amber steps are asynchronous (queued / scheduled / event-driven).

How to read these diagrams

These are C4 model diagrams (C4-PlantUML). Read them top-down: System Context (the whole SOA) → Container (one system's runtime units) → Dynamic (a single data flow, step by step).

  • People are rounded boxes; systems and containers are rectangles; databases and queues have distinct shapes.
  • Each arrow is a data flow labelled with what moves.
  • Solid arrows are synchronous (request/response, caller blocks).
  • Amber dashed arrows are asynchronous (queued, scheduled, or event-driven — caller does not block).
  • Drag to pan, scroll to zoom. Boxes with a link drill into the next level.

Org manager loads the B2B analytics dashboard (synchronous)

The dashboard is a client component, so the browser makes every call. MIT Learn first lists the organizations the user manages from MITx Online to get the org's Keycloak UUID (sso_organization_id), then fetches each panel from the Learn-scoped analytics host with the mit-learn session cookie. APISIX's learn route reuses mit-learn's OIDC session and forwards X-Userinfo. The b2b_dashboard tenant checks the org is in the user's organization claim, confirms is_manager with MITx Online (cached 60s per user and org), reads the backing materialized view, drops rows under the k-anonymity floor, and returns the rows with as_of taken from that view's last refresh.

Partner integration reads learner records (synchronous)

Machine-to-machine path for the b2b_learner_records tenant. The partner mints a client-credentials token, APISIX's bearer-only route verifies it against the realm JWKS and requires learner-records:read and the ol-analytics-api-client audience, and the app verifies the token again itself because the pod is reachable without going through APISIX. Access is granted only for organizations listed in the token's learner_records_organizations claim. No partner client was provisioned in any environment as of October 2026.