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 CORS (Course Offering Recommendation System) API is a REST API. All product functionality — from uploading historical enrollment data to generating AI-powered course recommendations — is accessible through this HTTP interface. Interactive API documentation (Swagger UI) is available at the /docs path of your CORS instance.

Base URL

The base URL depends on how you have deployed the CORS backend:
https://your-cors-instance.com
Replace your-cors-instance.com with the hostname of your deployment. All endpoint paths in this reference are relative to this base URL.

Interactive documentation

CORS includes a built-in interactive API explorer. Once your instance is running, navigate to:
https://your-cors-instance.com/docs
You can browse every endpoint, inspect schemas, and send live requests directly from the browser without any additional tooling.

Authentication

All endpoints — except /health — require a valid JWT bearer token. You obtain a token by completing the two-step login flow (see Authentication). Pass the token in the Authorization header of every request:
Authorization: Bearer eyJ...
Alternatively, the /auth/verify endpoint sets an access_token HttpOnly cookie that browsers send automatically. Both mechanisms are accepted.
Requests to protected endpoints without a valid token return 401 Unauthorized.

Content types

ScenarioContent-Type
All request bodies (JSON)application/json
File upload endpointsmultipart/form-data
The API always returns application/json for every endpoint except /scheduler/export, which streams an XLSX file.

Health check

Use GET /health to verify that the service is reachable and running before sending authenticated requests:
curl https://your-cors-instance.com/health
{ "status": "ok" }
This endpoint requires no authentication and is safe to use as a liveness probe.

Error responses

The API uses standard HTTP status codes. Error response bodies always follow this shape:
{ "detail": "Human-readable error message" }
Status codeMeaning
400 Bad RequestInvalid input, missing fields, or a business-logic constraint was violated
401 UnauthorizedMissing, expired, or invalid JWT token
404 Not FoundThe requested resource does not exist
500 Internal Server ErrorAn unexpected server-side error occurred
500 errors on prediction or training endpoints often mean the ML model files are missing. Trigger POST /predict/train to regenerate them.

Rate limiting

The CORS API does not enforce built-in rate limiting. If you are making a large number of automated requests, pace them appropriately to avoid overloading the server.

Endpoint groups

Auth

Login, two-factor verification, and logout. All other endpoints depend on the JWT token issued here.

Data

Upload and retrieve course catalogs, historical enrollment records, and faculty data.

Predictions

Train ML models and generate bulk course offering recommendations for a target semester.

Scheduler

Build a conflict-free weekly timetable by assigning rooms, instructors, and time slots to sections.

Graph

Retrieve the prerequisite dependency graph enriched with bottleneck and demand scores from the latest prediction run.

Dashboard

Fetch system-wide KPI metrics: catalog size, offering count, model confidence, and failure rate.