Currently, the API operates without authentication. In production, implement JWT-based authentication with the following header:
Authorization: Bearer <jwt_token>
http://localhost:8080/api
{
"success": true,
"message": "Operation completed successfully",
"data": { ... }
}{
"success": false,
"error": "Error message describing what went wrong",
"code": 400
}POST /api/programmes
Content-Type: application/json
{
"name": "B.Tech",
"duration_years": 4,
"total_semesters": 8
}GET /api/programmesGET /api/programmes/{id}PUT /api/programmes/{id}
Content-Type: application/json
{
"name": "B.Tech (Updated)",
"duration_years": 4,
"total_semesters": 8,
"is_active": true
}DELETE /api/programmes/{id}GET /api/programmes/{id}/departmentsPOST /api/departments
Content-Type: application/json
{
"name": "Computer Science & Technology",
"strength": 60,
"programme_id": 1
}GET /api/departmentsGET /api/departments/{id}GET /api/programmes/{programme_id}/departmentsPUT /api/departments/{id}
Content-Type: application/json
{
"name": "Computer Science & Technology",
"strength": 65,
"is_active": true
}DELETE /api/departments/{id}POST /api/routines/generate
Content-Type: application/json
{
"semester_offering_id": 1
}Response includes:
- Schedule run ID
- Generation report with placed/unplaced blocks
- Conflict details and suggestions
GET /api/routines/{schedule_run_id}GET /api/routines/semester-offering/{semester_offering_id}POST /api/routines/{schedule_run_id}/commitCommits a draft schedule run, making it active and preventing conflicts.
POST /api/routines/{schedule_run_id}/cancelCancels a draft schedule run and frees up the allocated slots.
GET /api/healthReturns service status and basic information.
{
"id": 1,
"name": "B.Tech",
"duration_years": 4,
"total_semesters": 8,
"is_active": true,
"created_at": "2025-08-19T10:00:00Z",
"updated_at": "2025-08-19T10:00:00Z"
}{
"id": 1,
"name": "Computer Science & Technology",
"strength": 60,
"programme_id": 1,
"is_active": true,
"created_at": "2025-08-19T10:00:00Z",
"updated_at": "2025-08-19T10:00:00Z",
"programme": { ... }
}{
"id": 1,
"semester_offering_id": 1,
"status": "DRAFT",
"algorithm_version": "v1.0",
"generated_at": "2025-08-19T10:00:00Z",
"committed_at": null,
"meta": "{\"total_blocks\": 15, \"placed_blocks\": 13, \"unplaced_blocks\": 2}",
"schedule_entries": [...]
}{
"id": 1,
"schedule_run_id": 1,
"semester_offering_id": 1,
"session_id": 1,
"course_offering_id": 1,
"teacher_id": 1,
"room_id": 1,
"day_of_week": 1,
"slot_number": 1,
"course_offering": { ... },
"teacher": { ... },
"room": { ... }
}| Code | Description |
|---|---|
| 400 | Bad Request - Invalid input data |
| 404 | Not Found - Resource doesn't exist |
| 500 | Internal Server Error - Server-side error |
DRAFT- Generated but not committedCOMMITTED- Active and committedCANCELLED- Cancelled draftFAILED- Generation failed
ODD- For Fall semesters (1, 3, 5, 7)EVEN- For Spring semesters (2, 4, 6, 8)
THEORY- Lecture halls for theory classesLAB- Laboratory rooms for practical sessionsOTHER- Other specialized rooms
The system uses a fixed time slot structure:
- Days: Monday (1) to Friday (5)
- Slots: 8 slots per day (1-8)
- Duration: 55 minutes per slot
- Break: Lunch break between slot 4 and 5
| Slot | Time |
|---|---|
| 1 | 09:00-09:55 |
| 2 | 09:55-10:50 |
| 3 | 10:50-11:45 |
| 4 | 11:45-12:40 |
| Break | 13:00-14:00 |
| 5 | 13:50-14:45 |
| 6 | 14:45-15:40 |
| 7 | 15:40-16:35 |
-
Setup Phase:
- Create programmes and departments
- Add teachers, subjects, and rooms
- Create academic sessions
-
Configuration Phase:
- Create semester offerings
- Add course offerings with subject assignments
- Assign teachers and rooms to course offerings
-
Generation Phase:
- Generate routine for semester offering
- Review generated schedule and conflicts
- Commit or regenerate as needed
-
Management Phase:
- View committed schedules
- Handle conflicts across semesters
- Make adjustments for next session