-
Notifications
You must be signed in to change notification settings - Fork 5.1k
/
dataregistry.json
585 lines (585 loc) · 27 KB
/
dataregistry.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
{
"swagger": "2.0",
"info": {
"title": "Azure Maps Data Registry Service",
"version": "2022-12-01-preview",
"description": "APIs for managing data registry in Azure Maps."
},
"x-ms-parameterized-host": {
"hostTemplate": "{geography}.atlas.microsoft.com",
"parameters": [
{
"$ref": "../../../Common/preview/1.0/common.json#/parameters/MapsAccountGeographicResourceLocation"
}
]
},
"schemes": [
"https"
],
"consumes": [
"application/json"
],
"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"
}
},
"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 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": "The version number of Azure Maps API.",
"type": "string",
"in": "query",
"required": true,
"x-ms-parameter-location": "client"
},
"UserDataId": {
"name": "udid",
"description": "The user data ID of the data registry.",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$",
"in": "path",
"required": true,
"x-ms-parameter-location": "method"
},
"OperationIdHeader": {
"name": "Operation-Id",
"description": "The operation ID, in GUID format.",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$",
"in": "header",
"required": false,
"x-ms-parameter-location": "method"
},
"OperationIdQuery": {
"name": "operationId",
"description": "The ID used to query the status of a data register request.",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$",
"in": "path",
"required": true,
"x-ms-parameter-location": "method"
}
},
"paths": {
"/dataRegistries": {
"get": {
"description": "**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).\n\nThe `List` request returns an array containing all data registries previously registered using the [Register or Replace API](https://docs.microsoft.com/rest/api/maps/data-registry/register-or-replace).\n\nThis API won't check whether Azure Maps can access the underlying content and whether integrity check is passed for each data registry. Please use [Get Content](https://docs.microsoft.com/rest/api/maps/data-registry/get-content) for the latest status individually.\n\nThe data registry service endpoint is limited in scope to the region of your Azure Maps account and is not available for global Azure Maps accounts.\n\n>[!Important]\n>By using this feature, you agree to the preview legal terms. See the [Preview Supplemental Terms](https://azure.microsoft.com/en-us/support/legal/preview-supplemental-terms/) for additional details.\n## Submit List Request\n\nTo list all your data registries, issue a `GET` request with no additional parameters.\n\n## List Response\n\nThe `List` request returns an array of data registries in `JSON` format in the body of the response.",
"operationId": "DataRegistry_List",
"x-ms-examples": {
"List all previously registered data registries": {
"$ref": "./examples/DataRegistries_List.json"
}
},
"parameters": [
{
"$ref": "../../../Common/preview/1.0/common.json#/parameters/ClientId"
},
{
"$ref": "#/parameters/ApiVersion"
}
],
"responses": {
"200": {
"description": "The `List` request completed successfully. The response body contains an array of data registries.",
"schema": {
"$ref": "#/definitions/DataRegistryList"
}
},
"default": {
"description": "An unexpected error occurred.",
"schema": {
"$ref": "../../../Common/preview/1.0/common.json#/definitions/MapsErrorResponse"
},
"headers": {
"x-ms-error-code": {
"type": "string",
"description": "Error code of the error that occurred."
}
},
"x-ms-error-response": true
}
}
}
},
"/dataRegistries/{udid}": {
"get": {
"description": "**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).\n\nThe `Get Data Registry` request returns the data registry information, as an [AzureBlob](#azureblob) object in JSON format, in the body of the response along with the HTTP status code of 200 when successful. If Azure Maps cannot access the underlying content or the integrity check fails, the `status` is set to `Failed` and and error is returned.\n\nThe data registry service endpoint is limited in scope to the region of your Azure Maps account and is not available for global Azure Maps accounts.\n\n>[!Important]\n>By using this feature, you agree to the preview legal terms. See the [Preview Supplemental Terms](https://azure.microsoft.com/en-us/support/legal/preview-supplemental-terms/) for additional details.\n## Submit Get Data Registry Request\n\nA data registry `GET` request returns details of the requested data registry, as determined by the specified `udid`. The details are returned in the body of the response in JSON format.",
"operationId": "DataRegistry_GetDataRegistry",
"x-ms-examples": {
"Get the data registry of a completed udid": {
"$ref": "./examples/DataRegistries_GetDataRegistryCompleted.json"
},
"Get the data registry of a failed udid": {
"$ref": "./examples/DataRegistries_GetDataRegistryFailed.json"
}
},
"parameters": [
{
"$ref": "../../../Common/preview/1.0/common.json#/parameters/ClientId"
},
{
"$ref": "#/parameters/ApiVersion"
},
{
"$ref": "#/parameters/UserDataId"
}
],
"responses": {
"200": {
"description": "The `Get Data Registry` request completed successfully. The response body contains the data registry of the specified `udid`.",
"schema": {
"$ref": "#/definitions/DataRegistry"
}
},
"default": {
"description": "An unexpected error occurred.",
"schema": {
"$ref": "../../../Common/preview/1.0/common.json#/definitions/MapsErrorResponse"
},
"headers": {
"x-ms-error-code": {
"type": "string",
"description": "Error code of the error that occurred."
}
},
"x-ms-error-response": true
}
}
},
"put": {
"description": "**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).\n\nThe `Register` request is used to register data in an Azure Storage Account with an Azure Maps account. The maximum file size that can be registered is one gigabyte.\n\nThis is useful in scenarios like registering a collection of Geofences in `GeoJSON` format for use in [Azure Maps Geofencing Service](https://docs.microsoft.com/rest/api/maps/spatial), or registering a set of DWG design files as a zipped [Drawing Package](https://docs.microsoft.com/azure/azure-maps/drawing-requirements) for use in the Azure Maps Creator [Conversion Service](https://docs.microsoft.com/rest/api/maps/v2/conversion).\n\nThe data registry service endpoint is limited in scope to the region of your Azure Maps account and is not available for global Azure Maps accounts.\n\n>[!Important]\n>By using this feature, you agree to the preview legal terms. See the [Preview Supplemental Terms](https://azure.microsoft.com/en-us/support/legal/preview-supplemental-terms/) for additional details.\n## Submit Register or Replace Request\n\nThe `Register` and `Replace` requests are both long-running operations that contain an [AzureBlob](#azureblob) JSON object in the body of the request that defines the data registry details.",
"operationId": "DataRegistry_RegisterOrReplace",
"x-ms-long-running-operation": true,
"x-ms-long-running-operation-options": {
"final-state-via": "location"
},
"x-ms-examples": {
"Register or replace a udid": {
"$ref": "./examples/DataRegistries_RegisterOrReplace.json"
}
},
"parameters": [
{
"$ref": "../../../Common/preview/1.0/common.json#/parameters/ClientId"
},
{
"$ref": "#/parameters/ApiVersion"
},
{
"$ref": "#/parameters/UserDataId"
},
{
"$ref": "#/parameters/OperationIdHeader"
},
{
"name": "dataRegistry",
"in": "body",
"description": "The data to be registered.",
"required": true,
"schema": {
"$ref": "#/definitions/DataRegistry"
}
}
],
"responses": {
"200": {
"description": "Resource replacing: The request has been accepted for processing.",
"headers": {
"Operation-Id": {
"type": "string",
"description": "ID of the status monitor for the operation."
},
"Operation-Location": {
"type": "string",
"description": "A URL used to check the status or results of the request when it is a long-running operation. `api-version` is not included in the URL."
}
},
"schema": {
"$ref": "#/definitions/DataRegistry"
}
},
"201": {
"description": "Resource creating: The request has been accepted for processing.",
"headers": {
"Operation-Id": {
"type": "string",
"description": "ID of the status monitor for the operation."
},
"Operation-Location": {
"type": "string",
"description": "New URL to check for the results of the long-running operation. `api-version` is not included in the URL."
}
},
"schema": {
"$ref": "#/definitions/DataRegistry"
}
},
"default": {
"description": "An unexpected error occurred.",
"schema": {
"$ref": "../../../Common/preview/1.0/common.json#/definitions/MapsErrorResponse"
},
"headers": {
"x-ms-error-code": {
"type": "string",
"description": "Error code of the error that occurred."
}
},
"x-ms-error-response": true
}
}
},
"delete": {
"description": "**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).\n\nThe `Unregister` request removes a data registry without deleting the underlying content frm the Azure storage account.\n\nUseful in scenarios like unregistering geofence files previously registered using the [Register or Replace API](https://docs.microsoft.com/rest/api/maps/data-registry/register-or-replace) for use in the [Azure Maps Geofencing Service](https://docs.microsoft.com/rest/api/maps/spatial), or unregistering a compressed (ZIP) file containing DWG design files used by the Azure Maps Creator [Conversion Service](https://docs.microsoft.com/rest/api/maps/v2/conversion).\n\nThe data registry service endpoint is limited in scope to the region of your Azure Maps account and is not available for global Azure Maps accounts.\n\n>[!Important]\n>By using this feature, you agree to the preview legal terms. See the [Preview Supplemental Terms](https://azure.microsoft.com/en-us/support/legal/preview-supplemental-terms/) for additional details.\n## Submit Unregister Request\n\nUse an HTTP `DELETE` request with the `udid` of the data registry to unregister.\n\n## Unregister Response\n\nThe `Unregister` request returns a HTTP '204 No Content' response with an empty body, if the data registry was deleted successfully.",
"operationId": "DataRegistry_Unregister",
"x-ms-examples": {
"Unregister a data registry without deleting the underlying contents": {
"$ref": "./examples/DataRegistries_Unregister.json"
}
},
"parameters": [
{
"$ref": "../../../Common/preview/1.0/common.json#/parameters/ClientId"
},
{
"$ref": "#/parameters/ApiVersion"
},
{
"$ref": "#/parameters/UserDataId"
}
],
"responses": {
"204": {
"description": "The `Unregister` request completed successfully. The data registry is deleted but the data has not been removed from the storage account."
},
"default": {
"description": "An unexpected error occurred.",
"schema": {
"$ref": "../../../Common/preview/1.0/common.json#/definitions/MapsErrorResponse"
},
"headers": {
"x-ms-error-code": {
"type": "string",
"description": "Error code of the error that occurred."
}
},
"x-ms-error-response": true
}
}
}
},
"/dataRegistries/{udid}/content": {
"get": {
"description": "**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).\n\nThe `Get Content` request returns the contents of the specified file in the body of the response. The content is not available if the status is `Running` or `Failed`.\n\nThe data registry service endpoint is limited in scope to the region of your Azure Maps account and is not available for global Azure Maps accounts.\n\n>[!Important]\n>By using this feature, you agree to the preview legal terms. See the [Preview Supplemental Terms](https://azure.microsoft.com/en-us/support/legal/preview-supplemental-terms/) for additional details.\n## Submit Get Content Request\n\nTo get the contents of a registered file, include the user data ID (`udid`) in a `dataRegistries` request.\n\n## Get Content Response\n\nThe `Get Content` request returns the contents of the file in the response body, along with the HTTP status code of 200 when successful. The HTTP status code 400 (Bad Request) is returned if the file registry process failed or is still running.",
"operationId": "DataRegistry_GetContent",
"x-ms-examples": {
"Download previously registered GeoJSON content": {
"$ref": "./examples/DataRegistries_GetContent.json"
}
},
"produces": [
"application/geo+json",
"application/zip"
],
"parameters": [
{
"$ref": "../../../Common/preview/1.0/common.json#/parameters/ClientId"
},
{
"$ref": "#/parameters/ApiVersion"
},
{
"$ref": "#/parameters/UserDataId"
}
],
"responses": {
"200": {
"description": "The `Get Content` request completed successfully. The contents of the requested file is returned in the response body.",
"schema": {
"type": "file"
},
"headers": {
"Content-Type": {
"type": "string",
"description": "The Content-Type of the the specified `udid`."
}
}
},
"default": {
"description": "An unexpected error occurred.",
"schema": {
"$ref": "../../../Common/preview/1.0/common.json#/definitions/MapsErrorResponse"
},
"headers": {
"x-ms-error-code": {
"type": "string",
"description": "Error code of the error that occurred."
}
},
"x-ms-error-response": true
}
}
}
},
"/dataRegistries/operations/{operationId}": {
"get": {
"description": "The HTTP `GET` request used to get the status of a [data register or replace](/rest/api/maps/data-registry/register-or-replace) request is returned in the header of the register or replace response as the value of the `Operation-Location` key. While in progress, a HTTP `200 OK` response will be returned with `Retry-After` header - followed by a HTTP `200 OK` with no extra header once completed.\n\nThe data registry service endpoint is limited in scope to the region of your Azure Maps account and is not available for global Azure Maps accounts.\n\n>[!Important]\n>By using this feature, you agree to the preview legal terms. See the [Preview Supplemental Terms](https://azure.microsoft.com/en-us/support/legal/preview-supplemental-terms/) for additional details.\n",
"operationId": "DataRegistry_GetOperation",
"x-ms-examples": {
"Get the status of an operation that is still running": {
"$ref": "./examples/DataRegistries_GetOperationStillRunning.json"
},
"Get the status of an operation that failed": {
"$ref": "./examples/DataRegistries_GetOperationFailed.json"
},
"Get the status of an operation that finished successfully": {
"$ref": "./examples/DataRegistries_GetOperationCompleted.json"
}
},
"parameters": [
{
"$ref": "#/parameters/ApiVersion"
},
{
"$ref": "#/parameters/OperationIdQuery"
}
],
"responses": {
"200": {
"description": "The status of the long-running operation.",
"headers": {
"Retry-After": {
"type": "integer",
"format": "int32",
"description": "Recommended minimum number of seconds to wait before next check."
}
},
"schema": {
"$ref": "#/definitions/LongRunningOperationResult"
}
},
"default": {
"description": "An unexpected error occurred.",
"schema": {
"$ref": "../../../Common/preview/1.0/common.json#/definitions/MapsErrorResponse"
},
"headers": {
"x-ms-error-code": {
"type": "string",
"description": "Error code of the error that occurred."
}
},
"x-ms-error-response": true
}
}
}
}
},
"definitions": {
"DataRegistry": {
"description": "The data registry in Azure Maps.",
"type": "object",
"properties": {
"udid": {
"description": "The user data ID for the data registry.",
"type": "string",
"readOnly": true
},
"description": {
"description": "The description given to the data registry. The max length is 1024 characters.",
"type": "string"
},
"kind": {
"description": "Data registry kind.",
"type": "string",
"enum": [
"AzureBlob"
],
"x-ms-enum": {
"name": "DataRegistryKind",
"modelAsString": true,
"values": [
{
"value": "AzureBlob",
"description": "Azure Blob"
}
]
}
},
"azureBlob": {
"$ref": "#/definitions/AzureBlob"
},
"status": {
"$ref": "#/definitions/LongRunningOperationStatus"
},
"error": {
"$ref": "../../../Common/preview/1.0/common.json#/definitions/MapsErrorDetail"
}
}
},
"AzureBlob": {
"description": "Azure blob data registry details.",
"type": "object",
"properties": {
"dataFormat": {
"$ref": "#/definitions/DataFormat"
},
"msiClientId": {
"description": "Client ID of user-assigned managed identity. Use system-assigned managed identity if not provided.",
"type": "string"
},
"linkedResource": {
"description": "The ID of the datastore in the Azure Maps account.",
"type": "string"
},
"blobUrl": {
"description": "The blob URL contains the path to the file being registered.",
"type": "string"
},
"downloadURL": {
"description": "The `get content` URL used to get the contents of the specified file. It may not be available if the status of the data registry is `Running` or `Failed`.",
"type": "string",
"readOnly": true
},
"sizeInBytes": {
"description": "The size of the content in bytes.",
"type": "integer",
"format": "int64",
"readOnly": true
},
"contentMD5": {
"description": "The content MD5 of the content, used for data validation.",
"type": "string",
"readOnly": true
}
},
"required": [
"dataFormat",
"linkedResource",
"blobUrl"
]
},
"DataRegistryList": {
"description": "The response model for the data registry List API. Returns a list of all the previously registered data.",
"type": "object",
"properties": {
"value": {
"description": "An array of data registries.",
"type": "array",
"items": {
"$ref": "#/definitions/DataRegistry"
},
"readOnly": true
},
"nextLink": {
"description": "The URL to get the next set of data registries.",
"type": "string",
"readOnly": true
}
}
},
"DataFormat": {
"description": "The data format of the uploaded content used for validation purposes.",
"type": "string",
"enum": [
"geojson",
"zip"
],
"x-ms-enum": {
"name": "DataFormat",
"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."
}
]
}
},
"LongRunningOperationStatus": {
"description": "The status of a long-running operation.",
"type": "string",
"readOnly": true,
"enum": [
"Running",
"Failed",
"Completed"
],
"x-ms-enum": {
"name": "LongRunningOperationStatus",
"modelAsString": true,
"values": [
{
"value": "Running",
"description": "The request is currently processing."
},
{
"value": "Failed",
"description": "The request has one or more failures."
},
{
"value": "Completed",
"description": "The request completed successfully."
}
]
}
},
"LongRunningOperationResult": {
"description": "The response model for a long-running operation.",
"type": "object",
"properties": {
"id": {
"description": "The operationId",
"type": "string",
"readOnly": true
},
"status": {
"$ref": "#/definitions/LongRunningOperationStatus"
},
"error": {
"$ref": "../../../Common/preview/1.0/common.json#/definitions/MapsErrorDetail"
}
}
}
}
}