@golemio/parkings 1.1.1-dev.560668363 → 1.1.1-dev.564542852
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
Binary file
|
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
# Implementační dokumentace modulu **parkings**
|
|
2
|
+
|
|
3
|
+
## Záměr
|
|
4
|
+
|
|
5
|
+
Modul slouží k ukládání a poskytování informací o parkování.
|
|
6
|
+
|
|
7
|
+
**Dostupní poskytovatelé**:
|
|
8
|
+
|
|
9
|
+
- Korid (Liberec)
|
|
10
|
+
- TSK (Praha)
|
|
11
|
+
- IPR (Praha)
|
|
12
|
+
|
|
13
|
+
## Vstupní data
|
|
14
|
+
|
|
15
|
+
### Data nám jsou posílána
|
|
16
|
+
|
|
17
|
+
- Přes Permission Proxy na Input Gateway, dodavatel Korid
|
|
18
|
+
|
|
19
|
+
- POST (/koridparkings/config) => RabbitMQ send Message `saveKoridConfToDB` ([Data example](../test/input-gateway/korid-parkings/data/korid-config.json))
|
|
20
|
+
- POST (/koridparkings/data) => RabbitMQ send Message `saveKoridDataToDB` ([Data example](../test/input-gateway/korid-parkings/data/korid-data.json))
|
|
21
|
+
|
|
22
|
+
- na FTP, dodavatel TSK (parkovací zóny)
|
|
23
|
+
|
|
24
|
+
### Data aktivně stahujeme
|
|
25
|
+
|
|
26
|
+
Data stahujeme pravidelně od IPR, TSK.
|
|
27
|
+
|
|
28
|
+
#### Zóny placeného stání
|
|
29
|
+
|
|
30
|
+
Zóny placeného stání používají 2 datové zdroje - TSK a Opendata IPR, které mají přesnější geometrii.
|
|
31
|
+
|
|
32
|
+
- zdroj dat (**TSK**):
|
|
33
|
+
|
|
34
|
+
config FTPProtocolStrategy:
|
|
35
|
+
|
|
36
|
+
```
|
|
37
|
+
filename: "Area_YYYY-MM-DD.json", // "Tarif_YYYY-MM-DD.tsv" pro tarify
|
|
38
|
+
path: config.datasources.TSKFTPParkingZonesPath,
|
|
39
|
+
url: {
|
|
40
|
+
host: config.datasources.TSKFTP.host,
|
|
41
|
+
port: config.datasources.TSKFTP.port,
|
|
42
|
+
user: config.datasources.TSKFTP.user,
|
|
43
|
+
password: config.datasources.TSKFTP.password,
|
|
44
|
+
},
|
|
45
|
+
encoding: "utf8",
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
- formát dat (**TSK**)
|
|
49
|
+
|
|
50
|
+
- protokol: ftp
|
|
51
|
+
- datový typ:
|
|
52
|
+
- lokace: json
|
|
53
|
+
- tarify: tsv
|
|
54
|
+
- validační schéma:
|
|
55
|
+
- lokace: json
|
|
56
|
+
- tarify: tsv
|
|
57
|
+
- validační schéma:
|
|
58
|
+
- lokace [datasourceGeoJsonSchema](https://gitlab.com/operator-ict/golemio/code/modules/parkings/-/blob/development/src/schema-definitions/index.ts)
|
|
59
|
+
- tarify [datasourceTariffJsonSchema](https://gitlab.com/operator-ict/golemio/code/modules/parkings/-/blob/development/src/schema-definitions/index.ts)
|
|
60
|
+
- příklad vstupních dat:
|
|
61
|
+
- [lokace](https://gitlab.com/operator-ict/golemio/code/modules/parkings/-/blob/development/test/integration-engine/data/ipr-parking-data-input.json)
|
|
62
|
+
- [tarify (tsv->json)](https://gitlab.com/operator-ict/golemio/code/modules/parkings/-/blob/development/test/integration-engine/data/tsk-parking-tariff-data-input.json)
|
|
63
|
+
|
|
64
|
+
- zdroj dat (**IPR**):
|
|
65
|
+
|
|
66
|
+
config HTTPProtocolStrategy:
|
|
67
|
+
|
|
68
|
+
```
|
|
69
|
+
headers: {},
|
|
70
|
+
method: "GET",
|
|
71
|
+
url: config.datasources.ParkingZones,
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
- formát dat (**IPR**)
|
|
75
|
+
|
|
76
|
+
- protokol: http
|
|
77
|
+
- datový typ: json
|
|
78
|
+
- validační schéma: datasourceEcoCounterJsonSchema
|
|
79
|
+
- příklad vstupních dat
|
|
80
|
+
|
|
81
|
+
- frekvence stahování
|
|
82
|
+
|
|
83
|
+
- cron definice:
|
|
84
|
+
- cron.dataplatform.parkings.saveParkingZonesPrague (`0 */5 * * * *`)
|
|
85
|
+
|
|
86
|
+
- název rabbitmq fronty
|
|
87
|
+
- dataplatform.parkings.saveParkingZonesPrague
|
|
88
|
+
|
|
89
|
+
#### Placené parkoviště
|
|
90
|
+
|
|
91
|
+
- zdroj dat (**TSK**):
|
|
92
|
+
|
|
93
|
+
config HTTPProtocolStrategy:
|
|
94
|
+
|
|
95
|
+
```
|
|
96
|
+
headers: {},
|
|
97
|
+
method: "GET",
|
|
98
|
+
url: config.datasources.TSKParkings,
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
+ filter `lastUpdated` ne starší než 48h
|
|
102
|
+
|
|
103
|
+
- formát dat
|
|
104
|
+
- protokol: http
|
|
105
|
+
- datový typ: json
|
|
106
|
+
- [validační schéma: datasourceMSO](https://gitlab.com/operator-ict/golemio/code/modules/parkings/-/blob/development/src/schema-definitions/index.ts)
|
|
107
|
+
- [příklad vstupních dat](https://gitlab.com/operator-ict/golemio/code/modules/parkings/-/blob/development/test/integration-engine/data/parking-lots-data-input.json)
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
- frekvence stahování
|
|
111
|
+
|
|
112
|
+
- cron definice:
|
|
113
|
+
- cron.dataplatform.parkings.saveParkingLotsPrague (`0 0 */6 * * *`)
|
|
114
|
+
- cron.dataplatform.parkings.saveParkingLotsMeasurementsPrague (`0 */5 * * * *`)
|
|
115
|
+
|
|
116
|
+
- název rabbitmq fronty
|
|
117
|
+
- dataplatform.parkings.saveParkingLotsPrague
|
|
118
|
+
- dataplatform.parkings.saveParkingLotsMeasurementsPrague
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
## Zpracování dat / transformace
|
|
122
|
+
|
|
123
|
+
Při transformaci dat lokací data obohacujeme o adresu parkoviště, která vychází z centroidu geometrie daného parkoviště a získává se z Photon API metodou `GeocodeApi.getAddressByLatLngFromPhoton` v modulu Core.
|
|
124
|
+
|
|
125
|
+
### Worker *ParkingsWorker*
|
|
126
|
+
|
|
127
|
+
#### *saveParkingZonesPrague*
|
|
128
|
+
|
|
129
|
+
- vstupní rabbitmq fronta
|
|
130
|
+
- název: `dataplatform.parkings.saveParkingZonesPrague`
|
|
131
|
+
- bez parametrů
|
|
132
|
+
- datové zdroje
|
|
133
|
+
- dataSourceTSK (ftp),
|
|
134
|
+
- dataSourceTariffTSK (ftp),
|
|
135
|
+
- dataSourceIPR
|
|
136
|
+
- transformace
|
|
137
|
+
|
|
138
|
+
Data pro `parkings` - TSK zdroj rozšiřujeme o geodata z Opendat IPR (geometrie stejné zóny mergujeme v jednu), které mají přesnější polohu parkovišť. Kde jsou k dispozici, nahrazujeme geometrii TSK.
|
|
139
|
+
Data pro `parkings_location` - IPR zdroj (původní detailní geometrie) rozšiřujeme o geodata z TSK, pouze kdyžkteré mají přesnější polohu parkovišť. Kde jsou k dispozici, nahrazujeme geometrii TSK.
|
|
140
|
+
- [TSKParkingTransformation](https://gitlab.com/operator-ict/golemio/code/modules/parkings/-/blob/development/src/integration-engine/TSKParkingTransformation.ts) - mapování pro `parkingsModel` a `parkingsLocationModel`
|
|
141
|
+
- [TSKParkingTariffTransformation](https://gitlab.com/operator-ict/golemio/code/modules/parkings/-/blob/development/src/integration-engine/TSKParkingTariffTransformation.ts) - mapování pro `parkingsTariffsModel`
|
|
142
|
+
- [IPRParkingTransformation](https://gitlab.com/operator-ict/golemio/code/modules/parkings/-/blob/development/src/integration-engine/IPRParkingTransformation.ts) - mapování pro `parkingsModel` a `parkingsLocationModel`
|
|
143
|
+
- data modely
|
|
144
|
+
- parkingsModel -> (schéma public) `parkings`
|
|
145
|
+
- parkingsLocationModel -> (schéma public) `parkings_location` (detailnější geometrie, která vychází z položek IPRu)
|
|
146
|
+
- parkingsTariffsModel -> (schéma public) `parkings_tariffs`
|
|
147
|
+
- Důležité informace pro zpracování dat ze zdroje TariffTSK
|
|
148
|
+
- U parkovišť ZPS pod správou TSK nastaveno ve payment_method hodnotu `litacka`
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
#### *saveParkingLotsPrague*
|
|
152
|
+
|
|
153
|
+
- vstupní rabbitmq fronta
|
|
154
|
+
- název: `dataplatform.parkings.saveParkingLotsPrague`
|
|
155
|
+
- bez parametrů
|
|
156
|
+
- datové zdroje
|
|
157
|
+
- dataSource (http),
|
|
158
|
+
- transformace
|
|
159
|
+
- [ParkingLotsTransformation](https://gitlab.com/operator-ict/golemio/code/modules/parkings/-/blob/development/src/integration-engine/ParkingLotsTransformation.ts) - mapování pro `parkingsModel` a `parkingsLocationModel`
|
|
160
|
+
- data modely
|
|
161
|
+
- parkingsModel -> (schéma public) `parkings`
|
|
162
|
+
- důležité informace pro zpracování dat ze zdroje TSKParkings
|
|
163
|
+
- V budoucnu přibydou další hodnoty parking_type: `park_sharing` pro službu Mr. Parkit, `disabled_parking` pro ZTP parkoviště z IPR atp.
|
|
164
|
+
- Parametr `zone_type` je povinný pokud je `parking_type == on_street`. Jinak má být `NULL`
|
|
165
|
+
- `zone_free` - placeholder pro Zóny neplaceného stání (zone_type), které se budou integrovat v budoucnu
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
#### *saveParkingLotsMeasurementsPrague*
|
|
169
|
+
|
|
170
|
+
- vstupní rabbitmq fronta
|
|
171
|
+
- název: `dataplatform.parkings.saveParkingLotsMeasurementsPrague`
|
|
172
|
+
- bez parametrů
|
|
173
|
+
- datové zdroje
|
|
174
|
+
- dataSource (http),
|
|
175
|
+
- transformace
|
|
176
|
+
- [ParkingLotsTransformation](https://gitlab.com/operator-ict/golemio/code/modules/parkings/-/blob/development/src/integration-engine/ParkingLotsTransformation.ts) - mapování pro `parkingsModel` a `parkingsLocationModel`
|
|
177
|
+
- data modely
|
|
178
|
+
- parkingsMeasurementsModel -> (schéma public) `parkings_measurements_part`
|
|
179
|
+
- parkingsMeasurementsActualModel -> (schéma public) `parkings_measurements_actual`
|
|
180
|
+
|
|
181
|
+
Všechny historické údaje jsou uloženy v tabulce `parkings_measurements_part`. Aktualizujeme pouze aktuální údaje v tabulce `parkings_measurements_actual`.
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
#### *saveKoridConfToDB*
|
|
185
|
+
|
|
186
|
+
- vstupní rabbitmq fronta
|
|
187
|
+
- název: `dataplatform.parkings.saveKoridConfToDB`
|
|
188
|
+
- bez parametrů
|
|
189
|
+
- datové zdroje
|
|
190
|
+
- IG
|
|
191
|
+
- transformace
|
|
192
|
+
- [KoridParkingConfigTransformation](https://gitlab.com/operator-ict/golemio/code/modules/parkings/-/blob/development/src/integration-engine/KoridParkingConfigTransformation.ts) - mapování pro `parkingsModel` a `parkingsLocationModel`
|
|
193
|
+
- data modely
|
|
194
|
+
- parkingsModel -> (schéma public) `parkings`
|
|
195
|
+
|
|
196
|
+
#### *saveKoridDataToDB*
|
|
197
|
+
|
|
198
|
+
- vstupní rabbitmq fronta
|
|
199
|
+
- název: `dataplatform.parkings.saveKoridDataToDB`
|
|
200
|
+
- bez parametrů
|
|
201
|
+
- datové zdroje
|
|
202
|
+
- IG
|
|
203
|
+
- transformace
|
|
204
|
+
- [KoridParkingDataTransformation](https://gitlab.com/operator-ict/golemio/code/modules/parkings/-/blob/development/src/integration-engine/KoridParkingDataTransformation.ts) - mapování pro `parkingsModel` a `parkingsLocationModel`
|
|
205
|
+
- data modely
|
|
206
|
+
- parkingsMeasurementsModel -> (schéma public) `parkings_measurements_part`
|
|
207
|
+
- parkingsMeasurementsActualModel -> (schéma public) `parkings_measurements_actual`
|
|
208
|
+
|
|
209
|
+
|
|
210
|
+
### Legacy mongo modely
|
|
211
|
+
|
|
212
|
+
**CronJob and Worker method refreshDataInDB**
|
|
213
|
+
|
|
214
|
+
`cron.dataplatform.parkings.refreshDataInDB` ("`0 */5 * * * *`" Dev a Prod)
|
|
215
|
+
|
|
216
|
+
Datasource TSKParkings, Transformovaná data jsou uložena v tabulce `public.parkings`
|
|
217
|
+
|
|
218
|
+
Na základě dat metoda generuje 3 události RabbitMQ:
|
|
219
|
+
|
|
220
|
+
- RabbitMQ send Message `saveDataToHistory`
|
|
221
|
+
- RabbitMQ send Message `updateAddressAndDistrict`
|
|
222
|
+
- RabbitMQ send Message `updateAverageOccupancy`
|
|
223
|
+
|
|
224
|
+
|
|
225
|
+
## Uložení dat
|
|
226
|
+
|
|
227
|
+
- typ databáze
|
|
228
|
+
- PSQL
|
|
229
|
+
- databázové schéma
|
|
230
|
+
- 
|
|
231
|
+
- retence dat
|
|
232
|
+
- `parkingsModel`, `parkingsLocationModel`, `parkingsMeasurementsActualModel`, `parkingsTariffsModel` update
|
|
233
|
+
- `parkingsMeasurementsModel` historizace bez promazávání
|
|
234
|
+
|
|
235
|
+
## Output API
|
|
236
|
+
|
|
237
|
+
### Obecné
|
|
238
|
+
|
|
239
|
+
- Zdroj pro api
|
|
240
|
+
- PSQL databáze viz výše
|
|
241
|
+
- OpenAPI dokumentace
|
|
242
|
+
- [OpenAPI](./openapi.yaml)
|
|
243
|
+
- veřejné / neveřejné endpointy
|
|
244
|
+
- částečně veřejná na úrovni filtrování podle poskytovatele dat
|
|
245
|
+
- postman kolekce
|
|
246
|
+
- TBD
|
|
247
|
+
|
|
248
|
+
#### _/parking_
|
|
249
|
+
|
|
250
|
+
#### _/parking/:id_
|
|
251
|
+
|
|
252
|
+
- zdrojové tabulky
|
|
253
|
+
- parkings
|
|
254
|
+
- parkings_measurements_actual
|
|
255
|
+
- implementováno dodatečně
|
|
256
|
+
- `reservation_url` - přidáno volitelný atribut, který použijeme v datech od MPLA
|
|
257
|
+
- Nový číselník `payment_methods`. Example: `{ payment_methods: ["card_online", "cash"] }`
|
|
258
|
+
|
|
259
|
+
#### _/parking/detail_
|
|
260
|
+
|
|
261
|
+
#### _/parking/detail/:id_
|
|
262
|
+
|
|
263
|
+
- zdrojové tabulky
|
|
264
|
+
- parkings
|
|
265
|
+
- parkings_location
|
|
266
|
+
- detailnejší geometrie, vychází z OpenData IPR a doplňuje parametry z TSK (ftp)
|
|
267
|
+
|
|
268
|
+
#### _/parking/tariffs/_
|
|
269
|
+
|
|
270
|
+
#### _/parking/tariffs/:tariffId_
|
|
271
|
+
|
|
272
|
+
- zdrojové tabulky
|
|
273
|
+
- parkings_tariffs
|
|
274
|
+
|
|
275
|
+
#### _/parking/measurements_
|
|
276
|
+
|
|
277
|
+
- zdrojové tabulky
|
|
278
|
+
- parkings_measurements_part
|
|
279
|
+
- implementováno dodatečně
|
|
280
|
+
- stránkovací metadata jsou zahrnuta v odpovědi ve formách response headers (`X-Total-Count`, `Link`)
|
|
281
|
+
- implementována možnost dotazování pomocí parametrů `pageSize` a `page`
|
|
@@ -0,0 +1,675 @@
|
|
|
1
|
+
# prettier-ignore
|
|
2
|
+
|
|
3
|
+
openapi: 3.0.3
|
|
4
|
+
info:
|
|
5
|
+
title: 🅿️ Parking
|
|
6
|
+
description: >-
|
|
7
|
+
<p>💡 Parkings, parking zones, tarifs, measurements.</p>
|
|
8
|
+
version: 1.0.0
|
|
9
|
+
contact:
|
|
10
|
+
name: Golemio Prague Data Plaform
|
|
11
|
+
email: golemio@operatorict.cz
|
|
12
|
+
url: https://golemio.cz
|
|
13
|
+
servers:
|
|
14
|
+
- url: https://rabin.golemio.cz/v2
|
|
15
|
+
description: Test (development) server
|
|
16
|
+
- url: https://api.golemio.cz/v2
|
|
17
|
+
description: Main (production) server
|
|
18
|
+
tags:
|
|
19
|
+
- name: 🅿️ Parking
|
|
20
|
+
description: >-
|
|
21
|
+
<p>💡 Parkings, parking zones, tarifs, measurements.</p>
|
|
22
|
+
paths:
|
|
23
|
+
/parking:
|
|
24
|
+
get:
|
|
25
|
+
tags:
|
|
26
|
+
- 🅿️ Parking
|
|
27
|
+
summary: GET All Parking Spaces
|
|
28
|
+
parameters:
|
|
29
|
+
- name: latlng
|
|
30
|
+
in: query
|
|
31
|
+
description: Sorting by location (Latitude and Longitude separated by comma,
|
|
32
|
+
latitude first).
|
|
33
|
+
schema:
|
|
34
|
+
type: string
|
|
35
|
+
example: 50.124935,14.457204
|
|
36
|
+
- name: range
|
|
37
|
+
in: query
|
|
38
|
+
description: Filter by distance from latlng in meters (range query). Depends
|
|
39
|
+
on the latlng parameter.
|
|
40
|
+
schema:
|
|
41
|
+
type: number
|
|
42
|
+
example: 5000
|
|
43
|
+
- name: source
|
|
44
|
+
in: query
|
|
45
|
+
description: Filter by data provider.
|
|
46
|
+
schema:
|
|
47
|
+
type: string
|
|
48
|
+
example: korid
|
|
49
|
+
- name: sourceId
|
|
50
|
+
in: query
|
|
51
|
+
description: Filter by parking group id. Unique per data provider.
|
|
52
|
+
schema:
|
|
53
|
+
type: string
|
|
54
|
+
example: 1
|
|
55
|
+
- name: category
|
|
56
|
+
in: query
|
|
57
|
+
description: Filter by parking type. Use with square brackets `category[]`
|
|
58
|
+
style: form
|
|
59
|
+
explode: false
|
|
60
|
+
schema:
|
|
61
|
+
type: array
|
|
62
|
+
items:
|
|
63
|
+
type: object
|
|
64
|
+
example: park_and_ride
|
|
65
|
+
- name: limit
|
|
66
|
+
in: query
|
|
67
|
+
description: Limits number of retrieved items.
|
|
68
|
+
schema:
|
|
69
|
+
type: number
|
|
70
|
+
example: 10
|
|
71
|
+
- name: offset
|
|
72
|
+
in: query
|
|
73
|
+
description: Number of the first items that are skipped.
|
|
74
|
+
schema:
|
|
75
|
+
type: number
|
|
76
|
+
example: 0
|
|
77
|
+
|
|
78
|
+
responses:
|
|
79
|
+
200:
|
|
80
|
+
description: OK
|
|
81
|
+
content:
|
|
82
|
+
application/json; charset=utf-8:
|
|
83
|
+
schema:
|
|
84
|
+
type: object
|
|
85
|
+
properties:
|
|
86
|
+
features:
|
|
87
|
+
type: array
|
|
88
|
+
items:
|
|
89
|
+
$ref: '#/components/schemas/ParkingSpaceFeature'
|
|
90
|
+
type:
|
|
91
|
+
type: string
|
|
92
|
+
example: FeatureCollection
|
|
93
|
+
401:
|
|
94
|
+
$ref: "#/components/responses/UnauthorizedError"
|
|
95
|
+
|
|
96
|
+
404:
|
|
97
|
+
description: Not found
|
|
98
|
+
/parking/{id}:
|
|
99
|
+
get:
|
|
100
|
+
tags:
|
|
101
|
+
- 🅿️ Parking
|
|
102
|
+
summary: GET Parking Space
|
|
103
|
+
parameters:
|
|
104
|
+
- name: id
|
|
105
|
+
in: path
|
|
106
|
+
description: Id of parking location.
|
|
107
|
+
required: true
|
|
108
|
+
schema:
|
|
109
|
+
type: string
|
|
110
|
+
example: 6
|
|
111
|
+
responses:
|
|
112
|
+
200:
|
|
113
|
+
description: OK
|
|
114
|
+
content:
|
|
115
|
+
application/json; charset=utf-8:
|
|
116
|
+
schema:
|
|
117
|
+
$ref: '#/components/schemas/ParkingSpaceFeature'
|
|
118
|
+
401:
|
|
119
|
+
$ref: "#/components/responses/UnauthorizedError"
|
|
120
|
+
|
|
121
|
+
404:
|
|
122
|
+
description: Not found
|
|
123
|
+
/parking/detail:
|
|
124
|
+
get:
|
|
125
|
+
tags:
|
|
126
|
+
- 🅿️ Parking
|
|
127
|
+
summary: GET All Detailed Parking Spaces
|
|
128
|
+
parameters:
|
|
129
|
+
- name: latlng
|
|
130
|
+
in: query
|
|
131
|
+
description: Sorting by location (Latitude and Longitude separated by comma,
|
|
132
|
+
latitude first).
|
|
133
|
+
schema:
|
|
134
|
+
type: string
|
|
135
|
+
example: 50.124935,14.457204
|
|
136
|
+
- name: range
|
|
137
|
+
in: query
|
|
138
|
+
description: Filter by distance from latlng in meters (range query). Depends
|
|
139
|
+
on the latlng parameter.
|
|
140
|
+
schema:
|
|
141
|
+
type: number
|
|
142
|
+
example: 5000
|
|
143
|
+
- name: source
|
|
144
|
+
in: query
|
|
145
|
+
description: Filter by data provider.
|
|
146
|
+
schema:
|
|
147
|
+
type: string
|
|
148
|
+
example: TSK
|
|
149
|
+
- name: sourceId
|
|
150
|
+
in: query
|
|
151
|
+
description: Filter by parking group id. Unique per data provider.
|
|
152
|
+
schema:
|
|
153
|
+
type: string
|
|
154
|
+
example: 1
|
|
155
|
+
- name: category
|
|
156
|
+
in: query
|
|
157
|
+
description: Filter by parking type. Use with square brackets `category[]`
|
|
158
|
+
style: form
|
|
159
|
+
explode: false
|
|
160
|
+
schema:
|
|
161
|
+
type: array
|
|
162
|
+
items:
|
|
163
|
+
type: object
|
|
164
|
+
example: park_and_ride
|
|
165
|
+
- name: limit
|
|
166
|
+
in: query
|
|
167
|
+
description: Limits number of retrieved items.
|
|
168
|
+
schema:
|
|
169
|
+
type: number
|
|
170
|
+
example: 10
|
|
171
|
+
- name: offset
|
|
172
|
+
in: query
|
|
173
|
+
description: Number of the first items that are skipped.
|
|
174
|
+
schema:
|
|
175
|
+
type: number
|
|
176
|
+
example: 0
|
|
177
|
+
|
|
178
|
+
responses:
|
|
179
|
+
200:
|
|
180
|
+
description: OK
|
|
181
|
+
content:
|
|
182
|
+
application/json; charset=utf-8:
|
|
183
|
+
schema:
|
|
184
|
+
type: object
|
|
185
|
+
properties:
|
|
186
|
+
features:
|
|
187
|
+
type: array
|
|
188
|
+
items:
|
|
189
|
+
$ref: '#/components/schemas/ParkingSpaceFeature'
|
|
190
|
+
type:
|
|
191
|
+
type: string
|
|
192
|
+
example: FeatureCollection
|
|
193
|
+
401:
|
|
194
|
+
$ref: "#/components/responses/UnauthorizedError"
|
|
195
|
+
|
|
196
|
+
404:
|
|
197
|
+
description: Not found
|
|
198
|
+
/parking/detail/{id}:
|
|
199
|
+
get:
|
|
200
|
+
tags:
|
|
201
|
+
- 🅿️ Parking
|
|
202
|
+
summary: GET Detailed Parking Space
|
|
203
|
+
parameters:
|
|
204
|
+
- name: id
|
|
205
|
+
in: path
|
|
206
|
+
description: Id of parking location.
|
|
207
|
+
required: true
|
|
208
|
+
schema:
|
|
209
|
+
type: string
|
|
210
|
+
example: 6
|
|
211
|
+
responses:
|
|
212
|
+
200:
|
|
213
|
+
description: OK
|
|
214
|
+
content:
|
|
215
|
+
application/json; charset=utf-8:
|
|
216
|
+
schema:
|
|
217
|
+
$ref: '#/components/schemas/ParkingSpaceFeature'
|
|
218
|
+
401:
|
|
219
|
+
$ref: "#/components/responses/UnauthorizedError"
|
|
220
|
+
|
|
221
|
+
404:
|
|
222
|
+
description: Not found
|
|
223
|
+
/parking/measurements:
|
|
224
|
+
get:
|
|
225
|
+
tags:
|
|
226
|
+
- 🅿️ Parking
|
|
227
|
+
summary: GET All Parking Spaces Measurements
|
|
228
|
+
parameters:
|
|
229
|
+
- name: source
|
|
230
|
+
in: query
|
|
231
|
+
description: Filter by data provider.
|
|
232
|
+
schema:
|
|
233
|
+
type: string
|
|
234
|
+
example: korid
|
|
235
|
+
- name: sourceId
|
|
236
|
+
in: query
|
|
237
|
+
description: Filter by parking group id. Unique per data provider.
|
|
238
|
+
schema:
|
|
239
|
+
type: string
|
|
240
|
+
example: 1
|
|
241
|
+
- name: latest
|
|
242
|
+
in: query
|
|
243
|
+
description: Show only the latest measurement.
|
|
244
|
+
schema:
|
|
245
|
+
type: boolean
|
|
246
|
+
example: true
|
|
247
|
+
default: false
|
|
248
|
+
- name: from
|
|
249
|
+
in: query
|
|
250
|
+
description: Date in ISO8601, limits data measured from this datetime.
|
|
251
|
+
schema:
|
|
252
|
+
type: string
|
|
253
|
+
example: "2021-02-26T12:01:00.000Z"
|
|
254
|
+
- name: to
|
|
255
|
+
in: query
|
|
256
|
+
description: Date in ISO8601, limits data measured up until this datetime.
|
|
257
|
+
schema:
|
|
258
|
+
type: string
|
|
259
|
+
example: "2021-02-26T12:03:00.000Z"
|
|
260
|
+
- name: page
|
|
261
|
+
in: query
|
|
262
|
+
description: Number of result page.
|
|
263
|
+
schema:
|
|
264
|
+
type: number
|
|
265
|
+
example: 1
|
|
266
|
+
- name: pageSize
|
|
267
|
+
in: query
|
|
268
|
+
description: Result page size.
|
|
269
|
+
schema:
|
|
270
|
+
type: number
|
|
271
|
+
example: 10000
|
|
272
|
+
responses:
|
|
273
|
+
200:
|
|
274
|
+
description: OK
|
|
275
|
+
content:
|
|
276
|
+
application/json; charset=utf-8:
|
|
277
|
+
schema:
|
|
278
|
+
type: array
|
|
279
|
+
items:
|
|
280
|
+
$ref: '#/components/schemas/ParkingMeasurement'
|
|
281
|
+
401:
|
|
282
|
+
$ref: "#/components/responses/UnauthorizedError"
|
|
283
|
+
|
|
284
|
+
404:
|
|
285
|
+
description: Not found
|
|
286
|
+
|
|
287
|
+
400:
|
|
288
|
+
description: Bad request
|
|
289
|
+
content:
|
|
290
|
+
application/json; charset=utf-8:
|
|
291
|
+
schema:
|
|
292
|
+
type: object
|
|
293
|
+
properties:
|
|
294
|
+
error_message:
|
|
295
|
+
type: string
|
|
296
|
+
example: Bad request
|
|
297
|
+
error_status:
|
|
298
|
+
type: number
|
|
299
|
+
example: 400
|
|
300
|
+
error_info:
|
|
301
|
+
type: string
|
|
302
|
+
example: '{"pageSize":{"location":"query","param":"pageSize","value":"-2","msg":"pageSize should be a positive int and should not exceed 10,000"}}'
|
|
303
|
+
/parking/tariffs/:
|
|
304
|
+
get:
|
|
305
|
+
tags:
|
|
306
|
+
- 🅿️ Parking
|
|
307
|
+
summary: GET All Parking Spaces Tariffs
|
|
308
|
+
parameters:
|
|
309
|
+
- name: x-access-token
|
|
310
|
+
in: header
|
|
311
|
+
description: e.g. YOUR_ACCESS_TOKEN
|
|
312
|
+
schema:
|
|
313
|
+
type: string
|
|
314
|
+
example: YOUR_ACCESS_TOKEN
|
|
315
|
+
- name: source
|
|
316
|
+
in: query
|
|
317
|
+
description: Filter by data provider.
|
|
318
|
+
schema:
|
|
319
|
+
type: string
|
|
320
|
+
example: korid
|
|
321
|
+
required: false
|
|
322
|
+
responses:
|
|
323
|
+
200:
|
|
324
|
+
description: OK
|
|
325
|
+
content:
|
|
326
|
+
application/json; charset=utf-8:
|
|
327
|
+
schema:
|
|
328
|
+
type: array
|
|
329
|
+
items:
|
|
330
|
+
$ref: '#/components/schemas/ParkingSpaceTariff'
|
|
331
|
+
401:
|
|
332
|
+
$ref: "#/components/responses/UnauthorizedError"
|
|
333
|
+
|
|
334
|
+
404:
|
|
335
|
+
description: Not found
|
|
336
|
+
/parking/tariffs/{tariffId}:
|
|
337
|
+
get:
|
|
338
|
+
tags:
|
|
339
|
+
- 🅿️ Parking
|
|
340
|
+
summary: GET Parking Space Tariff
|
|
341
|
+
parameters:
|
|
342
|
+
- name: tariffId
|
|
343
|
+
in: path
|
|
344
|
+
description: Id of parking tariff.
|
|
345
|
+
required: true
|
|
346
|
+
schema:
|
|
347
|
+
type: string
|
|
348
|
+
example: b184865e-5a5e-5465-abc1-4fab6bc56a77
|
|
349
|
+
responses:
|
|
350
|
+
200:
|
|
351
|
+
description: OK
|
|
352
|
+
content:
|
|
353
|
+
application/json; charset=utf-8:
|
|
354
|
+
schema:
|
|
355
|
+
$ref: '#/components/schemas/ParkingSpaceTariff'
|
|
356
|
+
401:
|
|
357
|
+
$ref: "#/components/responses/UnauthorizedError"
|
|
358
|
+
404:
|
|
359
|
+
description: Not found
|
|
360
|
+
components:
|
|
361
|
+
responses:
|
|
362
|
+
UnauthorizedError:
|
|
363
|
+
description: API key is missing or invalid
|
|
364
|
+
headers:
|
|
365
|
+
x-access-token:
|
|
366
|
+
schema:
|
|
367
|
+
type: string
|
|
368
|
+
schemas:
|
|
369
|
+
ParkingSpaceFeature:
|
|
370
|
+
type: object
|
|
371
|
+
properties:
|
|
372
|
+
geometry:
|
|
373
|
+
type: object
|
|
374
|
+
description: GeoJSon geometry
|
|
375
|
+
properties:
|
|
376
|
+
|
|
377
|
+
coordinates:
|
|
378
|
+
oneOf:
|
|
379
|
+
- type: array
|
|
380
|
+
items:
|
|
381
|
+
type: number
|
|
382
|
+
example: [14.441252, 50.109318]
|
|
383
|
+
- type: array
|
|
384
|
+
items:
|
|
385
|
+
type: array
|
|
386
|
+
items:
|
|
387
|
+
type: number
|
|
388
|
+
example: [14.441252, 50.109318]
|
|
389
|
+
type:
|
|
390
|
+
type: string
|
|
391
|
+
enum:
|
|
392
|
+
- Point
|
|
393
|
+
- Polygon
|
|
394
|
+
properties:
|
|
395
|
+
type: object
|
|
396
|
+
properties:
|
|
397
|
+
id:
|
|
398
|
+
type: string
|
|
399
|
+
example: 1768
|
|
400
|
+
source:
|
|
401
|
+
type: string
|
|
402
|
+
example: TSK
|
|
403
|
+
source_id:
|
|
404
|
+
type: string
|
|
405
|
+
example: 534002
|
|
406
|
+
data_provider:
|
|
407
|
+
type: string
|
|
408
|
+
nullable: true
|
|
409
|
+
example: www.tsk-praha.cz
|
|
410
|
+
name:
|
|
411
|
+
type: string
|
|
412
|
+
example: Holešovice
|
|
413
|
+
category:
|
|
414
|
+
type: string
|
|
415
|
+
nullable: true
|
|
416
|
+
example: park_and_ride
|
|
417
|
+
date_modified:
|
|
418
|
+
type: string
|
|
419
|
+
example: '2020-05-18T07:38:37.000Z'
|
|
420
|
+
address_formatted:
|
|
421
|
+
type: string
|
|
422
|
+
nullable: true
|
|
423
|
+
example: 'Vrbenského, 17000 Praha Holešovice, Česko'
|
|
424
|
+
address:
|
|
425
|
+
type: object
|
|
426
|
+
nullable: true
|
|
427
|
+
properties:
|
|
428
|
+
address_country:
|
|
429
|
+
type: string
|
|
430
|
+
example: Česko
|
|
431
|
+
address_formatted:
|
|
432
|
+
type: string
|
|
433
|
+
example: Vrbenského, 17000 Praha Holešovice, Česko
|
|
434
|
+
address_locality:
|
|
435
|
+
type: string
|
|
436
|
+
example: Praha
|
|
437
|
+
address_region:
|
|
438
|
+
type: string
|
|
439
|
+
example: Holešovice
|
|
440
|
+
postal_code:
|
|
441
|
+
type: string
|
|
442
|
+
example: 17000
|
|
443
|
+
street_address:
|
|
444
|
+
type: string
|
|
445
|
+
example: Vrbenského
|
|
446
|
+
area_served:
|
|
447
|
+
type: string
|
|
448
|
+
nullable: true
|
|
449
|
+
web_app_payment_url:
|
|
450
|
+
type: string
|
|
451
|
+
nullable: true
|
|
452
|
+
example: 'https://ke-utc.appspot.com/static/select_offstreet.html?shortname=139'
|
|
453
|
+
android_app_payment_url:
|
|
454
|
+
type: string
|
|
455
|
+
nullable: true
|
|
456
|
+
ios_app_payment_url:
|
|
457
|
+
type: string
|
|
458
|
+
nullable: true
|
|
459
|
+
total_spot_number:
|
|
460
|
+
type: number
|
|
461
|
+
example: 74
|
|
462
|
+
tariff_id:
|
|
463
|
+
type: string
|
|
464
|
+
nullable: true
|
|
465
|
+
example: 20
|
|
466
|
+
valid_from:
|
|
467
|
+
type: string
|
|
468
|
+
nullable: true
|
|
469
|
+
example: '2020-05-31T00:00:00.000Z'
|
|
470
|
+
valid_to:
|
|
471
|
+
type: string
|
|
472
|
+
nullable: true
|
|
473
|
+
example: '2022-05-31T00:00:00.000Z'
|
|
474
|
+
parking_type:
|
|
475
|
+
type: string
|
|
476
|
+
enum:
|
|
477
|
+
- park_and_ride
|
|
478
|
+
- park_paid_private
|
|
479
|
+
- on_street
|
|
480
|
+
- other
|
|
481
|
+
- park_sharing
|
|
482
|
+
- disabled_parking
|
|
483
|
+
zone_type:
|
|
484
|
+
type: string
|
|
485
|
+
nullable: true
|
|
486
|
+
enum:
|
|
487
|
+
- zone_residential
|
|
488
|
+
- zone_mixed
|
|
489
|
+
- zone_visitors
|
|
490
|
+
- zone_other
|
|
491
|
+
- zone_free
|
|
492
|
+
centroid:
|
|
493
|
+
type: object
|
|
494
|
+
properties:
|
|
495
|
+
type:
|
|
496
|
+
type: string
|
|
497
|
+
example: Point
|
|
498
|
+
coordinates:
|
|
499
|
+
type: array
|
|
500
|
+
items:
|
|
501
|
+
type: number
|
|
502
|
+
example: [14.441252, 50.109318]
|
|
503
|
+
available_spots_last_updated:
|
|
504
|
+
type: number
|
|
505
|
+
nullable: true
|
|
506
|
+
example: '2021-03-01T00:19:47+01:00'
|
|
507
|
+
available_spots_number:
|
|
508
|
+
type: number
|
|
509
|
+
nullable: true
|
|
510
|
+
example: 17
|
|
511
|
+
required:
|
|
512
|
+
- id
|
|
513
|
+
- source
|
|
514
|
+
- source_id
|
|
515
|
+
- name
|
|
516
|
+
- date_modified
|
|
517
|
+
- parking_type
|
|
518
|
+
- centroid
|
|
519
|
+
- available_spots_last_updated
|
|
520
|
+
- available_spots_number
|
|
521
|
+
type:
|
|
522
|
+
type: string
|
|
523
|
+
example: Feature
|
|
524
|
+
ParkingMeasurement:
|
|
525
|
+
title: Parking Measurement
|
|
526
|
+
type: object
|
|
527
|
+
properties:
|
|
528
|
+
source:
|
|
529
|
+
type: string
|
|
530
|
+
example: korid
|
|
531
|
+
source_id:
|
|
532
|
+
type: string
|
|
533
|
+
example: 1
|
|
534
|
+
available_spot_number:
|
|
535
|
+
type: number
|
|
536
|
+
example: 2
|
|
537
|
+
closed_spot_number:
|
|
538
|
+
type: number
|
|
539
|
+
example: 0
|
|
540
|
+
occupied_spot_number:
|
|
541
|
+
type: number
|
|
542
|
+
example: 12
|
|
543
|
+
total_spot_number:
|
|
544
|
+
type: number
|
|
545
|
+
example: 14
|
|
546
|
+
date_modified:
|
|
547
|
+
type: string
|
|
548
|
+
example: "2021-02-28T23:19:47.384Z"
|
|
549
|
+
required:
|
|
550
|
+
- source
|
|
551
|
+
- source_id
|
|
552
|
+
- available_spot_number
|
|
553
|
+
- closed_spot_number
|
|
554
|
+
- occupied_spot_number
|
|
555
|
+
- total_spot_number
|
|
556
|
+
- date_modified
|
|
557
|
+
ParkingSpaceTariff:
|
|
558
|
+
title: Parking Space Tariff
|
|
559
|
+
required:
|
|
560
|
+
- tariff_id
|
|
561
|
+
- source
|
|
562
|
+
- last_updated
|
|
563
|
+
- payment_mode
|
|
564
|
+
- free_of_charge
|
|
565
|
+
- charge_band_name
|
|
566
|
+
- charge_currency
|
|
567
|
+
type: object
|
|
568
|
+
properties:
|
|
569
|
+
tariff_id:
|
|
570
|
+
type: string
|
|
571
|
+
example: b184865e-5a5e-5465-abc1-4fab6bc56a77
|
|
572
|
+
source:
|
|
573
|
+
type: string
|
|
574
|
+
example: korid
|
|
575
|
+
last_updated:
|
|
576
|
+
type: string
|
|
577
|
+
example: "2020-10-12T15:19:21+02:00"
|
|
578
|
+
payment_mode:
|
|
579
|
+
type: string
|
|
580
|
+
example: "\"\""
|
|
581
|
+
payment_additional_description:
|
|
582
|
+
type: string
|
|
583
|
+
nullable: true
|
|
584
|
+
example: Parkování Liberec
|
|
585
|
+
free_of_charge:
|
|
586
|
+
type: boolean
|
|
587
|
+
example: false
|
|
588
|
+
url_link_address:
|
|
589
|
+
type: string
|
|
590
|
+
nullable: true
|
|
591
|
+
example: https://parking.liberec.cz/
|
|
592
|
+
charge_band_name:
|
|
593
|
+
type: string
|
|
594
|
+
example: E
|
|
595
|
+
payment_methods:
|
|
596
|
+
type: array
|
|
597
|
+
items:
|
|
598
|
+
type: string
|
|
599
|
+
enum:
|
|
600
|
+
- card_online
|
|
601
|
+
- card_offline
|
|
602
|
+
- cash
|
|
603
|
+
- coins_only
|
|
604
|
+
- mobile_app
|
|
605
|
+
- litacka
|
|
606
|
+
- sms_payment
|
|
607
|
+
- apple_pay
|
|
608
|
+
- google_pay
|
|
609
|
+
- unknown
|
|
610
|
+
|
|
611
|
+
charge_currency:
|
|
612
|
+
type: string
|
|
613
|
+
example: CZK
|
|
614
|
+
allowed_vehicle_type:
|
|
615
|
+
type: string
|
|
616
|
+
nullable: true
|
|
617
|
+
example: carSharing, taxi
|
|
618
|
+
allowed_fuel_type:
|
|
619
|
+
type: string
|
|
620
|
+
nullable: true
|
|
621
|
+
example: electricity, petrol, lpg
|
|
622
|
+
charges:
|
|
623
|
+
type: array
|
|
624
|
+
items:
|
|
625
|
+
$ref: '#/components/schemas/ParkingSpaceTariffCharge'
|
|
626
|
+
reservation_url:
|
|
627
|
+
type: string
|
|
628
|
+
nullable: true
|
|
629
|
+
ParkingSpaceTariffCharge:
|
|
630
|
+
title: Parking Space Tariff Charge
|
|
631
|
+
required:
|
|
632
|
+
- charge
|
|
633
|
+
- charge_order_index
|
|
634
|
+
type: object
|
|
635
|
+
properties:
|
|
636
|
+
charge:
|
|
637
|
+
type: number
|
|
638
|
+
example: 20
|
|
639
|
+
charge_type:
|
|
640
|
+
type: string
|
|
641
|
+
nullable: true
|
|
642
|
+
enum:
|
|
643
|
+
- minimum
|
|
644
|
+
- maximum
|
|
645
|
+
- additional_interval_price
|
|
646
|
+
- season_ticket
|
|
647
|
+
- temporary_price
|
|
648
|
+
- first_interval_price
|
|
649
|
+
- free_parking
|
|
650
|
+
- flat
|
|
651
|
+
- unknown
|
|
652
|
+
- other
|
|
653
|
+
charge_order_index:
|
|
654
|
+
type: number
|
|
655
|
+
example: 0
|
|
656
|
+
charge_interval:
|
|
657
|
+
type: number
|
|
658
|
+
nullable: true
|
|
659
|
+
example: 1800
|
|
660
|
+
max_iterations_of_charge:
|
|
661
|
+
type: number
|
|
662
|
+
nullable: true
|
|
663
|
+
example: 1
|
|
664
|
+
min_iterations_of_charge:
|
|
665
|
+
type: number
|
|
666
|
+
nullable: true
|
|
667
|
+
example: 1
|
|
668
|
+
start_time_of_period:
|
|
669
|
+
type: string
|
|
670
|
+
nullable: true
|
|
671
|
+
example: Mon-Fri 09:00
|
|
672
|
+
end_time_of_period:
|
|
673
|
+
type: string
|
|
674
|
+
nullable: true
|
|
675
|
+
example: Mon-Sun 14:30
|