Data Registry - Register Or Replace

Use to register data stored in an Azure Storage Account with an Azure Maps account.

Note

Azure Maps Data registry service retirement

The Azure Maps Data registry service is now deprecated and will be retired on 9/30/25. For more information, see End of Life Announcement of Azure Maps Data Registry.

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, or registering a set of DWG design files as a zipped Drawing Package for use in the Azure Maps Creator Conversion Service.

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 JSON object in the body of the request that defines the data registry details.

PUT https://{geography}.atlas.microsoft.com/dataRegistries/{udid}?api-version=2023-06-01

URI Parameters

Name In Required Type Description
geography
path True

string

This parameter specifies where the Azure Maps Account is located. Valid values are us (East US, West Central US, West US 2) and eu (North Europe, West Europe).

udid
path True

string

The user data ID of the data registry.

Regex 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}$

api-version
query True

string

The version number of Azure Maps API.

Request Header

Name Required Type Description
x-ms-client-id

string

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 for guidance.

Operation-Id

string

The operation ID, in GUID format.

Regex 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}$

Request Body

Name Type Description
azureBlob

AzureBlob

Azure blob data registry details.

description

string

The description given to the data registry. The max length is 1024 characters.

kind

DataRegistryKind

Data registry kind.

Responses

Name Type Description
200 OK

DataRegistry

Resource replacing: The request has been accepted for processing.

Headers

  • Operation-Id: string
  • Operation-Location: string
201 Created

DataRegistry

Resource creating: The request has been accepted for processing.

Headers

  • Operation-Id: string
  • Operation-Location: string
Other Status Codes

MapsErrorResponse

An unexpected error occurred.

Headers

x-ms-error-code: string

Security

AADToken

These are the Microsoft Entra OAuth 2.0 Flows. When paired with Azure role-based access 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. 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.

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 via Azure portal, PowerShell, CLI, Azure SDKs, or REST APIs. * Usage of the Azure Maps Web SDK allows for configuration based setup of an application for multiple use cases.

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

Name Description
https://atlas.microsoft.com/.default https://atlas.microsoft.com/.default

subscription-key

This is a shared key that is provisioned when creating an Azure Maps resource 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.

Type: apiKey
In: header

SAS Token

This is a shared access signature token is created from the List SAS operation on the Azure Maps resource 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 to limit rendering abuse and regularly renew the SAS Token.

Type: apiKey
In: header

Examples

Register or replace a udid

Sample request

PUT https://us.atlas.microsoft.com/dataRegistries/29a92cab-74af-49e7-a326-66898220aa9d?api-version=2023-06-01

{
  "description": "Contoso Geofence GeoJSON",
  "kind": "AzureBlob",
  "azureBlob": {
    "dataFormat": "geojson",
    "msiClientId": "3263cad5-ed8b-4829-b72b-3d1ba556e373",
    "linkedResource": "my-storage-account",
    "blobUrl": "https://mystorageaccount.blob.core.windows.net/my-container/my/blob/path.json"
  }
}

Sample response

Operation-Id: 0522b4fe-0539-4c6c-ba70-e35ec865d8e2
Operation-Location: https://us.atlas.microsoft.com/dataRegistries/operations/0522b4fe-0539-4c6c-ba70-e35ec865d8e2
{
  "udid": "29a92cab-74af-49e7-a326-66898220aa9d",
  "description": "Contoso Geofence GeoJSON",
  "kind": "AzureBlob",
  "azureBlob": {
    "dataFormat": "geojson",
    "msiClientId": "3263cad5-ed8b-4829-b72b-3d1ba556e373",
    "linkedResource": "my-storage-account",
    "blobUrl": "https://mystorageaccount.blob.core.windows.net/my-container/my/blob/path.json",
    "sizeInBytes": 1339
  },
  "status": "Running"
}
Operation-Id: 0522b4fe-0539-4c6c-ba70-e35ec865d8e2
Operation-Location: https://us.atlas.microsoft.com/dataRegistries/operations/0522b4fe-0539-4c6c-ba70-e35ec865d8e2
{
  "udid": "29a92cab-74af-49e7-a326-66898220aa9d",
  "description": "Contoso Geofence GeoJSON",
  "kind": "AzureBlob",
  "azureBlob": {
    "dataFormat": "geojson",
    "msiClientId": "3263cad5-ed8b-4829-b72b-3d1ba556e373",
    "linkedResource": "my-storage-account",
    "blobUrl": "https://mystorageaccount.blob.core.windows.net/my-container/my/blob/path.json",
    "sizeInBytes": 1339
  },
  "status": "Running"
}

Definitions

Name Description
AzureBlob

Azure blob data registry details.

DataFormat

The data format of the uploaded content used for validation purposes.

DataRegistry

The data registry in Azure Maps.

DataRegistryKind

Data registry kind.

LongRunningOperationStatus

The status of a long-running operation.

MapsErrorDetail

The error detail.

MapsErrorResponse

Common error response for Azure Maps APIs to return error details for failed operations.

MapsInnerError

An object containing more specific information than the current object about the error.

AzureBlob

Azure blob data registry details.

Name Type Description
blobUrl

string

The blob URL contains the path to the file being registered.

contentMD5

string

The content MD5 of the content, used for data validation.

dataFormat

DataFormat

The data format of the uploaded content used for validation purposes.

linkedResource

string

The ID of the datastore in the Azure Maps account.

msiClientId

string

Client ID of user-assigned managed identity. Use system-assigned managed identity if not provided.

sizeInBytes

integer

The size of the content in bytes.

DataFormat

The data format of the uploaded content used for validation purposes.

Name Type Description
geojson

string

GeoJSON is a JSON based geospatial data interchange format.

zip

string

Compressed data format.

DataRegistry

The data registry in Azure Maps.

Name Type Description
azureBlob

AzureBlob

Azure blob data registry details.

description

string

The description given to the data registry. The max length is 1024 characters.

error

MapsErrorDetail

The error detail.

kind

DataRegistryKind

Data registry kind.

status

LongRunningOperationStatus

The status of a long-running operation.

udid

string

The user data ID for the data registry.

DataRegistryKind

Data registry kind.

Name Type Description
AzureBlob

string

Azure Blob

LongRunningOperationStatus

The status of a long-running operation.

Name Type Description
Completed

string

The request completed successfully.

Failed

string

The request has one or more failures.

Running

string

The request is currently processing.

MapsErrorDetail

The error detail.

Name Type Description
code

string

One of a server-defined set of error codes.

details

MapsErrorDetail[]

An array of details about specific errors that led to this reported error.

innererror

MapsInnerError

An object containing more specific information than the current object about the error.

message

string

A human-readable representation of the error.

target

string

The target of the error.

MapsErrorResponse

Common error response for Azure Maps APIs to return error details for failed operations.

Name Type Description
error

MapsErrorDetail

The error detail.

MapsInnerError

An object containing more specific information than the current object about the error.

Name Type Description
code

string

The error code.

innererror

MapsInnerError

An object containing more specific information than the current object about the error.