Atlas project production

APEXLearningAPI

Read a CSV of classroom IDs and student IDs, authenticate to the APEX Learning API, and post enrollment payloads in batches by classroom. It ingests config.toml, CSV input file, APEX Learning API and produces Enrollment API calls, error_log.csv.

Type
Component
Lifecycle
Maintenance
Last touched
2024-06-06
Visibility
Public

Purpose

Read a CSV of classroom IDs and student IDs, authenticate to the APEX Learning API, and post enrollment payloads in batches by classroom.

Current state

Last touched: 2024-06-06. Functionality and completeness: Core enrollment flow is implemented; documentation and guardrails are minimal.

Next step

Add baseline automated tests to cover critical flows; Add CI pipeline for build/test/lint; Document deployment/runtime environment (or add Dockerfile); Document interfaces (CLI flags, API endpoints, file formats); Add structured logging and basic health checks.

Interfaces

Inputs
  • config.toml, CSV input file, APEX Learning API
  • Configuration files (TOML/YAML/JSON/INI/CONF)
  • CSV files
Outputs
  • Enrollment API calls, error_log.csv
  • CSV files

Reality to Action trace

Reality Ingestion

Not in scope.

Canonical Storage

Not in scope.

Automation Engines

Not in scope.

Human Interfaces

Contributes in this stage.

Operational Adoption

Contributes in this stage.

Core workflow

TBD. Document the 5-10 steps that define the core workflow.

Artifacts

  • CSV columns `ClassroomName`, `StudentId`; JSON payload includes studentUsers with ImportUserId and ImportOrgId

Operational notes

Constraints and scars

  • Prints the access token to stdout and lacks rate-limit/backoff handling; large CSVs may trigger API throttling.

Reliability posture

Failure modes and safe behavior: Non-success responses are logged unless the API reports "Enrollment already exists". Idempotency / retries / batching behavior: No retries; re-runs can attempt duplicate enrollments but are ignored if the API reports they already exist.

Observability

  • Metrics/health checks: None documented
  • Logs: stdout/stderr plus error_log.csv for API failures.

Security and privacy

Config includes client_secret; protect config files and avoid printing tokens in shared logs. error_log.csv may include sensitive enrollment errors; store with restricted access.

Dependencies

Upstream
  • APEX Learning API (token + classrooms enrollments)

Ownership

Owners

Josh Barton

Users

Josh Barton (owner)

APEXLearningAPI

Architecture & Major Components

  • High-level diagram (text):

    • Entry/trigger -> core logic -> outputs (details per docs below)
  • Entry points: src/main.rs

  • Top-level folders: src

  • src/ submodules: None (single-file implementation)

  • Key abstractions: token fetch, CSV grouping, per-classroom async tasks, error logging to CSV

Setup / Build / Run

  • Build system(s): Cargo.
  • Requires a config.toml and CSV file path configured before running.