Skip to main content

Documentation Index

Fetch the complete documentation index at: https://cors-lau.vercel.app/docs/llms.txt

Use this file to discover all available pages before exploring further.

The Data Management API gives you read and write access to the three core data sets that power the CORS recommendation engine: the course catalog, historical enrollment offerings, and faculty records. Uploading accurate, complete data into these endpoints directly improves the quality of ML predictions.
All upload endpoints use multipart/form-data, not application/json. Pass the file using the file form field.

GET /data/courses

Returns every course currently in the catalog.

Responses

Returns an array of course objects.
code
string
Unique course identifier, e.g. "CSC243".
name
string
Full course title, e.g. "Introduction to Object Oriented Programming".
prefix
string
Department prefix extracted from the course code, e.g. "CSC".
number
string
Course number extracted from the code, e.g. "243".
type
string
Course classification. Common values: "core", "elective", "masters", "minor". Cross-listed courses may store a JSON array string, e.g. '["core","elective"]'.
study_plan
string
The study plan or curriculum track this course belongs to, if specified.
prerequisites
string
JSON-encoded array of prerequisite course codes, e.g. '["CSC201","MTH201"]'. null if the course has no prerequisites.
course_level
integer
Numeric level derived from the first digit of the course number (1–4+). Used to distinguish undergraduate from graduate courses.
curl https://your-cors-instance.com/data/courses \
  -H "Authorization: Bearer eyJ..."

GET /data/offerings

Returns the full history of course offerings stored in the database. Each record represents one course’s enrollment statistics for a specific semester and campus.

Responses

id
integer
Auto-assigned offering record ID.
year
integer
The academic year of this offering.
semester
string
"Fall" or "Spring".
campus
string
Campus where the course was offered.
course_code
string
The course identifier this record belongs to.
total_enrolled
integer
Total number of students enrolled.
passed_count
integer
Number of students who passed.
failed_count
integer
Number of students who failed.
fail_ratio
number
Failure rate as a decimal (0.0–1.0). Computed as failed_count / total_enrolled.
is_offered
boolean
true if the course was actually offered in this term.
created_at
string
ISO 8601 timestamp of when this record was ingested.
curl https://your-cors-instance.com/data/offerings \
  -H "Authorization: Bearer eyJ..."

POST /data/upload/courses

Uploads a course catalog from a JSON file. The endpoint supports three JSON structures: a root-level array of course objects, a wrapper object containing a nested array, or a key-value dictionary mapping course codes to course metadata.

Request

Content-Type: multipart/form-data
file
file
required
A .json file containing course records. Each record must include at minimum a "code" field (or use the dictionary format where keys are course codes). Optional fields: "course_name" / "name", "type", "study_plan", "prerequisites".

Responses

status
string
"success" when at least one course was processed.
processed
integer
Number of courses upserted (inserted or updated) in the database.
curl -X POST https://your-cors-instance.com/data/upload/courses \
  -H "Authorization: Bearer eyJ..." \
  -F "file=@course_catalog.json"

POST /data/upload/offerings

Uploads historical enrollment data from a CSV or XLSX file. CSV files are read directly as flat tables. XLSX files are automatically normalized to handle raw institutional report formats; if normalization fails, the file falls back to a standard Excel read. The parser accepts flexible column names (e.g., course_code, course code, course, or a prefix + number pair).

Request

Content-Type: multipart/form-data
file
file
required
A .csv or .xlsx file. Required columns: year (or yr) and course_code (or equivalent). Optional columns: semester, campus, total_enrolled, passed_count, failed_count, is_offered.

Responses

status
string
"success" when at least one record was processed.
processed
integer
Number of offering records upserted in the database.
curl -X POST https://your-cors-instance.com/data/upload/offerings \
  -H "Authorization: Bearer eyJ..." \
  -F "file=@enrollment_history.xlsx"

POST /data/upload/doctors

Uploads faculty records from a JSON, CSV, or XLSX file. Records are upserted by name. JSON format: the root element may be an array of doctor objects, an object with a "doctors" or "faculty" key containing an array, or a name-keyed dictionary. CSV/XLSX format: expected columns include name (or doctor_name / professor), allowed_courses (comma-separated course codes), and optionally days, start, and end for availability windows.

Request

Content-Type: multipart/form-data
file
file
required
A .json, .csv, or .xlsx file containing faculty records.

Responses

status
string
Always "success".
processed
integer
Number of doctor records upserted.
curl -X POST https://your-cors-instance.com/data/upload/doctors \
  -H "Authorization: Bearer eyJ..." \
  -F "file=@faculty.json"