Description | : > > [!NOTE] > > **Azure Maps Data service retirement** > > The Azure Maps Data service (both [v1](/rest/api/maps/data?view=rest-maps-1.0) and [v2](/rest/api/maps/data)) is now deprecated and will be retired on 9/16/24. To avoid service disruptions, all calls to the Data service will need to be updated to use the Azure Maps [Data Registry](/rest/api/maps/data-registry) service by 9/16/24. For more information, see [How to create data registry](/azure/azure-maps/how-to-create-data-registries). The `Data Upload` API is an HTTP `POST` request that allows the caller to upload data content to the Azure Maps service. You can use this API in a scenario like uploading a collection of Geofences in `GeoJSON`format, for use in our [Azure Maps Geofencing Service](/rest/api/maps/spatial). >[!Important] >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. ## Submit Upload Request To upload your content you will use a `POST` request. The request body will contain the data to upload. The `dataFormat` query parameter will contain the format for the data, the `dataSharingLevel` query parameter can contain the sharing level for the data. The `Content-Type` header will be set to the content type of the data. For example, to upload a collection of geofences in `GeoJSON` format, set the request body to the geofence content. Set the `dataFormat` query parameter to _geojson_, and set the `Content-Type` header to either one of the following media types: - `application/json` - `application/vnd.geo+json` - `application/octet-stream` Here's a sample request body for uploading a simple Geofence represented as a circle geometry using a center point and a radius. The sample below is in `GeoJSON`: ```json { "type": "FeatureCollection", "features": [{ "type": "Feature", "geometry": { "type": "Point", "coordinates": [-122.126986, 47.639754] }, "properties": { "geometryId": "001", "radius": 500 } }] } ``` The Data Upload API performs a long-running operation. ## Data Upload Limits Please, be aware that currently every Azure Maps account has a [data storage limit](/azure/azure-resource-manager/management/azure-subscription-service-limits#azure-maps-limits). Once the storage limit is reached, all the new upload API calls will return a `409 Conflict` http error response. You can always use the [Data Delete](/rest/api/maps/data/delete) API to delete old/unused content and create space for new uploads. |
Reference | : Link ¶ |
⚼ Request
POST:
/mapData
{
x-ms-client-id:
string
,
api-version:
string
,
description:
string
,
dataFormat:
string
,
UploadContent:
object
,
}
⚐ Response (200)
{
$headers:
{
,
resource-location:
string
,
}
$schema:
}
{
,
operationId:
string
,
status:
enum
,
created:
string
,
error:
{
,
code:
string
,
message:
string
,
target:
string
,
details:
[
,
string
,
]
additionalInfo:
}
[
]
,
{
,
type:
string
,
info:
object
,
}
warning:
}
{
,
code:
string
,
message:
string
,
target:
string
,
details:
[
,
string
,
]
additionalInfo:
}
[
]
,
{
,
type:
string
,
info:
object
,
}
⚐ Response (202)
{
operation-location:
string
,
}
⚐ Response (409)
{
error:
}
{
,
code:
string
,
message:
string
,
target:
string
,
details:
[
,
string
,
]
additionalInfo:
}
[
]
,
{
,
type:
string
,
info:
object
,
}
⚐ Response (default)
{
error:
}
{
,
code:
string
,
message:
string
,
target:
string
,
details:
[
,
string
,
]
additionalInfo:
}
[
]
,
{
,
type:
string
,
info:
object
,
}