swagger: '2.0' info: title: Microsoft Azure Azure Maps Data Registry Service version: '2023-06-01' 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. To 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. #### Notes * 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). * The `Authorization URL` is specific to the Azure public cloud instance. Sovereign clouds have unique Authorization URLs and Microsoft Entra ID configurations. * 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. * Usage of the [Azure Maps Web SDK](https://aka.ms/amaadmc) allows for configuration based setup of an application for multiple use cases. * 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. 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. 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. 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. 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: summary: 'Microsoft Azure Use To Get A List Of All Data Registries In The Azure Maps Account' description: >-

The `List` API is an HTTP `GET` request that 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).

The 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.

## Submit List Request

To list all your data registries, issue a `GET` request with no additional parameters.

## List Response

The `List` request returns an array of data registries in `JSON` format in the body of the response. operationId: microsoftAzureDataregistryList 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 tags: - dataRegistries /dataRegistries/{udid}: get: summary: 'Microsoft Azure Use To Get The Specified Data Registry Information' description: >-

The `Get Data Registry` API is an HTTP `GET` request that returns data registry information, as an [AzureBlob](#azureblob) object in JSON format, in the body of the response, along with the HTTP status code 200, when successful. If Azure Maps cannot access the underlying content or the integrity check fails, the `status` is set to `Failed` and an error is returned.

The 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.

## Submit Get Data Registry Request

A 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: microsoftAzureDataregistryGetdataregistry 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 tags: - dataRegistries put: summary: >- Microsoft Azure Use To Register Data Stored In An Azure Storage Account With An Azure Maps Account description: >-

The `Register` API is an HTTP `PUT` request used to register the data in an Azure Storage Account with an Azure Maps account. The maximum file size that can be registered is one gigabyte.

This 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).

The 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.

## Submit Register or Replace Request

The `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: microsoftAzureDataregistryRegisterorreplace 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 tags: - dataRegistries delete: summary: >- Microsoft Azure Use To Unregister Data Stored In An Azure Storage Account That Is Registered With An Azure Maps Account description: >-

The `Unregister` API is an HTTP `DELETE` request that removes a data registry without deleting the underlying content from the Azure storage account.

Useful in scenarios like unregistering geofence files previously registered using the [Register or Replace](https://docs.microsoft.com/rest/api/maps/data-registry/register-or-replace) API 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).

The 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.

## Submit Unregister Request

Use an HTTP `DELETE` request with the `udid` of the data registry to unregister.

## Unregister Response

The `Unregister` request returns a HTTP '204 No Content' response with an empty body, if the data registry was deleted successfully. operationId: microsoftAzureDataregistryUnregister 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 tags: - dataRegistries /dataRegistries/operations/{operationId}: get: summary: >- Microsoft Azure Use To Check The Status Of The [data Register Or Replace] Rest Api Maps Data Registry Register Or Replace Request description: >- The `Get Operation` API is an 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.

The 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.

operationId: microsoftAzureDataregistryGetoperation 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 tags: - dataRegistries 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 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 tags: - name: dataRegistries