v5

latestOpenAPI 3.1.0raw.githubusercontent.com2026-07-211355122.6 KB

Submit Schedule

Create an API generation session for a validated combined configuration.

Args: request: Pydantic-validated combined scheduler configuration from the body.

Returns: A new session identifier and its base schedule endpoint.

Raises: HTTPException: Status 422 when any built-in submission limit is exceeded; status 500 if work cannot be submitted; or status 400 for other request setup failures.

Behavior: Expired sessions and all built-in request limits are checked before work is accepted. Scheduler construction is queued on the shared executor with the API solver timeout. A UUID-backed session is registered immediately with empty results so later requests can await initialization asynchronously.

post/submit

Request body

limitinteger

Maximum number of schedules to generate

optimizer_flagsOptimizerFlags[]

List of optimizer flags

Example request

{
  "config": {
    "rooms": [
      {
        "capacity": 40,
        "name": "Room 101"
      }
    ],
    "labs": [
      {
        "capacity": 24,
        "name": "Lab 101"
      }
    ],
    "courses": [
      {
        "capacity": 24,
        "conflicts": [
          "CS 102"
        ],
        "course_id": "CS 101",
        "credits": 3,
        "faculty": [
          "Dr. Smith"
        ],
        "lab": [
          "Lab 101"
        ],
        "room": [
          "Room 101"
        ]
      }
    ],
    "faculty": [
      {
        "course_preferences": {
          "CS 101": 5
        },
        "lab_preferences": {
          "Lab 101": 5
        },
        "mandatory_days": [
          "MON"
        ],
        "maximum_credits": 12,
        "maximum_days": 3,
        "minimum_credits": 3,
        "name": "Dr. Smith",
        "room_preferences": {
          "Room 101": 5
        },
        "times": {
          "MON": [
            "10:00-12:00"
          ],
          "TUE": [
            "10:00-12:00"
          ]
        },
        "unique_course_limit": 3
      }
    ]
  },
  "time_slot_config": {
    "classes": [
      {
        "credits": 3,
        "meetings": [
          {
            "day": "MON",
            "duration": 150,
            "lab": false
          }
        ],
        "start_time": "10:00"
      }
    ],
    "max_time_gap": 30,
    "min_time_overlap": 45
  },
  "limit": 10,
  "optimizer_flags": [
    "faculty_course",
    "faculty_room",
    "faculty_lab",
    "same_room",
    "same_lab",
    "pack_rooms",
    "pack_labs"
  ]
}

Response

Successful Response

schedule_idstring required
endpointstring required