source: src/mapservice/openapi.yaml@ 8f3d1dd

debian/bullseye
Last change on this file since 8f3d1dd was adda9f2, checked in by Joachim Langenbach <joachim.langenbach@…>, 7 years ago

code_generator generates the package now with name gnuboat_webserivce and a suitable version

  • Property mode set to 100644
File size: 39.6 KB
RevLine 
[3a89adb]1openapi: 3.0.0
2info:
3 title: GNUBoat Mapservice API
4 contact:
5 name: EngSaS - Engineering Solutions and Services Langenbach
6 url: 'http://www.engsas.com'
7 email: info@engsas.de
8 license:
9 name: GPL 3
10 url: 'https://www.gnu.org/licenses/gpl-3.0.en.html'
11 version: v1
12 description: API to upload log files with water depth to GNUBoat server
13servers:
14 - url: 'https://gnuboat.engsas.com/mapservice/{version}'
15 description: The production API server
16 variables:
17 version:
18 default: v1
19 - url: 'http://localhost:8080/mapservice/{version}'
20 description: The local flask development url
21 variables:
22 version:
23 default: v1
24paths:
[ec8d5d0]25 /user:
[be25db1]26 get:
[28198a1]27 description: Returns information of current/authorized user
[be25db1]28 tags:
29 - users
30 summary: Returns info of a user
31 operationId: usersGet
32 security:
33 - basicAuth: []
34 - apiKeyAuth: []
35 responses:
36 '200':
37 description: OK
38 content:
39 application/json:
40 schema:
41 $ref: '#/components/schemas/User'
42 examples:
43 User:
44 $ref: '#/components/examples/User'
45 '400':
46 $ref: '#/components/responses/BadRequest'
47 '401':
48 $ref: '#/components/responses/Unauthorized'
49 post:
50 description: Registers a new user
51 tags:
52 - users
53 summary: Registers a new user
54 operationId: usersRegister
55 requestBody:
56 content:
57 application/json:
58 schema:
59 $ref: '#/components/schemas/UserCreation'
60 examples:
61 Water:
62 $ref: '#/components/examples/UserCreation'
63 responses:
64 '201':
65 description: Userr created
66 content:
67 application/json:
68 schema:
69 $ref: '#/components/schemas/User'
70 examples:
71 Water:
72 $ref: '#/components/examples/User'
73 '400':
74 $ref: '#/components/responses/BadRequest'
75 options:
76 description: Used by CORS preflight
77 tags:
78 - users
79 responses:
80 '200':
81 description: CORS prefilght requests should return 200 as status code
82 content:
[13cbe66]83 application/json: {}
[ec8d5d0]84 /user/apikey_create:
[be25db1]85 get:
86 description: Generates and returns a new API key for current user
87 tags:
88 - users
89 summary: Returns a new API key
90 operationId: usersApiKeyCreate
91 security:
92 - basicAuth: []
93 responses:
94 '200':
95 description: OK
96 content:
97 application/json:
98 schema:
99 $ref: '#/components/schemas/apiKeys'
[13cbe66]100 example: NewApiKey4711
[be25db1]101 '400':
102 $ref: '#/components/responses/BadRequest'
103 '401':
104 $ref: '#/components/responses/Unauthorized'
105 '/user/{api_key}':
106 delete:
107 description: Deletes given API key and returns remaining API keys of the user
108 tags:
109 - users
110 summary: Deletes API key
111 operationId: usersApiKeyDelete
112 security:
113 - basicAuth: []
114 parameters:
115 - name: api_key
116 in: path
117 description: API key
118 required: true
119 schema:
120 $ref: '#/components/schemas/apiKey'
[13cbe66]121 example: DelApiKey4711
[be25db1]122 responses:
123 '200':
124 description: OK
125 content:
126 application/json:
127 schema:
128 $ref: '#/components/schemas/apiKeys'
[13cbe66]129 example: ApiKey4711
[be25db1]130 '400':
131 $ref: '#/components/responses/BadRequest'
132 '401':
133 $ref: '#/components/responses/Unauthorized'
[13cbe66]134 '404':
135 $ref: '#/components/responses/NotFound'
[be25db1]136 '/user/activate/{activation_code}':
137 get:
138 description: Activates a user account
139 tags:
140 - users
141 summary: Activates a user account
142 operationId: usersActivate
143 parameters:
144 - name: activation_code
145 in: path
146 description: Activation code
147 required: true
148 schema:
149 $ref: '#/components/schemas/activationCode'
[13cbe66]150 example: dac9630aec642a428cd73f4be0a03569
[be25db1]151 responses:
152 '302':
153 description: OK or not OK
154 headers:
155 Location:
156 schema:
157 type: string
[13cbe66]158 description: 'URL to the website, showing the result of the activation'
[ec8d5d0]159 /waters:
[3a89adb]160 get:
161 description: Returns all waters
162 tags:
163 - waters
164 summary: Find waters by id
165 operationId: watersGet
166 parameters:
167 - name: name
[be25db1]168 in: query
[3a89adb]169 schema:
[041e464]170 $ref: '#/components/schemas/itemName'
[13cbe66]171 example: Missi
[3a89adb]172 - name: manager
[be25db1]173 in: query
[3a89adb]174 schema:
175 $ref: '#/components/schemas/username'
[13cbe66]176 example: jane
[bcaee05]177 - name: stakeholder
178 in: query
179 description: A stakeholder is a user, which has uploaded Logfiles to water, added a gauge, ...
180 schema:
181 $ref: '#/components/schemas/username'
182 example: jane
[3a89adb]183 - $ref: '#/components/parameters/orderBy'
184 - $ref: '#/components/parameters/offset'
185 - $ref: '#/components/parameters/limit'
186 responses:
187 '200':
188 description: OK
189 content:
190 application/json:
191 schema:
192 $ref: '#/components/schemas/waters'
193 examples:
194 Waters:
195 $ref: '#/components/examples/waters'
[13cbe66]196 '404':
197 $ref: '#/components/responses/NotFound'
[3a89adb]198 post:
199 description: Adds a new water to the database
200 tags:
201 - waters
202 summary: Add a new water
[be25db1]203 operationId: watersCreate
[3a89adb]204 security:
205 - basicAuth: []
206 - apiKeyAuth: []
207 requestBody:
208 content:
209 application/json:
210 schema:
211 $ref: '#/components/schemas/WaterCreation'
[13cbe66]212 example:
[041e464]213 name: Rhein
214 osmId: 1756854
[13cbe66]215 osmType: Relation
[3a89adb]216 responses:
217 '201':
218 description: Water created
219 content:
220 application/json:
221 schema:
222 $ref: '#/components/schemas/Water'
223 examples:
224 Water:
225 $ref: '#/components/examples/Water'
226 '400':
227 $ref: '#/components/responses/BadRequest'
228 '401':
229 $ref: '#/components/responses/Unauthorized'
230 '/waters/{id}':
231 get:
232 description: Returns the water identified by id
233 tags:
234 - waters
235 summary: Represents a water
[13cbe66]236 operationId: watersGetById
[3a89adb]237 parameters:
238 - name: id
239 in: path
240 description: Item ID
241 required: true
242 schema:
[041e464]243 $ref: '#/components/schemas/itemId'
[3a89adb]244 responses:
245 '200':
246 description: OK
247 content:
248 application/json:
249 schema:
250 $ref: '#/components/schemas/Water'
251 examples:
252 Water:
253 $ref: '#/components/examples/Water'
254 '404':
255 $ref: '#/components/responses/NotFound'
[13cbe66]256 '/waters/{water_id}/gauges':
257 get:
258 description: Returns all gauges of water waterId
259 tags:
260 - waters
261 summary: Find gauges of water waterId by gaugeId
262 operationId: watersGaugesGet
263 parameters:
264 - name: water_id
265 in: path
266 description: Water ID
267 required: true
268 schema:
269 $ref: '#/components/schemas/itemId'
270 - name: name
271 in: query
272 schema:
273 $ref: '#/components/schemas/itemName'
274 example: Missi
275 - name: manager
276 in: query
277 schema:
278 $ref: '#/components/schemas/username'
279 example: jane
280 - $ref: '#/components/parameters/orderBy'
281 - $ref: '#/components/parameters/offset'
282 - $ref: '#/components/parameters/limit'
283 responses:
284 '200':
285 description: OK
286 content:
287 application/json:
288 schema:
289 $ref: '#/components/schemas/Gauges'
290 examples:
291 Gauges:
292 $ref: '#/components/examples/Gauges'
293 application/geo+json:
294 schema:
295 $ref: '#/components/schemas/GaugesGeoJson'
296 examples:
297 Gauge:
298 $ref: '#/components/examples/GaugesGeoJson'
299 post:
300 description: Adds a new gauge for water waterId to the database
301 tags:
302 - waters
303 summary: Add a new water
304 operationId: watersGaugeCreate
305 parameters:
306 - name: water_id
307 in: path
308 description: Water ID
309 required: true
310 schema:
311 $ref: '#/components/schemas/itemId'
312 security:
313 - basicAuth: []
314 - apiKeyAuth: []
315 requestBody:
316 content:
317 application/json:
318 schema:
319 $ref: '#/components/schemas/GaugeCreation'
320 example:
321 name: New Orleans
322 location:
323 - 90.136111
324 - 29.934722
[5e16955]325 referenceWaterLevelGaugeHeight: 5.1
[13cbe66]326 responses:
327 '201':
328 description: Gauge created
329 content:
330 application/json:
331 schema:
332 $ref: '#/components/schemas/Gauge'
333 examples:
334 Gauge:
335 $ref: '#/components/examples/Gauge'
336 application/geo+json:
337 schema:
338 $ref: '#/components/schemas/GaugeGeoJson'
339 examples:
340 Gauge:
341 $ref: '#/components/examples/GaugeGeoJson'
342 '400':
343 $ref: '#/components/responses/BadRequest'
344 '401':
345 $ref: '#/components/responses/Unauthorized'
346 '/waters/{water_id}/gauges/{gauge_id}':
347 get:
348 description: Returns the gauge identified by id
349 tags:
350 - waters
351 summary: Represents a gauge
352 operationId: watersGaugeGetById
353 parameters:
354 - name: water_id
355 in: path
356 description: Water ID
357 required: true
358 schema:
359 $ref: '#/components/schemas/itemId'
360 - name: gauge_id
361 in: path
362 description: Gauge ID
363 required: true
364 schema:
365 $ref: '#/components/schemas/itemId'
366 responses:
367 '200':
368 description: OK
369 content:
370 application/json:
371 schema:
372 $ref: '#/components/schemas/Gauge'
373 examples:
374 Gauge:
375 $ref: '#/components/examples/Gauge'
376 application/geo+json:
377 schema:
378 $ref: '#/components/schemas/GaugeGeoJson'
379 examples:
380 Gauge:
381 $ref: '#/components/examples/GaugeGeoJson'
382 '400':
383 $ref: '#/components/responses/BadRequest'
384 '404':
385 $ref: '#/components/responses/NotFound'
[1cd45dd]386 /devices:
[ec8d5d0]387 get:
388 description: Returns all devices of user
389 tags:
390 - devices
391 summary: Find devices by id
392 operationId: devicesGet
393 security:
394 - basicAuth: []
395 - apiKeyAuth: []
396 parameters:
397 - name: name
398 in: query
399 schema:
400 $ref: '#/components/schemas/itemName'
401 example: Love
402 - $ref: '#/components/parameters/orderBy'
403 - $ref: '#/components/parameters/offset'
404 - $ref: '#/components/parameters/limit'
405 responses:
406 '200':
407 description: OK
408 content:
409 application/json:
410 schema:
411 $ref: '#/components/schemas/devices'
412 examples:
413 Devices:
414 $ref: '#/components/examples/devices'
415 '404':
416 $ref: '#/components/responses/NotFound'
417 post:
418 description: Adds a new device to the database
419 tags:
420 - devices
421 summary: Add a new device
422 operationId: devicesCreate
423 security:
424 - basicAuth: []
425 - apiKeyAuth: []
426 requestBody:
427 content:
428 application/json:
429 schema:
430 $ref: '#/components/schemas/DeviceCreation'
431 example:
[1cd45dd]432 name: Lovely Boat
[ec8d5d0]433 sensorDepth: 2
434 responses:
435 '201':
436 description: Device created
437 content:
438 application/json:
439 schema:
440 $ref: '#/components/schemas/Device'
441 examples:
442 Device:
443 $ref: '#/components/examples/Device'
444 '400':
445 $ref: '#/components/responses/BadRequest'
446 '401':
447 $ref: '#/components/responses/Unauthorized'
448 '/devices/{id}':
449 get:
450 description: Returns the device identified by id
451 tags:
452 - devices
453 summary: Represents a device
454 operationId: devicesGetById
455 security:
456 - basicAuth: []
457 - apiKeyAuth: []
458 parameters:
459 - name: id
460 in: path
461 description: Item ID
462 required: true
463 schema:
464 $ref: '#/components/schemas/itemId'
465 responses:
466 '200':
467 description: OK
468 content:
469 application/json:
470 schema:
471 $ref: '#/components/schemas/Device'
472 examples:
473 Water:
474 $ref: '#/components/examples/Device'
475 '404':
476 $ref: '#/components/responses/NotFound'
[1cd45dd]477 delete:
478 description: Deletes given device and returns remaining devices of the user
479 tags:
480 - devices
481 summary: Deletes device
482 operationId: devicesDeviceDelete
483 security:
484 - basicAuth: []
485 - apiKeyAuth: []
486 parameters:
487 - name: id
488 in: path
489 description: Item id
490 required: true
491 schema:
492 $ref: '#/components/schemas/itemId'
493 example: 1
494 responses:
495 '200':
496 description: OK
497 content:
498 application/json:
499 schema:
500 $ref: '#/components/schemas/devices'
501 example:
502 Devices:
503 $ref: '#/components/examples/devices'
504 '400':
505 $ref: '#/components/responses/BadRequest'
506 '401':
507 $ref: '#/components/responses/Unauthorized'
508 '404':
509 $ref: '#/components/responses/NotFound'
[ec9e811]510 /logs:
511 get:
512 description: Returns all log metadata
513 tags:
514 - logs
515 summary: Find logs by id
516 operationId: logsGet
517 parameters:
518 - name: submitter
519 in: query
520 schema:
521 $ref: '#/components/schemas/username'
522 example: jane
523 - $ref: '#/components/parameters/orderBy'
524 - $ref: '#/components/parameters/offset'
525 - $ref: '#/components/parameters/limit'
526 responses:
527 '200':
528 description: OK
529 content:
530 application/json:
531 schema:
532 $ref: '#/components/schemas/logs'
533 examples:
534 Logs:
535 $ref: '#/components/examples/logs'
536 '404':
537 $ref: '#/components/responses/NotFound'
[ac11efe]538 post:
[5e16955]539 description: >-
540 Creates a new log from given meta data. The log entries itself, must be
541 uploaded per /logs/{log_id}
[ac11efe]542 tags:
543 - logs
544 summary: Add a new log
545 operationId: logsLogCreate
546 security:
547 - basicAuth: []
548 - apiKeyAuth: []
549 requestBody:
550 content:
[ec9e811]551 application/json:
[ac11efe]552 schema:
[ec9e811]553 $ref: '#/components/schemas/LogCreation'
[ac11efe]554 responses:
555 '201':
556 description: Log created
557 content:
558 application/json:
559 schema:
560 $ref: '#/components/schemas/LogMetaData'
561 examples:
562 LogMetaData:
563 $ref: '#/components/examples/LogMetaData'
564 '400':
565 $ref: '#/components/responses/BadRequest'
566 '401':
567 $ref: '#/components/responses/Unauthorized'
568 '/logs/{log_id}':
569 get:
570 description: Returns the log identified by id
571 tags:
572 - logs
573 summary: Represents a log
574 operationId: logsLogGetById
575 parameters:
576 - name: log_id
577 in: path
578 description: Log ID
579 required: true
580 schema:
581 $ref: '#/components/schemas/itemId'
582 responses:
583 '200':
584 description: OK
585 content:
586 application/json:
587 schema:
588 $ref: '#/components/schemas/Log'
589 examples:
590 Log:
591 $ref: '#/components/examples/Log'
592 application/geo+json:
593 schema:
594 $ref: '#/components/schemas/LogGeoJson'
595 examples:
596 Log:
597 $ref: '#/components/examples/LogGeoJson'
598 '400':
599 $ref: '#/components/responses/BadRequest'
600 '404':
601 $ref: '#/components/responses/NotFound'
[ec9e811]602 post:
603 description: Adds log entries from uploaded file to current Log
604 tags:
605 - logs
606 summary: Add a new log entries
607 operationId: logsLogUpload
608 parameters:
609 - name: log_id
610 in: path
611 description: Log ID
612 required: true
613 schema:
614 $ref: '#/components/schemas/itemId'
615 security:
616 - basicAuth: []
617 - apiKeyAuth: []
618 requestBody:
619 content:
620 text/plain:
621 schema:
622 type: string
623 format: binary
624 responses:
625 '201':
626 description: Logs uploaded
627 content:
628 application/json:
629 schema:
[a88607b]630 $ref: '#/components/schemas/LogMetaData'
[ec9e811]631 examples:
632 Log:
[a88607b]633 $ref: '#/components/examples/LogMetaData'
[ec9e811]634 '400':
635 $ref: '#/components/responses/BadRequest'
636 '401':
637 $ref: '#/components/responses/Unauthorized'
[ac11efe]638 delete:
639 description: Deletes given log and returns remaining logs of the gauge
640 tags:
641 - logs
642 summary: Deletes log
643 operationId: logsLogDelete
644 security:
645 - basicAuth: []
646 - apiKeyAuth: []
647 parameters:
648 - name: log_id
649 in: path
650 description: Log ID
651 required: true
652 schema:
653 $ref: '#/components/schemas/itemId'
654 responses:
655 '200':
656 description: OK
657 content:
658 application/json:
659 schema:
660 $ref: '#/components/schemas/logs'
661 example:
662 Devices:
663 $ref: '#/components/examples/logs'
664 '400':
665 $ref: '#/components/responses/BadRequest'
666 '401':
667 $ref: '#/components/responses/Unauthorized'
668 '404':
669 $ref: '#/components/responses/NotFound'
[5e16955]670 '/tiles/gnuboat/{accuracy}/{resolution}/{zoom}/{x_tile}/{y_tile}.png':
671 get:
672 description: 'Returns the map tile x_tile, y_tile at Zoomlevel zoom'
673 tags:
674 - tiles
675 summary: Represents a tile
676 operationId: tilesTileGet
677 parameters:
678 - name: accuracy
679 in: path
680 description: Accuracy of generated tiles
681 required: true
682 schema:
683 title: >-
684 Accuracy of the tiles (for a higher accuracy more measured points per square meter are needed to generate a pixel of water depth)
685 type: string
686 enum:
687 - 'high'
688 - 'low'
689 - name: resolution
690 in: path
691 description: Resolution of the tiles
692 required: true
693 schema:
694 title: >-
695 Tile Resolution (Pixel per Tile) (Placed here, because
696 codegenerator could use Enums in components/schemas
697 type: integer
698 format: int32
699 enum:
700 - 256
701 - 512
702 - name: zoom
703 in: path
704 description: Zoomlevel
705 required: true
706 schema:
707 $ref: '#/components/schemas/tileZoomlevel'
708 - name: x_tile
709 in: path
710 description: Number of the tile in x dimension
711 required: true
712 schema:
713 $ref: '#/components/schemas/itemId'
714 - name: y_tile
715 in: path
716 description: Number of the tile in y dimension
717 required: true
718 schema:
719 $ref: '#/components/schemas/itemId'
720 responses:
721 '200':
722 description: OK
723 content:
724 image/*:
725 schema:
726 type: string
727 format: binary
728 #contentEncoding: base64
729 #contentMediaType: image/png
730 '400':
731 $ref: '#/components/responses/BadRequest'
732 '404':
733 $ref: '#/components/responses/NotFound'
734 '500':
735 $ref: '#/components/responses/InternalServerError'
[3a89adb]736components:
737 securitySchemes:
738 basicAuth:
739 type: http
740 scheme: basic
[adda9f2]741 x-basicInfoFunc: gnuboat_mapservice.server_impl.security.Security.auth_basic
[3a89adb]742 apiKeyAuth:
743 type: apiKey
744 in: header
745 name: X-API-KEY
[adda9f2]746 x-apikeyInfoFunc: gnuboat_mapservice.server_impl.security.Security.auth_api
[3a89adb]747 schemas:
748 username:
749 title: Username
750 type: string
[be25db1]751 apiKey:
752 title: API Key
753 type: string
754 apiKeys:
755 title: Array of API keys
756 type: array
757 items:
758 $ref: '#/components/schemas/apiKey'
759 activationCode:
760 title: Activation code for a User
761 type: string
[041e464]762 itemId:
[3a89adb]763 title: Item ID
764 type: integer
[5e16955]765 format: int64
[041e464]766 itemName:
[3a89adb]767 title: Item Name
768 type: string
[ec9e811]769 itemBase:
770 title: 'Basic, generic item data'
771 type: object
772 properties:
773 label:
774 type: string
775 description: >-
776 A representative name, for the item, which could be understand by
777 the user. Mostly it should be the itemName
778 id:
779 $ref: '#/components/schemas/itemId'
780 url:
781 type: string
782 format: url
783 description: 'Url, where details of the object could be retrieved'
784 required:
785 - label
786 - id
[13cbe66]787 order:
788 title: order
789 enum:
790 - desc
791 - asc
792 type: string
793 default: asc
794 description: |
795 Sort order:
796 * `asc` - Ascending, from A to Z
797 * `desc` - Descending, from Z to A
798 example: asc
[be25db1]799 osmType:
[041e464]800 title: OSM type of item (N|W|R)
[3a89adb]801 type: string
[041e464]802 enum:
803 - Node
804 - Way
805 - Relation
[13cbe66]806 comment:
807 title: Comment of an item
808 type: string
809 point:
810 title: 'Point of type [longitude, latitude]'
811 type: array
812 maxItems: 2
813 minItems: 2
814 items:
815 type: number
816 geoJsonType:
817 title: Type of GeoJSON objects
818 type: string
819 enum:
820 - Feature
821 - Point
[1a7f9da]822 - FeatureCollection
[13cbe66]823 geoJsonPoint:
824 type: object
[72cc339]825 description: GeoJson geometry
[13cbe66]826 externalDocs:
827 url: 'http://geojson.org/geojson-spec.html#id2'
828 properties:
829 type:
830 type: string
831 coordinates:
832 $ref: '#/components/schemas/point'
[ec8d5d0]833 sensorDepth:
834 type: number
[1cd45dd]835 title: Depth of sensor beneath water level in cm (positive means below water)
[ec8d5d0]836 minimum: 0
[be25db1]837 User:
838 title: User
839 type: object
840 properties:
841 username:
842 $ref: '#/components/schemas/username'
843 email:
844 type: string
845 firstName:
846 type: string
847 lastName:
848 type: string
849 activated:
850 type: boolean
[bd0cb38]851 licenseAccepted:
852 type: boolean
[be25db1]853 apiKeys:
854 $ref: '#/components/schemas/apiKeys'
855 UserCreation:
856 title: User
857 type: object
858 properties:
859 username:
860 $ref: '#/components/schemas/username'
861 email:
862 type: string
863 firstName:
864 type: string
865 lastName:
866 type: string
867 password:
868 type: string
[bd0cb38]869 licenseAccepted:
870 type: boolean
[be25db1]871 required:
872 - username
873 - email
874 - firstName
875 - lastName
876 - password
[bd0cb38]877 - licenseAccepted
[3a89adb]878 Water:
879 title: Water
880 type: object
881 properties:
[be25db1]882 waterId:
[041e464]883 $ref: '#/components/schemas/itemId'
[3a89adb]884 name:
[041e464]885 $ref: '#/components/schemas/itemName'
[3a89adb]886 manager:
887 $ref: '#/components/schemas/username'
[be25db1]888 osmId:
[041e464]889 $ref: '#/components/schemas/itemId'
[be25db1]890 osmType:
891 $ref: '#/components/schemas/osmType'
[13cbe66]892 gauges:
893 $ref: '#/components/schemas/Gauges'
[72cc339]894 logs:
[ac11efe]895 $ref: '#/components/schemas/logs'
[3a89adb]896 required:
[be25db1]897 - waterId
[3a89adb]898 - name
899 WaterCreation:
[ec8d5d0]900 title: Water for Creation
[3a89adb]901 type: object
902 properties:
903 name:
[041e464]904 $ref: '#/components/schemas/itemName'
[be25db1]905 osmId:
[041e464]906 $ref: '#/components/schemas/itemId'
[be25db1]907 osmType:
908 $ref: '#/components/schemas/osmType'
[3a89adb]909 required:
910 - name
911 waters:
912 title: waters
913 type: array
914 items:
915 $ref: '#/components/schemas/Water'
[5e16955]916 ReferenceWaterLevelGaugeHeight:
917 title: Gauge Height of reference water level of a Gauge
918 description: The gauge height (stage) for reference water level. The reference water level is the water level, the depth on the map is shown at. Therefore, the water depth of a LogEntry is transformed to this referenceWaterLevel, with help of the gaugeHeight of the Log related to the LogEntry.
919 type: number
920 format: float
[13cbe66]921 Gauge:
922 title: Gauge
923 type: object
924 properties:
925 gaugeId:
926 $ref: '#/components/schemas/itemId'
927 name:
928 $ref: '#/components/schemas/itemName'
929 manager:
930 $ref: '#/components/schemas/username'
931 location:
932 $ref: '#/components/schemas/point'
[5e16955]933 referenceWaterLevelGaugeHeight:
934 $ref: '#/components/schemas/ReferenceWaterLevelGaugeHeight'
[72cc339]935 logs:
[ac11efe]936 $ref: '#/components/schemas/logs'
[13cbe66]937 comment:
938 $ref: '#/components/schemas/comment'
939 required:
940 - gaugeId
941 - name
942 - location
[5e16955]943 - referenceWaterLevelGaugeHeight
[13cbe66]944 GaugeCreation:
945 title: Gauge for Creation
946 type: object
947 properties:
948 name:
949 $ref: '#/components/schemas/itemName'
950 location:
951 $ref: '#/components/schemas/point'
[5e16955]952 referenceWaterLevelGaugeHeight:
953 $ref: '#/components/schemas/ReferenceWaterLevelGaugeHeight'
[ec9e811]954 water:
955 $ref: '#/components/schemas/itemBase'
[13cbe66]956 comment:
957 $ref: '#/components/schemas/comment'
958 required:
959 - name
960 - location
961 Gauges:
962 title: Gauges
963 type: array
964 items:
965 $ref: '#/components/schemas/Gauge'
966 GaugeGeoJson:
[72cc339]967 title: Gauge in GeoJson format
[13cbe66]968 type: object
969 properties:
970 type:
971 $ref: '#/components/schemas/geoJsonType'
972 geometry:
973 $ref: '#/components/schemas/geoJsonPoint'
974 properties:
975 type: object
976 properties:
977 name:
978 $ref: '#/components/schemas/itemName'
979 manager:
980 $ref: '#/components/schemas/username'
[5e16955]981 referenceWaterLevelGaugeHeight:
982 $ref: '#/components/schemas/ReferenceWaterLevelGaugeHeight'
[13cbe66]983 comment:
984 $ref: '#/components/schemas/comment'
985 required:
986 - name
987 required:
988 - type
989 - geometry
990 - properties
991 GaugesGeoJson:
992 title: Gauges in GeoJson format
993 type: array
994 items:
995 $ref: '#/components/schemas/GaugeGeoJson'
[ec8d5d0]996 Device:
997 title: Device
998 type: object
999 properties:
1000 deviceId:
1001 $ref: '#/components/schemas/itemId'
1002 name:
1003 $ref: '#/components/schemas/itemName'
1004 sensorDepth:
1005 $ref: '#/components/schemas/sensorDepth'
[ac11efe]1006 logs:
1007 $ref: '#/components/schemas/logs'
[ec8d5d0]1008 comment:
[1cd45dd]1009 $ref: '#/components/schemas/comment'
[ec8d5d0]1010 required:
1011 - deviceId
1012 - name
1013 - sensorDepth
1014 DeviceCreation:
1015 title: Device for Creation
1016 type: object
1017 properties:
1018 name:
1019 $ref: '#/components/schemas/itemName'
1020 sensorDepth:
1021 $ref: '#/components/schemas/sensorDepth'
1022 comment:
[1cd45dd]1023 $ref: '#/components/schemas/comment'
[ec8d5d0]1024 required:
1025 - name
1026 - sensorDepth
1027 devices:
1028 title: Devices
1029 type: array
1030 items:
1031 $ref: '#/components/schemas/Device'
[f601952]1032 GaugeHeight:
[5e16955]1033 title: 'Gauge height (stage) of the gauge, at the time of measuring'
[72cc339]1034 type: number
1035 format: float
1036 LogEntry:
1037 title: Measurement in a Log
1038 type: object
1039 properties:
1040 datetime:
1041 type: string
1042 format: date-time
1043 location:
1044 $ref: '#/components/schemas/point'
1045 waterDepth:
1046 title: Measured water depth at current position
1047 type: number
1048 format: float
[ac11efe]1049 required:
1050 - datetime
1051 - location
[72cc339]1052 LogMetaData:
1053 title: 'Metadata of a log, without log entries'
1054 type: object
1055 properties:
1056 logId:
1057 $ref: '#/components/schemas/itemId'
1058 submitter:
[ac11efe]1059 $ref: '#/components/schemas/username'
[72cc339]1060 water:
[ec9e811]1061 $ref: '#/components/schemas/itemBase'
[72cc339]1062 device:
[ec9e811]1063 $ref: '#/components/schemas/itemBase'
[72cc339]1064 gauge:
[ec9e811]1065 $ref: '#/components/schemas/itemBase'
[f601952]1066 gaugeHeight:
1067 $ref: '#/components/schemas/GaugeHeight'
[72cc339]1068 start:
[ac11efe]1069 title: Date and Time of the first log entry in UTC timezone
[72cc339]1070 type: string
1071 format: date-time
1072 end:
[ac11efe]1073 title: Date and Time of the last log entry in UTC timezone
[72cc339]1074 type: string
1075 format: date-time
[306f18a]1076 processingState:
[f601952]1077 $ref: '#/components/schemas/itemBase'
[72cc339]1078 entriesCount:
1079 title: Number of measurings in the log
1080 type: integer
1081 format: int64
1082 comment:
1083 $ref: '#/components/schemas/comment'
1084 required:
[f601952]1085 - gaugeHeight
[72cc339]1086 - start
1087 - end
1088 - entriesCount
1089 Log:
1090 title: A collection of LogEntries
1091 type: object
1092 properties:
1093 metaData:
1094 $ref: '#/components/schemas/LogMetaData'
1095 entries:
1096 title: Log entries
1097 type: array
1098 items:
1099 $ref: '#/components/schemas/LogEntry'
1100 required:
1101 - metaData
1102 - entries
1103 LogCreation:
1104 title: Log for Creation
1105 type: object
1106 properties:
1107 water:
[ac11efe]1108 $ref: '#/components/schemas/itemId'
[72cc339]1109 device:
[ac11efe]1110 $ref: '#/components/schemas/itemId'
[72cc339]1111 gauge:
[ac11efe]1112 $ref: '#/components/schemas/itemId'
[f601952]1113 gaugeHeight:
1114 $ref: '#/components/schemas/GaugeHeight'
[72cc339]1115 comment:
1116 $ref: '#/components/schemas/comment'
1117 required:
1118 - water
1119 - device
1120 - gauge
[f601952]1121 - gaugeHeight
[72cc339]1122 logs:
1123 title: Logs
1124 type: array
1125 items:
[ac11efe]1126 $ref: '#/components/schemas/LogMetaData'
[72cc339]1127 LogGeoJson:
[1a7f9da]1128 title: FeatureCollection representing a Log in GeoJson format
1129 type: object
1130 properties:
1131 type:
1132 $ref: '#/components/schemas/geoJsonType'
1133 features:
1134 type: array
1135 items:
1136 $ref: '#/components/schemas/LogEntryGeoJson'
1137 required:
1138 - type
1139 - features
1140 LogEntryGeoJson:
1141 title: Feature representing LogEntry in GeoJson format
[72cc339]1142 type: object
1143 properties:
1144 type:
1145 $ref: '#/components/schemas/geoJsonType'
1146 geometry:
[1a7f9da]1147 $ref: '#/components/schemas/geoJsonPoint'
[72cc339]1148 properties:
1149 type: object
[1a7f9da]1150 properties:
1151 datetime:
1152 type: string
1153 format: date-time
1154 waterDepth:
1155 type: number
1156 format: float
1157 required:
1158 - datetime
[72cc339]1159 required:
1160 - type
1161 - geometry
1162 - properties
[5e16955]1163 tileZoomlevel:
1164 title: Zoomlevel of requested Tile
1165 type: integer
1166 format: int32
1167 minimum: 0
1168 maximum: 19
[3a89adb]1169 HttpError:
1170 title: HTTP Error Response Object
1171 type: object
1172 properties:
[1cd45dd]1173 type:
[72cc339]1174 type: string
[1cd45dd]1175 title:
[72cc339]1176 type: string
[1cd45dd]1177 detail:
[72cc339]1178 type: string
[1cd45dd]1179 instance:
[72cc339]1180 type: string
[3a89adb]1181 required:
[1cd45dd]1182 - type
1183 - title
1184 - detail
1185 - instance
[3a89adb]1186 parameters:
1187 orderBy:
[ec9e811]1188 name: order_by
[3a89adb]1189 in: query
1190 description: 'Order by field: name'
1191 schema:
1192 type: string
1193 default: name
[13cbe66]1194 example: name
[3a89adb]1195 order:
1196 name: order
1197 in: query
1198 description: Order
1199 schema:
1200 $ref: '#/components/schemas/order'
[be25db1]1201 example: ''
[3a89adb]1202 offset:
1203 name: offset
1204 in: query
1205 description: >-
1206 Skip over a number of elements by specifying an offset value for the
1207 query
1208 schema:
1209 type: integer
1210 format: int32
1211 default: 0
1212 example: 0
1213 limit:
1214 name: limit
1215 in: query
1216 description: Limit the number of elements on the response
1217 style: form
1218 explode: true
1219 schema:
1220 type: integer
1221 format: int32
1222 default: 10
1223 example: 10
1224 examples:
[be25db1]1225 User:
1226 value:
1227 username: jane
1228 email: jane@example.org
1229 firstName: Jane
1230 lastName: Doe
1231 activated: true
1232 apiKeys:
1233 - ApiKey4701
1234 UserCreation:
1235 value:
1236 username: richard
1237 email: richard@examle.org
1238 firstName: Richard
1239 lastName: Roe
1240 password: sdfl.1238_ASDkeil?
[bd0cb38]1241 licenseAccepted: true
[3a89adb]1242 Water:
1243 value:
[be25db1]1244 waterId: 1
[3a89adb]1245 name: Mississippi
[be25db1]1246 osmId: 1756854
1247 osmType: R
[3a89adb]1248 summary: A water example object
1249 WaterCreation:
1250 value:
1251 name: Mississippi
[be25db1]1252 osmId: 1756854
[13cbe66]1253 osmType: Relation
[3a89adb]1254 summary: A water example object for creation of a water
1255 waters:
1256 value:
[be25db1]1257 - waterId: 1
[13cbe66]1258 name: Mississippi
[be25db1]1259 osmId: 1756854
[13cbe66]1260 osmType: Relation
[be25db1]1261 - waterId: 2
[13cbe66]1262 name: Bodensee
[3a89adb]1263 summary: A sample list with waters
[13cbe66]1264 Gauge:
1265 value:
1266 gaugeId: 1
1267 name: New Orleans
1268 manager: jane
1269 location:
1270 - 90.136111
1271 - 29.934722
[5e16955]1272 referenceWaterLevelGaugeHeight: 5.1
[13cbe66]1273 comment: Gauge for Mississippi in New Orleans
1274 Gauges:
1275 value:
1276 - gaugeId: 1
1277 name: New Orleans
1278 manager: jane
1279 location:
1280 - 90.136111
1281 - 29.934722
[5e16955]1282 referenceWaterLevelGaugeHeight: 5.1
[13cbe66]1283 summary: A sample list of gauges
1284 GaugeGeoJson:
1285 value:
1286 type: Feature
1287 geometry:
1288 type: Point
1289 coordinates:
1290 - 90.136111
[ec8d5d0]1291 - 29.934722
[13cbe66]1292 properties:
1293 name: New Orleans
1294 manager: jane
[5e16955]1295 referenceWaterLevelGaugeHeight: 5.1
[13cbe66]1296 comment: Gauge for Mississippi in New Orleans
1297 GaugesGeoJson:
1298 value:
1299 - type: Feature
1300 geometry:
1301 type: Point
1302 coordinates:
1303 - 90.136111
[ec8d5d0]1304 - 29.934722
[13cbe66]1305 properties:
1306 name: New Orleans
1307 manager: jane
[5e16955]1308 referenceWaterLevelGaugeHeight: 5.1
[13cbe66]1309 comment: Gauge for Mississippi in New Orleans
1310 summary: A sample list of gauges in GeoJson format
[ec8d5d0]1311 Device:
1312 value:
1313 deviceId: 1
1314 name: Lovely Boat
1315 sensorDepth: 0.2
1316 comment: Really a pleasure to measure
1317 summary: A sample device
1318 devices:
1319 value:
1320 - deviceId: 1
1321 name: Lovely Boat
1322 sensorDepth: 0.2
1323 comment: Really a pleasure to measure
[72cc339]1324 LogMetaData:
1325 value:
1326 logId: 1
1327 submitter:
1328 userId: 1
1329 name: Jane
1330 device:
1331 deviceId: 1
1332 name: Lovely Boat
1333 sensorDepth: 0.2
1334 gauge:
1335 gaugeId: 1
1336 name: New Orleans
1337 manager: jane
1338 location:
1339 - 90.136111
1340 - 29.934722
[f601952]1341 gaugeHeight: 8
[72cc339]1342 start: 2017-07-21T10:32:28.000Z
1343 end: 2017-07-21T17:32:28.000Z
1344 entriesCount: 12600
1345 Log:
1346 value:
1347 metaData:
1348 logId: 1
1349 submitter:
1350 userId: 1
1351 name: Jane
1352 device:
1353 deviceId: 1
1354 name: Lovely Boat
1355 sensorDepth: 0.2
1356 gauge:
1357 gaugeId: 1
1358 name: New Orleans
1359 manager: jane
1360 location:
1361 - 90.136111
1362 - 29.934722
[f601952]1363 gaugeHeight: 8
[72cc339]1364 start: 2017-07-21T10:32:28.000Z
1365 end: 2017-07-21T17:32:28.000Z
1366 entriesCount: 1
[ec9e811]1367 entries:
1368 - datetime: null
1369 location:
1370 - 90.136111
1371 - 29.934722
1372 waterDepth: 10
[72cc339]1373 LogGeoJson:
1374 value:
[1a7f9da]1375 type: FeatureCollection
1376 features:
1377 - geometry:
1378 coordinates:
1379 - 90.136111
1380 - 29.934722
1381 type: 'Point'
1382 properties:
[72cc339]1383 datetime: 2017-07-21T10:32:28.000Z
1384 waterDepth: 10
[1a7f9da]1385 - geometry:
1386 coordinates:
1387 - 90.236111
1388 - 30.034722
1389 type: Point
1390 properties:
[72cc339]1391 datetime: 2017-07-21T11:32:28.000Z
1392 waterDepth: 5
1393 logs:
1394 value:
1395 - logId: 1
1396 submitter:
1397 userId: 1
1398 name: Jane
1399 device:
1400 deviceId: 1
1401 name: Lovely Boat
1402 sensorDepth: 0.2
1403 gauge:
1404 gaugeId: 1
1405 name: New Orleans
1406 manager: jane
1407 location:
1408 - 90.136111
1409 - 29.934722
[f601952]1410 gaugeHeight: 8
[72cc339]1411 start: 2017-07-21T10:32:28.000Z
1412 end: 2017-07-21T17:32:28.000Z
1413 entriesCount: 12600
[3a89adb]1414 HttpError:
1415 value:
[72cc339]1416 type: 'http://example.com/waters/not-found'
1417 title: Water 1 not found
1418 detail: There is no water with id 1 in database
1419 instance: 'http://example.net/waters/1'
[3a89adb]1420 responses:
1421 BadRequest:
1422 description: Bad Request (400)
1423 content:
[1cd45dd]1424 application/problem+json:
[3a89adb]1425 schema:
1426 $ref: '#/components/schemas/HttpError'
1427 examples:
1428 HttpError:
1429 $ref: '#/components/examples/HttpError'
1430 Unauthorized:
1431 description: Unauthorized (401) acces to resource
1432 content:
[1cd45dd]1433 application/problem+json:
[3a89adb]1434 schema:
1435 $ref: '#/components/schemas/HttpError'
1436 examples:
1437 HttpError:
1438 $ref: '#/components/examples/HttpError'
1439 NotFound:
[5e16955]1440 description: Item with given Id not found
1441 content:
1442 application/problem+json:
1443 schema:
1444 $ref: '#/components/schemas/HttpError'
1445 examples:
1446 HttpError:
1447 $ref: '#/components/examples/HttpError'
1448 InternalServerError:
1449 description: Internal Server Error (HTTP Code 500)
[3a89adb]1450 content:
[1cd45dd]1451 application/problem+json:
[3a89adb]1452 schema:
1453 $ref: '#/components/schemas/HttpError'
1454 examples:
1455 HttpError:
1456 $ref: '#/components/examples/HttpError'
1457tags:
1458 - name: waters
1459 description: >-
1460 A water is a river (like Mississippi, lake (Lake Ontario), or a sea (North
1461 Sea)
[be25db1]1462 - name: users
[13cbe66]1463 description: All actions used to manage users and api keys
[ec8d5d0]1464 - name: devices
1465 description: All actions used to manage devices of an user
[ac11efe]1466 - name: logs
[ec9e811]1467 description: 'All actions used to manage logs of an water, device, gauge or user'
[5e16955]1468 - name: tiles
1469 description: Tile serving
Note: See TracBrowser for help on using the repository browser.