-
Notifications
You must be signed in to change notification settings - Fork 0
/
original_CDS APIs.yaml
1898 lines (1858 loc) · 75.5 KB
/
original_CDS APIs.yaml
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
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
openapi: 3.1.0
x-stoplight:
id: 4wvvx7c8j5ymv
tags:
- name: Curbs API
description: The Curbs API is a REST API allowing cities to specify areas of interest along the curb along with the rules for using them
- name: Events API
description: 'The Events API is a REST API allowing real-time and historic events at the curb to be sent to cities, and the ability to check on the status of any sensors.'
- name: Metrics API
description: The Metrics API is a REST API allowing historic metrics calculations based on Event activity that happened at defined Curb places
info:
title: Curb Data Specification
version: 1.0.0
summary: 'CDS is a data specification to help cities manage their curb zone programs and surrounding areas, and measure the utilization and impact.'
description: 'The Curb Data Specification (CDS), a project of the Open Mobility Foundation (OMF), is a data standard and set of Application Programming Interfaces (APIs) that helps cities manage and companies use dynamic curb zones that optimize loading activities of people and goods, and measure the impact of these programs.'
contact:
url: 'https://github.com/openmobilityfoundation/curb-data-specification/'
name: Open Mobility Foundation
email: info@openmobilityfoundation.org
license:
name: Creative Commons Attribution 4.0 International Public License
url: 'http://www.apache.org/licenses/LICENSE-2.0.htmlhttps://github.com/openmobilityfoundation/curb-data-specification/blob/0706316a7bfb0d6b5104c75608d8f66cb8101fe7/LICENCE'
servers: []
paths:
/curbs/zones:
get:
summary: Get Curb Zones
responses:
'200':
description: Zones Found
content:
application/json:
schema:
type: object
properties:
version:
$ref: '#/components/schemas/rest-response-version'
time_zone:
$ref: '#/components/schemas/rest-response-time_zone'
last_updated:
$ref: '#/components/schemas/rest-response-last_updated'
currency:
$ref: '#/components/schemas/rest-response-currency'
author:
$ref: '#/components/schemas/rest-response-author'
license_url:
$ref: '#/components/schemas/rest-response-license_url'
data:
type: array
items:
type: object
properties:
zones:
type: array
items:
$ref: '#/components/schemas/curb_zone'
'400':
description: BAD_REQUEST
'401':
description: UNAUTHORIZED
'403':
description: FORBIDDEN
'500':
description: SERVER_ERROR
'503':
description: SERVICE_UNAVAILABLE
operationId: get-curbs-zones
description: 'This required endpoint must be implemented by every Curbs API server. If attaching policies to curb zones, the Query Curb Policies endpoint is also required.'
parameters:
- schema:
$ref: '#/components/schemas/uuid'
in: query
name: area
description: 'The ID of a Curb Area. If specified, only return Curb Zones contained within this area.'
- $ref: '#/components/parameters/min_lat'
- $ref: '#/components/parameters/min_lng'
- $ref: '#/components/parameters/max_lat'
- $ref: '#/components/parameters/max_lng'
- $ref: '#/components/parameters/lat'
- $ref: '#/components/parameters/lng'
- $ref: '#/components/parameters/radius'
tags:
- Curbs API
x-stoplight:
id: rf9d12orekm1h
/curbs/areas:
get:
summary: Get Curb Areas
responses:
'200':
description: Areas Found
content:
application/json:
schema:
type: object
properties:
version:
$ref: '#/components/schemas/rest-response-version'
time_zone:
$ref: '#/components/schemas/rest-response-time_zone'
last_updated:
$ref: '#/components/schemas/rest-response-last_updated'
currency:
$ref: '#/components/schemas/rest-response-currency'
author:
$ref: '#/components/schemas/rest-response-author'
license_url:
$ref: '#/components/schemas/rest-response-license_url'
data:
type: array
items:
type: object
properties:
areas:
type: array
items:
$ref: '#/components/schemas/curb_area'
'400':
description: BAD_REQUEST
'401':
description: UNAUTHORIZED
'403':
description: FORBIDDEN
'500':
description: SERVER_ERROR
'501':
description: NOT_IMPLEMENTED
'503':
description: SERVICE_UNAVAILABLE
operationId: get-curbs-areas
description: 'Optional endpoint. If not implemented, the server should reply with 501 Not Implemented.'
parameters:
- $ref: '#/components/parameters/min_lat'
- $ref: '#/components/parameters/min_lng'
- $ref: '#/components/parameters/max_lat'
- $ref: '#/components/parameters/max_lng'
- $ref: '#/components/parameters/lat'
- $ref: '#/components/parameters/lng'
- $ref: '#/components/parameters/radius'
tags:
- Curbs API
security: []
x-stoplight:
id: 2rmkdtzdroapa
/curbs/spaces:
get:
summary: Get Curb Spaces
responses:
'200':
description: Spaces Found
content:
application/json:
schema:
type: object
properties:
version:
$ref: '#/components/schemas/rest-response-version'
time_zone:
$ref: '#/components/schemas/rest-response-time_zone'
last_updated:
$ref: '#/components/schemas/rest-response-last_updated'
currency:
$ref: '#/components/schemas/rest-response-currency'
author:
$ref: '#/components/schemas/rest-response-author'
license_url:
$ref: '#/components/schemas/rest-response-license_url'
data:
type: array
items:
type: object
properties:
spaces:
type: array
items:
$ref: '#/components/schemas/curb_space'
'400':
description: BAD_REQUEST
'401':
description: UNAUTHORIZED
'403':
description: FORBIDDEN
'500':
description: SERVER_ERROR
'501':
description: NOT_IMPLEMENTED
'503':
description: SERVICE_UNAVAILABLE
operationId: get-curbs-spaces
description: 'Optional endpoint. If not implemented, the server should reply with 501 Not Implemented.'
parameters:
- $ref: '#/components/parameters/min_lat'
- $ref: '#/components/parameters/min_lng'
- $ref: '#/components/parameters/max_lat'
- $ref: '#/components/parameters/max_lng'
- $ref: '#/components/parameters/lat'
- $ref: '#/components/parameters/lng'
- $ref: '#/components/parameters/radius'
tags:
- Curbs API
security: []
x-stoplight:
id: uw6x7xz5yqmmo
/curbs/policies:
get:
summary: Get Curb Policies
responses:
'200':
description: Policies Found
content:
application/json:
schema:
type: object
properties:
version:
$ref: '#/components/schemas/rest-response-version'
time_zone:
$ref: '#/components/schemas/rest-response-time_zone'
last_updated:
$ref: '#/components/schemas/rest-response-last_updated'
currency:
$ref: '#/components/schemas/rest-response-currency'
author:
$ref: '#/components/schemas/rest-response-author'
license_url:
$ref: '#/components/schemas/rest-response-license_url'
data:
type: array
items:
type: object
properties:
policies:
type: array
items:
$ref: '#/components/schemas/curb_policy'
'400':
description: BAD_REQUEST
'401':
description: UNAUTHORIZED
'403':
description: FORBIDDEN
'500':
description: SERVER_ERROR
'501':
description: NOT_IMPLEMENTED
'503':
description: SERVICE_UNAVAILABLE
operationId: get-curbs-policies
description: 'Optional endpoint, but required if Curb Zones contain policy_id references. If not implemented, the server should reply with 501 Not Implemented.'
parameters:
- schema:
type: string
in: query
name: ids
description: Comma-separated list of Policy IDs.
tags:
- Curbs API
security: []
x-stoplight:
id: 8e7iad2rt96ow
'/curbs/zones/{id}':
get:
summary: Get a single Curb Zone
responses:
'200':
description: Zone Found
content:
application/json:
schema:
type: object
properties:
version:
$ref: '#/components/schemas/rest-response-version'
time_zone:
$ref: '#/components/schemas/rest-response-time_zone'
last_updated:
$ref: '#/components/schemas/rest-response-last_updated'
currency:
$ref: '#/components/schemas/rest-response-currency'
author:
$ref: '#/components/schemas/rest-response-author'
license_url:
$ref: '#/components/schemas/rest-response-license_url'
data:
type: array
items:
type: object
properties:
zone:
$ref: '#/components/schemas/curb_zone'
'400':
description: BAD_REQUEST
'401':
description: UNAUTHORIZED
'403':
description: FORBIDDEN
'404':
description: NOT_FOUND
'500':
description: SERVER_ERROR
'501':
description: NOT_IMPLEMENTED
'503':
description: SERVICE_UNAVAILABLE
operationId: get-curbs-zone
description: 'Fetch a single Curb Zone by ID. Optional endpoint. If not implemented, the server should reply with 501 Not Implemented.'
parameters:
- schema:
type: string
name: id
in: path
required: true
description: Curb Zone ID
- schema:
$ref: '#/components/schemas/timestamp'
in: query
name: time
description: 'The Curb Zone object will only be returned if its validity period includes this time; otherwise, the server should reply with 404 Not Found.'
- schema:
type: boolean
in: query
name: show_historic
description: 'Whether to return historic, retired curb zone data.'
tags:
- Curbs API
security: []
x-stoplight:
id: yuag4b4aqbkf1
'/curbs/areas/{id}':
get:
summary: Get a single Curb Area
responses:
'200':
description: Area Found
content:
application/json:
schema:
type: object
properties:
version:
$ref: '#/components/schemas/rest-response-version'
time_zone:
$ref: '#/components/schemas/rest-response-time_zone'
last_updated:
$ref: '#/components/schemas/rest-response-last_updated'
currency:
$ref: '#/components/schemas/rest-response-currency'
author:
$ref: '#/components/schemas/rest-response-author'
license_url:
$ref: '#/components/schemas/rest-response-license_url'
data:
type: array
items:
type: object
properties:
area:
$ref: '#/components/schemas/curb_area'
'400':
description: BAD_REQUEST
'401':
description: UNAUTHORIZED
'403':
description: FORBIDDEN
'404':
description: NOT_FOUND
'500':
description: SERVER_ERROR
'501':
description: NOT_IMPLEMENTED
'503':
description: SERVICE_UNAVAILABLE
operationId: get-curbs-area
description: 'Fetch a single Curb Area by ID. Optional endpoint. If not implemented, the server should reply with 501 Not Implemented.'
parameters:
- schema:
type: string
name: id
in: path
required: true
description: Curb Area ID
tags:
- Curbs API
security: []
x-stoplight:
id: ad85cej1q50dp
'/curbs/spaces/{id}':
get:
summary: Get a single Curb Space
responses:
'200':
description: Space Found
content:
application/json:
schema:
type: object
properties:
version:
$ref: '#/components/schemas/rest-response-version'
time_zone:
$ref: '#/components/schemas/rest-response-time_zone'
last_updated:
$ref: '#/components/schemas/rest-response-last_updated'
currency:
$ref: '#/components/schemas/rest-response-currency'
author:
$ref: '#/components/schemas/rest-response-author'
license_url:
$ref: '#/components/schemas/rest-response-license_url'
data:
type: array
items:
type: object
properties:
space:
$ref: '#/components/schemas/curb_space'
'400':
description: BAD_REQUEST
'401':
description: UNAUTHORIZED
'403':
description: FORBIDDEN
'404':
description: NOT_FOUND
'500':
description: SERVER_ERROR
'501':
description: NOT_IMPLEMENTED
'503':
description: SERVICE_UNAVAILABLE
operationId: get-curbs-space
description: 'Fetch a single Curb Space by ID. Optional endpoint. If not implemented, the server should reply with 501 Not Implemented.'
parameters:
- schema:
type: string
name: id
in: path
required: true
description: Curb Space ID
- schema:
$ref: '#/components/schemas/timestamp'
in: query
name: time
description: Availability data (if supplied) will be returned as of this time.
tags:
- Curbs API
security: []
x-stoplight:
id: u19hpktf0n1hl
'/curbs/policies/{id}':
get:
summary: Get a single Curb Policy
responses:
'200':
description: Policy Found
content:
application/json:
schema:
type: object
properties:
version:
$ref: '#/components/schemas/rest-response-version'
time_zone:
$ref: '#/components/schemas/rest-response-time_zone'
last_updated:
$ref: '#/components/schemas/rest-response-last_updated'
currency:
$ref: '#/components/schemas/rest-response-currency'
author:
$ref: '#/components/schemas/rest-response-author'
license_url:
$ref: '#/components/schemas/rest-response-license_url'
data:
type: array
items:
type: object
properties:
policy:
$ref: '#/components/schemas/curb_policy'
'400':
description: BAD_REQUEST
'401':
description: UNAUTHORIZED
'403':
description: FORBIDDEN
'404':
description: NOT_FOUND
'500':
description: SERVER_ERROR
'503':
description: SERVICE_UNAVAILABLE
operationId: get-curbs-policy
description: Fetch a single Curb Policy by ID.
parameters:
- schema:
type: string
name: id
in: path
required: true
description: Curb Policy ID
tags:
- Curbs API
security: []
x-stoplight:
id: f891w4kmcowo1
/events/events:
get:
summary: Get Events
tags:
- Events API
responses:
'200':
description: 'OK: operation successful.'
content:
application/json:
schema:
type: object
properties:
time_zone:
$ref: '#/components/schemas/rest-response-time_zone'
version:
$ref: '#/components/schemas/rest-response-version'
last_updated:
$ref: '#/components/schemas/rest-response-last_updated'
currency:
$ref: '#/components/schemas/rest-response-currency'
author:
$ref: '#/components/schemas/rest-response-author'
license_url:
$ref: '#/components/schemas/rest-response-license_url'
data:
type: array
items:
$ref: '#/components/schemas/curb-event'
operationId: get-events-events
parameters:
- $ref: '#/components/parameters/curb_area_id'
- $ref: '#/components/parameters/curb_zone_id'
- $ref: '#/components/parameters/curb_space_id'
description: ''
x-stoplight:
id: b5ex02kdfrljo
/events/status:
get:
summary: Get Status
tags:
- Events API
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
properties:
version:
$ref: '#/components/schemas/rest-response-version'
time_zone:
$ref: '#/components/schemas/rest-response-time_zone'
last_updated:
$ref: '#/components/schemas/rest-response-last_updated'
currency:
$ref: '#/components/schemas/rest-response-currency'
author:
$ref: '#/components/schemas/rest-response-author'
license_url:
$ref: '#/components/schemas/rest-response-license_url'
data:
type: object
properties:
status:
type: array
items:
type: object
properties:
data_source_device_id:
$ref: '#/components/schemas/uuid'
description: 'Unique identifier of this event source, whether sensor, vehicle, camera, etc.'
data_source_type:
$ref: '#/components/schemas/data_source_type'
description: General category of the source creating the event.
data_source_operator_id:
$ref: '#/components/schemas/operator_id'
sensor_status_is_commissioned:
type: boolean
description: 'If a sensor was used to capture this event, the commissioned status at the time that the event was reported. Indicates whether the sensor is currently in a state where it should be reporting data.'
sensor_status_is_online:
type: boolean
description: 'If a sensor was used to capture this event, the online status at the time that the event was reported. Indicates whether the sensor is currently online and reporting data.'
required:
- data_source_device_id
- data_source_type
'501':
$ref: '#/components/responses/501'
operationId: get-events-status
parameters:
- $ref: '#/components/parameters/curb_area_id'
- $ref: '#/components/parameters/curb_zone_id'
- $ref: '#/components/parameters/curb_space_id'
x-stoplight:
id: p1of272g09cjr
/metrics/sessions:
get:
summary: Get Sessions
tags:
- Metrics API
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
properties:
version:
$ref: '#/components/schemas/rest-response-version'
time_zone:
$ref: '#/components/schemas/rest-response-time_zone'
last_updated:
$ref: '#/components/schemas/rest-response-last_updated'
currency:
$ref: '#/components/schemas/rest-response-currency'
author:
$ref: '#/components/schemas/rest-response-author'
license_url:
$ref: '#/components/schemas/rest-response-license_url'
data:
type: array
items:
type: object
properties:
session_type:
type: string
enum:
- parking
- area
description: The type of session that happened for this event.
event_session_id:
$ref: '#/components/schemas/uuid'
description: 'If known and recorded to tie two Events together, then include the `event_session_id` from the [Curb Event](./docs/cds-openapi/6754f1a684eb4)'
event_id_start:
$ref: '#/components/schemas/uuid'
description: The globally unique identifier of the start/enter event that occurred.
event_id_end:
$ref: '#/components/schemas/uuid'
description: The globally unique identifier of the end/exit event that occurred.
event_location_start_latitude:
$ref: '#/components/schemas/latitude'
description: The geographic latitude point location where the start/enter of the event occurred.
event_location_start_longitude:
$ref: '#/components/schemas/longitude'
description: The geographic longitude point location where the start/enter of the event occurred.
event_location_end_latitude:
$ref: '#/components/schemas/latitude'
description: The geographic latitude point location where the end/exit of the event occurred.
event_location_end_longitude:
$ref: '#/components/schemas/longitude'
description: The geographic longitude point location where the end/exit of the event occurred.
event_time_start:
$ref: '#/components/schemas/timestamp'
description: Timestamp (date/time) at which the event started with the `park_start` or `enter_area` event types.
event_time_end:
$ref: '#/components/schemas/timestamp'
description: Timestamp (date/time) at which the event occurred.
curb_area_ids:
type: array
description: 'Unique IDs of the Curb Area where the event occurred. Since Curb Areas can overlap, an event may happen in more than one. Required for events that occurred in a known Curb Area for these event_types: `enter_area`, `exit_area`, `park_start`, `park_end`.'
items:
$ref: '#/components/schemas/uuid'
curb_zone_id:
$ref: '#/components/schemas/uuid'
description: Unique ID of the Curb Zone where the event occurred. Required for events that occurred at a known Curb Zone for **ALL** event types.
curb_space_id:
$ref: '#/components/schemas/uuid'
description: 'Unique ID of the Curb Space where the event occurred. Required for events that occurred at a known Curb Space for these event_types: `park_start`, `park_end`, `enter_area`, `exit_area`.'
vehicle_length:
type: number
description: 'Approximate length of the vehicle that performed the event, in centimeters. Required for sources capable of determining vehicle length.'
vehicle_type:
$ref: '#/components/schemas/vehicle_type'
required:
- session_type
'501':
$ref: '#/components/responses/501'
operationId: get-metrics-sessions
parameters:
- $ref: '#/components/parameters/curb_place_type'
- $ref: '#/components/parameters/curb_place_id'
- $ref: '#/components/parameters/min_lat'
- $ref: '#/components/parameters/min_lng'
- $ref: '#/components/parameters/max_lat'
- $ref: '#/components/parameters/max_lng'
- $ref: '#/components/parameters/lat'
- $ref: '#/components/parameters/lng'
- $ref: '#/components/parameters/radius'
- $ref: '#/components/parameters/start_time'
- $ref: '#/components/parameters/end_time'
description: |-
## Required Query Parameters
The following sets of query parameters are required if `ANY` parameter in the set are provided.
* `curb_place_type`, `curb_place_id`
* `min_lat`, `min_lng`, `max_lat`, `max_lng`
* `lat`, `lng`, `radius`
x-stoplight:
id: owuyr2yiwj38o
/metrics/aggregates:
get:
summary: Get Aggregates
tags:
- Metrics API
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
properties:
version:
$ref: '#/components/schemas/rest-response-version'
time_zone:
$ref: '#/components/schemas/rest-response-time_zone'
last_updated:
$ref: '#/components/schemas/rest-response-last_updated'
currency:
$ref: '#/components/schemas/rest-response-currency'
author:
$ref: '#/components/schemas/rest-response-author'
license_url:
$ref: '#/components/schemas/rest-response-license_url'
data:
type: array
items:
type: object
properties:
curb_place_type:
type: string
description: The type of curb place this aggregate applies to from the Curbs API.
enum:
- area
- zone
- space
curb_place_id:
$ref: '#/components/schemas/uuid'
description: The ID of this curb place.
metric_type:
type: string
enum:
- total_sessions
- turnover
- average_dwell_time
- occupancy_percent
description: 'The metric this aggregate applies to. These calaculations are defined by the OMF in detail [here](https://github.com/openmobilityfoundation/curb-data-specification/tree/main/metrics#methodology).'
date:
type: string
description: 'The date the event occured in ISO 8601 format, local timezone, in "YYYY-MM-DD" format.'
example: '2021-04-01'
format: date
hour:
type: integer
description: 'The hour of the day the event occured in ISO 8601 format, local timezone, in "hh" format.'
example: '23'
value:
type: number
description: The results of the calculations for this metric. Note that "-1" means that the sensor/source was offline for the majority of the time.
example: '"2.9" "0.05"'
required:
- curb_place_type
- curb_place_id
- metric_type
- date
- hour
- value
required:
- version
- time_zone
- last_updated
- currency
- author
- license_url
- data
'501':
$ref: '#/components/responses/501'
operationId: get-metrics-aggregates
parameters:
- $ref: '#/components/parameters/curb_place_type'
- $ref: '#/components/parameters/curb_place_id'
- $ref: '#/components/parameters/min_lat'
- $ref: '#/components/parameters/min_lng'
- $ref: '#/components/parameters/max_lat'
- $ref: '#/components/parameters/max_lng'
- $ref: '#/components/parameters/lat'
- $ref: '#/components/parameters/lng'
- $ref: '#/components/parameters/radius'
- $ref: '#/components/parameters/start_time'
- $ref: '#/components/parameters/end_time'
description: |-
## Required Query Parameters
The following sets of query parameters are required if `ANY` parameter in the set are provided.
* `curb_place_type`, `curb_place_id`
* `min_lat`, `min_lng`, `max_lat`, `max_lng`
* `lat`, `lng`, `radius`
x-stoplight:
id: vlnl7l63gqy1n
components:
schemas:
timestamp:
description: Timestamp in milliseconds since Epoch.
type: integer
minimum: 100000000000
maximum: 99999999999999
x-internal: false
title: Timestamp
x-stoplight:
id: 9h333ijy5gy1e
uuid:
type: string
format: uuid
x-internal: false
title: UUID
x-stoplight:
id: yan587cvuqppu
description: A UUID string value
latitude:
type: number
minimum: -90
maximum: 90
x-internal: false
title: Latitude
description: ''
x-stoplight:
id: w5n8fow8pavzx
longitude:
type: number
minimum: -180
maximum: 180
x-internal: false
title: Longitude
x-stoplight:
id: 1mf0ywpexjhtq
data_source_type:
title: Data Source Type
x-stoplight:
id: 807f64500e804
type: string
enum:
- data_feed
- camera
- above_ground
- in_ground
- meter
- payment
- in_person
- other
description: The set of possible categories of sources that can publish a Curb Event.
vehicle_type:
title: Vehicle Type
x-stoplight:
id: zc8pejs5x7n8g
type: string
enum:
- bicyle
- cargo_bicycle
- car
- scooter
- moped
- motorcycle
- truck
- van
- freight
- other
- unspecified
description: |-
Type of the vehicle that performed the event.
Required for sources capable of determining vehicle type.
operator_id:
$ref: '#/components/schemas/uuid'
x-stoplight:
id: jts5h9b4s9c8v
description: |-
Unique identifier of the entity responsible for operating the event data source.
For example, IDs can identify a fleet operator sending a data feed, or the organization (company or city) operating the sensor.
**Values are defined globally and are managed by the Open Mobility Foundation and operators may register [here](https://github.com/openmobilityfoundation/curb-data-specification/wiki/Adding-a-CDS-Data-Source-Operator-ID)**
title: Operator ID
examples:
- 55b617b9-730e-485e-83de-5e1a35fdc352
curb_zone:
type: object
properties:
curb_zone_id:
allOf:
- $ref: '#/components/schemas/uuid'
- description: The ID of this Curb Zone.
geometry:
type: object
properties:
type:
type: string
coordinates:
type: array
items:
type: number
required:
- type
- coordinates
description: The spatial extent of this curb zone.
curb_policy_ids:
type: array
items:
$ref: '#/components/schemas/uuid'
description: 'An array of IDs of Policy objects. Together, these define the regulations of this Curb Zone.'
prev_policies:
type: array
items:
type: object
properties:
curb_policy_ids:
type: array
items:
$ref: '#/components/schemas/uuid'
description: 'An array of IDs of Policy objects. Together, these define the previous regulations of this Curb Zone.'
start_date:
allOf:
- $ref: '#/components/schemas/timestamp'
- description: The date/time that this policy started being active for this curb location.
end_date:
allOf:
- $ref: '#/components/schemas/timestamp'
- description: The date/time that this policy ended being active for this curb location.
required:
- curb_policy_ids
- start_date
- end_date
description: An array of information about what previous policies applied to a curb zone and when.
published_date:
allOf:
- $ref: '#/components/schemas/timestamp'
- description: The date/time that this curb zone was first published in this data feed.
last_updated_date:
allOf:
- $ref: '#/components/schemas/timestamp'
- description: The date/time that the properties of ths curb zone were last updated.
prev_curb_zone_ids:
type: array
items:
$ref: '#/components/schemas/uuid'
description: An array of IDs of previous curb zone objects. They are listed in order with the most recent ones first.
start_date:
allOf:
- $ref: '#/components/schemas/timestamp'
- description: The earliest time that the data for this curb location is known to be valid.
end_date:
allOf:
- $ref: '#/components/schemas/timestamp'
- description: The time at which the data for this curb location ceases to be valid.
location_references:
type: array
items:
type: object
properties:
source:
type: string
format: url
description: An identifier for the source of the linear reference. This MUST be a URL pointing to more information about the underlying map or reference system.
ref_id:
type: string
description: The linear feature being referenced (usually a street or curb segment).
start:
type: integer
description: The distance (in centimeters) from the start of the referenced linear feature to the start of the Curb Zone.
minimum: 0
end:
type: integer
description: 'The distance (in centimeters) from the start of the referenced linear feature to the end of the Curb Zone. ''end'' MAY be smaller than start, implying that the direction of the Curb Zone is opposite to the direction of the referenced linear feature.'
minimum: 0
side:
type: string
enum:
- left
- right
description: 'If the referenced linear feature is a roadway, the side of the roadway on which the Curb Zone may be found, when heading from the start to the end of the feature in its native orientation.'
required:
- source
- ref_id
- start
- end
description: 'A linear reference defines a Curb Zone''s position by reference to a linear feature, like a street centerline or edge-of-pavement line.'
description: One or more linear references for this Curb Zone.
name:
type: string
description: A human-readable name for this Curb Zone that identifies it to end users.
user_zone_id:
type: string
description: 'An identifier that can be used to refer to this Curb Zone on physical signage as well as within mobile applications, typically for payment purposes.'
street_name:
type: string
description: The name of the street that this Curb Zone is on.