-
Notifications
You must be signed in to change notification settings - Fork 0
/
calls.http
309 lines (238 loc) · 7.5 KB
/
calls.http
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
### GET AN ACCESS TOKEN
# @name login
POST {{$dotenv DEV_AUTH_URI}}/auth/realms/noi/protocol/openid-connect/token
Content-Type: application/x-www-form-urlencoded
&grant_type=password
&username={{$dotenv DEV_AUTH_USER}}
&password={{$dotenv DEV_AUTH_PASS}}
&client_id=odh-generic-client
&client_secret=
# &grant_type=client_credentials
# &client_id=odh-generic-client
# &client_secret=
###
@token = {{login.response.body.access_token}}
@host=http://localhost:8081
#@host=https://mobility.api.opendatahub.com/v2
#@host=https://mobility.api.opendatahub.testingmachine.eu/v2
###
GET {{host}}/tree/TrafficSensor/*/latest
?where=scode.eq.%22A22:5687:3%22
Authorization: Bearer {{token}}
### Events
{{host}}/event,tree/*
?select=evldescription,evuuid,evseriesuuid,evprovenance
Authorization: Bearer {{token}}
###
GET {{host}}/flat/*/*/2022-01-01/2022-01-02
?where=sorigin.eq.APPABZ
&select=prname,prversion
###
GET {{host}}/flat/*/*/latest
?where=sorigin.eq.APPABZ
Authorization: Bearer {{token}}
### Origin logging
GET {{host}}
?origin=tes
### Issue: 3x savailable
GET {{host}}/flat/*/*
?select=savailable
### Issue: 3x savailable
GET {{host}}/flat/*/*/latest
?select=savailable
Authorization: Bearer {{token}}
###
GET {{host}}/flat,edge
###
GET {{host}}/tree,node/BluetoothStation/*/latest
?limit=200
&where=scode.eq.corse_cappuccini
&distinct=true
&timezone=UTC
&select=mvalue
###
GET https://mobility.api.opendatahub.com/v1/emobility/rest/get-stations
Content-Type: text/xml
###
GET {{host}}/flat/MeteoStation/*/latest
?select=sdatatypes
&limit=1
&shownull=true
###
GET {{host}}/flat/MeteoStation/*/latest
?select=tmeasurements
&limit=1
&shownull=true
Referer: testreferer
###
GET {{host}}/flat/MeteoStation/*/2019-01-01/2019-01-02
?select=tmeasurements
&limit=2
&shownull=true
Authorization: Bearer {{token}}
###
GET {{host}}/flat/MeteoStation/*/2019-01-01/2019-01-02
?select=tmeasurements
&limit=2
&shownull=true
### Level02
GET {{host}}/flat/LinkStation?select=smetadata.coordinates
###
GET {{host}}/tree,edge/*
?limit=100
&select=eorigin
&shownull=true
#&where=eorigin.neq.null
Referer: testreferer
### Level5
GET {{host}}/flat/BluetoothStation/vehicle detection/2019-07-23T18:01:00+0200/2019-07-23T18:01:02+0200
?select=mvalidtime
###
GET {{host}}/flat/BluetoothStation/vehicle detection/2019-07-23T16:01:00-0200/2019-07-23T18:01:02-0200
?select=mvalidtime
###
{{host}}/flat/LinkStation
?where=savailable.neq.false
###
GET {{host}}/tree/Bicycle/*?select=sdatatypes&where=scode.eq."1041071595"&shownull=false
###
{{host}}/flat/ParkingStation,ParkingSensor/parking-forecast-30,parking-forecast-60,parking-forecast-120,parking-forecast-240/2020-09-21T13:45:24.975Z/2020-09-21T17:45:24.975Z?limit=-1&offset=0&shownull=false&distinct=false&select=scode,mvalue,mperiod,mvalidtime
###
{{host}}/tree,edge/LinkStation/?limit=-1&distinct=true&select=egeometry,ecode&where=eactive.eq.false
###
GET {{host}}/flat,edge/LinkStation/?select=egeometry,ecode&where=egeometry.neq.null
###
GET {{host}}/flat/BluetoothStation/Bluetooth Count record/2020-09-15T22:00:00.000Z/2020-09-22T22:00:00.000Z
?limit=-1
&distinct=true
&where=and(scode.eq."Maso_Pieve",sactive.eq.true)
###
GET {{host}}/flat/BluetoothStation/Bluetooth Count record/2012-09-15T22:00:00.000Z/2020-09-22T22:00:00.000Z
?limit=100
&distinct=true
&where=and(scode.eq."Maso_Pieve",sactive.eq.true)
&select=mvalue,mvalidtime
### Metadata history
GET {{host}}/tree,node/BluetoothStation/metadata/2019-01-01/2023-01-02
?limit=200
&where=scode.eq.corse_cappuccini
###
GET {{host}}/flat/BluetoothStation/metadata/2019-01-01/2023-01-02
?limit=200
&where=scode.eq.corse_cappuccini
### Check availability (should always be true or an empty response)
GET {{host}}/flat,edge/*
?where=sbactive.eq.null
//?where=or(seavailable.neq.true,sbavailable.neq.true,eavailable.neq.true)
###
GET {{host}}/tree,node/BluetoothStation/*/2020-01-05T12/2020-01-05T17
?where=sactive.eq.true
#&select=tname,tunit,tdescription,scoordinate,sname
&limit=-1
###
GET {{host}}/flat/VMS/esposizione/
?where=tmetadata.signal-codes.0.id.eq."0"
&limit=1
###
GET {{host}}/flat/VMS/esposizione/
?select=tmetadata.signal-codes.0.id
############# PROBLEMATIC QUERIES (status = 500)
###
GET {{host}}/flat,node/BluetoothStation/*/latest
?limit=200&where=scode.eq.mazzini&distinct=true&timezone=UTC
###
GET {{host}}/flat,node/BluetoothStation/*/latest
?limit=200&where=scode.eq.schaffer-winkel&distinct=true&timezone=UTC
###
GET {{host}}/tree,node/BluetoothStation/*/2023-03-01/2023-03-09
?limit=200&timezone=UTC
#?limit=200&where=scode.eq.huber&distinct=true&timezone=UTC
###
GET {{host}}/flat,node/EChargingPlug/*/2019-03-25T01/2019-03-25T02
?where=pactive.eq.true
&limit=-1
### Measurement JSON Tests
@token = {{login.response.body.access_token}}
GET {{host}}/tree/*/*/latest?where=mvalue.type.ire.POINT&select=mvalue
Authorization: Bearer {{token}}
### Test issue https://github.com/noi-techpark/it.bz.opendatahub.api.mobility-ninja/issues/16
{{host}}/tree/EChargingPlug/echarging-plug-status/latest
?select=mvalue
&where=sactive.eq.true,pactive.eq.true
&limit=1
### Test issue https://github.com/noi-techpark/it.bz.opendatahub.api.mobility-ninja/issues/22
{{host}}/tree/EChargingPlug/echarging-plug-status/latest
?select=pcode,pmetadata.state,mvalue
&where=sactive.eq.true,pactive.eq.true
&limit=-1
&showNull=true
### Test
{{host}}/tree/MeteoStation/precipitation/latest
?select=count(mvalue)
&limit=1000
### Test issue
{{host}}/flat/EChargingStation/*/latest
?limit=-1
&distinct=true
&where=and(savailable.eq.true,sactive.eq.true,smetadata.accessType.neq."PRIVATE")
### Test mvalue with strings
{{host}}/flat/*/*/latest
?select=mvalue
&where=mvalue.when.eq."now"
### Problem on maps.noi.bz.it
{{host}}/flat/NOI-Place/*/latest
?limit=-1
&offset=0
&select=tmetadata,mvalue
&shownull=false
&distinct=true
&where=mvalue.eq.Selettori%20Group,sorigin.eq.office365
### Problem about ON_DEMAND
@token = {{login.response.body.access_token}}
{{host}}/flat/ON_DEMAND_ITINERARY/*/latest
Authorization: Bearer {{token}}
### Events
{{host}}/event,flat
### Events
@token = {{login.response.body.access_token}}
{{host}}/event,tree/*
?select=evldescription,evuuid,evseriesuuid,evprovenance
Authorization: Bearer {{token}}
#?1=1
#&shownull=true
#&limit=1
### Parent
{{host}}/node,tree/*
?select=sname,sparent
&limit=1
###
{{host}}/tree/BikeCounter/*/latest?limit=-1&distinct=true&showNull=true&select=tmeasurements&where=or(and(mperiod.eq.3600,tname.eq."vehicle detection \(count\)"))
###
{{host}}/flat,event/A22/latest?select=count(evcategory)&where=evcategory.eq."A22:BrennerLEC_BrennerLec B4 II S.103 \(BZ-SM\)"
###
{{host}}/flat,event/*?select=count(evcategory),evorigin
###
{{host}}/flat,event/A22/latest?select=evname,evcategory,evstart
### Start in the future --> shows events that have not been closed yet
{{host}}/flat,event/A22/2022-12-05?select=evname,evcategory,evstart,evend&shownull=true
### latest, but only if started from Jan 2022 onwards (not implemented yet)
{{host}}/flat,event/A22/latest?select=evname,evcategory,evstart,evend&shownull=true&where=evstart.gt.2022-01-01
# 2020-01-05T12/2020-01-05T17
### ERROR 404 expected --> generic
{{host}}/flat,event/b/c/a
### Test referer parameter header override
# Switch on json logging to see the referer in output
#
### Just header
{{host}}/event,flat
Referer: rheader
### just parameter
{{host}}/event,flat
?referer=rparamlc
### both (parameter should override)
{{host}}/event,flat
?referer=rparamlc
Referer: rheader
### uppercase parameter (not advertised, there for consistency with Content API)
{{host}}/event,flat
?Referer=rparamuc