-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathOperationsAPI.yaml
More file actions
1608 lines (1532 loc) · 53.5 KB
/
OperationsAPI.yaml
File metadata and controls
1608 lines (1532 loc) · 53.5 KB
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.0.0
info:
version: 1.0.0
title: Mobility Database Catalog Operations
description: |
API for the Mobility Database Catalog Operations. See [https://mobilitydatabase.org/](https://mobilitydatabase.org/).
This API was designed for internal use and is not intended to be used by the general public.
The Mobility Database Operation API uses Auth2.0 authentication.
termsOfService: https://mobilitydatabase.org/terms-and-conditions
contact:
name: MobilityData
url: https://mobilitydata.org/
email: api@mobilitydata.org
license:
name: MobilityData License
url: https://www.apache.org/licenses/LICENSE-2.0
tags:
- name: "operations"
description: "Mobility Database Operations"
- name: "licenses"
description: "Licenses of the Mobility Database"
paths:
/v1/operations/feeds:
get:
description: Get a list of feeds with optional filtering and pagination.
operationId: getFeeds
tags:
- "operations"
parameters:
- name: search_query
in: query
description: General search query to match against feed stable id, feed name and feed provider.
required: False
schema:
type: string
- name: operation_status
in: query
description: Filter feeds by operational status.
required: false
schema:
type: string
enum: [wip, published, unpublished]
- name: data_type
in: query
description: Filter feeds by data type.
required: false
schema:
type: string
enum: [gtfs, gtfs_rt]
- name: offset
in: query
description: Number of items to skip for pagination.
required: false
schema:
type: string
default: "0"
- name: limit
in: query
description: Maximum number of items to return.
required: false
schema:
type: string
default: "50"
example: "100"
responses:
200:
description: List of feeds retrieved successfully.
content:
application/json:
schema:
type: object
properties:
total:
type: integer
offset:
type: integer
limit:
type: integer
feeds:
type: array
items:
$ref: "#/components/schemas/OperationFeed"
401:
description: Unauthorized.
500:
description: Internal Server Error.
/v1/operations/feeds/gtfs:
post:
description: Create a GTFS feed in the Mobility Database.
tags:
- "operations"
operationId: createGtfsFeed
security:
- ApiKeyAuth: []
requestBody:
description: Payload to create the specified GTFS feed.
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/OperationCreateRequestGtfsFeed"
responses:
201:
description: >
The feed was successfully created. No content is returned.
content:
application/json:
schema:
$ref: "#/components/schemas/OperationGtfsFeed"
400:
description: >
The request was invalid.
401:
description: >
The request was not authenticated or has invalid authentication credentials.
409:
description: >
A feed with the producer_url already exists.
500:
description: >
An internal server error occurred.
put:
description: Update the specified GTFS feed in the Mobility Database.
tags:
- "operations"
operationId: updateGtfsFeed
security:
- ApiKeyAuth: []
requestBody:
description: Payload to update the specified GTFS feed.
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/UpdateRequestGtfsFeed"
responses:
200:
description: >
The feed was successfully updated. No content is returned.
204:
description: >
The feed update request was successfully received, but the update process was skipped as the request matches with the source feed.
400:
description: >
The request was invalid.
401:
description: >
The request was not authenticated or has invalid authentication credentials.
500:
description: >
An internal server error occurred.
/v1/operations/gtfs_feeds/{id}:
parameters:
- $ref: "#/components/parameters/feed_id_path_param"
get:
description: Get the specified GTFS feed from the Mobility Database.
tags:
- "operations"
operationId: getGtfsFeed
security:
- Authentication: []
responses:
200:
description: >
Successful pull of the GTFS feeds common info for the provided ID.
content:
application/json:
schema:
$ref: "#/components/schemas/OperationGtfsFeed"
/v1/operations/gtfs_rt_feeds/{id}:
parameters:
- $ref: "#/components/parameters/feed_id_path_param"
get:
description: Get the specified GTFS-RT feed from the Mobility Database.
tags:
- "operations"
operationId: getGtfsRtFeed
security:
- Authentication: []
responses:
200:
description: >
Successful pull of the GTFS-RT feeds common info for the provided ID.
content:
application/json:
schema:
$ref: "#/components/schemas/OperationGtfsRtFeed"
/v1/operations/feeds/gtfs_rt:
post:
description: Create a GTFS-RT feed in the Mobility Database.
tags:
- "operations"
operationId: createGtfsRtFeed
security:
- ApiKeyAuth: []
requestBody:
description: Payload to create the specified GTF-RT feed.
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/OperationCreateRequestGtfsRtFeed"
responses:
201:
description: >
The feed was successfully created. No content is returned.
content:
application/json:
schema:
$ref: "#/components/schemas/OperationGtfsRtFeed"
400:
description: >
The request was invalid.
401:
description: >
The request was not authenticated or has invalid authentication credentials.
409:
description: >
A feed with the producer_url already exists.
500:
description: "An internal server error occurred. \n"
put:
description: Update the specified GTFS-RT feed in the Mobility Database.
tags:
- "operations"
operationId: updateGtfsRtFeed
security:
- ApiKeyAuth: []
requestBody:
description: Payload to update the specified GTFS-RT feed.
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/UpdateRequestGtfsRtFeed"
responses:
200:
description: >
The feed was successfully updated. No content is returned.
204:
description: >
The feed update request was successfully received, but the update process was skipped as the request matches with the source feed.
400:
description: >
The request was invalid.
401:
description: >
The request was not authenticated or has invalid authentication credentials.
500:
description: >
An internal server error occurred.
/v1/operations/licenses:
get:
description: Get the list of all licenses in the DB.
tags:
- "licenses"
operationId: getLicenses
parameters:
- $ref: "#/components/parameters/limit_query_param_licenses_endpoint"
- $ref: "#/components/parameters/offset"
- $ref: "#/components/parameters/search_text_query_param_license"
- $ref: "#/components/parameters/license_is_spdx_query_param"
security:
- Authentication: []
responses:
200:
description: Successful pull of the licenses info.
content:
application/json:
schema:
$ref: "#/components/schemas/Licenses"
/v1/operations/licenses/{id}:
parameters:
- $ref: "#/components/parameters/license_id_path_param"
get:
description: Get the specified license from the Mobility Database, including the license rules.
tags:
- "licenses"
operationId: getLicense
security:
- Authentication: []
responses:
200:
description: >
Successful pull of the license info for the provided ID.
content:
application/json:
schema:
$ref: "#/components/schemas/LicenseWithRules"
components:
schemas:
Redirect:
type: object
properties:
target_id:
description: The feed ID that should be used in replacement of the current one.
type: string
example: mdb-10
comment:
description: A comment explaining the redirect.
type: string
example: Redirected because of a change of URL.
BasicFeed:
type: object
properties:
id:
description: Unique identifier used as a key for the feeds table.
type: string
example: mdb-1210
data_type:
type: string
enum:
- gtfs
- gtfs_rt
- gbfs
example: gtfs
# Have to put the enum inline because of a bug in openapi-generator
# $ref: "#/components/schemas/DataType"
created_at:
description: The date and time the feed was added to the database, in ISO 8601 date-time format.
type: string
example: 2023-07-10T22:06:00Z
format: date-time
external_ids:
$ref: "#/components/schemas/ExternalIds"
provider:
description: A commonly used name for the transit provider included in the feed.
type: string
example: Los Angeles Department of Transportation (LADOT, DASH, Commuter Express)
feed_contact_email:
description: Use to contact the feed producer.
type: string
example: someEmail@ladotbus.com
source_info:
$ref: "#/components/schemas/SourceInfo"
redirects:
type: array
items:
$ref: "#/components/schemas/Redirect"
Feed:
allOf:
- $ref: "#/components/schemas/BasicFeed"
- type: object
discriminator:
propertyName: data_type
mapping:
gtfs: "#/components/schemas/GtfsFeed"
gtfs_rt: "#/components/schemas/GtfsRTFeed"
properties:
status:
description: >
Describes status of the Feed. Should be one of
* `active` Feed should be used in public trip planners.
* `deprecated` Feed is explicitly deprecated and should not be used in public trip planners.
* `inactive` Feed hasn't been recently updated and should be used at risk of providing outdated information.
* `development` Feed is being used for development purposes and should not be used in public trip planners.
* `future` Feed is not yet active but will be in the future.
type: string
enum:
- active
- deprecated
- inactive
- development
- future
example: deprecated
official:
description: >
A boolean value indicating if the feed is official or not. Official feeds are provided by the transit agency or a trusted source.
type: boolean
example: true
official_updated_at:
description: >
The date and time the official status was last updated, in ISO 8601 date-time format.
type: string
example: 2023-07-10T22:06:00Z
format: date-time
feed_name:
description: >
An optional description of the data feed, e.g to specify if the data feed is an aggregate of multiple providers, or which network is represented by the feed.
type: string
example: Bus
note:
description: A note to clarify complex use cases for consumers.
type: string
related_links:
description: >
A list of related links for the feed.
type: array
items:
$ref: "#/components/schemas/FeedRelatedLink"
FeedRelatedLink:
type: object
properties:
code:
description: >
A short code to identify the type of link.
type: string
example: next_1
description:
description: >
A description of the link.
type: string
example: The URL for a future feed version with an upcoming service period.
url:
description: >
The URL of the related link.
type: string
format: url
created_at:
description: >
The date and time the related link was created, in ISO 8601 date-time format.
type: string
example: 2023-07-10T22:06:00Z
format: date-time
GtfsFeed:
allOf:
- $ref: "#/components/schemas/Feed"
- type: object
properties:
# We reproduce this property here so we can have a specific example.
data_type:
type: string
enum:
- gtfs
- gtfs_rt
- gbfs
example: gtfs
locations:
$ref: "#/components/schemas/Locations"
latest_dataset:
$ref: "#/components/schemas/LatestDataset"
bounding_box:
$ref: "#/components/schemas/BoundingBox"
visualization_dataset_id:
description: >
The dataset ID of the dataset used to compute the visualization files.
type: string
example: mdb-1210-202402121801
GbfsFeed:
allOf:
- $ref: "#/components/schemas/BasicFeed"
- type: object
properties:
# We reproduce this property here so we can have a specific example.
data_type:
type: string
enum:
- gtfs
- gtfs_rt
- gbfs
example: gbfs
locations:
$ref: "#/components/schemas/Locations"
system_id:
description: >
The system ID of the feed. This is a unique identifier for the system that the feed belongs to.
type: string
example: system-1234
provider_url:
description: >
The URL of the provider's website. This is the website of the organization that operates the system that the feed belongs to.
type: string
format: url
example: https://www.citybikenyc.com/
versions:
description: >
A list of GBFS versions that the feed supports. Each version is represented by its version number and a list of endpoints.
type: array
items:
$ref: "#/components/schemas/GbfsVersion"
bounding_box:
$ref: "#/components/schemas/BoundingBox"
bounding_box_generated_at:
description: The date and time the bounding box was generated, in ISO 8601 date-time format.
type: string
example: 2023-07-10T22:06:00Z
format: date-time
GbfsVersion:
type: object
properties:
version:
description: >
The version of the GBFS specification that the feed is using. This is a string that follows the semantic versioning format.
type: string
example: 2.3
created_at:
description: >
The date when the GBFS version was saved to the database.
type: string
format: date-time
example: 2023-07-10T22:06:00Z
last_updated_at:
description: >
The date when the GBFS version was last updated in the database.
type: string
format: date-time
example: 2023-07-10T22:06:00Z
source:
description: >
Indicates the origin of the version information. Possible values are:
* `autodiscovery`: Retrieved directly from the main GBFS autodiscovery URL.
* `gbfs_versions`: Retrieved from the `gbfs_versions` endpoint.
type: string
enum:
- autodiscovery
- gbfs_versions
endpoints:
description: >
A list of endpoints that are available in the version.
type: array
items:
$ref: "#/components/schemas/GbfsEndpoint"
latest_validation_report:
$ref: "#/components/schemas/GbfsValidationReport"
GbfsValidationReport:
type: object
description: >
A validation report of the GBFS feed.
properties:
validated_at:
description: >
The date and time the GBFS feed was validated, in ISO 8601 date-time format.
type: string
example: 2023-07-10T22:06:00Z
format: date-time
total_error:
type: integer
example: 10
minimum: 0
report_summary_url:
description: >
The URL of the JSON report of the validation summary.
type: string
format: url
example: https://storage.googleapis.com/mobilitydata-datasets-prod/validation-reports/gbfs-1234-202402121801.json
validator_version:
description: >
The version of the validator used to validate the GBFS feed.
type: string
example: 1.0.13
GbfsEndpoint:
type: object
properties:
name:
description: >
The name of the endpoint. This is a human-readable name for the endpoint.
type: string
example: system_information
url:
description: >
The URL of the endpoint. This is the URL where the endpoint can be accessed.
type: string
format: url
example: https://gbfs.citibikenyc.com/gbfs/system_information.json
language:
description: >
The language of the endpoint. This is the language that the endpoint is available in for versions 2.3 and prior.
type: string
example: en
is_feature:
description: >
A boolean value indicating if the endpoint is a feature. A feature is defined as an optionnal endpoint.
type: boolean
example: false
GbfsFeeds:
type: array
items:
$ref: "#/components/schemas/GbfsFeed"
GtfsRTFeed:
allOf:
- $ref: "#/components/schemas/Feed"
- type: object
properties:
# We reproduce this property here so we can have a specific example.
data_type:
type: string
enum:
- gtfs
- gtfs_rt
- gbfs
example: gtfs_rt
entity_types:
type: array
items:
type: string
enum:
- vp
- tu
- sa
example: vp
description: >
The type of realtime entry:
* vp - vehicle positions
* tu - trip updates
* sa - service alerts
# Have to put the enum inline because of a bug in openapi-generator
# $ref: "#/components/schemas/EntityTypes"
feed_references:
description: A list of the GTFS feeds that the real time source is associated with, represented by their MDB source IDs.
type: array
items:
type: string
example: "mdb-20"
locations:
$ref: "#/components/schemas/Locations"
SearchFeedItemResult:
# The following schema is used to represent the search results for feeds.
# The schema is a union of all the possible types(Feed, GtfsFeed, GtfsRTFeed and GbfsFeed) of feeds that can be returned.
# This union is not based on its original types due to the limitations of openapi-generator.
# For the same reason it's not defined as anyOf, but as a single object with all the possible properties.
type: object
required:
- id
- data_type
- status
properties:
id:
description: Unique identifier used as a key for the feeds table.
type: string
example: mdb-1210
data_type:
type: string
enum:
- gtfs
- gtfs_rt
- gbfs
example: gtfs
# Have to put the enum inline because of a bug in openapi-generator
# $ref: "#/components/schemas/DataType"
status:
description: >
Describes status of the Feed. Should be one of
* `active` Feed should be used in public trip planners.
* `deprecated` Feed is explicitly deprecated and should not be used in public trip planners.
* `inactive` Feed hasn't been recently updated and should be used at risk of providing outdated information.
* `development` Feed is being used for development purposes and should not be used in public trip planners.
* `future` Feed is not yet active but will be in the future.
type: string
enum:
- active
- deprecated
- inactive
- development
- future
example: deprecated
# Have to put the enum inline because of a bug in openapi-generator
# $ref: "#/components/schemas/FeedStatus"
created_at:
description: The date and time the feed was added to the database, in ISO 8601 date-time format.
type: string
example: 2023-07-10T22:06:00Z
format: date-time
official:
description: >
A boolean value indicating if the feed is official or not. Official feeds are provided by the transit agency or a trusted source.
type: boolean
example: true
external_ids:
$ref: "#/components/schemas/ExternalIds"
provider:
description: A commonly used name for the transit provider included in the feed.
type: string
example: Los Angeles Department of Transportation (LADOT, DASH, Commuter Express)
feed_name:
description: >
An optional description of the data feed, e.g to specify if the data feed is an aggregate of multiple providers, or which network is represented by the feed.
type: string
example: Bus
note:
description: A note to clarify complex use cases for consumers.
type: string
feed_contact_email:
description: Use to contact the feed producer.
type: string
example: someEmail@ladotbus.com
source_info:
$ref: "#/components/schemas/SourceInfo"
redirects:
type: array
items:
$ref: "#/components/schemas/Redirect"
locations:
$ref: "#/components/schemas/Locations"
latest_dataset:
$ref: "#/components/schemas/LatestDataset"
entity_types:
type: array
items:
type: string
enum:
- vp
- tu
- sa
example: vp
description: >
The type of realtime entry:
* vp - vehicle positions
* tu - trip updates
* sa - service alerts
# Have to put the enum inline because of a bug in openapi-generator
# $ref: "#/components/schemas/EntityTypes"
versions:
type: array
items:
type: string
example: 2.3
description: The supported versions of the GBFS feed.
feed_references:
description: A list of the GTFS feeds that the real time source is associated with, represented by their MDB source IDs.
type: array
items:
type: string
example: "mdb-20"
Feeds:
type: array
items:
$ref: "#/components/schemas/Feed"
GtfsFeeds:
type: array
items:
$ref: "#/components/schemas/GtfsFeed"
GtfsRTFeeds:
type: array
items:
$ref: "#/components/schemas/GtfsRTFeed"
LatestDataset:
type: object
properties:
id:
description: Identifier of the latest dataset for this feed.
type: string
example: mdb-1210-202402121801
hosted_url:
description: >
As a convenience, the URL of the latest uploaded dataset hosted by MobilityData. It should be the same URL as the one found in the latest dataset id dataset. An alternative way to find this is to use the latest dataset id to obtain the dataset and then use its hosted_url.
type: string
format: url
example: https://storage.googleapis.com/mobilitydata-datasets-prod/mdb-1210/mdb-1210-202402121801/mdb-1210-202402121801.zip
bounding_box:
$ref: "#/components/schemas/BoundingBox"
downloaded_at:
description: The date and time the dataset was downloaded from the producer, in ISO 8601 date-time format.
type: string
example: 2023-07-10T22:06:00Z
format: date-time
hash:
description: A hash of the dataset.
type: string
example: ad3805c4941cd37881ff40c342e831b5f5224f3d8a9a2ec3ac197d3652c78e42
service_date_range_start:
description: The start date of the service date range for the dataset in UTC. Timing starts at 00:00:00 of the day.
type: string
example: 2023-07-10T06:00:00Z
format: date-time
service_date_range_end:
description: The start date of the service date range for the dataset in UTC. Timing ends at 23:59:59 of the day.
type: string
example: 2023-07-10T05:59:59+00Z
format: date-time
agency_timezone:
description: The timezone of the agency.
type: string
example: America/Los_Angeles
zipped_folder_size_mb:
description: The size of the zipped folder in MB.
type: number
example: 100.2
unzipped_folder_size_mb:
description: The size of the unzipped folder in MB.
type: number
example: 200.5
validation_report:
type: object
properties:
features:
description: List of GTFS features associated to the dataset. More information, https://gtfs.org/getting-started/features/overview
type: array
items:
type: string
example: ["Shapes", "Headsigns", "Wheelchair Accessibility"]
total_error:
type: integer
example: 10
minimum: 0
total_warning:
type: integer
example: 20
minimum: 0
total_info:
type: integer
example: 30
minimum: 0
unique_error_count:
type: integer
example: 1
minimum: 0
unique_warning_count:
type: integer
example: 2
minimum: 0
unique_info_count:
type: integer
example: 3
minimum: 0
# Have to put the enum inline because of a bug in openapi-generator
# EntityTypes:
# type: array
# items:
# $ref: "#/components/schemas/EntityType"
# EntityType:
# type: string
# enum:
# - vp
# - tu
# - sa
# example: vp
# description: >
# The type of realtime entry:
# * vp - vehicle positions
# * tu - trip updates
# * sa - service alerts
ExternalIds:
type: array
items:
$ref: "#/components/schemas/ExternalId"
ExternalId:
type: object
properties:
external_id:
description: The ID that can be use to find the feed data in an external or legacy database.
type: string
example: 1210
source:
description: The source of the external ID, e.g. the name of the database where the external ID can be used.
type: string
example: mdb
SourceInfo:
type: object
properties:
producer_url:
description: >
URL where the producer is providing the dataset. Refer to the authentication information to know how to access this URL.
type: string
format: url
example: https://ladotbus.com/gtfs
authentication_type:
description: >
Defines the type of authentication required to access the `producer_url`. Valid values for this field are:
* 0 or (empty) - No authentication required.
* 1 - The authentication requires an API key, which should be passed as value of the parameter api_key_parameter_name in the URL. Please visit URL in authentication_info_url for more information.
* 2 - The authentication requires an HTTP header, which should be passed as the value of the header api_key_parameter_name in the HTTP request.
When not provided, the authentication type is assumed to be 0.
type: integer
enum:
- 0
- 1
- 2
example: 2
authentication_info_url:
description: >
Contains a URL to a human-readable page describing how the authentication should be performed and how credentials can be created. This field is required for `authentication_type=1` and `authentication_type=2`.
type: string
format: url
example: https://apidevelopers.ladottransit.com
api_key_parameter_name:
type: string
description: >
Defines the name of the parameter to pass in the URL to provide the API key. This field is required for `authentication_type=1` and `authentication_type=2`.
example: Ocp-Apim-Subscription-Key
license_url:
description: A URL where to find the license for the feed.
type: string
format: url
example: https://www.ladottransit.com/dla.html
license_id:
description: Id of the feed license that can be used to query the license endpoint.
type: string
example: 0BSD
license_is_spdx:
description: true if the license is SPDX. false if not.
type: boolean
example: true
license_notes:
description: Notes concerning the relation between the feed and the license.
type: string
example: Detected locale/jurisdiction port 'nl'. SPDX does not list ported CC licenses; using canonical ID.
Locations:
type: array
items:
$ref: "#/components/schemas/Location"
Location:
type: object
properties:
country_code:
description: >
ISO 3166-1 alpha-2 code designating the country where the system is located. For a list of valid codes [see here](https://unece.org/trade/uncefact/unlocode-country-subdivisions-iso-3166-2).
type: string
example: US
country:
description: The english name of the country where the system is located.
type: string
example: United States
subdivision_name:
description: >
ISO 3166-2 english subdivision name designating the subdivision (e.g province, state, region) where the system is located. For a list of valid names [see here](https://unece.org/trade/uncefact/unlocode-country-subdivisions-iso-3166-2).
type: string
example: California
municipality:
description: Primary municipality in english in which the transit system is located.
type: string
example: Los Angeles
# Have to put the enum inline because of a bug in openapi-generator
# FeedStatus:
# description: >
# Describes status of the Feed. Should be one of
# * `active` Feed should be used in public trip planners.
# * `deprecated` Feed is explicitly deprecated and should not be used in public trip planners.
# * `inactive` Feed hasn't been recently updated and should be used at risk of providing outdated information.
# * `development` Feed is being used for development purposes and should not be used in public trip planners.
# * `future` Feed is not yet active but will be in the future
# type: string
# enum:
# - active
# - deprecated
# - inactive
# - development
# - future
# example: active
BasicDataset:
type: object
properties:
id:
description: Unique identifier used as a key for the datasets table.
type: string
example: mdb-10-202402080058
feed_id:
description: ID of the feed related to this dataset.
type: string