-
Notifications
You must be signed in to change notification settings - Fork 5.1k
/
data.json
748 lines (748 loc) · 38.2 KB
/
data.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
{
"swagger": "2.0",
"info": {
"title": "Azure Maps Data Service",
"version": "2.0",
"description": "APIs for uploading map data to Azure Maps."
},
"x-ms-parameterized-host": {
"hostTemplate": "{geography}.atlas.microsoft.com",
"parameters": [
{
"$ref": "#/parameters/GeographicResourceLocation"
}
]
},
"schemes": [
"https"
],
"consumes": [],
"produces": [
"application/json"
],
"securityDefinitions": {
"AADToken": {
"type": "oauth2",
"authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize",
"flow": "implicit",
"description": "These are the [Microsoft Entra OAuth 2.0](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#### Notes\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* \nThe `Authorization URL` is specific to the Azure public cloud instance. Sovereign clouds have unique Authorization URLs and Azure Active directory configurations. \n* \nThe 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* \nUsage of the [Azure Maps Web SDK](https://aka.ms/amaadmc) allows for configuration based setup of an application for multiple use cases.\n* For more information on Microsoft identity platform, see [Microsoft identity platform overview](https://learn.microsoft.com/entra/identity-platform/v2-overview).",
"scopes": {
"https://atlas.microsoft.com/.default": "https://atlas.microsoft.com/.default"
}
},
"SharedKey": {
"type": "apiKey",
"description": "This is a shared key that is provisioned when you [Create an Azure Maps account](https://docs.microsoft.com/azure/azure-maps/quick-demo-map-app#create-an-azure-maps-account) in the Azure portal or using PowerShell, CLI, Azure SDKs, or REST API.\n\n With this key, any application can access all REST API. In other words, this key can be used as a master key in the account that they are issued in.\n\n For publicly exposed applications, our recommendation is to use the [confidential client applications](https://docs.microsoft.com/azure/azure-maps/authentication-best-practices#confidential-client-applications) approach to access Azure Maps REST APIs so your key can be securely stored.",
"name": "subscription-key",
"in": "query"
},
"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"
]
},
{
"SharedKey": []
},
{
"SasToken": []
}
],
"parameters": {
"GeographicResourceLocation": {
"name": "geography",
"description": "This parameter specifies where the Azure Maps Creator resource is located. Valid values are us and eu.",
"in": "path",
"required": true,
"type": "string",
"default": "us",
"enum": [
"us",
"eu"
],
"x-ms-enum": {
"name": "GeographicResourceLocation",
"modelAsString": true,
"values": [
{
"value": "us",
"description": "Used to access an Azure Maps Creator resource in the United States"
},
{
"value": "eu",
"description": "Used to access an Azure Maps Creator resource in Europe"
}
]
},
"x-ms-parameter-location": "client"
},
"ClientId": {
"name": "x-ms-client-id",
"description": "Specifies which account is intended for usage in conjunction with the Microsoft Entra ID security model. It represents a unique ID for the Azure Maps account and can be retrieved from the Azure Maps management plane Account API. To use Microsoft Entra ID security in Azure Maps see the following [articles](https://aka.ms/amauthdetails) for guidance.",
"type": "string",
"in": "header",
"required": false,
"x-ms-parameter-location": "client"
},
"SubscriptionKey": {
"name": "subscription-key",
"description": "One of the Azure Maps keys provided from an Azure Map Account. Please refer to this [article](https://docs.microsoft.com/azure/azure-maps/how-to-manage-authentication) for details on how to manage authentication.",
"type": "string",
"in": "query",
"required": false,
"x-ms-parameter-location": "client"
},
"ApiVersion": {
"name": "api-version",
"description": "Version number of Azure Maps API. Current version is 2.0",
"type": "string",
"in": "query",
"required": true,
"default": "2.0",
"x-ms-parameter-location": "client"
},
"JsonFormat": {
"name": "format",
"description": "Desired format of the response. Only `json` format is supported.",
"type": "string",
"in": "path",
"required": true,
"enum": [
"json"
],
"x-ms-enum": {
"name": "JsonFormat",
"modelAsString": true,
"values": [
{
"value": "json",
"description": "[The JavaScript Object Notation Data Interchange Format](https://tools.ietf.org/html/rfc8259)"
}
]
},
"x-ms-parameter-location": "method"
},
"UploadDataFormat": {
"name": "dataFormat",
"description": "Data format of the content being uploaded.",
"type": "string",
"in": "query",
"required": true,
"enum": [
"geojson",
"zip",
"dwgzippackage"
],
"x-ms-enum": {
"name": "UploadDataFormat",
"modelAsString": true,
"values": [
{
"value": "geojson",
"description": "[GeoJSON](https://tools.ietf.org/html/rfc7946) is a JSON based geospatial data interchange format."
},
{
"value": "zip",
"description": "Compressed data format."
},
{
"value": "dwgzippackage",
"description": ""
}
]
},
"x-ms-parameter-location": "method"
},
"Udid": {
"name": "udid",
"description": "The unique data id for the content. The `udid` must have been obtained from a successful [Data Upload API](https://docs.microsoft.com/en-us/rest/api/maps/data-v2/upload-preview) call.",
"type": "string",
"in": "path",
"required": true,
"x-ms-parameter-location": "method"
},
"Description": {
"name": "description",
"description": "The description to be given to the upload.",
"type": "string",
"in": "query",
"required": false,
"x-ms-parameter-location": "method"
},
"DataUploadOperationId": {
"name": "operationId",
"type": "string",
"in": "path",
"description": "The ID to query the status for the data upload request.",
"required": true,
"x-ms-parameter-location": "method"
}
},
"paths": {
"/mapData": {
"post": {
"x-publish": true,
"description": "**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).\n\nThe Data Upload API allows the caller to upload data content to the Azure Maps service.\nYou can use this API in a scenario like uploading a collection of Geofences in `GeoJSON` \nformat, for use in our [Azure Maps Geofencing Service](https://docs.microsoft.com/rest/api/maps/spatial).\n\n## Submit Upload Request\n\nTo upload your content you will use a `POST` request. The request body will contain the data to upload. The `Content-Type` header will be set to the content type of the \ndata.\n\nFor example, to upload a collection of geofences in `GeoJSON` format, set the request body to the geofence \ncontent. Set the `dataFormat` query parameter to _geojson_, and set the `Content-Type` header to either one \nof the following media types:\n\n- `application/json` if `dataFormat` is `JSON`\n- `application/vnd.geo+json` if `dataFormat` is `geoJSON` \n- `application/octet-stream` if `dataFormat` is `zip`\n\nHere's a sample request body for uploading a simple Geofence represented as a circle geometry using a center \npoint and a radius. The sample below is in `GeoJSON`:\n\n```json\n{\n \"type\": \"FeatureCollection\",\n \"features\": [{\n \"type\": \"Feature\",\n \"geometry\": {\n \"type\": \"Point\",\n \"coordinates\": [-122.126986, 47.639754]\n },\n \"properties\": {\n \"geometryId\": \"001\",\n \"radius\": 500\n }\n }]\n}\n```\n\nThe Data Upload API performs a \nlong-running operation.\n\n## Data Upload Limits\n\nPlease, be aware that currently every Azure Maps account has a [data storage limit](https://docs.microsoft.com/en-us/azure/azure-resource-manager/management/azure-subscription-service-limits#azure-maps-limits). \nOnce the storage limit is reached, all the new upload API calls will return a `409 Conflict` http error response. \nYou can always use the [Data Delete API](https://docs.microsoft.com/rest/api/maps/data-v2/delete-preview) to \ndelete old/unused content and create space for new uploads.",
"operationId": "Data_UploadPreview",
"x-ms-long-running-operation": true,
"x-ms-long-running-operation-options": {
"final-state-via": "location"
},
"x-ms-examples": {
"Upload GeoJSON data containing geometries that represent a collection of geofences": {
"$ref": "./examples/Upload.json"
}
},
"parameters": [
{
"$ref": "#/parameters/ClientId"
},
{
"$ref": "#/parameters/SubscriptionKey"
},
{
"$ref": "#/parameters/ApiVersion"
},
{
"$ref": "#/parameters/Description"
},
{
"$ref": "#/parameters/UploadDataFormat"
},
{
"name": "UploadContent",
"in": "body",
"description": "The content to upload.",
"required": true,
"schema": {
"type": "object"
}
}
],
"responses": {
"200": {
"description": "Data upload failed. The uploaded content did not satisfy all the validation checks. The response body contains all the errors that were encountered.",
"schema": {
"$ref": "#/definitions/ODataErrorResponse"
}
},
"202": {
"description": "Request Accepted: The request has been accepted for processing. Please use the URL in the Operation-Location Header to obtain status.",
"headers": {
"Operation-Location": {
"type": "string",
"description": "New URL to check for the results of the long-running operation."
}
}
},
"400": {
"description": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive.",
"schema": {
"$ref": "#/definitions/ODataErrorResponse"
}
},
"401": {
"description": "Access denied due to invalid subscription key or invalid Microsoft Entra ID bearer token. Make sure to provide a valid key for an active Azure subscription and Maps resource. Otherwise, verify the [WWW-Authenticate](https://tools.ietf.org/html/rfc6750#section-3.1) header for error code and description of the provided Microsoft Entra ID bearer token.",
"schema": {
"$ref": "#/definitions/ODataErrorResponse"
}
},
"403": {
"description": "Permission, capacity, or authentication issues.",
"schema": {
"$ref": "#/definitions/ODataErrorResponse"
}
},
"404": {
"description": "Not Found: the requested resource could not be found, but it may be available again in the future.",
"schema": {
"$ref": "#/definitions/ODataErrorResponse"
}
},
"500": {
"description": "An error occurred while processing the request. Please try again later.",
"schema": {
"$ref": "#/definitions/ODataErrorResponse"
}
}
}
},
"get": {
"x-publish": true,
"description": "**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).\n\nThis API allows the caller to fetch a list of all content uploaded previously using the [Data Upload API](https://docs.microsoft.com/en-us/rest/api/maps/data-v2/upload-preview). \n\n\n### Submit List Request\n\nTo list all your map data content you will issue a `GET` request with no additional parameters.\n\n\n### List Data Response\n\nThe Data List API returns the complete list of all data in `json` format. The response contains the following details for each data resource:\n\n > udid - The unique data id for the data resource.\n\n > location - The location of the data resource. Execute a HTTP `GET` on this location to download the data.\n\n\nHere's a sample response returning the `udid` and `location` of 3 data resources: \n\n<br>\n\n```json\n{\n \"mapDataList\": \n [\n {\n \"udid\": \"9a1288fa-1858-4a3b-b68d-13a8j5af7d7c\",\n \"location\": \"https://us.atlas.microsoft.com/mapData/9a1288fa-1858-4a3b-b68d-13a8j5af7d7c?api-version=1.0\",\n \"created\": \"2021-04-05T18:41:15+00:00\",\n \"updated\": \"2021-04-05T18:41:26+00:00\",\n \"sizeInBytes\": 29920,\n \"uploadStatus\": \"Completed\",\n \"description\": \"Sample Building\",\n \"dataFormat\": \"zip\"\n },\n {\n \"udid\": \"8b1288fa-1958-4a2b-b68e-13a7i5af7d7c\",\n \"location\": \"https://us.atlas.microsoft.com/mapData/8b1288fa-1958-4a2b-b68e-13a7i5af7d7c?api-version=1.0\",\n \"created\": \"2021-06-09T12:42:17+00:00\",\n \"updated\": \"2021-06-09T12:42:19+00:00\",\n \"sizeInBytes\": 1339,\n \"uploadStatus\": \"Completed\",\n \"description\": \"Sample Lobby\",\n \"dataFormat\": \"zip\"\n },\n {\n \"udid\": \"7c1288fa-2058-4a1b-b68f-13a6h5af7d7c\",\n \"location\": \"https://us.atlas.microsoft.com/mapData/7c1288fa-2058-4a1b-b68f-13a6h5af7d7c?api-version=1.0\",\n \"created\": \"2021-07-08T08:25:48+00:00\",\n \"updated\": \"2021-07-08T08:25:52+00:00\",\n \"sizeInBytes\": 1650,\n \"uploadStatus\": \"Pending\",\n \"description\": \"Sample Break Room\",\n \"dataFormat\": \"zip\"\n }]\n}\n```\n\n<br>",
"operationId": "Data_ListPreview",
"x-ms-examples": {
"List all the previously uploaded data": {
"$ref": "./examples/List.json"
}
},
"parameters": [
{
"$ref": "#/parameters/ClientId"
},
{
"$ref": "#/parameters/SubscriptionKey"
},
{
"$ref": "#/parameters/ApiVersion"
}
],
"responses": {
"200": {
"description": "List data request completed successfully. The response body contains a list of all the previously uploaded data.",
"schema": {
"$ref": "#/definitions/MapDataListResponse"
},
"headers": {
"Content-Type": {
"type": "string",
"description": "The content-type for the Download API response."
}
}
},
"400": {
"description": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive.",
"schema": {
"$ref": "#/definitions/ODataErrorResponse"
}
},
"401": {
"description": "Access denied due to invalid subscription key or invalid Microsoft Entra ID bearer token. Make sure to provide a valid key for an active Azure subscription and Maps resource. Otherwise, verify the [WWW-Authenticate](https://tools.ietf.org/html/rfc6750#section-3.1) header for error code and description of the provided Microsoft Entra ID bearer token.",
"schema": {
"$ref": "#/definitions/ODataErrorResponse"
}
},
"403": {
"description": "Permission, capacity, or authentication issues.",
"schema": {
"$ref": "#/definitions/ODataErrorResponse"
}
},
"404": {
"description": "Not Found: the requested resource could not be found, but it may be available again in the future.",
"schema": {
"$ref": "#/definitions/ODataErrorResponse"
}
},
"500": {
"description": "An error occurred while processing the request. Please try again later.",
"schema": {
"$ref": "#/definitions/ODataErrorResponse"
}
}
}
}
},
"/mapData/{udid}": {
"put": {
"x-publish": true,
"description": "**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).\n\nThe Data Update API allows the caller to update a previously uploaded data content.\n\nYou can use this API in a scenario like adding or removing geofences to or from an existing collection of geofences. \nGeofences are uploaded using the [Data Upload API](https://docs.microsoft.com/rest/api/maps/data-v2/upload-preview), for \nuse in the [Azure Maps Geofencing Service](https://docs.microsoft.com/rest/api/maps/spatial).\n\nPlease note that the Update API will *replace* and *override* the existing data content.\n\n## Submit Update Request\n\nTo update your content you will use a `PUT` request. The request body will contain the new data that will replace \nthe existing data. The `Content-Type` header will be set to the content type of the data, and the path will contain \nthe `udid` of the data to be update.\n\nFor example, to update a collection of geofences that were previously uploaded using the Upload API, place the new \ngeofence content in the request body. Set the `udid` parameter in the path to the `udid` of the data received \npreviously in the upload API response. And set the `Content-Type` header to one of the following media types:\n\n- `application/json` if `dataFormat` is `JSON`\n- `application/vnd.geo+json` if `dataFormat` is `geoJSON`\n- `application/octet-stream` if `dataFormat` is `zip`\n\nHere's a sample request body for updating a simple Geofence. It's represented as a circle geometry using a center \npoint and a radius. The sample below is in `GeoJSON`:\n\n```json\n{\n \"type\": \"FeatureCollection\",\n \"features\": [{\n \"type\": \"Feature\",\n \"geometry\": {\n \"type\": \"Point\",\n \"coordinates\": [-122.126986, 47.639754]\n },\n \"properties\": {\n \"geometryId\": \"001\",\n \"radius\": 500\n }\n }]\n}\n```\n\nThe previously uploaded geofence had a radius of 100m. The above request will update it to 500m.\n\nThe Data Update API performs a \nlong-running operation.\n\n## Data Update Limits\n\nPlease, be aware that currently every Azure Maps account has a [data storage limit](https://docs.microsoft.com/en-us/azure/azure-resource-manager/management/azure-subscription-service-limits#azure-maps-limits). \nOnce the storage limit is reached, all the new upload API calls will return a `409 Conflict` http error response. \nYou can always use the [Data Delete API](https://docs.microsoft.com/rest/api/maps/data-v2/delete-preview) to \ndelete old/unused content and create space for new uploads.",
"operationId": "Data_UpdatePreview",
"x-ms-long-running-operation": true,
"x-ms-long-running-operation-options": {
"final-state-via": "location"
},
"x-ms-examples": {
"Update previously uploaded GeoJSON data containing geometries that represent a collection of geofences": {
"$ref": "./examples/Update.json"
}
},
"parameters": [
{
"$ref": "#/parameters/ClientId"
},
{
"$ref": "#/parameters/SubscriptionKey"
},
{
"$ref": "#/parameters/ApiVersion"
},
{
"$ref": "#/parameters/Udid"
},
{
"$ref": "#/parameters/Description"
},
{
"name": "UpdateContent",
"in": "body",
"description": "The new content that will update/replace the previously uploaded content.",
"required": true,
"schema": {
"type": "object"
}
}
],
"responses": {
"200": {
"description": "Data update failed. The uploaded content did not satisfy all the validation checks. The response body contains all the errors that were encountered.",
"schema": {
"$ref": "#/definitions/ODataErrorResponse"
}
},
"202": {
"description": "Request Accepted: The request has been accepted for processing. Please use the URL in the Operation-Location Header to obtain status.",
"headers": {
"Operation-Location": {
"type": "string",
"description": "New URL to check for the results of the long-running operation."
}
}
},
"400": {
"description": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive.",
"schema": {
"$ref": "#/definitions/ODataErrorResponse"
}
},
"401": {
"description": "Access denied due to invalid subscription key or invalid Microsoft Entra ID bearer token. Make sure to provide a valid key for an active Azure subscription and Maps resource. Otherwise, verify the [WWW-Authenticate](https://tools.ietf.org/html/rfc6750#section-3.1) header for error code and description of the provided Microsoft Entra ID bearer token.",
"schema": {
"$ref": "#/definitions/ODataErrorResponse"
}
},
"403": {
"description": "Permission, capacity, or authentication issues.",
"schema": {
"$ref": "#/definitions/ODataErrorResponse"
}
},
"404": {
"description": "Not Found: the requested resource could not be found, but it may be available again in the future.",
"schema": {
"$ref": "#/definitions/ODataErrorResponse"
}
},
"500": {
"description": "An error occurred while processing the request. Please try again later.",
"schema": {
"$ref": "#/definitions/ODataErrorResponse"
}
}
}
},
"get": {
"x-publish": true,
"description": "**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).\n\nThis API allows the caller to download a previously uploaded data content.<br> \nYou can use this API in a scenario like downloading an existing collection of geofences uploaded previously using the [Data Upload API](https://docs.microsoft.com/en-us/rest/api/maps/data-v2/upload-preview) for use in our [Azure Maps Geofencing Service](https://docs.microsoft.com/en-us/rest/api/maps/spatial). \n\n\n### Submit Download Request\n\nTo download your content you will use a `GET` request where the path will contain the `udid` of the data to download. Optionally, you can also pass in an `Accept` header to specify a preference for the `Content-Type` of the data response. <br>\nFor example, to download a collection of geofences previously uploaded using the Upload API, set the `udid` parameter in the path to the `udid` of the data received previously in the upload API response and set the `Accept` header to either one of the following media types: \n \n - `application/json` if `dataFormat` is `JSON`\n - `application/vnd.geo+json` if `dataFormat` is `geoJSON`\n - `application/octet-stream` if `dataFormat` is `zip`\n\n\n### Download Data Response\n\nThe Download API will return a HTTP `200 OK` response if the data resource with the passed-in `udid` is found, where the response body will contain the content of the data resource.<br>\nA HTTP `400 Bad Request` error response will be returned if the data resource with the passed-in `udid` is not found.<br>\n\nHere's a sample response body for a simple geofence represented in `GeoJSON` uploaded previously using the Upload API:\n<br>\n\n```json\n{\n \"type\": \"FeatureCollection\",\n \"features\": [{\n \"type\": \"Feature\",\n \"geometry\": {\n \"type\": \"Point\",\n \"coordinates\": [-122.126986, 47.639754]\n },\n \"properties\": {\n \"geometryId\": \"001\",\n \"radius\": 500\n }\n }]\n}\n```",
"operationId": "Data_DownloadPreview",
"x-ms-examples": {
"Download previously uploaded GeoJSON data containing geometries that represent a collection of geofences": {
"$ref": "./examples/Download.json"
}
},
"parameters": [
{
"$ref": "#/parameters/ClientId"
},
{
"$ref": "#/parameters/SubscriptionKey"
},
{
"$ref": "#/parameters/ApiVersion"
},
{
"$ref": "#/parameters/Udid"
}
],
"responses": {
"200": {
"description": "Data download request completed successfully. The response body will contain the content for the passed in `udid`.",
"schema": {
"$ref": "#/definitions/MapDataDownloadResponse"
},
"headers": {
"Content-Type": {
"type": "string",
"description": "The content-type for the Download API response."
}
}
},
"400": {
"description": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive.",
"schema": {
"$ref": "#/definitions/ODataErrorResponse"
}
},
"401": {
"description": "Access denied due to invalid subscription key or invalid Microsoft Entra ID bearer token. Make sure to provide a valid key for an active Azure subscription and Maps resource. Otherwise, verify the [WWW-Authenticate](https://tools.ietf.org/html/rfc6750#section-3.1) header for error code and description of the provided Microsoft Entra ID bearer token.",
"schema": {
"$ref": "#/definitions/ODataErrorResponse"
}
},
"403": {
"description": "Permission, capacity, or authentication issues.",
"schema": {
"$ref": "#/definitions/ODataErrorResponse"
}
},
"404": {
"description": "Not Found: the requested resource could not be found, but it may be available again in the future.",
"schema": {
"$ref": "#/definitions/ODataErrorResponse"
}
},
"500": {
"description": "An error occurred while processing the request. Please try again later.",
"schema": {
"$ref": "#/definitions/ODataErrorResponse"
}
}
}
},
"delete": {
"x-publish": true,
"description": "**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).\n\nThis API allows the caller to delete a previously uploaded data content.<br> \nYou can use this API in a scenario like removing geofences previously uploaded using the [Data Upload API](https://docs.microsoft.com/en-us/rest/api/maps/data-v2/upload-preview) for use in our [Azure Maps Geofencing Service](https://docs.microsoft.com/en-us/rest/api/maps/spatial). You can also use this API to delete old/unused uploaded content and create space for new content.\n\n\n### Submit Delete Request\n\nTo delete your content you will issue a `DELETE` request where the path will contain the `udid` of the data to delete.<br> \nFor example, to delete a collection of geofences previously uploaded using the Upload API, set the `udid` parameter in the path to the `udid` of the data received previously in the upload API response. \n\n\n### Delete Data Response\n\nThe Data Delete API returns a HTTP `204 No Content` response with an empty body, if the data resource was deleted successfully.<br> \nA HTTP `400 Bad Request` error response will be returned if the data resource with the passed-in `udid` is not found. ",
"operationId": "Data_DeletePreview",
"x-ms-examples": {
"Delete previously uploaded GeoJSON data containing geometries that represent a collection of geofences": {
"$ref": "./examples/Delete.json"
}
},
"parameters": [
{
"$ref": "#/parameters/ClientId"
},
{
"$ref": "#/parameters/SubscriptionKey"
},
{
"$ref": "#/parameters/ApiVersion"
},
{
"$ref": "#/parameters/Udid"
}
],
"responses": {
"204": {
"description": "Data delete request completed successfully. The content for `udid` was deleted on the server."
},
"400": {
"description": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive.",
"schema": {
"$ref": "#/definitions/ODataErrorResponse"
}
},
"401": {
"description": "Access denied due to invalid subscription key or invalid Microsoft Entra ID bearer token. Make sure to provide a valid key for an active Azure subscription and Maps resource. Otherwise, verify the [WWW-Authenticate](https://tools.ietf.org/html/rfc6750#section-3.1) header for error code and description of the provided Microsoft Entra ID bearer token.",
"schema": {
"$ref": "#/definitions/ODataErrorResponse"
}
},
"403": {
"description": "Permission, capacity, or authentication issues.",
"schema": {
"$ref": "#/definitions/ODataErrorResponse"
}
},
"404": {
"description": "Not Found: the requested resource could not be found, but it may be available again in the future.",
"schema": {
"$ref": "#/definitions/ODataErrorResponse"
}
},
"500": {
"description": "An error occurred while processing the request. Please try again later.",
"schema": {
"$ref": "#/definitions/ODataErrorResponse"
}
}
}
}
},
"/mapData/operations/{operationId}": {
"get": {
"description": "This path will be obtained from a call to POST /mapData. While in progress, an http200 will be returned with no extra headers - followed by an http200 with Resource-Location header once completed.",
"operationId": "Data_GetOperationPreview",
"x-ms-examples": {
"Get the status of an operation which is still running": {
"$ref": "./examples/GetOperationStillRunning.json"
},
"Get the status of an operation which has finished successfully": {
"$ref": "./examples/GetOperation.json"
}
},
"parameters": [
{
"$ref": "#/parameters/SubscriptionKey"
},
{
"$ref": "#/parameters/ApiVersion"
},
{
"$ref": "#/parameters/DataUploadOperationId"
}
],
"responses": {
"200": {
"description": "The operation is running or complete. If the operation was successful, use the Resource-Location header to obtain the path to the result.",
"schema": {
"$ref": "#/definitions/LongRunningOperationResult"
}
},
"400": {
"description": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive.",
"schema": {
"$ref": "#/definitions/ODataErrorResponse"
}
}
}
}
}
},
"definitions": {
"ODataErrorResponse": {
"type": "object",
"description": "This response object is returned when an error occurs in the Azure Maps API.",
"properties": {
"error": {
"$ref": "#/definitions/ODataError"
}
}
},
"ODataError": {
"type": "object",
"description": "This object is returned when an error occurs in the Azure Maps API.",
"properties": {
"code": {
"type": "string",
"readOnly": true,
"description": "The ODataError code."
},
"message": {
"type": "string",
"readOnly": true,
"description": "If available, a human-readable description of the error."
},
"details": {
"type": "array",
"items": {
"$ref": "#/definitions/ODataError"
}
},
"target": {
"type": "string",
"readOnly": true,
"description": "If available, the target causing the error."
}
}
},
"LongRunningOperationResult": {
"description": "The response model for a Long-Running Operations API.",
"type": "object",
"properties": {
"operationId": {
"description": "The Id for this long-running operation.",
"type": "string"
},
"status": {
"description": "The status state of the request.",
"type": "string",
"enum": [
"NotStarted",
"Running",
"Failed",
"Succeeded"
],
"x-ms-enum": {
"name": "type",
"modelAsString": true,
"values": [
{
"value": "NotStarted",
"description": "The request has not started processing yet."
},
{
"value": "Running",
"description": "The request has started processing."
},
{
"value": "Failed",
"description": "The request has one or more failures."
},
{
"value": "Succeeded",
"description": "The request has successfully completed."
}
]
},
"readOnly": true
},
"created": {
"description": "The created timestamp.",
"type": "string",
"readOnly": true
},
"error": {
"$ref": "#/definitions/ODataError"
},
"warning": {
"$ref": "#/definitions/ODataError"
}
}
},
"MapDataDownloadResponse": {
"description": "The response model for the Data Download API. The response body will contain the content for the passed in `udid`.",
"type": "object",
"properties": {}
},
"MapDataListResponse": {
"description": "The response model for the Data List API. Returns a list of all the previously uploaded data.",
"type": "object",
"properties": {
"mapDataList": {
"description": "A list of all the previously uploaded data.",
"type": "array",
"readOnly": true,
"items": {
"$ref": "#/definitions/MapDataDetailInfo"
}
}
}
},
"MapDataDetailInfo": {
"description": "Detail information for the data.",
"type": "object",
"properties": {
"udid": {
"description": "The unique data id for the data.",
"type": "string",
"readOnly": true
},
"location": {
"description": "The location of the data. Execute a HTTP `GET` on this location to download the data.",
"type": "string",
"readOnly": true
},
"sizeInBytes": {
"description": "The size of the content in bytes.",
"type": "integer",
"format": "int64",
"readOnly": true
},
"uploadStatus": {
"description": "The current upload status of the content.",
"type": "string",
"readOnly": true
},
"dataFormat": {
"description": "The current data format.",
"type": "string",
"readOnly": true
},
"description": {
"description": "The current description.",
"type": "string",
"readOnly": true
}
}
}
}
}