forked from graphhopper/directions-api-clients
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathswagger.json
1935 lines (1935 loc) · 79.9 KB
/
swagger.json
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
{
"swagger": "2.0",
"info": {
"title": "GraphHopper Directions API",
"description": "You use the GraphHopper Directions API to add route planning, navigation and route optimization to your software. E.g. the Routing API has turn instructions and elevation data and the Route Optimization API solves your logistic problems and supports various constraints like time window and capacity restrictions. Also it is possible to get all distances between all locations with our fast Matrix API.",
"version": "1.0.0"
},
"host": "graphhopper.com",
"schemes": [
"https"
],
"basePath": "/api/1",
"produces": [
"application/json"
],
"securityDefinitions": {
"api_key": {
"type": "apiKey",
"name": "key",
"in": "query"
}
},
"paths": {
"/route": {
"get": {
"summary": "Routing Request",
"description": "The GraphHopper Routing API allows to calculate route and implement navigation via the turn instructions",
"parameters": [
{
"name": "point",
"in": "query",
"description": "Specify multiple points for which the route should be calculated. The order is important. Specify at least two points.",
"required": true,
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"name": "locale",
"in": "query",
"description": "The locale of the resulting turn instructions. E.g. `pt_PT` for Portuguese or `de` for German",
"type": "string"
},
{
"name": "instructions",
"in": "query",
"description": "If instruction should be calculated and returned",
"type": "boolean"
},
{
"name": "vehicle",
"in": "query",
"description": "The vehicle for which the route should be calculated. Other vehicles are foot, small_truck, ...",
"type": "string"
},
{
"name": "elevation",
"in": "query",
"description": "If `true` a third dimension - the elevation - is included in the polyline or in the GeoJson. If enabled you have to use a modified version of the decoding method or set points_encoded to `false`. See the points_encoded attribute for more details. Additionally a request can fail if the vehicle does not support elevation. See the features object for every vehicle.",
"type": "boolean"
},
{
"name": "points_encoded",
"in": "query",
"description": "IMPORTANT- TODO - currently you have to pass false for the swagger client - Have not found a way to force add a parameter. If `false` the coordinates in `point` and `snapped_waypoints` are returned as array using the order [lon,lat,elevation] for every point. If `true` the coordinates will be encoded as string leading to less bandwith usage. You'll need a special handling for the decoding of this string on the client-side. We provide open source code in [Java](https://github.com/graphhopper/graphhopper/blob/d70b63660ac5200b03c38ba3406b8f93976628a6/web/src/main/java/com/graphhopper/http/WebHelper.java#L43) and [JavaScript](https://github.com/graphhopper/graphhopper/blob/d70b63660ac5200b03c38ba3406b8f93976628a6/web/src/main/webapp/js/ghrequest.js#L139). It is especially important to use no 3rd party client if you set `elevation=true`!",
"type": "boolean",
"required": true
},
{
"name": "calc_points",
"in": "query",
"description": "If the points for the route should be calculated at all printing out only distance and time.",
"type": "boolean"
},
{
"name": "point_hint",
"in": "query",
"description": "Optional parameter. Specifies a hint for each `point` parameter to prefer a certain street for the closest location lookup. E.g. if there is an address or house with two or more neighboring streets you can control for which street the closest location is looked up.",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"name": "ch.disable",
"in": "query",
"description": "Use this parameter in combination with one or more parameters of this table",
"type": "boolean"
},
{
"name": "weighting",
"in": "query",
"description": "Which kind of 'best' route calculation you need. Other option is `shortest` (e.g. for `vehicle=foot` or `bike`), `short_fastest` if time and distance is expensive e.g. for `vehicle=truck`",
"type": "string"
},
{
"name": "edge_traversal",
"in": "query",
"description": "Use `true` if you want to consider turn restrictions for bike and motor vehicles. Keep in mind that the response time is roughly 2 times slower.",
"type": "boolean"
},
{
"name": "algorithm",
"in": "query",
"description": "The algorithm to calculate the route. Other options are `dijkstra`, `astar`, `astarbi`, `alternative_route` and `round_trip`",
"type": "string"
},
{
"name": "heading",
"in": "query",
"description": "Favour a heading direction for a certain point. Specify either one heading for the start point or as many as there are points. In this case headings are associated by their order to the specific points. Headings are given as north based clockwise angle between 0 and 360 degree. This parameter also influences the tour generated with `algorithm=round_trip` and force the initial direction.",
"type": "integer",
"format": "int32"
},
{
"name": "heading_penalty",
"in": "query",
"description": "Penalty for omitting a specified heading. The penalty corresponds to the accepted time delay in seconds in comparison to the route without a heading.",
"type": "integer",
"format": "int32"
},
{
"name": "pass_through",
"in": "query",
"description": "If `true` u-turns are avoided at via-points with regard to the `heading_penalty`.",
"type": "boolean"
},
{
"name": "details",
"in": "query",
"description": "List of additional trip attributes to be returned. Try some of the following: `average_speed`, `street_name`, `edge_id`, `time`, `distance`.",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"name": "round_trip.distance",
"in": "query",
"description": "If `algorithm=round_trip` this parameter configures approximative length of the resulting round trip",
"type": "integer",
"format": "int32"
},
{
"name": "round_trip.seed",
"in": "query",
"description": "If `algorithm=round_trip` this parameter introduces randomness if e.g. the first try wasn't good.",
"type": "integer",
"format": "int64"
},
{
"name": "alternative_route.max_paths",
"in": "query",
"description": "If `algorithm=alternative_route` this parameter sets the number of maximum paths which should be calculated. Increasing can lead to worse alternatives.",
"type": "integer",
"format": "int32"
},
{
"name": "alternative_route.max_weight_factor",
"in": "query",
"description": "If `algorithm=alternative_route` this parameter sets the factor by which the alternatives routes can be longer than the optimal route. Increasing can lead to worse alternatives.",
"type": "integer",
"format": "int32"
},
{
"name": "alternative_route.max_share_factor",
"in": "query",
"description": "If `algorithm=alternative_route` this parameter specifies how much alternatives routes can have maximum in common with the optimal route. Increasing can lead to worse alternatives.",
"type": "integer",
"format": "int32"
},
{
"name": "avoid",
"in": "query",
"description": "comma separate list to avoid certain roads. You can avoid motorway, ferry, tunnel or track",
"type": "string"
},
{
"name": "key",
"in": "query",
"description": "Get your key at graphhopper.com",
"required": true,
"type": "string"
}
],
"tags": [
"Routing"
],
"responses": {
"200": {
"description": "Routing Result",
"schema": {
"$ref": "#/definitions/RouteResponse"
}
},
"default": {
"description": "Unexpected Error",
"schema": {
"$ref": "#/definitions/GHError"
}
}
}
}
},
"/isochrone": {
"get": {
"summary": "Isochrone Request",
"description": "The GraphHopper Isochrone API allows calculating an isochrone of a locations means to calculate\n'a line connecting points at which a vehicle arrives at the same time,'\nsee [Wikipedia](http://en.wikipedia.org/wiki/Isochrone_map).\nIt is also called **reachability** or **walkability**.\n",
"parameters": [
{
"name": "point",
"in": "query",
"description": "Specify the start coordinate",
"required": true,
"type": "string"
},
{
"name": "time_limit",
"in": "query",
"description": "Specify which time the vehicle should travel. In seconds.",
"default": 600,
"type": "integer",
"format": "int32"
},
{
"name": "distance_limit",
"in": "query",
"description": "Specify which distance the vehicle should travel. In meter.",
"default": -1,
"type": "integer",
"format": "int32"
},
{
"name": "vehicle",
"in": "query",
"description": "Possible vehicles are bike, car, foot and [more](https://graphhopper.com/api/1/docs/supported-vehicle-profiles/)",
"default": "car",
"type": "string"
},
{
"name": "buckets",
"in": "query",
"description": "For how many sub intervals an additional polygon should be calculated.",
"default": 1,
"type": "integer",
"format": "int32"
},
{
"name": "reverse_flow",
"in": "query",
"description": "If `false` the flow goes from point to the polygon, if `true` the flow goes from the polygon \"inside\" to the point. Example usage for `false`: *How many potential customer can be reached within 30min travel time from your store* vs. `true`: *How many customers can reach your store within 30min travel time.*",
"default": false,
"type": "boolean"
},
{
"name": "weighting",
"in": "query",
"description": "Can be fastest or shortest",
"default": "fastest",
"type": "string"
},
{
"name": "key",
"in": "query",
"description": "Get your key at graphhopper.com",
"required": true,
"type": "string"
}
],
"tags": [
"Isochrone"
],
"responses": {
"200": {
"description": "Isochrone Result",
"schema": {
"$ref": "#/definitions/IsochroneResponse"
}
},
"default": {
"description": "Unexpected Error",
"schema": {
"$ref": "#/definitions/GHError"
}
}
}
}
},
"/matrix": {
"get": {
"summary": "Matrix API",
"description": "The Matrix API is part of the GraphHopper Directions API and with this API you can calculate many-to-many distances, times or routes a lot more efficient than calling the Routing API multiple times.\nIn the Routing API we support multiple points, so called 'via points', which results in one route being calculated. The Matrix API results in NxM routes or more precise NxM weights, distances or times being calculated but is a lot faster compared to NxM single requests. The most simple example is a tourist trying to decide which pizza is close to him instead of using beeline distance she can calculate a 1x4 matrix. Or a delivery service in the need of often big NxN matrices to solve vehicle routing problems. E.g. the GraphHopper Route Optimization API uses the Matrix API under the hood to achieve this.\n",
"parameters": [
{
"name": "point",
"in": "query",
"description": "Specifiy multiple points for which the weight-, route-, time- or distance-matrix should be calculated. In this case the starts are identical to the destinations. If there are N points, then NxN entries will be calculated. The order of the point parameter is important. Specify at least three points. Cannot be used together with from_point or to_point. Is a string with the format latitude,longitude.",
"required": false,
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"name": "from_point",
"in": "query",
"description": "The starting points for the routes. E.g. if you want to calculate the three routes A->1, A->2, A->3 then you have one from_point parameter and three to_point parameters. Is a string with the format latitude,longitude.",
"required": false,
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"name": "to_point",
"in": "query",
"description": "The destination points for the routes. Is a string with the format latitude,longitude.",
"required": false,
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"name": "point_hint",
"in": "query",
"description": "Optional parameter. Specifies a hint for each `point` parameter to prefer a certain street for the closest location lookup. E.g. if there is an address or house with two or more neighboring streets you can control for which street the closest location is looked up.",
"required": false,
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"name": "from_point_hint",
"in": "query",
"description": "For the from_point parameter. See point_hint",
"required": false,
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"name": "to_point_hint",
"in": "query",
"description": "For the to_point parameter. See point_hint",
"required": false,
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"name": "out_array",
"in": "query",
"description": "Specifies which arrays should be included in the response. Specify one or more of the following options 'weights', 'times', 'distances'. To specify more than one array use e.g. out_array=times&out_array=distances. The units of the entries of distances are meters, of times are seconds and of weights is arbitrary and it can differ for different vehicles or versions of this API.",
"required": false,
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"name": "vehicle",
"in": "query",
"description": "The vehicle for which the route should be calculated. Other vehicles are foot, small_truck etc",
"default": "car",
"type": "string"
},
{
"name": "key",
"in": "query",
"description": "Get your key at graphhopper.com",
"required": true,
"type": "string"
}
],
"tags": [
"Matrix"
],
"responses": {
"200": {
"description": "Isochrone Result",
"schema": {
"$ref": "#/definitions/MatrixResponse"
}
},
"default": {
"description": "Unexpected Error",
"schema": {
"$ref": "#/definitions/GHError"
}
}
}
},
"post": {
"summary": "Matrix API Post",
"description": "The GET request has an URL length limitation, which hurts for many locations per request. In those cases use a HTTP POST request with JSON data as input. The only parameter in the URL will be the key which stays in the URL. Both request scenarios are identically except that all singular parameter names are named as their plural for a POST request.\n",
"parameters": [
{
"name": "body",
"in": "body",
"schema": {
"$ref": "#/definitions/MatrixRequest"
}
},
{
"name": "key",
"in": "query",
"description": "Get your key at graphhopper.com",
"required": true,
"type": "string"
}
],
"tags": [
"Matrix"
],
"responses": {
"200": {
"description": "Isochrone Result",
"schema": {
"$ref": "#/definitions/MatrixResponse"
}
},
"default": {
"description": "Unexpected Error",
"schema": {
"$ref": "#/definitions/GHError"
}
}
}
}
},
"/geocode": {
"get": {
"summary": "Execute a Geocoding request",
"description": "This endpoint provides forward and reverse geocoding. For more details, review the official documentation at: https://graphhopper.com/api/1/docs/geocoding/\n",
"parameters": [
{
"name": "q",
"in": "query",
"description": "If you do forward geocoding, then this would be a textual description of the address you are looking for",
"required": false,
"type": "string"
},
{
"name": "locale",
"in": "query",
"description": "Display the search results for the specified locale. Currently French (fr), English (en), German (de) and Italian (it) are supported. If the locale wasn't found the default (en) is used.",
"required": false,
"type": "string"
},
{
"name": "limit",
"in": "query",
"description": "Specify the maximum number of returned results",
"required": false,
"type": "integer",
"format": "int32"
},
{
"name": "reverse",
"in": "query",
"description": "Set to true to do a reverse Geocoding request, see point parameter",
"required": false,
"type": "boolean"
},
{
"name": "point",
"in": "query",
"description": "The location bias in the format 'latitude,longitude' e.g. point=45.93272,11.58803",
"required": false,
"type": "string"
},
{
"name": "provider",
"in": "query",
"description": "Can be either, default, nominatim, opencagedata",
"required": false,
"type": "string"
},
{
"name": "key",
"in": "query",
"description": "Get your key at graphhopper.com",
"required": true,
"type": "string"
}
],
"tags": [
"Geocoding"
],
"responses": {
"200": {
"description": "An array found locations",
"schema": {
"$ref": "#/definitions/GeocodingResponse"
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/GHError"
}
}
}
}
},
"/vrp/optimize": {
"post": {
"summary": "Solves vehicle routing problems",
"description": "This endpoint for solving vehicle routing problems, i.e. traveling salesman or vehicle routing problems, and returns the solution.",
"operationId": "postVrp",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"parameters": [
{
"in": "query",
"name": "key",
"description": "your API key",
"required": true,
"type": "string"
},
{
"in": "body",
"name": "body",
"description": "Request object that contains the problem to be solved",
"required": true,
"schema": {
"$ref": "#/definitions/Request"
}
}
],
"tags": [
"vrp"
],
"responses": {
"200": {
"description": "A jobId you can use to retrieve your solution from server - see solution endpoint.",
"schema": {
"$ref": "#/definitions/JobId"
}
},
"400": {
"description": "Error occurred when reading client request. Request is invalid."
},
"500": {
"description": "Error occurred on server side."
}
}
}
},
"/vrp/solution/{jobId}": {
"get": {
"summary": "Return the solution associated to the jobId",
"description": "This endpoint returns the solution of a large problems. You can fetch it with the job_id, you have been sent.\n",
"operationId": "getSolution",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"parameters": [
{
"in": "query",
"name": "key",
"description": "your API key",
"required": true,
"type": "string"
},
{
"in": "path",
"name": "jobId",
"description": "Request solution with jobId",
"required": true,
"type": "string"
}
],
"tags": [
"solution"
],
"responses": {
"200": {
"description": "A response containing the solution",
"schema": {
"$ref": "#/definitions/Response"
}
},
"400": {
"description": "Error occurred on client side such as invalid input."
},
"500": {
"description": "Error occurred on server side."
}
}
}
}
},
"definitions": {
"GeocodingResponse": {
"properties": {
"hits": {
"type": "array",
"items": {
"$ref": "#/definitions/GeocodingLocation"
}
},
"locale": {
"type": "string"
}
}
},
"GeocodingLocation": {
"type": "object",
"properties": {
"point": {
"$ref": "#/definitions/GeocodingPoint"
},
"osm_id": {
"type": "string",
"description": "OSM Id"
},
"osm_type": {
"type": "string",
"description": "N = node, R = relation, W = way"
},
"osm_key": {
"type": "string",
"description": "The osm key of the result like `place` or `amenity`"
},
"name": {
"type": "string"
},
"country": {
"type": "string"
},
"city": {
"type": "string"
},
"state": {
"type": "string"
},
"street": {
"type": "string"
},
"housenumber": {
"type": "string"
},
"postcode": {
"type": "string"
}
}
},
"GeocodingPoint": {
"type": "object",
"properties": {
"lat": {
"type": "number",
"format": "double",
"description": "Latitude"
},
"lng": {
"type": "number",
"format": "double",
"description": "Longitude"
}
}
},
"MatrixRequest": {
"type": "object",
"properties": {
"points": {
"description": "Specifiy multiple points for which the weight-, route-, time- or distance-matrix should be calculated. In this case the starts are identical to the destinations. If there are N points, then NxN entries will be calculated. The order of the point parameter is important. Specify at least three points. Cannot be used together with from_point or to_point. Is a string with the format longitude,latitude.",
"type": "array",
"items": {
"type": "array",
"items": {
"type": "number",
"format": "double"
}
}
},
"from_points": {
"description": "The starting points for the routes. E.g. if you want to calculate the three routes A->1, A->2, A->3 then you have one from_point parameter and three to_point parameters. Is a string with the format longitude,latitude.",
"type": "array",
"items": {
"type": "array",
"items": {
"type": "number",
"format": "double"
}
}
},
"to_points": {
"description": "The destination points for the routes. Is a string with the format longitude,latitude.",
"type": "array",
"items": {
"type": "array",
"items": {
"type": "number",
"format": "double"
}
}
},
"point_hints": {
"description": "Optional parameter. Specifies a hint for each point in the `points` array to prefer a certain street for the closest location lookup. E.g. if there is an address or house with two or more neighboring streets you can control for which street the closest location is looked up.",
"type": "array",
"items": {
"type": "string"
}
},
"from_point_hints": {
"description": "More information for the `from_points` array. See `point_hints`",
"type": "array",
"items": {
"type": "string"
}
},
"to_point_hints": {
"description": "More information for the `to_points` array. See `point_hints`",
"type": "array",
"items": {
"type": "string"
}
},
"out_arrays": {
"description": "Specifies which arrays should be included in the response. Specify one or more of the following options 'weights', 'times', 'distances'. To specify more than one array use e.g. out_array=times&out_array=distances. The units of the entries of distances are meters, of times are seconds and of weights is arbitrary and it can differ for different vehicles or versions of this API.",
"type": "array",
"items": {
"type": "string"
}
},
"vehicle": {
"description": "The vehicle for which the route should be calculated. Other vehicles are foot, small_truck etc, see here for the details.",
"type": "string"
}
}
},
"MatrixResponse": {
"type": "object",
"properties": {
"distances": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "number",
"format": "int64"
}
}
},
"times": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "number",
"format": "int64"
}
}
},
"weights": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "number",
"format": "double"
}
}
},
"info": {
"$ref": "#/definitions/ResponseInfo"
}
}
},
"RouteResponse": {
"type": "object",
"properties": {
"paths": {
"type": "array",
"items": {
"$ref": "#/definitions/RouteResponsePath"
}
},
"info": {
"$ref": "#/definitions/ResponseInfo"
}
}
},
"RouteResponsePath": {
"type": "object",
"description": "A found path",
"properties": {
"distance": {
"description": "The total distance of the route, in meter",
"type": "number",
"format": "double"
},
"time": {
"description": "The total time of the route, in ms",
"type": "integer",
"format": "int64"
},
"ascend": {
"type": "number",
"format": "double"
},
"descend": {
"description": "The total descend (downhill) of the route, in meter",
"type": "number",
"format": "double"
},
"points": {
"$ref": "#/definitions/ResponseCoordinates"
},
"points_encoded": {
"description": "Is true if the points are encoded, if not paths[0].points contains the geo json of the path (then order is lon,lat,elevation), which is easier to handle but consumes more bandwidth compared to encoded version",
"type": "boolean"
},
"bbox": {
"description": "The bounding box of the route, format <br> minLon, minLat, maxLon, maxLat",
"type": "array",
"items": {
"type": "number",
"format": "double"
}
},
"snapped_waypoints": {
"$ref": "#/definitions/ResponseCoordinates"
},
"instructions": {
"$ref": "#/definitions/ResponseInstructions"
},
"details": {
"type": "object"
}
}
},
"ResponseCoordinates": {
"type": "object",
"properties": {
"coordinates": {
"$ref": "#/definitions/ResponseCoordinatesArray"
}
}
},
"ResponseCoordinatesArray": {
"type": "array",
"description": "An array containing coordinates",
"items": {
"type": "array",
"items": {
"type": "number",
"format": "double"
}
}
},
"ResponseInstructions": {
"type": "array",
"description": "Contains information about the instructions for this route. The last instruction is always the Finish instruction and takes 0ms and 0meter. Keep in mind that instructions are currently under active development and can sometimes contain misleading information, so, make sure you always show an image of the map at the same time when navigating your users!",
"items": {
"$ref": "#/definitions/ResponseInstruction"
}
},
"ResponseInstruction": {
"type": "object",
"properties": {
"text": {
"type": "string",
"description": "A description what the user has to do in order to follow the route. The language depends on the locale parameter."
},
"street_name": {
"type": "string",
"description": "The name of the street to turn onto in order to follow the route."
},
"distance": {
"type": "number",
"format": "double",
"description": "The distance for this instruction, in meter"
},
"time": {
"type": "integer",
"format": "int32",
"description": "The duration for this instruction, in ms"
},
"interval": {
"type": "array",
"items": {
"type": "integer",
"format": "int32"
},
"description": "An array containing the first and the last index (relative to paths[0].points) of the points for this instruction. This is useful to know for which part of the route the instructions are valid."
},
"sign": {
"type": "integer",
"format": "int32",
"description": "A number which specifies the sign to show e.g. for right turn etc <br>TURN_SHARP_LEFT = -3<br>TURN_LEFT = -2<br>TURN_SLIGHT_LEFT = -1<br>CONTINUE_ON_STREET = 0<br>TURN_SLIGHT_RIGHT = 1<br>TURN_RIGHT = 2<br>TURN_SHARP_RIGHT = 3<br>FINISH = 4<br>VIA_REACHED = 5<br>USE_ROUNDABOUT = 6"
},
"annotation_text": {
"type": "string",
"description": "optional - A text describing the instruction in more detail, e.g. like surface of the way, warnings or involved costs."
},
"annotation_importance": {
"type": "integer",
"format": "int32",
"description": "optional - 0 stands for INFO, 1 for warning, 2 for costs, 3 for costs and warning"
},
"exit_number": {
"type": "integer",
"format": "int32",
"description": "optional - Only available for USE_ROUNDABOUT instructions. The count of exits at which the route leaves the roundabout."
},
"turn_angle": {
"type": "number",
"format": "double",
"description": "optional - Only available for USE_ROUNDABOUT instructions. The radian of the route within the roundabout - 0<r<2*PI for clockwise and -2PI<r<0 for counterclockwise transit. Null if the direction of rotation is undefined."
}
}
},
"ResponseInfo": {
"type": "object",
"description": "Additional information for your request",
"properties": {
"copyrights": {
"type": "array",
"items": {
"type": "string"
}
},
"took": {
"type": "number",
"format": "double"
}
}
},
"IsochroneResponse": {
"type": "object",
"properties": {
"polygons": {
"type": "array",
"items": {
"$ref": "#/definitions/IsochroneResponsePolygon"
}
},
"copyrights": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"IsochroneResponsePolygon": {
"type": "object",
"description": "A found path",
"properties": {
"properties": {
"type": "object",
"properties": {
"bucket": {
"type": "integer",
"format": "int32"
}
}
},
"type": {
"type": "string"
},
"geometry": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"coordinates": {
"type": "array",
"items": {
"$ref": "#/definitions/ResponseCoordinatesArray"
}
}
}
}