{ "openapi": "3.1.0", "info": { "title": "Modulplaner OpenAPI", "version": "1.0.0", "contact": { "email": "sean@black-burn.ch" }, "description": "OpenAPI documentation of the modulplaner API\n", "license": { "name": "MPL 2.0", "url": "https://www.mozilla.org/en-US/MPL/2.0/" } }, "servers": [ { "url": "http://localhost:8080", "description": "localhost" } ], "paths": { "/data/semester-versions.json": { "get": { "operationId": "GetSemesterVersions", "summary": "Overview of the available semesters and their respective versions of the timetable.", "security": [], "tags": [ "Semesters" ], "responses": { "200": { "$ref": "#/components/responses/semester-versions-200" } } } }, "/data/modules.json": { "get": { "operationId": "GetModules", "summary": "All available modules and additional information.", "security": [], "tags": [ "Modules" ], "responses": { "200": { "$ref": "#/components/responses/modules-200" } } } }, "/data/lecturers.json": { "get": { "operationId": "GetLecturers", "summary": "A list of all the lecturers.", "security": [], "tags": [ "Lecturers" ], "responses": { "200": { "$ref": "#/components/responses/lecturers-200" } } } }, "/data/module-history.json": { "get": { "operationId": "GetModuleHistory", "summary": "A list of all the lecturers.", "security": [], "tags": [ "Modules" ], "responses": { "200": { "$ref": "#/components/responses/module-history-200" } } } }, "/data/changelog.html": { "get": { "operationId": "GetHTMLChangelog", "summary": "HTML Changelog of the modulplaner frontend", "security": [], "tags": [ "Changelog" ], "responses": { "200": { "$ref": "#/components/responses/changelog-html-200" } } } }, "/data/{semester}/config.json": { "get": { "operationId": "GetSemesterConfig", "summary": "Configuration / additional information for this semester.", "security": [], "tags": [ "Semester" ], "parameters": [ { "$ref": "#/components/parameters/semester" } ], "responses": { "200": { "$ref": "#/components/responses/semester-config-200" } } } }, "/data/{semester}/changes.json": { "get": { "operationId": "GetSemesterChanges", "summary": "A list of all changes between the versions of this semester.", "security": [], "tags": [ "Semester" ], "parameters": [ { "$ref": "#/components/parameters/semester" } ], "responses": { "200": { "$ref": "#/components/responses/changes-200" } } } }, "/data/{semester}/blockclasses.json": { "get": { "operationId": "GetSemesterBlockclasses", "summary": "A list of all blockclasses for this semester.", "security": [], "tags": [ "Semester" ], "parameters": [ { "$ref": "#/components/parameters/semester" } ], "responses": { "200": { "$ref": "#/components/responses/blockclasses-200" } } } }, "/data/{semester}/{version}/classes.json": { "get": { "operationId": "GetSemesterVersionClasses", "summary": "A list of all classes for this semester/version.", "security": [], "tags": [ "Semester Version" ], "parameters": [ { "$ref": "#/components/parameters/semester" }, { "$ref": "#/components/parameters/version" } ], "responses": { "200": { "$ref": "#/components/responses/classes-200" } } } }, "/data/{semester}/{version}/config.json": { "get": { "operationId": "GetSemesterVersionConfig", "summary": "Configuration/additional information for this semester/version.", "security": [], "tags": [ "Semester Version" ], "parameters": [ { "$ref": "#/components/parameters/semester" }, { "$ref": "#/components/parameters/version" } ], "responses": { "200": { "$ref": "#/components/responses/semester-version-config-200" } } } }, "/data/{semester}/{version}/klassen.pdf": { "get": { "operationId": "GetSemesterVersionKlassenPDF", "summary": "PDF of the original timetable.", "security": [], "tags": [ "Semester Version" ], "parameters": [ { "$ref": "#/components/parameters/semester" }, { "$ref": "#/components/parameters/version" } ], "responses": { "200": { "$ref": "#/components/responses/klassen-pdf-200" } } } } }, "components": { "schemas": { "semester-version": { "type": "object", "description": "Single semester and all of its versions", "properties": { "semester": { "description": "Name of the semester", "type": "string" }, "versions": { "description": "The different versions available for this semester", "type": "array", "items": { "type": "string" } } }, "required": [ "semester", "versions" ] }, "grading-type": { "description": "Types of grading", "type": "string", "oneOf": [ { "title": "HN", "const": "HN", "description": "TODO" }, { "title": "MSP", "const": "MSP", "description": "Final Exam" }, { "title": "SE", "const": "SE", "description": "TODO" } ] }, "module-dependency": { "type": "object", "description": "The dependencies of a single module, split by language.", "additionalProperties": { "description": "The language (as the key), in which the module has a dependency to (array values).\n", "type": "array", "items": { "description": "The short module name", "type": "string" } } }, "module": { "type": "object", "description": "A single module definition", "properties": { "short": { "description": "Short name of the module / its human readable ID.", "type": "string" }, "name": { "description": "Full name of the module", "type": "string" }, "for_degrees": { "description": "List of degrees, for which this module is meant.", "type": [ "array", "null" ], "items": { "type": "string" } }, "module_id": { "description": "The unique module ID number.", "type": [ "number", "null" ] }, "module_ids": { "description": "TODO", "type": [ "array", "null" ], "items": { "type": "integer", "format": "int32" } }, "ects": { "description": "The number of ECTS this module awards upon completion.", "type": [ "number", "null" ] }, "marks": { "description": "The types of marks that this module involves (Final exam, continuous grading,\nproject, …).\n", "type": [ "array", "null" ], "items": { "$ref": "#/components/schemas/grading-type" } }, "cat": { "description": "Category of module (Context, Specialization, basic education, …).", "type": [ "string", "null" ] }, "sub_cat": { "description": "Sub-category of the module (business administration, subject supplement,\nspecialization).\n", "type": [ "string", "null" ] }, "dependencies": { "description": "What dependencies are required to be able to participate in this module.\n", "$ref": "#/components/schemas/module-dependency" }, "enablingModules": { "description": "List of modules, that can be attended, after the completion of this module.\n", "$ref": "#/components/schemas/module-dependency" } }, "required": [ "short", "name", "for_degrees", "module_id", "module_ids", "ects", "marks", "cat", "sub_cat", "dependencies", "enablingModules" ] }, "lecturer": { "type": "object", "description": "Single lecturer", "properties": { "short": { "description": "A short name for the lecturer, that is unique", "type": "string" }, "surname": { "description": "The surname of the lecturer", "type": "string" }, "firstname": { "description": "The given name of a lecturer", "type": "string" } }, "required": [ "short", "surname", "firstname" ] }, "weekday": { "type": "integer", "format": "int8", "description": "The various weekdays", "oneOf": [ { "title": "Monday", "const": 0 }, { "title": "Tuesday", "const": 1 }, { "title": "Wednesday", "const": 2 }, { "title": "Thursday", "const": 3 }, { "title": "Friday", "const": 4 }, { "title": "Saturday", "const": 5 }, { "title": "Sunday", "const": 6 } ] }, "teaching-type": { "type": "string", "description": "Various types of teaching types/locations", "oneOf": [ { "title": "On Site", "const": "on_site", "description": "Only taught on site" }, { "title": "Online", "const": "online", "description": "Exclusively taught online" }, { "title": "Blockmodule", "const": "blockmodule", "description": "A module that is taught in a single block over the span of a few weeks, not the\nentire semester.\n" }, { "title": "Hybrid", "const": "hybrid", "description": "Both on site and online" } ] }, "module-history": { "type": "object", "description": "A complete history of all planned executions of each module", "additionalProperties": { "description": "The key is the modules short name with a mapping to an array", "type": "array", "items": { "type": "object", "properties": { "semester": { "description": "The semester this module took place in", "type": "string" }, "version": { "description": "The version of the semester plan", "type": "string" }, "weekday": { "description": "The weekday the module took place on", "$ref": "#/components/schemas/weekday" }, "class": { "description": "Name of the class this module is part of", "type": "string" }, "from": { "description": "Start time of the module, in seconds since midnight", "type": "integer", "format": "int32" }, "to": { "description": "End time of the module, in seconds since midnight", "type": "integer", "format": "int32" }, "lecturers": { "description": "List of lecturers teaching this module", "type": "array", "items": { "type": "string" } }, "teaching_type": { "description": "The type of teaching", "$ref": "#/components/schemas/teaching-type" }, "rooms": { "description": "List of rooms reserved for this module", "type": "array", "items": { "type": "string" } }, "pages": { "description": "List of pages, on which the module can be found in the PDF", "type": "array", "items": { "type": "integer", "format": "int16" } }, "id": { "description": "A unique ID for this module and the time it is taught", "type": "string" } }, "required": [ "semester", "version", "weekday", "class", "from", "to", "lecturers", "teaching_type", "rooms", "pages", "id" ] } } }, "semester-config": { "type": "object", "description": "Semester configuration / additional information", "properties": { "blockclass_file": { "description": "Relative path to the blockclass file", "type": [ "string", "null" ] } }, "required": [ "blockclass_file" ] }, "change": { "type": "object", "description": "A single change in the semester plan version, outlining the changes", "properties": { "name": { "description": "The name of the version", "type": "string" }, "changes": { "description": "A HTML string of the changes", "type": "string" } }, "required": [ "name", "changes" ] }, "blockclass": { "type": "object", "description": "Single blockclass entry", "properties": { "weekday": { "description": "Not used", "type": "null" }, "from": { "description": "Time the module starts in seconds since midnight (not used, always 0)", "type": "integer", "format": "int32" }, "to": { "description": "Time the module starts in seconds since midnight (not used, always 0)", "type": "integer", "format": "int32" }, "class": { "description": "Class name this block module is part of", "type": "string" }, "name": { "description": "Short name of the module", "type": "string" }, "rooms": { "description": "The rooms which are reserved for this module", "type": "array", "items": { "type": "string" } }, "teachers": { "description": "The lecturers names that are teaching this module", "type": "array", "items": { "type": "string" } }, "teaching_type": { "description": "Type of teaching", "$ref": "#/components/schemas/teaching-type" }, "pages": { "description": "The pages, on which the module can be found", "type": "array", "items": { "type": "integer", "format": "int16" } }, "degree_prg": { "description": "Name of the degree program this module is part of", "type": "string" }, "part_of_other_classes": { "description": "List of other classes, where this module is also taught", "type": "array", "items": { "type": "string" } }, "id": { "description": "Unique identifier for this blockmodule", "type": "string" } }, "required": [ "weekday", "from", "to", "class", "name", "rooms", "teachers", "teaching_type", "pages", "degree_prg", "part_of_other_classes", "id" ] }, "class": { "type": "object", "description": "Single class definition of a specific version", "properties": { "weekday": { "description": "The weekday the module took place on", "$ref": "#/components/schemas/weekday" }, "from": { "description": "Start time of the module, in seconds since midnight", "type": "integer", "format": "int32" }, "to": { "description": "End time of the module, in seconds since midnight", "type": "integer", "format": "int32" }, "class": { "description": "Name of the class this module is part of", "type": "string" }, "name": { "description": "Short name of the module" }, "rooms": { "description": "List of rooms reserved for this module", "type": "array", "items": { "type": "string" } }, "teachers": { "description": "List of lecturers teaching this module", "type": "array", "items": { "type": "string" } }, "teaching_type": { "description": "The type of teaching", "$ref": "#/components/schemas/teaching-type" }, "pages": { "description": "List of pages, on which the module can be found in the PDF", "type": "array", "items": { "type": "integer", "format": "int16" } }, "degree_prg": { "description": "Name of the degree program this module is part of", "type": "string" }, "part_of_other_classes": { "description": "List of other classes, where this module is also taught", "type": "array", "items": { "type": "string" } }, "id": { "description": "A unique ID for this module and the time it is taught", "type": "string" } }, "required": [ "weekday", "from", "to", "class", "name", "rooms", "teachers", "teaching_type", "pages", "degree_prg", "part_of_other_classes", "id" ] }, "semester-version-config": { "type": "object", "description": "Version specific configurations/additional information", "properties": { "pdf_version": { "description": "Version name of the PDF", "type": "string", "example": "einschreiben / HS_24_einschr_3" }, "export_date": { "description": "The date, when the version of this plan was released.", "format": "dd.mm.yyyy HH:MM:SS", "type": "string", "example": "17.06.2024 15:07:00" }, "parse_date": { "description": "The date, when the version of this plan was parsed.", "format": "dd.mm.yyyy HH:MM:SS", "type": "string", "example": "04.10.2024 17:45:10" } }, "required": [ "pdf_version", "export_date", "parse_date" ] } }, "responses": { "semester-versions-200": { "description": "OK", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/semester-version" } }, "example": [ { "semester": "24HS", "versions": [ "einschr_3", "einschr_2", "einschr_1" ] }, { "semester": "24FS", "versions": [ "korr_2", "korr_2_1", "korr_1", "einschr_3_1", "einschr_3", "einschr_2", "einschr_1", "prov_4a" ] } ] } } }, "modules-200": { "description": "OK", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/module" } }, "example": [ { "short": "aet1", "name": "Allgemeine Elektrotechnik 1 ", "for_degrees": [ "Elektro- und Informationstechnik", "Systemtechnik" ], "module_id": 6007771, "module_ids": [ 6007771 ], "ects": 3, "marks": [ "HN", "MSP", "SE" ], "cat": "Fachausbildung", "sub_cat": "Fachgrundlagen", "dependencies": { "de": [ "an1" ], "en": [] }, "enablingModules": { "de": [ "aet2", "msee" ], "en": [] } }, { "short": "ast1", "name": "Analoge Schaltungstechnik 1 ", "for_degrees": null, "module_id": null, "module_ids": null, "ects": null, "marks": null, "cat": null, "sub_cat": null, "dependencies": {}, "enablingModules": { "de": [], "en": [] } } ] } } }, "lecturers-200": { "description": "OK", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/lecturer" } }, "example": [ { "short": "rabh", "surname": "Racquel", "firstname": "Bharath" }, { "short": "rudu", "surname": "Ruuben", "firstname": "Dunyasha" } ] } } }, "module-history-200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/module-history" }, "example": { "aet1": [ { "semester": "24HS", "version": "einschr_3", "weekday": 0, "class": "1Ea", "from": 29700, "to": 39600, "lecturers": [ "Gaus" ], "teaching_type": "on_site", "rooms": [ "1.331" ], "pages": [ 3, 5 ], "id": "1Ea-aet1-0-29700-39600" } ], "afana": [ { "semester": "12HS", "version": "korr_8", "weekday": 1, "class": "1Ia", "from": 45900, "to": 54600, "lecturers": [ "Syn" ], "teaching_type": "on_site", "rooms": [ "4.417" ], "pages": [ 3 ], "id": "1Ia-afana-1-45900-54600" }, { "semester": "12HS", "version": "korr_8", "weekday": 1, "class": "1Ib", "from": 33000, "to": 42300, "lecturers": [ "Syn" ], "teaching_type": "on_site", "rooms": [ "4.427" ], "pages": [ 4 ], "id": "1Ib-afana-1-33000-42300" } ] } } } }, "changelog-html-200": { "description": "OK", "content": { "text/html": { "example": "" } } }, "semester-config-200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/semester-config" }, "example": { "blockclass_file": "Blockmodule.xlsx" } } } }, "changes-200": { "description": "OK", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/change" } }, "example": [ { "name": "prov_5", "changes": "
Initialversion
" }, { "name": "einschr_1", "changes": "Seit der letzten Version hat's neben diversen Raum- und Dozierenden-Änderungen folgende Anpassungen gegeben:
\nVerschiebung / Änderungen:\n
Streichung von:
Keine Angaben
" }, { "name": "korr_2", "changes": "Keine Angaben
" } ] } } }, "blockclasses-200": { "description": "OK", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/blockclass" } }, "example": [ { "weekday": null, "from": 0, "to": 0, "class": "5Me", "name": "aem", "rooms": [], "teachers": [], "teaching_type": "blockmodule", "pages": [ 1 ], "degree_prg": "Maschinenbau", "part_of_other_classes": [], "id": "5Me-aem-b" }, { "weekday": null, "from": 0, "to": 0, "class": "7KGb", "name": "alges", "rooms": [], "teachers": [], "teaching_type": "blockmodule", "pages": [ 1 ], "degree_prg": "Kontext GSW", "part_of_other_classes": [], "id": "7KGb-alges-b" } ] } } }, "classes-200": { "description": "OK", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/class" } }, "example": [ { "weekday": 0, "from": 29700, "to": 64800, "class": "1Da", "name": "dummy", "rooms": [ "5.3B51" ], "teachers": [ "Cur" ], "teaching_type": "on_site", "pages": [ 1 ], "degree_prg": "Data Science", "part_of_other_classes": [], "id": "1Da-dummy-0-29700-64800" }, { "weekday": 1, "from": 29700, "to": 36000, "class": "1Da", "name": "eda", "rooms": [ "5.3B51" ], "teachers": [ "Ped" ], "teaching_type": "on_site", "pages": [ 1 ], "degree_prg": "Data Science", "part_of_other_classes": [], "id": "1Da-eda-1-29700-36000" } ] } } }, "semester-version-config-200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/semester-version-config" }, "example": { "pdf_version": "einschreiben / HS_24_einschr_3", "export_date": "17.06.2024 15:07:00", "parse_date": "04.10.2024 17:45:10" } } } }, "klassen-pdf-200": { "description": "OK", "content": { "application/vnd.ms-excel": { "example": "" } } } }, "parameters": { "semester": { "name": "semester", "in": "path", "description": "Semester", "required": true, "schema": { "type": "string", "summary": "Name of the semester. To fetch the latest semester, use `latest`" } }, "version": { "name": "version", "in": "path", "description": "Semester version", "required": true, "schema": { "type": "string", "summary": "Name of the version. To fetch the latest version, use `latest`" } } } } }