-
Notifications
You must be signed in to change notification settings - Fork 5.1k
/
search.json
1265 lines (1265 loc) · 56.9 KB
/
search.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": "Azure Maps Search Service",
"version": "2022-12-01-preview",
"description": "Azure Maps Search REST APIs"
},
"host": "atlas.microsoft.com",
"schemes": [
"https"
],
"consumes": [],
"produces": [
"application/json"
],
"securityDefinitions": {
"AADToken": {
"type": "oauth2",
"authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize",
"flow": "implicit",
"description": "These are the [Azure Active Directory OAuth2](https://docs.microsoft.com/azure/active-directory/develop/v1-overview) Flows. When paired with [Azure role-based access](https://docs.microsoft.com/azure/role-based-access-control/overview) control it can be used to control access to Azure Maps REST APIs. Azure role-based access controls are used to designate access to one or more Azure Maps resource account or sub-resources. Any user, group, or service principal can be granted access via a built-in role or a custom role composed of one or more permissions to Azure Maps REST APIs.\n\nTo implement scenarios, we recommend viewing [authentication concepts](https://aka.ms/amauth). In summary, this security definition provides a solution for modeling application(s) via objects capable of access control on specific APIs and scopes.\n\n> [!NOTE]\n> * This security definition **requires** the use of the `x-ms-client-id` header to indicate which Azure Maps resource the application is requesting access to. This can be acquired from the [Maps management API](https://aka.ms/amauthdetails).\n> * The `Authorization URL` is specific to the Azure public cloud instance. Sovereign clouds have unique Authorization URLs and Azure Active directory configurations. \n> * The Azure role-based access control is configured from the [Azure management plane](https://aka.ms/amrbac) via Azure portal, PowerShell, CLI, Azure SDKs, or REST APIs.\n> * Usage of the [Azure Maps Web SDK](https://aka.ms/amaadmc) allows for configuration based setup of an application for multiple use cases.\n> * Currently, Azure Active Directory [v1.0 or v2.0](https://docs.microsoft.com/azure/active-directory/develop/azure-ad-endpoint-comparison) supports Work, School, and Guests but does not support Personal accounts.\n\n",
"scopes": {
"https://atlas.microsoft.com/.default": "https://atlas.microsoft.com/.default"
}
},
"AzureKey": {
"type": "apiKey",
"description": "This is a shared key that is provisioned when creating an [Azure Maps resource](https://aka.ms/amauth) through the Azure management plane via Azure portal, PowerShell, CLI, Azure SDKs, or REST APIs.\n\n With this key, any application is authorized to access all REST APIs. In other words, these can currently be treated as master keys to the account which they are issued for.\n\n For publicly exposed applications, our recommendation is to use server-to-server access of Azure Maps REST APIs where this key can be securely stored.",
"name": "subscription-key",
"in": "header"
},
"SasToken": {
"type": "apiKey",
"description": "This is a shared access signature token is created from the List SAS operation on the [Azure Maps resource](https://aka.ms/amauth) through the Azure management plane via Azure portal, PowerShell, CLI, Azure SDKs, or REST APIs.\n\n With this token, any application is authorized to access with Azure role-based access controls and fine-grain control to the expiration, rate, and region(s) of use for the particular token. In other words, the SAS Token can be used to allow applications to control access in a more secured way than the shared key.\n\n For publicly exposed applications, our recommendation is to configure a specific list of allowed origins on the [Map account resource](https://aka.ms/amauth) to limit rendering abuse and regularly renew the SAS Token.",
"name": "SAS Token",
"in": "header"
}
},
"security": [
{
"AADToken": [
"https://atlas.microsoft.com/.default"
]
},
{
"AzureKey": []
},
{
"SasToken": []
}
],
"responses": {},
"parameters": {
"ApiVersion": {
"name": "api-version",
"description": "Version number of Azure Maps API.",
"type": "string",
"in": "query",
"required": true,
"x-ms-parameter-location": "client"
},
"Top": {
"name": "top",
"in": "query",
"description": "Maximum number of responses that will be returned. Default: 5, minimum: 1 and maximum: 20.",
"required": false,
"type": "integer",
"format": "int32",
"default": 5,
"minimum": 1,
"maximum": 20,
"x-ms-parameter-location": "method"
},
"Accept-Language": {
"name": "Accept-Language",
"in": "header",
"description": "Language in which search results should be returned. \n\nPlease refer to [Supported Languages](https://learn.microsoft.com/azure/azure-maps/supported-languages) for details.",
"required": false,
"type": "string",
"x-ms-parameter-location": "client"
},
"Location": {
"name": "location",
"in": "query",
"description": "A point on the earth specified as a longitude and latitude. When you specify this parameter, the user’s location is taken into account and the results returned may be more relevant to the user. Example: &location=lon,lat",
"required": false,
"type": "array",
"items": {
"type": "number",
"format": "double"
},
"minItems": 2,
"maxItems": 2,
"collectionFormat": "csv",
"x-ms-parameter-location": "method"
},
"Bbox": {
"name": "bbox",
"in": "query",
"description": "A rectangular area on the earth defined as a bounding box object. The sides of the rectangles are defined by longitude and latitude values. When you specify this parameter, the geographical area is taken into account when computing the results of a location query.\n\nExample: lon1,lat1,lon2,lat2",
"required": false,
"type": "array",
"items": {
"type": "number",
"format": "double"
},
"collectionFormat": "csv",
"minItems": 4,
"maxItems": 4,
"x-ms-parameter-location": "method"
},
"View": {
"name": "view",
"in": "query",
"description": "A string that represents an [ISO 3166-1 Alpha-2 region/country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2). This will alter Geopolitical disputed borders and labels to align with the specified user region. By default, the View parameter is set to “Auto” even if you haven’t defined it in the request.\n\nPlease refer to [Supported Views](https://aka.ms/AzureMapsLocalizationViews) for details and to see the available Views.",
"required": false,
"type": "string",
"x-ms-parameter-location": "method"
},
"BoundaryResultType": {
"name": "resultType",
"in": "query",
"description": "The geopolitical concept to return a boundary for.",
"required": false,
"type": "string",
"default": "countryRegion",
"enum": [
"countryRegion",
"adminDistrict",
"adminDistrict2",
"postalCode",
"postalCode2",
"postalCode3",
"postalCode4",
"neighborhood",
"locality"
],
"x-ms-enum": {
"name": "BoundaryResultTypeEnum",
"modelAsString": true,
"values": [
{
"name": "countryRegion",
"value": "countryRegion",
"description": "Country or region."
},
{
"name": "adminDistrict",
"value": "adminDistrict",
"description": "First administrative level within the country/region level, such as a state or a province."
},
{
"name": "adminDistrict2",
"value": "adminDistrict2",
"description": "Second administrative level within the country/region level, such as a county."
},
{
"name": "postalCode",
"value": "postalCode",
"description": "The smallest post code category, such as a zip code."
},
{
"name": "postalCode2",
"value": "postalCode2",
"description": "The next largest post code category after postalCode that is created by aggregating postalCode areas."
},
{
"name": "postalCode3",
"value": "postalCode3",
"description": "The next largest post code category after postalCode2 that is created by aggregating postalCode2 areas."
},
{
"name": "postalCode4",
"value": "postalCode4",
"description": "The next largest post code category after postalCode3 that is created by aggregating postalCode3 areas."
},
{
"name": "neighborhood",
"value": "neighborhood",
"description": "A section of a populated place that is typically well-known, but often with indistinct boundaries."
},
{
"name": "locality",
"value": "locality",
"description": "A concentrated area of human settlement, such as a city, town or village."
}
]
},
"x-ms-parameter-location": "method"
},
"Resolution": {
"name": "resolution",
"in": "query",
"description": "Resolution determines the amount of points to send back.",
"required": false,
"type": "string",
"default": "medium",
"enum": [
"small",
"medium",
"large",
"huge"
],
"x-ms-enum": {
"name": "ResolutionEnum",
"modelAsString": true,
"values": [
{
"name": "small",
"value": "small",
"description": "Return the boundary geometry with the least amount of points."
},
{
"name": "medium",
"value": "medium",
"description": "Return the boundary geometry with more or the same amount of points as small."
},
{
"name": "large",
"value": "large",
"description": "Return the boundary geometry with more or the same amount of points as medium."
},
{
"name": "huge",
"value": "huge",
"description": "Return the boundary geometry with more or the same amount of points as large."
}
]
},
"x-ms-parameter-location": "method"
},
"ReverseGeocodingResultTypes": {
"name": "resultTypes",
"in": "query",
"description": "Specify entity types that you want in the response. Only the types you specify will be returned. If the point cannot be mapped to the entity types you specify, no location information is returned in the response.\nDefault value is all possible entities.\nA comma separated list of entity types selected from the following options.\n\n- Address\n- Neighborhood\n- PopulatedPlace\n- Postcode1\n- AdminDivision1\n- AdminDivision2\n- CountryRegion\n\nThese entity types are ordered from the most specific entity to the least specific entity. When entities of more than one entity type are found, only the most specific entity is returned. For example, if you specify Address and AdminDistrict1 as entity types and entities were found for both types, only the Address entity information is returned in the response.",
"required": false,
"type": "array",
"items": {
"type": "string",
"enum": [
"Address",
"Neighborhood",
"PopulatedPlace",
"Postcode1",
"AdminDivision1",
"AdminDivision2",
"CountryRegion"
],
"x-ms-enum": {
"name": "ReverseGeocodingResultTypeEnum",
"modelAsString": true,
"values": [
{
"name": "Address",
"value": "Address"
},
{
"name": "Neighborhood",
"value": "Neighborhood"
},
{
"name": "PopulatedPlace",
"value": "PopulatedPlace"
},
{
"name": "Postcode1",
"value": "Postcode1"
},
{
"name": "AdminDivision1",
"value": "AdminDivision1"
},
{
"name": "AdminDivision2",
"value": "AdminDivision2"
},
{
"name": "CountryRegion",
"value": "CountryRegion"
}
]
}
},
"x-ms-parameter-location": "method"
}
},
"paths": {
"/geocode": {
"get": {
"description": "**Geocoding**\n\n**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).\n\nIn many cases, the complete search service might be too much, for instance if you are only interested in traditional geocoding. Search can also be accessed for address look up exclusively. The geocoding is performed by hitting the geocoding endpoint with just the address or partial address in question. The geocoding search index will be queried for everything above the street level data. No Point of Interest (POIs) will be returned. Note that the geocoder is very tolerant of typos and incomplete addresses. It will also handle everything from exact street addresses or street or intersections as well as higher level geographies such as city centers, counties, states etc.\n>[!Important]\n>By using this feature, you agree to the preview legal terms. See the [Preview Supplemental Terms](https://azure.microsoft.com/support/legal/preview-supplemental-terms/) for additional details.",
"operationId": "Search_GetGeocoding",
"produces": [
"application/geo+json"
],
"x-ms-examples": {
"Search detail address 15127 NE 24th Street, Redmond, WA": {
"$ref": "./examples/ForwardGeocoding.json"
},
"Search detail address 15127 NE 24th Street, Redmond, WA by addressLine": {
"$ref": "./examples/ForwardGeocodingByAddressLine.json"
},
"Search detail address 15127 NE 24th Street, Redmond, WA by query": {
"$ref": "./examples/ForwardGeocodingByQuery.json"
},
"Search landmark Empire State Building by query": {
"$ref": "./examples/ForwardGeocodingFindLandmarkByQuery.json"
}
},
"parameters": [
{
"$ref": "#/parameters/ApiVersion"
},
{
"$ref": "#/parameters/Accept-Language"
},
{
"$ref": "#/parameters/Top"
},
{
"name": "query",
"in": "query",
"description": "A string that contains information about a location, such as an address or landmark name.",
"required": false,
"type": "string"
},
{
"name": "addressLine",
"in": "query",
"description": "The official street line of an address relative to the area, as specified by the locality, or postalCode, properties. Typical use of this element would be to provide a street address or any official address.\n\n**If query is given, should not use this parameter.**",
"required": false,
"type": "string"
},
{
"name": "countryRegionSet",
"in": "query",
"description": "Comma separated string of country or region codes(ISO 3166-1 Alpha-2), e.g. FR,ES. This will limit the search to the specified countries. Only the first country code will be used for the Geocoder.\n\n**If query is given, should not use this parameter.**",
"required": false,
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "csv",
"x-ms-parameter-location": "method"
},
{
"$ref": "#/parameters/Bbox"
},
{
"$ref": "#/parameters/View"
},
{
"$ref": "#/parameters/Location"
},
{
"name": "adminDistrict",
"in": "query",
"description": "The country subdivision portion of an address, such as WA.\n\n**If query is given, should not use this parameter.**",
"required": false,
"type": "string"
},
{
"name": "adminDistrict2",
"in": "query",
"description": "The county for the structured address, such as King.\n\n**If query is given, should not use this parameter.**",
"required": false,
"type": "string"
},
{
"name": "adminDistrict3",
"in": "query",
"description": "The named area for the structured address.\n\n**If query is given, should not use this parameter.**",
"required": false,
"type": "string"
},
{
"name": "locality",
"in": "query",
"description": "The locality portion of an address, such as Seattle.\n\n**If query is given, should not use this parameter.**",
"required": false,
"type": "string"
},
{
"name": "postalCode",
"in": "query",
"description": "The postal code portion of an address.\n\n**If query is given, should not use this parameter.**",
"required": false,
"type": "string"
},
{
"name": "strictMatch",
"in": "query",
"description": "Restrict the geocoding result to the country or region that is specified in the countryRegionSet field and the state, province or territory specified in the adminDistrict field.\n\n**If query is given, should not use this parameter.**",
"required": false,
"type": "string",
"default": "notstrict",
"enum": [
"notstrict",
"strict"
],
"x-ms-enum": {
"name": "StrictMatchEnum",
"modelAsString": true,
"values": [
{
"name": "NotStrict",
"value": "notstrict",
"description": "Do not restrict results to the specified countryRegionSet and adminDistrict."
},
{
"name": "Strict",
"value": "strict",
"description": "Restrict results to the specified countryRegionSet and adminDistrict."
}
]
},
"x-ms-parameter-location": "method"
},
{
"$ref": "../../../Common/preview/2022-09-01-preview/common.json#/parameters/ClientId"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/GeocodingResponse"
},
"headers": {
"x-ms-request-id": {
"description": "request id.",
"type": "string"
}
}
},
"default": {
"$ref": "../../../Common/preview/2022-09-01-preview/common.json#/responses/default"
}
}
}
},
"/geocode:batch": {
"post": {
"description": "**Geocoding Batch API**\n\n\n**Applies to**: see pricing [tiers](https://aka.ms/AzureMapsPricingTier).\n\n\n\nThe Geocoding Batch API sends batches of queries to [Geocoding API](https://docs.microsoft.com/rest/api/maps/search-v2/get-geocoding) using just a single API call. The API allows caller to batch up to **100** queries.\n>[!Important]\n>By using this feature, you agree to the preview legal terms. See the [Preview Supplemental Terms](https://azure.microsoft.com/support/legal/preview-supplemental-terms/) for additional details.\n\n### Submit Synchronous Batch Request\nThe Synchronous API is recommended for lightweight batch requests. When the service receives a request, it will respond as soon as the batch items are calculated and there will be no possibility to retrieve the results later. The Synchronous API will return a timeout error (a 408 response) if the request takes longer than 60 seconds. The number of batch items is limited to **100** for this API.\n```\nPOST https://atlas.microsoft.com/geocode:batch?api-version=2022-12-01-preview\n```\n### POST Body for Batch Request\nTo send the _geocoding_ queries you will use a `POST` request where the request body will contain the `batchItems` array in `json` format and the `Content-Type` header will be set to `application/json`. Here's a sample request body containing 2 _geocoding_ queries:\n\n\n```\n{\n \"batchItems\": [\n {\n \"addressLine\": \"One, Microsoft Way, Redmond, WA 98052\",\n \"top\": 2\n },\n {\n \"addressLine\": \"Pike Pl\",\n \"adminDistrict\": \"WA\",\n \"locality\": \"Seattle\",\n \"top\": 3\n }\n ]\n}\n```\n\nA _geocoding_ batchItem object can accept any of the supported _geocoding_ [URI parameters](https://docs.microsoft.com/rest/api/maps/search-v2/get-geocoding#uri-parameters).\n\n\nThe batch should contain at least **1** query.\n\n\n### Batch Response Model\nThe batch response contains a `summary` component that indicates the `totalRequests` that were part of the original batch request and `successfulRequests` i.e. queries which were executed successfully. The batch response also includes a `batchItems` array which contains a response for each and every query in the batch request. The `batchItems` will contain the results in the exact same order the original queries were sent in the batch request. Each item is of one of the following types:\n\n - [`GeocodingResponse`](https://docs.microsoft.com/rest/api/maps/search-v2/get-geocoding#geocodingresponse) - If the query completed successfully.\n\n - `Error` - If the query failed. The response will contain a `code` and a `message` in this case.\n\n\n",
"operationId": "Search_GetGeocodingBatch",
"x-ms-examples": {
"A Geocoding Batch API call containing 2 Geocoding queries": {
"$ref": "./examples/ForwardGeocodingBatch.json"
}
},
"parameters": [
{
"$ref": "../../../Common/preview/2022-09-01-preview/common.json#/parameters/ClientId"
},
{
"$ref": "#/parameters/ApiVersion"
},
{
"$ref": "#/parameters/Accept-Language"
},
{
"name": "geocodingBatchRequestBody",
"in": "body",
"description": "The list of address geocoding queries/requests to process. The list can contain a max of 100 queries and must contain at least 1 query.",
"required": true,
"schema": {
"$ref": "#/definitions/GeocodingBatchRequestBody"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/GeocodingBatchResponse"
}
},
"207": {
"description": "Multi-Status. One or more batch items could not be processed and return different status code.",
"schema": {
"$ref": "#/definitions/GeocodingBatchResponse"
}
},
"default": {
"$ref": "../../../Common/preview/2022-09-01-preview/common.json#/responses/default"
}
}
}
},
"/search/polygon": {
"get": {
"description": "**Get Polygon**\n\n**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).\n\nSupplies polygon data of a geographical area outline such as a city or a country region.\n>[!Important]\n>By using this feature, you agree to the preview legal terms. See the [Preview Supplemental Terms](https://azure.microsoft.com/support/legal/preview-supplemental-terms/) for additional details.",
"operationId": "Search_GetPolygon",
"produces": [
"application/geo+json"
],
"x-ms-examples": {
"Get polygon for a city at coordinates -122.204141,47.612560": {
"$ref": "./examples/GetPolygon.json"
}
},
"parameters": [
{
"$ref": "../../../Common/preview/2022-09-01-preview/common.json#/parameters/ClientId"
},
{
"$ref": "#/parameters/ApiVersion"
},
{
"$ref": "#/parameters/Accept-Language"
},
{
"name": "coordinates",
"in": "query",
"description": "A point on the earth specified as a longitude and latitude. Example: &coordinates=lon,lat",
"required": true,
"type": "array",
"items": {
"type": "number",
"format": "double"
},
"minItems": 2,
"maxItems": 2,
"collectionFormat": "csv",
"x-ms-parameter-location": "method"
},
{
"$ref": "#/parameters/View"
},
{
"$ref": "#/parameters/BoundaryResultType"
},
{
"$ref": "#/parameters/Resolution"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/Boundary"
}
},
"default": {
"$ref": "../../../Common/preview/2022-09-01-preview/common.json#/responses/default"
}
}
}
},
"/reverseGeocode": {
"get": {
"description": "**Reverse Geocoding**\n\n**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).\n\nTranslate a coordinate (example: 37.786505, -122.3862) into a human understandable street address. Most often this is needed in tracking applications where you receive a GPS feed from the device or asset and wish to know what address where the coordinate is located. This endpoint will return address information for a given coordinate.\n\n>[!Important]\n>By using this feature, you agree to the preview legal terms. See the [Preview Supplemental Terms](https://azure.microsoft.com/support/legal/preview-supplemental-terms/) for additional details.\n\n",
"operationId": "Search_GetReverseGeocoding",
"produces": [
"application/geo+json"
],
"x-ms-examples": {
"Search point -122.138681, 47.630358": {
"$ref": "./examples/ReverseGeocoding.json"
}
},
"parameters": [
{
"$ref": "../../../Common/preview/2022-09-01-preview/common.json#/parameters/ClientId"
},
{
"$ref": "#/parameters/ApiVersion"
},
{
"$ref": "#/parameters/Accept-Language"
},
{
"name": "coordinates",
"in": "query",
"description": "The coordinates of the location that you want to reverse geocode. Example: &coordinates=lon,lat",
"required": true,
"type": "array",
"items": {
"type": "number",
"format": "double"
},
"minItems": 2,
"maxItems": 2,
"collectionFormat": "csv",
"x-ms-parameter-location": "method"
},
{
"$ref": "#/parameters/ReverseGeocodingResultTypes"
},
{
"$ref": "#/parameters/View"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/GeocodingResponse"
}
},
"default": {
"$ref": "../../../Common/preview/1.0/common.json#/responses/default"
}
}
}
},
"/reverseGeocode:batch": {
"post": {
"description": "**Reverse Geocoding Batch API**\n\n\n**Applies to**: see pricing [tiers](https://aka.ms/AzureMapsPricingTier).\n\n\n\nThe Reverse Geocoding Batch API sends batches of queries to [Reverse Geocoding API](https://docs.microsoft.com/rest/api/maps/search-v2/get-reverse-geocoding) using just a single API call. The API allows caller to batch up to **100** queries.\n>[!Important]\n>By using this feature, you agree to the preview legal terms. See the [Preview Supplemental Terms](https://azure.microsoft.com/support/legal/preview-supplemental-terms/) for additional details.\n\n### Submit Synchronous Batch Request\nThe Synchronous API is recommended for lightweight batch requests. When the service receives a request, it will respond as soon as the batch items are calculated and there will be no possibility to retrieve the results later. The Synchronous API will return a timeout error (a 408 response) if the request takes longer than 60 seconds. The number of batch items is limited to **100** for this API.\n```\nPOST https://atlas.microsoft.com/reverseGeocode:batch?api-version=2022-12-01-preview\n```\n### POST Body for Batch Request\nTo send the _reverse geocoding_ queries you will use a `POST` request where the request body will contain the `batchItems` array in `json` format and the `Content-Type` header will be set to `application/json`. Here's a sample request body containing 2 _reverse geocoding_ queries:\n\n\n```\n{\n \"batchItems\": [\n {\n \"coordinates\": [-122.128275, 47.639429],\n \"resultTypes\": [\"Address\", \"PopulatedPlace\"]\n },\n {\n \"coordinates\": [-122.341979399674, 47.6095253501216]\n }\n ]\n}\n```\n\nA _reverse geocoding_ batchItem object can accept any of the supported _reverse geocoding_ [URI parameters](https://docs.microsoft.com/rest/api/maps/search-v2/get-reverse-geocoding#uri-parameters).\n\n\nThe batch should contain at least **1** query.\n\n\n### Batch Response Model\nThe batch response contains a `summary` component that indicates the `totalRequests` that were part of the original batch request and `successfulRequests` i.e. queries which were executed successfully. The batch response also includes a `batchItems` array which contains a response for each and every query in the batch request. The `batchItems` will contain the results in the exact same order the original queries were sent in the batch request. Each item is of one of the following types:\n\n - [`GeocodingResponse`](https://docs.microsoft.com/rest/api/maps/search-v2/get-reverse-geocoding#geocodingresponse) - If the query completed successfully.\n\n - `Error` - If the query failed. The response will contain a `code` and a `message` in this case.\n\n\n",
"operationId": "Search_GetReverseGeocodingBatch",
"x-ms-examples": {
"A Reverse Geocoding Batch API call containing 2 Reverse Geocoding queries": {
"$ref": "./examples/ReverseGeocodingBatch.json"
}
},
"parameters": [
{
"$ref": "../../../Common/preview/2022-09-01-preview/common.json#/parameters/ClientId"
},
{
"$ref": "#/parameters/ApiVersion"
},
{
"$ref": "#/parameters/Accept-Language"
},
{
"name": "reverseGeocodingBatchRequestBody",
"in": "body",
"description": "The list of reverse geocoding queries/requests to process. The list can contain a max of 100 queries and must contain at least 1 query.",
"required": true,
"schema": {
"$ref": "#/definitions/ReverseGeocodingBatchRequestBody"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/GeocodingBatchResponse"
}
},
"207": {
"description": "Multi-Status. One or more batch items could not be processed and return different status code.",
"schema": {
"$ref": "#/definitions/GeocodingBatchResponse"
}
},
"default": {
"$ref": "../../../Common/preview/1.0/common.json#/responses/default"
}
}
}
}
},
"definitions": {
"UsageType": {
"type": "string",
"enum": [
"Display",
"Route"
],
"x-ms-enum": {
"name": "UsageTypeEnum",
"modelAsString": true,
"values": [
{
"value": "Display"
},
{
"value": "Route"
}
]
}
},
"GeocodePoints": {
"description": "A collection of geocode points that differ in how they were calculated and their suggested use.",
"type": "array",
"items": {
"type": "object",
"properties": {
"geometry": {
"$ref": "../../../Common/preview/2022-09-01-preview/common.json#/definitions/GeoJsonPoint"
},
"calculationMethod": {
"description": "The method that was used to compute the geocode point.",
"type": "string",
"enum": [
"Interpolation",
"InterpolationOffset",
"Parcel",
"Rooftop"
],
"x-ms-enum": {
"name": "CalculationMethodEnum",
"modelAsString": true,
"values": [
{
"value": "Interpolation",
"description": "The geocode point was matched to a point on a road using interpolation."
},
{
"value": "InterpolationOffset",
"description": "The geocode point was matched to a point on a road using interpolation with an additional offset to shift the point to the side of the street."
},
{
"value": "Parcel",
"description": "The geocode point was matched to the center of a parcel."
},
{
"value": "Rooftop",
"description": "The geocode point was matched to the rooftop of a building."
}
]
}
},
"usageTypes": {
"description": "The best use for the geocode point.\nEach geocode point is defined as a `Route` point, a `Display` point or both.\nUse `Route` points if you are creating a route to the location. Use `Display` points if you are showing the location on a map. For example, if the location is a park, a `Route` point may specify an entrance to the park where you can enter with a car, and a `Display` point may be a point that specifies the center of the park.",
"type": "array",
"items": {
"$ref": "#/definitions/UsageType"
}
}
}
}
},
"GeocodingBatchRequestItem": {
"description": "Batch Query object",
"type": "object",
"properties": {
"optionalId": {
"description": "id of the request which would show in corresponding batchItem",
"type": "string"
},
"top": {
"description": "Maximum number of responses that will be returned. Default: 5, minimum: 1 and maximum: 20.",
"type": "integer",
"format": "int32",
"default": 5,
"minimum": 1,
"maximum": 20
},
"query": {
"description": "A string that contains information about a location, such as an address or landmark name.",
"type": "string"
},
"addressLine": {
"description": "The official street line of an address relative to the area, as specified by the locality, or postalCode, properties. Typical use of this element would be to provide a street address or any official address.\n\n**If query is given, should not use this parameter.**",
"type": "string"
},
"countryRegionSet": {
"description": "Comma separated string of country or region codes, e.g. FR,ES. This will limit the search to the specified countries. Only the first country code will be used for the Geocoder.\n\n**If query is given, should not use this parameter.**",
"type": "array",
"items": {
"type": "string"
}
},
"bbox": {
"description": "A rectangular area on the earth defined as a bounding box object. The sides of the rectangles are defined by longitude and latitude values. For more information, see Location and Area Types. When you specify this parameter, the geographical area is taken into account when computing the results of a location query.\n\nExample: [lon1, lat1, lon2, lat2]",
"type": "array",
"items": {
"type": "number",
"format": "double"
},
"minItems": 4,
"maxItems": 4
},
"view": {
"description": "A string that specifies an [ISO 3166-1 Alpha-2 region/country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2). This will alter Geopolitical disputed borders and labels to align with the specified user region.",
"type": "string"
},
"location": {
"description": "A point on the earth specified as a longitude and latitude. When you specify this parameter, the user’s location is taken into account and the results returned may be more relevant to the user. Example: [lon, lat]",
"type": "array",
"items": {
"type": "number",
"format": "double"
},
"minItems": 2,
"maxItems": 2
},
"adminDistrict": {
"description": "The country subdivision portion of an address, such as WA.\n\n**If query is given, should not use this parameter.**",
"type": "string"
},
"adminDistrict2": {
"description": "The county for the structured address, such as King.\n\n**If query is given, should not use this parameter.**",
"type": "string"
},
"adminDistrict3": {
"description": "The named area for the structured address.\n\n**If query is given, should not use this parameter.**",
"type": "string"
},
"locality": {
"description": "The locality portion of an address, such as Seattle.\n\n**If query is given, should not use this parameter.**",
"type": "string"
},
"postalCode": {
"description": "The postal code portion of an address.\n\n**If query is given, should not use this parameter.**",
"type": "string"
},
"strictMatch": {
"description": "Restrict the geocoding result to the country or region that is specified in the countryRegion field and the state, province or territory specified in the adminDistrict field.\n\n**If query is given, should not use this parameter.**",
"type": "string",
"default": "notstrict",
"enum": [
"notstrict",
"strict"
],
"x-ms-enum": {
"name": "StrictMatchEnum",
"modelAsString": true,
"values": [
{
"value": "notstrict",
"description": "Do not restrict results to the specified countryRegion and adminDistrict."
},
{
"value": "strict",
"description": "Restrict results to the specified countryRegion and adminDistrict."
}
]
}
}
}
},
"GeocodingBatchRequestBody": {
"description": "The list of address geocoding queries/requests to process. The list can contain a max of 100 queries and must contain at least 1 query.",
"type": "object",
"properties": {
"batchItems": {
"description": "The list of queries to process.",
"type": "array",
"items": {
"$ref": "#/definitions/GeocodingBatchRequestItem"
}
}
}
},
"ReverseGeocodingBatchRequestItem": {
"description": "Batch Query object",
"type": "object",
"properties": {
"optionalId": {
"description": "id of the request which would show in corresponding batchItem",
"type": "string"
},
"coordinates": {
"description": "The coordinates of the location that you want to reverse geocode. Example: [lon,lat]",
"type": "array",
"items": {
"type": "number",
"format": "double"
},
"minItems": 2,
"maxItems": 2
},
"resultTypes": {
"description": "Specify entity types that you want in the response. Only the types you specify will be returned. If the point cannot be mapped to the entity types you specify, no location information is returned in the response.\nDefault value is all possible entities.\nA comma separated list of entity types selected from the following options.\n\n- Address\n- Neighborhood\n- PopulatedPlace\n- Postcode1\n- AdminDivision1\n- AdminDivision2\n- CountryRegion\n\nThese entity types are ordered from the most specific entity to the least specific entity. When entities of more than one entity type are found, only the most specific entity is returned. For example, if you specify Address and AdminDistrict1 as entity types and entities were found for both types, only the Address entity information is returned in the response.",
"type": "array",
"items": {
"type": "string",
"enum": [
"Address",
"Neighborhood",
"PopulatedPlace",
"Postcode1",
"AdminDivision1",
"AdminDivision2",
"CountryRegion"
],
"x-ms-enum": {
"name": "ResultTypeEnum",
"modelAsString": true,
"values": [
{
"name": "Address",
"value": "Address"
},
{
"name": "Neighborhood",
"value": "Neighborhood"
},
{
"name": "PopulatedPlace",
"value": "PopulatedPlace"
},
{
"name": "Postcode1",
"value": "Postcode1"
},
{
"name": "AdminDivision1",
"value": "AdminDivision1"
},
{
"name": "AdminDivision2",
"value": "AdminDivision2"
},
{
"name": "CountryRegion",
"value": "CountryRegion"
}
]
}
}
},
"view": {
"description": "A string that specifies an [ISO 3166-1 Alpha-2 region/country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2). This will alter Geopolitical disputed borders and labels to align with the specified user region.",
"type": "string"
}
}
},
"ReverseGeocodingBatchRequestBody": {
"description": "The list of reverse geocoding queries/requests to process. The list can contain a max of 100 queries and must contain at least 1 query.",
"type": "object",
"properties": {
"batchItems": {
"description": "The list of queries to process.",
"type": "array",
"items": {
"$ref": "#/definitions/ReverseGeocodingBatchRequestItem"
}
}
}
},
"GeocodingBatchResponseItem": {
"type": "object",
"properties": {
"optionalId": {
"description": "id of the batchItem which would be the same as the id in the request",
"type": "string"
},
"type": {
"$ref": "#/definitions/FeatureCollectionType"
},
"features": {
"$ref": "#/definitions/Features"
},
"nextLink": {
"$ref": "#/definitions/NextLink"
},
"error": {
"$ref": "../../../../../common-types/data-plane/v1/types.json#/definitions/ErrorDetail"
}
}
},
"GeocodingBatchResponse": {
"description": "This object is returned from a successful Geocoding Batch service call.",
"type": "object",
"properties": {
"summary": {
"description": "Summary for the batch request",
"type": "object",
"properties": {
"successfulRequests": {
"description": "Number of successful requests in the batch",
"type": "integer",
"format": "int32"
},
"totalRequests": {
"description": "Total number of requests in the batch",
"type": "integer",
"format": "int32"
}
}
},
"batchItems": {
"description": "Array containing the batch results.",
"type": "array",
"items": {
"$ref": "#/definitions/GeocodingBatchResponseItem"
}
},
"nextLink": {
"$ref": "#/definitions/NextLink"
}
}
},
"Features": {
"type": "array",
"items": {
"$ref": "#/definitions/FeaturesItem"
}
},
"FeaturesItem": {
"type": "object",
"properties": {
"type": {
"type": "string",
"description": "The type of a feature must be Feature.",
"enum": [
"Feature"
],
"x-ms-enum": {
"name": "FeatureTypeEnum",
"modelAsString": true,
"values": [
{
"value": "Feature"
}