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