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