Skip to content
Snippets Groups Projects
Commit d53c0021 authored by Jonas Zohren's avatar Jonas Zohren :speech_balloon:
Browse files

Basic docs for TU Dortmund-APIs

parents
No related branches found
No related tags found
No related merge requests found
README.md 0 → 100644
# TU Dortmund-API
## Auth
Die TU benutzt einen OAuth-Login für die Authorisierung der App-APIs.
### Login
```
POST https://mobil.itmc.tu-dortmund.de/oauth2/v2/access_token
{"username":"XXX","password":"XXX","grant_type":"password"}
```
Gibt dann zurück:
```json
{
"scope": "uid x-de-tudortmund-matr employeeType eduPersonAffiliation givenname sn x-de-tudortmund-ScopedAffiliation employeeNumber",
"expires_in": 1799,
"token_type": "Bearer",
"refresh_token": "<refresh-token>",
"access_token": "<access-token>"
}
```
Den `<access-token>` kann man dann bei späteren, authorisierten Requests als Header mitsenden: `Authorization: Bearer <access-token>`
**`GET https://mobil.itmc.tu-dortmund.de/oauth2/v2/tokeninfo`** (mit Auth):
```json
{
"name": "<sm... username>",
"roles": [
"student",
"member"
],
"sn": "<lastname>",
"givenname": "<firstname>",
"scope": [
"uid",
"x-de-tudortmund-matr",
"employeeType",
"eduPersonAffiliation",
"givenname",
"sn",
"x-de-tudortmund-ScopedAffiliation",
"employeeNumber"
],
"realm": "/tuapp",
"uid": "<sm... username>",
"eduPersonAffiliation": [
"student",
"member"
],
"token_type": "Bearer",
"expires_in": 1799,
"access_token": "<access_token>",
"x-de-tudortmund-matr": "<matrx_nr>",
"grant_type": "password",
"auth_level": 0,
"client_id": "mobile-app"
}
```
## Semesterticket
### Tickets auflisten:
**`GET https://mobil.itmc.tu-dortmund.de/ticket/v4/tickets`** (mit Auth):
```json
[
"20211",
"20212"
]
```
SemesterId ist z.B. `20211` für SoSe 2021 und `20212` für WiSe 2021/2022
### Ticket als PNG anfordern:
**`GET https://mobil.itmc.tu-dortmund.de/ticket/v4/png-tickets/<semesterId>`** (mit Auth):
```json
{
"semesterId": "<semesterId>",
"ticketData": "<png-data>"
}
```
`<png-data>` is a base64 encoded PNG of the ticket.
## LSF
### Liste der Semester:
**`GET https://mobil.itmc.tu-dortmund.de/lsf/v3/semesters`**
### Semester-Infos:
**`GET https://mobil.itmc.tu-dortmund.de/lsf/v3/20211/header/`**
### Navigation im Veranstaltungsbaum:
**`GET https://mobil.itmc.tu-dortmund.de/lsf/v3/20211/header/118250`**
### Veranstaltungsdetails:
**`GET https://mobil.itmc.tu-dortmund.de/lsf/v3/20211/courseDetails/235739`**
## Personensuche
**`GET https://mobil.itmc.tu-dortmund.de/employee-data/v2/employees?q=<suchstring>&offset=0&limit=10`**
## Abfahrtsmonitor
### Liste der Stationen:
**`GET https://mobil.itmc.tu-dortmund.de/departure/v1/stations`**
### Abfahrten an einer Station:
**`GET https://mobil.itmc.tu-dortmund.de/departure/v1/stations/20000472/departures`**
## Gebäude
**`GET https://service.tu-dortmund.de/o/edu.udo.itmc.dev.presencetracking/conjectfm/rest/v2/buildings`**
**`GET https://service.tu-dortmund.de/o/edu.udo.itmc.dev.presencetracking/conjectfm/rest/v2/buildings/<building-id>/floors`**
**`GET https://service.tu-dortmund.de/o/edu.udo.itmc.dev.presencetracking/conjectfm/rest/v2/buildings/floors/<floor-id>/rooms`**
Alternativer Endpunkt dieser API: `https://mobil.itmc.tu-dortmund.de/conjectfm/v2/buildings`
## Mensa
### Übersicht:
**`GET https://mobil.itmc.tu-dortmund.de/canteen-menu/v3/canteens`**
```json
[
{
"id": "341",
"name": {
"de": "Hauptmensa",
"en": "Hauptmensa"
}
},
{
"id": "342",
"name": {
"de": "Mensa Süd",
"en": "Mensa Süd"
}
}
]
```
### Menü:
**`GET https://mobil.itmc.tu-dortmund.de/canteen-menu/v3/canteens/<canteen-id>`**
**`GET https://mobil.itmc.tu-dortmund.de/canteen-menu/v3/canteens/<canteen-id>/2021-08-26?expand=true`**
```json
[
{
"title": {
"de": "Veganer Rigatonigratin mit Gemüse und Knoblauch (2,4,7,20a,25,28)",
"en": "Veganer Rigatonigratin mit Gemüse und Knoblauch (2,4,7,20a,25,28)"
},
"type": [
"N"
],
"additives": [
"2",
"4",
"20a",
"25",
"28"
],
"category": "104",
"price": {
"student": "2,00 €",
"staff": "3,50 €",
"guest": "3,50 €"
},
"dispoId": "2635432",
"counter": "Vegetarisches Menü",
"position": 4
},
{
"title": {
"de": "gebratene Ravioli mit Spinat u. Kürbiskernen (20a) dazu Käsesauce (2,4,26) und Salat (7,20a,22,26)",
"en": "gebratene Ravioli mit Spinat u. Kürbiskernen (20a) dazu Käsesauce (2,4,26) und Salat (7,20a,22,26)"
},
"type": [
"V"
],
"additives": [
"2",
"4",
"20a",
"26"
],
"category": "105",
"price": {
"student": "2,00 €",
"staff": "3,50 €",
"guest": "3,50 €"
},
"dispoId": "2635725",
"counter": "Aktionsteller",
"position": 5
}
]
```
### Öffnungszeiten:
**`GET https://mobil.itmc.tu-dortmund.de/canteen-menu/v3/canteens/<canteen-id>/openings`**
```json
{
"morningStartTime": "11:30:00",
"morningEndTime": "14:00:00",
"afternoonStartTime": null,
"afternoonEndTime": null
}
```
## Sonder-Tiles
![](https://md.fachschaften.org/uploads/upload_ebc176983206613d3e7df46dc3144c09.png)
### Liste der verfügbaren Sondertiles abrufen:
**`GET https://mobil.itmc.tu-dortmund.de/tiles/v2`**:
```json
[
{
"id": 6,
"name": [
{
"id": 21,
"locale": "de_DE",
"value": "Online-Wahlen"
},
{
"id": 22,
"locale": "en_US",
"value": "Online Elections"
}
],
"start": "2021-06-22T08:00:44+02:00",
"end": "2021-07-01T15:00:44+02:00",
"state": "ACTIVE"
},
{
"id": 10,
"name": [
{
"id": 37,
"locale": "de_DE",
"value": "Jetzt bewerben!"
},
{
"id": 38,
"locale": "en_US",
"value": "Apply now!"
}
],
"start": "2021-08-15T01:00:14+02:00",
"end": "2021-09-15T01:00:14+02:00",
"state": "ACTIVE"
}
]
```
### Details zu den Tiles:
**`GET https://mobil.itmc.tu-dortmund.de/tiles/v2/<tile-id>`**:
```json
{
"id": 10,
"name": [
{
"id": 37,
"locale": "de_DE",
"value": "Jetzt bewerben!"
},
{
"id": 38,
"locale": "en_US",
"value": "Apply now!"
}
],
"content": [
{
"id": 39,
"locale": "de_DE",
"value": "<h2>Deutsch­land­stipen­dium an der TU Dortmund: Noch bis zum 15. September bewerben!</h2><p>....</p>"
},
{
"id": 40,
"locale": "en_US",
"value": "<h2>Deutschlandstipendium: Apply by September 15, 2021!</h2><h2><br></h2>..."
}
],
"start": "2021-08-15T01:00:14+02:00",
"end": "2021-09-15T01:00:14+02:00",
"state": "ACTIVE"
}
```
### SVG icons zu den Tiles:
**`GET https://mobil.itmc.tu-dortmund.de/tiles/v2/<tile-id>/icon`**:
```
svg data halt...
```
## Corona-Tracing:
**`GET https://mobil.itmc.tu-dortmund.de/presencetracking-backend/v1/contactdata/data`** (mit Auth):
```json
{
"email":null,
"telephone":"<nummer>"
}
```
Liefert also die im Service-Portal hinterlegten Adressdaten
## Stundenplan
**`GET https://mobil.itmc.tu-dortmund.de/lsf/v3/lsfEvents?date=2021-07-06`** (mit Auth):
```json
[
{
"name": "Effiziente Algorithmen",
"type": "Wahlpflichtvorlesung",
"courseId": "235720",
"startTime": "2021-07-06T10:15:00.000+02:00",
"endTime": "2021-07-06T12:00:00.000+02:00",
"rhythmStartDate": "2021-04-12T10:15:00.000+02:00",
"rhythmEndDate": "2021-07-23T12:00:00.000+02:00",
"building": "k.A.",
"room": "online",
"rhythm": "wöchentlich",
"approvalStatus": "SP",
"responsiblePersons": [
{
"firstName": "Bernd Thomas",
"lastName": "Zey",
"gender": "M",
"responsibility": ""
}
],
"dayOfWeek": "Dienstag"
},
{
"name": "Rechnerarchitektur",
"type": "Wahlpflichtvorlesung",
"courseId": "235681",
"startTime": "2021-07-06T12:15:00.000+02:00",
"endTime": "2021-07-06T14:00:00.000+02:00",
"rhythmStartDate": "2021-04-12T12:15:00.000+02:00",
"rhythmEndDate": "2021-07-23T14:00:00.000+02:00",
"building": "k.A.",
"room": "online",
"rhythm": "wöchentlich",
"approvalStatus": "ZU",
"responsiblePersons": [
{
"firstName": "Christian",
"lastName": "Hakert",
"gender": "M",
"responsibility": "begleitend"
},
{
"firstName": "Jian-Jia",
"lastName": "Chen",
"gender": "M",
"responsibility": "verantwort"
}
],
"dayOfWeek": "Dienstag"
},
{
"name": "Softwaretechnik/Softwaretechnik für Wirtschaftsmathematik",
"type": "Vorlesung",
"courseId": "235728",
"startTime": "2021-07-06T16:15:00.000+02:00",
"endTime": "2021-07-06T18:00:00.000+02:00",
"rhythmStartDate": "2021-04-12T16:15:00.000+02:00",
"rhythmEndDate": "2021-07-23T18:00:00.000+02:00",
"building": "k.A.",
"room": "online",
"rhythm": "wöchentlich",
"approvalStatus": "ZU",
"responsiblePersons": [
{
"firstName": "Benjamin",
"lastName": "Hermann",
"gender": "M",
"responsibility": ""
},
{
"firstName": "Falk",
"lastName": "Howar",
"gender": "M",
"responsibility": ""
},
{
"firstName": "Stefan",
"lastName": "Dissmann",
"gender": "M",
"responsibility": ""
}
],
"dayOfWeek": "Dienstag"
}
]
```
## "Leistungen" / BOSS-Prüfungsdaten
**`GET https://mobil.itmc.tu-dortmund.de/lsf/v3/courses`** (mit Auth):
```json
[
{
"labID": "5776334",
"pnr": "65691",
"leistung": "Modulprüfung: Rechnerarchitektur",
"pstatusKurz": "AN",
"pstatus": "angemeldet",
"pnote": "",
"pdatum": "14.09.2021",
"prueferNachname": "Chen",
"prueferVorname": "Jian-Jia",
"vermerkKurz": "",
"vermerk": "",
"partKurz": "MO",
"part": "Modulprüfung",
"aenddat": "22.08.2021"
},
{
"labID": "5707146",
"pnr": "87891",
"leistung": "Modulprüfung: Datenbanken in der Praxis",
"pstatusKurz": "AN",
"pstatus": "angemeldet",
"pnote": "",
"pdatum": "05.08.2021",
"prueferNachname": "Teubner",
"prueferVorname": "Jens",
"vermerkKurz": "RT",
"vermerk": "Stornierung Online",
"partKurz": "MO",
"part": "Modulprüfung",
"aenddat": "06.07.2021"
},
{
"labID": "5673901",
"pnr": "87841",
"leistung": "Studienleistung: Übungen zu Datenbanken in der Praxis",
"pstatusKurz": "BE",
"pstatus": "bestanden",
"pnote": "",
"pdatum": "",
"prueferNachname": "",
"prueferVorname": "",
"vermerkKurz": "BE",
"vermerk": "Eintrag BE, unbenotet",
"partKurz": "SL",
"part": "Studienleistungen",
"aenddat": "23.06.2021"
}
]
```
## CampusID / UniBib-Ausweis
### CampusID / Digitaler Bibliotheksausweis als QR-Code anfordern:
**`GET https://mobil.itmc.tu-dortmund.de/campus-id/v1/totp/secret`** (mit Auth)
```json
{
"uuid": "<uuid>,
"secret": "<secret>",
"createdDate": "2021-08-27T12:13:25.127+02:00",
"lastAccessDate": "2021-08-27T12:13:25.127+02:00",
"expirationDate": "2021-11-25T12:13:25.127+01:00"
}
```
Daraus wird dann ein QR-Code nach folgendem URL-Schema generiert:
```
tudo://app/campusId/v1/auth?uuid=<uuid>&totp=<6-digit-totp>
```
Die uuid wird übernommen.
Zeitfenster für TOTP generation: 30 Sekunden
### CampusID / Digitalen Bibliotheksausweis überprüfen:
**`GET https://mobil.itmc.tu-dortmund.de/campus-id/v1/totp/valid?uuid=<uuid>&totp=<6-digit-totp>`**:
```json
{
"valid":true
}
```
## Uni-Bibliothek
### Liste der Vormerkungen
**`GET https://mobil.itmc.tu-dortmund.de/library-account/v3/items/reserved`** (mit Auth):
```json
[]
```
### Liste der Ausleihen
**`GET https://mobil.itmc.tu-dortmund.de/library-account/v3/items/borrowed`** (mit Auth):
```json
[]
```
### Liste der Bestellungen
**`GET https://mobil.itmc.tu-dortmund.de/library-account/v3/items/ordered`** (mit Auth):
```json
[]
```
### Liste der Säumnisgebühren
**`GET https://mobil.itmc.tu-dortmund.de/library-account/v3/items/fees`** (mit Auth):
```json
[]
```
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment