-
-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathopenapi.yaml
2359 lines (2336 loc) · 83.1 KB
/
openapi.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
openapi: 3.1.0
info:
title: NavigaTUM
description: |
Navigating around TUM with excellence – An API to search for rooms,
buildings and other places
NavigaTUM is a tool developed by students for students, to help you get around at [TUM](https://tum.de). Feel free to contribute.
Features:
- Interactive or static maps to lookup the position of rooms or buildings
- Fast and typo-tolerant search
- Support for different room code formats as well as generic names
All functionality is also available via an API.
*Note: Not all buildings in NavigaTUM are owned by TUM, but are instead being used by TUM departments.*
termsOfService: 'https://nav.tum.de/about/privacy'
contact:
name: TUM-Dev
url: 'https://www.tum.app/'
email: [email protected]
license:
name: GPL v3
url: 'https://www.gnu.org/licenses/'
version: 1.0.0
servers:
- url: 'https://nav.tum.de'
description: https
paths:
/api/search:
get:
operationId: search
summary: Search entries
description: |
This endpoint is designed to support search-as-you-type results.
Instead of simply returning a list, the search results are returned in a way to provide a richer experience by splitting them up into sections. You might not necessarily need to implement all types of sections, or all sections features (if you just want to show a list). The order of sections is a suggested order to display them, but you may change this as you like.
Some fields support highlighting the query terms and it uses \x19 and \x17 to mark the beginning/end of a highlighted sequence.
(See [Wikipedia](https://en.wikipedia.org/wiki/C0_and_C1_control_codes#Modified_C0_control_code_sets)).
Some text-renderers will ignore them, but in case you do not want to use them, you might want to remove them from the responses via empty `pre_highlight` and `post_highlight` query parameters.
parameters:
- name: q
in: query
description: |
string you want to search for.
Note, that the amounts returned can be controlled using the limit\* paramerters.
The following query-filters are supported:
- `in:<parent>`: Only return rooms in the given parent (e.g. `in:5304` or `in:garching`)
alternative syntax:
- `@<parent>`
- `usage:<type>`: Only return entries of the given usage (e.g. `usage:wc` or `usage:büro`)
alternative syntax:
- `nutzung:<usage>`
- `=<usage>`
- `type:<type>`: Only return entries of the given type (e.g. `type:building` or `type:room`)
required: true
schema:
type: string
examples:
'5304':
summary: A 'misspelled' (according to tumonline) lecture-hall
value: mi hs1
garching:
summary: A misspelled campus
value: sfarching
fsmpi:
summary: A regular room
value: 5606.EG.036
interims:
summary: Lecture halls
value: interims
sv:
summary: common name
value: AStA
none:
summary: All rooms
value: ''
- name: limit_buildings
in: query
description: |
Maximum number of buildings/sites to return.
Clamped to 0..1000. If this is an problem for you, please open an issue.
schema:
type: integer
default: 5
maximum: 1000
minimum: 0
- name: limit_rooms
in: query
description: |
Maximum number of rooms to return.
Clamped to 0..1000. If this is an problem for you, please open an issue.
schema:
type: integer
default: 10
maximum: 1000
minimum: 0
- name: limit_all
in: query
description: |
Overall maximum number of results. Only visible results are counted (i.e. hidden buildings are not counted).
Clamped to 1..1000. If this is an problem for you, please open an issue.
schema:
type: integer
default: 10
maximum: 1000
minimum: 1
- name: pre_highlight
in: query
description: |
string to include in front of highlighted sequences.
If this and `post_highlight` are empty, highlighting is disabled.
schema:
type: string
default: /u0019
maxLength: 25
minLength: 0
examples:
default:
summary: 'The default value (See [Wikipedia](https://en.wikipedia.org/wiki/C0_and_C1_control_codes#Modified_C0_control_code_sets)).'
value: /u0019
em:
summary: A good alternative default value
value: <em>
ais-highlight:
summary: Another good alternative
value: <ais-highlight-00000000>
- name: post_highlight
in: query
description: |
string to include after the highlighted sequences.
If this and `pre_highlight` are empty, highlighting is disabled.
schema:
type: string
default: /u0017
maxLength: 25
minLength: 0
examples:
default:
summary: 'The default value (See [Wikipedia](https://en.wikipedia.org/wiki/C0_and_C1_control_codes#Modified_C0_control_code_sets)).'
value: /u0017
em:
summary: A good alternative default value
value: </em>
ais-highlight:
summary: Another good alternative
value: </ais-highlight-00000000>
responses:
'200':
description: The search-result
content:
application/json:
schema:
$ref: '#/components/schemas/SearchResponse'
examples:
mw:
value:
sections:
- facet: sites_buildings
entries:
- id: mw
type: joined_building
name: "Maschinenwesen (\x19MW\x17)"
subtext: Gebäudekomplex
- id: '5501'
type: building
name: 'Gebäudeteil 1, Institut für Mechatronik'
subtext: Gebäudeteil
- id: '5502'
type: building
name: 'Gebäudeteil 2, Institut für Werkstoffe und Verarbeitung'
subtext: Gebäudeteil
- id: '5503'
type: building
name: 'Gebäudeteil 3, Institut für Produktionstechnik'
subtext: Gebäudeteil
n_visible: 5
estimatedTotalHits: 20
- facet: rooms
entries:
- id: 5510.03.002
type: room
name: "5510.03.002 (\x19MW\x17 2001, Empore)"
subtext: Maschinenwesen (MW)
subtext_bold: 3002@5510
- id: 5510.01.004A
type: room
name: "5510.01.004A (Exp.-Bühne zu Hörsaal \x19MW\x17 2001)"
subtext: Maschinenwesen (MW)
subtext_bold: 1004a@5510
- id: 5502.01.250
type: room
name: 5502.01.250 (Hörsaal)
subtext: Maschinenwesen (MW)
subtext_bold: 1250@5502
- id: 5502.EG.250
type: room
name: 5502.EG.250 (Ludwig-Prandtl-Hörsaal)
subtext: Maschinenwesen (MW)
subtext_bold: 0250@5502
- id: 5503.EG.350
type: room
name: 5503.EG.350 (Egbert-von-Hoyer-Hörsaal)
subtext: Maschinenwesen (MW)
subtext_bold: 0350@5503
estimatedTotalHits: 3655
time_ms: 16
nothing:
value:
sections:
- facet: sites_buildings
entries: []
estimatedTotalHits: 0
- facet: rooms
entries: []
estimatedTotalHits: 0
time_ms: 6
interims-2:
value:
sections:
- facet: sites_buildings
entries:
- id: '5416'
type: building
name: "\x19Interims\x17hörsäle II, Jürgen Manchot-Hörsaalgebäude"
subtext: Gebäude
n_visible: 1
estimatedTotalHits: 1
- facet: rooms
entries:
- id: 5416.01.004
type: room
name: "5416.01.004 (Hörsaal 1 \"\x19Interims\x17 II\")"
subtext: 'Interimshörsäle II, Jürgen Manchot-Hörsaalgebäude'
subtext_bold: 004@5416
- id: 5416.01.003
type: room
name: "5416.01.003 (Hörsaal \x192\x17, \"\x19Interims\x17 II\")"
subtext: 'Interimshörsäle II, Jürgen Manchot-Hörsaalgebäude'
subtext_bold: 003@5416
- id: 5620.01.102
type: room
name: "56\x192\x170.01.10\x192\x17 (Hörsaal \x192\x17, \"\x19Interims\x17 I\")"
subtext: Interims-Audimax I
subtext_bold: "10\x192\x17@56\x192\x170"
- id: 5416.EG.010
type: room
name: 5416.EG.010 (IT/Audio)
subtext: 'Interimshörsäle II, Jürgen Manchot-Hörsaalgebäude'
subtext_bold: 010@5416
estimatedTotalHits: 23
time_ms: 23
'400':
description: Invalid Request
'404':
description: '`search_query` is empty. Since searching for nothing is nonsensical, we dont support this.'
content:
text/plain:
schema:
type: string
example: Not found
enum:
- Not found
'414':
description: The uri you are trying to request is unreasonably long. Search querys dont have thousands of chars..
tags:
- core
'/api/get/{id}':
get:
operationId: details
summary: Get entry-details
description: |
This returns the full data available for the entry (room/building).
This is more data, that should be supplied once a user clicks on an entry.
Preloading this is not an issue on our end, but keep in mind bandwith constraints on your side.
The data can be up to 50kB (using gzip) or 200kB unzipped.
The more about this data format is described in the NavigaTUM-data documentation
parameters:
- name: lang
in: query
description: 'The language you want your details to be in. If either this or the query parameter is set to en, this will be delivered.'
required: false
schema:
type: string
default: de
enum:
- de
- en
- name: id
in: path
description: string you want to search for
required: true
schema:
type: string
examples:
'5304':
summary: A normal building
value: '5304'
root:
summary: The root entry of the NavigaTUM-data
value: root
garching:
summary: The garching campus
value: garching
mri:
summary: The MRI campus
value: garching
mi:
summary: 'A large, (custom named) building'
value: mi
mw:
summary: 'An other large, (custom named) building'
value: mw
fsmpi:
summary: A regular room
value: 5606.EG.036
rechnerhalle:
summary: A room with custom props added
value: 5605.EG.011
tb-chemie:
summary: A virtual room
value: 5401.01.100A
humangenetik:
summary: A virtual room
value: Gebäude 1543
responses:
'200':
description: More data about the requested building/room
content:
application/json:
schema:
discriminator:
propertyName: type
mapping:
root: RootResponse
room: DetailsResponse
building: DetailsResponse
joined_building: DetailsResponse
area: DetailsResponse
site: DetailsResponse
campus: DetailsResponse
oneOf:
- $ref: '#/components/schemas/RootResponse'
- $ref: '#/components/schemas/DetailsResponse'
examples:
mi-hs-1:
value:
parent_names:
- Standorte
- Garching Forschungszentrum
- Fakultät Mathematik & Informatik (FMI oder MI)
- Hörsaal 1 (BT02)
id: 5602.EG.001
type: room
name: '5602.EG.001 (MI HS 1, Friedrich L. Bauer Hörsaal)'
parents:
- root
- garching
- mi
- '5602'
props:
calendar_url: 'https://campus.tum.de/tumonline/tvKalender.wSicht?cOrg=19691&cRes=12559&cReadonly=J'
operator:
code: TUZVZA4
name: Immobilien (ZA 4)
url: 'https://campus.tum.de/tumonline/webnav.navigate_to?corg=19691'
id: 19691
tumonline_room_nr: 12325
computed:
- name: Raumkennung
text: 5602.EG.001
- name: Architekten-Name
text: 00.02.001
- name: Stockwerk
text: Erdgeschoss
- name: Adresse
text: 'Boltzmannstr. 3, 85748 Garching b. München'
usage:
name: Hörsaal
din_277: NF5.1
din_277_desc: Unterrichtsräume mit festem Gestühl
sources:
base:
- name: TUMonline
url: 'https://campus.tum.de/tumonline/ee/ui/ca2/app/desktop/#/pl/ui/$ctx/wbRaum.editRaum?pRaumNr=12325'
- name: Roomfinder
url: 'https://portal.mytum.de/displayRoomMap?roomid=00.02.001@5602&disable_decoration=yes'
coords:
lat: 48.26244490906312
lon: 11.669122601167174
source: roomfinder
maps:
roomfinder:
available:
- scale: '500'
id: rf87
name: FMI Garching BT02 EG
width: 399
height: 487
x: 234
'y': 286
source: Roomfinder
file: rf87.webp
- scale: '2000'
id: rf142
name: FMI Übersicht
width: 639
height: 461
x: 499
'y': 189
source: Roomfinder
file: rf142.webp
- scale: '10000'
id: rf80
name: Lageplan Campus Garching
width: 676
height: 480
x: 340
'y': 334
source: Roomfinder
file: rf80.webp
- scale: '200000'
id: rf54
name: München
width: 640
height: 603
x: 444
'y': 35
source: Roomfinder
file: rf54.webp
- scale: '400000'
id: rf156
name: München und Umgebung
width: 420
height: 515
x: 265
'y': 167
source: Roomfinder
file: rf156.webp
default: rf87
overlays:
available:
- id: -1
floor: U1
file: mi_-1.webp
name: MI Gebäude (UG) – © TUM WWW & Online Services
coordinates:
- - 11.666739
- 48.263478
- - 11.669666
- 48.263125
- - 11.669222
- 48.261585
- - 11.666331
- 48.261929
- id: 0
floor: EG
file: mi_0.webp
name: MI Gebäude (EG) – © TUM WWW & Online Services
coordinates:
- - 11.666739
- 48.263478
- - 11.669666
- 48.263125
- - 11.669222
- 48.261585
- - 11.666331
- 48.261929
- id: 1
floor: '01'
file: mi_1.webp
name: MI Gebäude (1.OG) – © TUM WWW & Online Services
coordinates:
- - 11.666739
- 48.263478
- - 11.669666
- 48.263125
- - 11.669222
- 48.261585
- - 11.666331
- 48.261929
- id: 2
floor: '02'
file: mi_2.webp
name: MI Gebäude (2.OG) – © TUM WWW & Online Services
coordinates:
- - 11.666739
- 48.263478
- - 11.669666
- 48.263125
- - 11.669222
- 48.261585
- - 11.666331
- 48.261929
- id: 3
floor: '03'
file: mi_3.webp
name: MI Gebäude (3.OG) – © TUM WWW & Online Services
coordinates:
- - 11.666739
- 48.263478
- - 11.669666
- 48.263125
- - 11.669222
- 48.261585
- - 11.666331
- 48.261929
- id: 4
floor: '04'
file: mi_4.webp
name: MI Gebäude (4.OG) – © TUM WWW & Online Services
coordinates:
- - 11.666739
- 48.263478
- - 11.669666
- 48.263125
- - 11.669222
- 48.261585
- - 11.666331
- 48.261929
default: 0
default: interactive
type_common_name: Hörsaal
ranking_factors:
rank_type: 100
rank_usage: 900
rank_combined: 900
aliases:
- 00.02.001@5602
redirect_url: /room/5602.EG.001
5606.EG.036:
value:
parent_names:
- Standorte
- Garching Forschungszentrum
- Fakultät Mathematik & Informatik (FMI oder MI)
- Finger 06 (BT06)
name: 5606.EG.036 (Büro Fachschaft Mathe Physik Informatik Chemie / MPIC)
short_name: MPIC Büro
sources:
base:
- name: NavigaTUM
- name: TUMonline
url: 'https://campus.tum.de/tumonline/ee/ui/ca2/app/desktop/#/pl/ui/$ctx/wbRaum.editRaum?pRaumNr=55601'
- name: Roomfinder
url: 'https://portal.mytum.de/displayRoomMap?roomid=00.06.036@5606&disable_decoration=yes'
id: 5606.EG.036
type: room
parents:
- root
- garching
- mi
- '5606'
props:
operator:
code: TUVBMPI
name: Fachschaftsverbund Mathematik/Physik/Informatik/Chemie
url: 'https://campus.tum.de/tumonline/webnav.navigate_to?corg=45500'
id: 45500
tumonline_room_nr: 55601
computed:
- name: Raumkennung
text: 5606.EG.036
- name: Architekten-Name
text: 00.06.036
- name: Stockwerk
text: Erdgeschoss
- name: Adresse
text: 'Boltzmannstr. 3, 85748 Garching b. München'
usage:
name: Büro
din_277: NF2.1
din_277_desc: Büroräume
coords:
lat: 48.26217845031176
lon: 11.668693278105701
source: roomfinder
maps:
roomfinder:
available:
- scale: '500'
id: rf95
name: FMI Garching BT06 EG
width: 318
height: 605
x: 207
'y': 217
source: Roomfinder
file: rf95.webp
- scale: '2000'
id: rf142
name: FMI Übersicht
width: 639
height: 461
x: 443
'y': 242
source: Roomfinder
file: rf142.webp
- scale: '10000'
id: rf80
name: Lageplan Campus Garching
width: 676
height: 480
x: 329
'y': 344
source: Roomfinder
file: rf80.webp
- scale: '200000'
id: rf54
name: München
width: 640
height: 603
x: 444
'y': 36
source: Roomfinder
file: rf54.webp
- scale: '400000'
id: rf156
name: München und Umgebung
width: 420
height: 515
x: 265
'y': 167
source: Roomfinder
file: rf156.webp
default: rf95
overlays:
available:
- id: -1
floor: U1
file: mi_-1.webp
name: MI Gebäude (UG) – © TUM WWW & Online Services
coordinates:
- - 11.666739
- 48.263478
- - 11.669666
- 48.263125
- - 11.669222
- 48.261585
- - 11.666331
- 48.261929
- id: 0
floor: EG
file: mi_0.webp
name: MI Gebäude (EG) – © TUM WWW & Online Services
coordinates:
- - 11.666739
- 48.263478
- - 11.669666
- 48.263125
- - 11.669222
- 48.261585
- - 11.666331
- 48.261929
- id: 1
floor: '01'
file: mi_1.webp
name: MI Gebäude (1.OG) – © TUM WWW & Online Services
coordinates:
- - 11.666739
- 48.263478
- - 11.669666
- 48.263125
- - 11.669222
- 48.261585
- - 11.666331
- 48.261929
- id: 2
floor: '02'
file: mi_2.webp
name: MI Gebäude (2.OG) – © TUM WWW & Online Services
coordinates:
- - 11.666739
- 48.263478
- - 11.669666
- 48.263125
- - 11.669222
- 48.261585
- - 11.666331
- 48.261929
- id: 3
floor: '03'
file: mi_3.webp
name: MI Gebäude (3.OG) – © TUM WWW & Online Services
coordinates:
- - 11.666739
- 48.263478
- - 11.669666
- 48.263125
- - 11.669222
- 48.261585
- - 11.666331
- 48.261929
- id: 4
floor: '04'
file: mi_4.webp
name: MI Gebäude (4.OG) – © TUM WWW & Online Services
coordinates:
- - 11.666739
- 48.263478
- - 11.669666
- 48.263125
- - 11.669222
- 48.261585
- - 11.666331
- 48.261929
default: 0
default: interactive
type_common_name: Büro
ranking_factors:
rank_type: 100
rank_usage: 100
rank_combined: 100
aliases:
- 00.06.036@5606
redirect_url: /room/5606.EG.036
'404':
description: Invalid input
content:
text/plain:
schema:
type: string
example: Not found
enum:
- Not found
tags:
- core
'/api/calendar/{id}':
get:
operationId: calendar
summary: Get a entry-preview
description: |
This returns the a 1200x630px preview for the entry (room/building/..).
This is usefull for implementing custom OpenGraph images for detail previews.
parameters:
- name: start
in: query
description: The first allowed time the calendar would like to display
required: true
schema:
type: string
format: date-time
- name: end
in: query
description: The last allowed time the calendar would like to display
required: true
schema:
type: string
format: date-time
- name: id
in: path
description: string you want to search for
required: true
schema:
type: string
examples:
'5304':
summary: A normal building
value: '5304'
root:
summary: The root entry of the NavigaTUM-data
value: root
garching:
summary: The garching campus
value: garching
mri:
summary: The MRI campus
value: garching
mi:
summary: 'A large, (custom named) building'
value: mi
mw:
summary: 'An other large, (custom named) building'
value: mw
fsmpi:
summary: A regular room
value: 5606.EG.036
rechnerhalle:
summary: A room with custom props added
value: 5605.EG.011
tb-chemie:
summary: A virtual room
value: 5401.01.100A
humangenetik:
summary: A virtual room
value: '1543'
responses:
'200':
description: More entries of the calendar in the requested time span
content:
application/json:
schema:
$ref: '#/components/schemas/CalendarResponse'
'404':
description: Invalid input
content:
text/plain:
schema:
type: string
example: Not found
enum:
- Not found
'503':
description: 'Not Ready, please retry later'
content:
text/plain:
schema:
type: string
example: Waiting for first sync with TUMonline
enum:
- Waiting for first sync with TUMonline
tags:
- core
'/api/preview/{id}':
get:
operationId: previews
summary: Get a entry-preview
description: |
This returns the a 1200x630px preview for the entry (room/building/..).
This is usefull for implementing custom OpenGraph images for detail previews.
parameters:
- name: lang
in: query
description: 'The language you want your preview to be in. If either this or the query parameter is set to en, this will be delivered.'
required: false
schema:
type: string
default: de
enum:
- de
- en
- name: id
in: path
description: string you want to search for
required: true
schema:
type: string
examples:
'5304':
summary: A normal building
value: '5304'
root:
summary: The root entry of the NavigaTUM-data
value: root
garching:
summary: The garching campus
value: garching
mri:
summary: The MRI campus
value: garching
mi:
summary: 'A large, (custom named) building'
value: mi
mw:
summary: 'An other large, (custom named) building'
value: mw
fsmpi:
summary: A regular room
value: 5606.EG.036
rechnerhalle:
summary: A room with custom props added
value: 5605.EG.011
tb-chemie:
summary: A virtual room
value: 5401.01.100A
humangenetik:
summary: A virtual room
value: '1543'
responses:
'200':
description: More data about the requested building/room
content:
image/png: {}
'404':
description: Invalid input
content:
text/plain:
schema:
type: string
example: Not found
enum:
- Not found
tags:
- maps
/api/feedback/get_token:
post:
operationId: get_token
summary: Get a feedback-token
description: |
***Do not abuse this endpoint.***
This returns a JWT token usable for submitting feedback.
You should request a token, ***if (and only if) a user is on a feedback page***
As a rudimentary way of rate-limiting feedback, this endpoint returns a token.
To post feedback, you will need this token.
Tokens gain validity after 5s, and are invalid after 12h of being issued.
They are not refreshable, and are only valid for one usage.
***Important Note:***
Global Rate-Limiting allows bursts with up to 20 requests and replenishes 50 requests per day
responses:
'201':
description: Returns a usable token
content:
application/json:
schema:
$ref: '#/components/schemas/TokenResponse'
'429':
description: |
Too many requests.
We are rate-limiting everyone's requests, please try again later.
'503':
description: |
Service unavailable.
We have not configured a GitHub Access Token or a JWT Key.
This could be because we are experiencing technical difficulties or intentional if we experience abuse of these endpoints.
Please try again later.
tags:
- feedback
/api/feedback/feedback:
post:
operationId: post_feedback
summary: Post feedback
description: |
***Do not abuse this endpoint.***
This posts the actual feedback to github and returns the github link.
This API will create issues instead of pull-requests => all feedback is allowed, but `/api/feedback/propose_edit` is prefered, if it can be posted there.
For this Endpoint to work, you need to generate a token via the `/api/feedback/get_token` endpoint.
***Important Note:*** Tokens are only used if we return a 201 Created response. Otherwise, they are still valid
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/PostFeedbackRequest'
responses:
'201':
description: |
The feedback has been successfully posted to GitHub.
We return the link to the GitHub issue.
content:
text/plain:
schema:
type: string
example: 'https://github.com/TUM-Dev/navigatum/issues/9'
'400':
description: If not all fields in the body are present as defined above
'403':
description: |
Forbidden. Causes are (delivered via the body):
- `Invalid token`: You have not supplied a token generated via the `gen_token`-Endpoint.
- `Token not old enough, please wait`: Tokens are only valid after 10s.
- `Token expired`: Tokens are only valid for 12h.
- `Token already used`: Tokens are non reusable/refreshable single-use items.
content:
text/plain:
schema:
type: string
enum:
- Invalid token
- 'Token not old enough, please wait'
- Token expired
- Token already used
'422':
description: |
Unprocessable Entity
Subject or body missing or too short.
'451':
description: |
Unavailable for legal reasons.
Using this endpoint without accepting the privacy policy is not allowed.
For us to post to GitHub, this has to be true
'500':
description: |
Internal Server Error.
We have a problem communicating with GitHubs servers. Please try again later.
'503':
description: |
Service unavailable.
We have not configured a GitHub Access Token.
This could be because we are experiencing technical difficulties or intentional. Please try again later.
tags:
- feedback
/api/feedback/propose_edit:
post:
operationId: propose_edit
summary: Post Edit-Requests
description: |
***Do not abuse this endpoint.***