diff --git a/specification/common-types/data-plane/v1/types.json b/specification/common-types/data-plane/v1/types.json new file mode 100644 index 000000000000..b28088d93ada --- /dev/null +++ b/specification/common-types/data-plane/v1/types.json @@ -0,0 +1,74 @@ +{ + "swagger": "2.0", + "info": { + "version": "1.0", + "title": "Common types" + }, + "paths": {}, + "definitions": { + "ErrorDetail": { + "type": "object", + "description": "The error detail.", + "properties": { + "code": { + "readOnly": true, + "type": "string", + "description": "The error code." + }, + "message": { + "readOnly": true, + "type": "string", + "description": "The error message." + }, + "target": { + "readOnly": true, + "type": "string", + "description": "The error target." + }, + "details": { + "readOnly": true, + "type": "array", + "items": { + "$ref": "#/definitions/ErrorDetail" + }, + "description": "The error details." + }, + "additionalInfo": { + "readOnly": true, + "type": "array", + "items": { + "$ref": "#/definitions/ErrorAdditionalInfo" + }, + "description": "The error additional info." + } + } + }, + "ErrorResponse": { + "type": "object", + "title": "Error response", + "description": "Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.).", + "properties": { + "error": { + "description": "The error object.", + "$ref": "#/definitions/ErrorDetail" + } + } + }, + "ErrorAdditionalInfo": { + "type": "object", + "properties": { + "type": { + "readOnly": true, + "type": "string", + "description": "The additional info type." + }, + "info": { + "readOnly": true, + "type": "object", + "description": "The additional info." + } + }, + "description": "The resource management error additional info." + } + } +} diff --git a/specification/maps/data-plane/Microsoft.Maps/Alias/preview/1.0/alias.json b/specification/maps/data-plane/Microsoft.Maps/Alias/preview/1.0/alias.json deleted file mode 100644 index 5f6ef30ed777..000000000000 --- a/specification/maps/data-plane/Microsoft.Maps/Alias/preview/1.0/alias.json +++ /dev/null @@ -1,450 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "Azure Maps Alias Service", - "version": "1.0", - "description": "APIs for managing aliases in Azure Maps." - }, - "x-ms-parameterized-host": { - "hostTemplate": "{geography}.atlas.microsoft.com", - "parameters": [ - { - "$ref": "#/parameters/GeographicResourceLocation" - } - ] - }, - "schemes": [ - "https" - ], - "consumes": [], - "produces": [ - "application/json", - "application/xml" - ], - "securityDefinitions": { - "azure_auth": { - "type": "oauth2", - "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", - "flow": "implicit", - "description": "These are the [Azure Active Directory OAuth2](https://docs.microsoft.com/en-us/azure/active-directory/develop/v1-overview) Flows. When paired with [Azure Role Based Access](https://docs.microsoft.com/en-us/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#### Note\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* The `Authorization URL` is specific to the Azure public cloud instance. Sovereign clouds have unique Authorization URLs and Azure Active directory configurations. \n* 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.\n* Usage of the [Azure Maps Web SDK](https://aka.ms/amaadmc) allows for configuration based setup of an application for multiple use cases.\n* Currently Azure Active Directory [v1.0](https://docs.microsoft.com/en-us/azure/active-directory/develop/azure-ad-endpoint-comparison) tokens are supported.", - "scopes": { - "user_impersonation": "Impersonates a user's Azure Active Directory account." - } - }, - "apiKeyQuery": { - "type": "apiKey", - "description": "This is a shared key which 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 which 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": "query" - } - }, - "security": [ - { - "azure_auth": [] - }, - { - "apiKeyQuery": [] - } - ], - "responses": { - "202": { - "description": "Request Accepted: The request has been accepted for processing. Please use the URL in the Location Header to retry or access the results.", - "headers": { - "Location": { - "type": "string", - "description": "New URL to check for the results of the long running process." - } - } - }, - "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 Azure Active Directory 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 AAD bearer token.", - "schema": { - "$ref": "#/definitions/ODataErrorResponse" - }, - "headers": { - "WWW-Authenticate": { - "type": "string", - "description": "Bearer realm=\"https://atlas.microsoft.com/\", error=\"invalid_token\", error_description=\"The access token expired\"" - } - } - }, - "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" - } - } - }, - "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" - }, - "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 1.0", - "type": "string", - "in": "query", - "required": true, - "default": "1.0", - "x-ms-parameter-location": "client" - }, - "CreateResourceId": { - "name": "resourceId", - "description": "The unique id that references a resource to be aliased.", - "type": "string", - "in": "query", - "required": false, - "x-ms-parameter-location": "method" - }, - "AssignResourceId": { - "name": "resourceId", - "description": "The unique id that references a resource to be aliased.", - "type": "string", - "in": "query", - "required": true, - "x-ms-parameter-location": "method" - }, - "AliasId": { - "name": "aliasId", - "description": "The unique id that references an existing alias.", - "type": "string", - "in": "path", - "required": true, - "x-ms-parameter-location": "method" - } - }, - "paths": { - "/alias": { - "post": { - "x-publish": true, - "description": "**Alias - Create API**\n\n**Applies to**: see pricing [tiers](https://azure.microsoft.com/en-us/pricing/details/azure-maps/).\n
\n\nThis API allows the caller to create an alias.
\nYou can also assign the alias during the create request as well.\n\n\n### Submit Create Request\n\nTo create your alias, you will use a `POST` request. If you would like to assign the alias during the creation, you will pass the `resourceId` query parameter.
\n\n\n### Create Alias Response\n\nThe Create API returns a HTTP `201 Created` response the id of the alias, `aliasId`, in the body.\nThe response will look something like:\n\n```json\n{\n \"aliasId\" : \"d7e5efc8-2239-4387-a286-5bb51aa804e3\"\n}\n```\n\n
", - "operationId": "Alias_CreatePreview", - "x-ms-examples": { - "Create an alias that does not reference any resource": { - "$ref": "./examples/Alias_Create.json" - } - }, - "parameters": [ - { - "$ref": "#/parameters/SubscriptionKey" - }, - { - "$ref": "#/parameters/ApiVersion" - } - ], - "responses": { - "201": { - "description": "Content created successfully. The response body contains the newly created alias id `aliasId`.", - "schema": { - "$ref": "#/definitions/AliasCreateResponse" - }, - "headers": { - "Access-Control-Expose-Headers": { - "type": "string", - "description": "The list of response headers that can be read by the client." - } - } - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" - } - } - }, - "get": { - "x-publish": true, - "description": "**Alias - List API**\n\n**Applies to**: see pricing [tiers](https://azure.microsoft.com/en-us/pricing/details/azure-maps/).\n
\n\nThis API allows the caller to fetch a list of all previously successfully created aliases.\n\n\n### Submit List Request\n\nTo list all your aliases, you will issue a `GET` request with no additional parameters.
\n\n\n### List Data Response\n\nThe List API returns the complete list of all aliases in `json` format. The response contains the following details for each alias resource:\n\n > createdTimestamp - The timestamp that the alias was created.\n > aliasId - The id for the alias.\n > resourceId - The id for the resource that this alias references (could be null if the alias has not been assigned).\n > lastUpdatedTimestamp - The last time the alias was assigned to a resource.\n\n\nHere's a sample response returning 2 alias resources: \n\n
\n\n```json\n{\n \"aliases\": [\n {\n \"createdTimestamp\": \"2020-02-13T21:19:11+00:00\",\n \"aliasId\": \"a8a4b8bb-ecf4-fb27-a618-f41721552766\",\n \"resourceId\": \"e89aebb9-70a3-8fe1-32bb-1fbd0c725f14\",\n \"lastUpdatedTimestamp\": \"2020-02-13T21:19:22+00:00\"\n },\n {\n \"createdTimestamp\": \"2020-02-18T19:53:33+00:00\",\n \"aliasId\": \"1856dbfc-7a66-ee5a-bf8d-51dbfe1906f6\",\n \"resourceId\": null,\n \"lastUpdatedTimestamp\": \"2020-02-18T19:53:33+00:00\"\n }\n ]\n}\n```\n\n
", - "operationId": "Alias_ListPreview", - "x-ms-examples": { - "List all the previously created aliases": { - "$ref": "./examples/Alias_List.json" - } - }, - "parameters": [ - { - "$ref": "#/parameters/SubscriptionKey" - }, - { - "$ref": "#/parameters/ApiVersion" - } - ], - "responses": { - "200": { - "description": "List alias request completed successfully. The response body contains a list of all the previously created aliases.", - "schema": { - "$ref": "#/definitions/AliasListResponse" - } - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" - } - } - } - }, - "/alias/assign/{aliasId}": { - "patch": { - "x-publish": true, - "description": "**Alias - Assign API**\n\n**Applies to**: see pricing [tiers](https://azure.microsoft.com/en-us/pricing/details/azure-maps/).\n
\n\nThis API allows the caller to assign an alias to reference a resource.
\n\n\n### Submit Assign Request\n\nTo assign your alias to a resource, you will use a `PATCH` request with the `aliasId` in the path and the `resourceId` passed as a query parameter.
\n\n\n### Create Alias Response\n\nThe Assign API returns a HTTP `204 No Content` response with an empty body, if the alias was assigned successfully.
", - "operationId": "Alias_AssignPreview", - "x-ms-examples": { - "Assign an alias to a resource": { - "$ref": "./examples/Alias_Assign.json" - } - }, - "parameters": [ - { - "$ref": "#/parameters/SubscriptionKey" - }, - { - "$ref": "#/parameters/ApiVersion" - }, - { - "$ref": "#/parameters/AliasId" - }, - { - "$ref": "#/parameters/AssignResourceId" - } - ], - "responses": { - "204": { - "description": "Alias was assigned successfully.", - "schema": { - "$ref": "#/definitions/AliasAssignResponse" - } - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" - } - } - } - }, - "/alias/{aliasId}": { - "delete": { - "x-publish": true, - "description": "**Alias - Delete API**\n\n**Applies to**: see pricing [tiers](https://azure.microsoft.com/en-us/pricing/details/azure-maps/).\n
\n\nThis API allows the caller to delete a previously created alias.
\nYou can also use this API to delete old/unused aliases to create space for new content.\nThis API does not delete the references resource, only the alias referencing the resource.\n\n\n### Submit Delete Request\n\nTo delete your alias you will issue a `DELETE` request where the path will contain the `aliasId` of the alias to delete.
\n\n\n### Delete Alias Response\n\nThe Delete API returns a HTTP `204 No Content` response with an empty body, if the alias was deleted successfully.
\nA HTTP `400 Bad Request` error response will be returned if the alias with the passed-in `aliasId` is not found. ", - "operationId": "Alias_DeletePreview", - "x-ms-examples": { - "Delete previously created alias": { - "$ref": "./examples/Alias_Delete.json" - } - }, - "parameters": [ - { - "$ref": "#/parameters/SubscriptionKey" - }, - { - "$ref": "#/parameters/ApiVersion" - }, - { - "$ref": "#/parameters/AliasId" - } - ], - "responses": { - "204": { - "description": "Alias delete request completed successfully. The content for `aliasId` was deleted on the server.", - "schema": { - "$ref": "#/definitions/AliasDeleteResponse" - } - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" - } - } - } - } - }, - "definitions": { - "ODataErrorResponse": { - "type": "object", - "description": "This response object is returned when an error occurs in the Maps API.", - "properties": { - "error": { - "$ref": "#/definitions/ODataError" - } - } - }, - "ODataError": { - "type": "object", - "description": "This object is returned when an error occurs in the 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." - } - } - }, - "AliasCreateResponse": { - "description": "The response model for the Alias Create API for the case when the alias was successfully created.", - "type": "object", - "properties": { - "aliasId": { - "description": "An alias id `aliasId` for the created alias.", - "type": "string", - "readOnly": true - } - } - }, - "AliasAssignResponse": { - "description": "The response model for the Assign API. The response body will be empty signifying the assign was successful.", - "type": "object" - }, - "AliasDeleteResponse": { - "description": "The response model for the Delete API. The response body will be empty signifying there's alias available with the given `aliasId` anymore.", - "type": "object" - }, - "AliasListResponse": { - "description": "The response model for the List API. Returns a list of all the previously created aliases.", - "type": "object", - "properties": { - "aliases": { - "description": "A list of all the previously created aliases.", - "type": "array", - "readOnly": true, - "items": { - "$ref": "#/definitions/AliasListItem" - } - } - } - }, - "AliasListItem": { - "description": "Detailed information for the alias.", - "type": "object", - "properties": { - "createdTimestamp": { - "description": "The created timestamp for the alias.", - "type": "string", - "readOnly": true - }, - "aliasId": { - "description": "The id for the alias.", - "type": "string", - "readOnly": true - }, - "resourceId": { - "description": "The id for the resource that this alias references (could be null if the alias has not been assigned).", - "type": "string", - "readOnly": true - }, - "lastUpdatedTimestamp": { - "description": "The timestamp of the last time the alias was assigned.", - "type": "string", - "readOnly": true - } - } - } - } -} diff --git a/specification/maps/data-plane/Microsoft.Maps/Alias/preview/1.0/examples/Alias_Assign.json b/specification/maps/data-plane/Microsoft.Maps/Alias/preview/1.0/examples/Alias_Assign.json deleted file mode 100644 index 510eadf5d277..000000000000 --- a/specification/maps/data-plane/Microsoft.Maps/Alias/preview/1.0/examples/Alias_Assign.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "parameters": { - "geography": "us", - "api-version": "1.0", - "subscription-key": "[subscription-key]", - "aliasId": "[aliasId]", - "resourceId": "[resourceId]" - }, - "responses": { - "204": { - "body": {} - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request - Error message." - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found - The requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "Unknown error - An error occurred while processing the request. Please try again later." - } - } - } - } -} diff --git a/specification/maps/data-plane/Microsoft.Maps/Alias/preview/1.0/examples/Alias_Create.json b/specification/maps/data-plane/Microsoft.Maps/Alias/preview/1.0/examples/Alias_Create.json deleted file mode 100644 index 4ceff472346f..000000000000 --- a/specification/maps/data-plane/Microsoft.Maps/Alias/preview/1.0/examples/Alias_Create.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "parameters": { - "geography": "us", - "api-version": "1.0", - "subscription-key": "[subscription-key]" - }, - "responses": { - "201": { - "headers": {}, - "body": { - "aliasId": "25084fb7-307a-4720-8f91-7952a0b91012" - } - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request - Error message." - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found - The requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "Unknown error - An error occurred while processing the request. Please try again later." - } - } - } - } -} diff --git a/specification/maps/data-plane/Microsoft.Maps/Alias/preview/1.0/examples/Alias_Delete.json b/specification/maps/data-plane/Microsoft.Maps/Alias/preview/1.0/examples/Alias_Delete.json deleted file mode 100644 index fc920bdb905e..000000000000 --- a/specification/maps/data-plane/Microsoft.Maps/Alias/preview/1.0/examples/Alias_Delete.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "parameters": { - "geography": "us", - "api-version": "1.0", - "subscription-key": "[subscription-key]", - "aliasId": "[aliasId]" - }, - "responses": { - "204": { - "body": {} - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request - One or more parameters were incorrectly specified or are mutually exclusive." - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found - The requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "Unknown error - An error occurred while processing the request. Please try again later." - } - } - } - } -} diff --git a/specification/maps/data-plane/Microsoft.Maps/Alias/preview/1.0/examples/Alias_List.json b/specification/maps/data-plane/Microsoft.Maps/Alias/preview/1.0/examples/Alias_List.json deleted file mode 100644 index 918b6bc1c103..000000000000 --- a/specification/maps/data-plane/Microsoft.Maps/Alias/preview/1.0/examples/Alias_List.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "parameters": { - "geography": "us", - "api-version": "1.0", - "subscription-key": "[subscription-key]" - }, - "responses": { - "200": { - "body": { - "aliases": [ - { - "createdTimestamp": "2020-02-13T21:19:11+00:00", - "aliasId": "a8a4b8bb-ecf4-fb27-a618-f41721552766", - "resourceId": "e89aebb9-70a3-8fe1-32bb-1fbd0c725f14", - "lastUpdatedTimestamp": "2020-02-13T21:19:22+00:00" - }, - { - "createdTimestamp": "2020-02-13T21:19:11+00:00", - "aliasId": "1856dbfc-7a66-ee5a-bf8d-51dbfe1906f6", - "resourceId": null, - "lastUpdatedTimestamp": "2020-02-13T21:19:11+00:00" - } - ] - } - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request - One or more parameters were incorrectly specified or are mutually exclusive." - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found - The requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "Unknown error - An error occurred while processing the request. Please try again later." - } - } - } - } -} diff --git a/specification/maps/data-plane/Microsoft.Maps/Alias/preview/2.0/alias.json b/specification/maps/data-plane/Microsoft.Maps/Alias/preview/2.0/alias.json index c90b224da3d1..6454352c9996 100644 --- a/specification/maps/data-plane/Microsoft.Maps/Alias/preview/2.0/alias.json +++ b/specification/maps/data-plane/Microsoft.Maps/Alias/preview/2.0/alias.json @@ -12,14 +12,26 @@ "hostTemplate": "{geography}.atlas.microsoft.com", "parameters": [ { - "$ref": "#/parameters/GeographicResourceLocation" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/GeographicResourceLocation" } ] }, "consumes": [], "produces": [ - "application/json", - "application/xml" + "application/json" + ], + "security": [ + { + "azure_auth": [ + "user_impersonation" + ] + }, + { + "SubscriptionKeyInHeader": [] + }, + { + "SubscriptionKeyInQuery": [] + } ], "securityDefinitions": { "azure_auth": { @@ -28,104 +40,25 @@ "flow": "implicit", "description": "These are the [Azure Active Directory OAuth2](https://docs.microsoft.com/en-us/azure/active-directory/develop/v1-overview) Flows. When paired with [Azure Role Based Access](https://docs.microsoft.com/en-us/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#### Note\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* The `Authorization URL` is specific to the Azure public cloud instance. Sovereign clouds have unique Authorization URLs and Azure Active directory configurations. \n* 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.\n* Usage of the [Azure Maps Web SDK](https://aka.ms/amaadmc) allows for configuration based setup of an application for multiple use cases.\n* Currently Azure Active Directory [v1.0](https://docs.microsoft.com/en-us/azure/active-directory/develop/azure-ad-endpoint-comparison) tokens are supported.", "scopes": { - "user_impersonation": "Impersonates a user's Azure Active Directory account." + "user_impersonation": "impersonate your user account" } }, - "apiKeyQuery": { + "SubscriptionKeyInHeader": { "type": "apiKey", - "description": "This is a shared key which 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 which 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": "query" - } - }, - "security": [ - { - "azure_auth": [] - }, - { - "apiKeyQuery": [] - } - ], - "responses": { - "201": { - "description": "Resource Created: The alias resource has been created." - }, - "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 Azure Active Directory 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 AAD bearer token.", - "schema": { - "$ref": "#/definitions/ODataErrorResponse" - }, - "headers": { - "WWW-Authenticate": { - "type": "string", - "description": "Bearer realm=\"https://atlas.microsoft.com/\", error=\"invalid_token\", error_description=\"The access token expired\"" - } - } - }, - "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" - } + "in": "header" }, - "500": { - "description": "An error occurred while processing the request. Please try again later.", - "schema": { - "$ref": "#/definitions/ODataErrorResponse" - } + "SubscriptionKeyInQuery": { + "type": "apiKey", + "name": "subscription-key", + "in": "query" } }, + "responses": {}, "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" - }, - "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": { + "AliasApiVersionV2": { "name": "api-version", - "description": "Version number of Azure Maps API. Current version is 2.0", + "description": "Version number of Azure Maps API.", "type": "string", "in": "query", "required": true, @@ -137,7 +70,6 @@ "description": "The unique id that references a creator data item to be aliased.", "type": "string", "in": "query", - "required": false, "x-ms-parameter-location": "method" }, "AssignCreatorDataItemId": { @@ -160,7 +92,6 @@ "paths": { "/aliases": { "post": { - "x-publish": true, "description": "**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).\n\nCreator makes it possible to develop applications based on your private indoor map data using Azure Maps API and SDK. [This](https://docs.microsoft.com/azure/azure-maps/creator-indoor-maps) article introduces concepts and tools that apply to Azure Maps Creator.\n\nThis API allows the caller to create an alias. You can also assign the alias during the create request. An alias can reference an ID generated by a creator service, but cannot reference another alias ID.\n\n### Submit Create Request\n\nTo create your alias, you will use a `POST` request. If you would like to assign the alias during the creation, you will pass the `resourceId` query parameter.\n\n### Create Alias Response\n\nThe Create API returns a HTTP `201 Created` response with the alias resource in the body.\n\nA sample response from creating an alias:\n\n```json\n{\n \"createdTimestamp\": \"2020-02-13T21:19:11.123Z\",\n \"aliasId\": \"a8a4b8bb-ecf4-fb27-a618-f41721552766\",\n \"creatorDataItemId\": \"e89aebb9-70a3-8fe1-32bb-1fbd0c725f14\",\n \"lastUpdatedTimestamp\": \"2020-02-13T21:19:22.123Z\"\n}\n```", "operationId": "Alias_Create", "x-ms-examples": { @@ -170,10 +101,7 @@ }, "parameters": [ { - "$ref": "#/parameters/SubscriptionKey" - }, - { - "$ref": "#/parameters/ApiVersion" + "$ref": "#/parameters/AliasApiVersionV2" }, { "$ref": "#/parameters/CreateCreatorDataItemId" @@ -183,7 +111,7 @@ "201": { "description": "Content created successfully. The response body contains the newly created alias id `aliasId`.", "schema": { - "$ref": "#/definitions/AliasCreateResponse" + "$ref": "#/definitions/AliasesCreateResponse" }, "headers": { "Access-Control-Expose-Headers": { @@ -192,25 +120,12 @@ } } }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" + "default": { + "$ref": "../../../Common/preview/1.0/common.json#/responses/default" } } }, "get": { - "x-publish": true, "description": "**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).\n\nCreator makes it possible to develop applications based on your private indoor map data using Azure Maps API and SDK. [This](https://docs.microsoft.com/azure/azure-maps/creator-indoor-maps) article introduces concepts and tools that apply to Azure Maps Creator.\n\nThis API allows the caller to fetch a list of all previously successfully created aliases.\n\n### Submit List Request\n\nTo list all your aliases, you will issue a `GET` request with no additional parameters.\n\n### List Data Response\n\nThe List API returns the complete list of all aliases in `json` format. The response contains the following details for each alias resource:\n > createdTimestamp - The timestamp that the alias was created. Format yyyy-MM-ddTHH:mm:ss.sssZ\n > aliasId - The id for the alias.\n > creatorDataItemId - The id for the creator data item that this alias references (could be null if the alias has not been assigned).\n > lastUpdatedTimestamp - The last time the alias was assigned to a resource. Format yyyy-MM-ddTHH:mm:ss.sssZ\n\nA sample response returning 2 alias resources:\n\n```json\n{\n \"aliases\": [\n {\n \"createdTimestamp\": \"2020-02-13T21:19:11.123Z\",\n \"aliasId\": \"a8a4b8bb-ecf4-fb27-a618-f41721552766\",\n \"creatorDataItemId\": \"e89aebb9-70a3-8fe1-32bb-1fbd0c725f14\",\n \"lastUpdatedTimestamp\": \"2020-02-13T21:19:22.123Z\"\n },\n {\n \"createdTimestamp\": \"2020-02-18T19:53:33.123Z\",\n \"aliasId\": \"1856dbfc-7a66-ee5a-bf8d-51dbfe1906f6\",\n \"creatorDataItemId\": null,\n \"lastUpdatedTimestamp\": \"2020-02-18T19:53:33.123Z\"\n }\n ]\n}\n```", "operationId": "Alias_List", "x-ms-examples": { @@ -220,12 +135,13 @@ }, "parameters": [ { - "$ref": "#/parameters/SubscriptionKey" - }, - { - "$ref": "#/parameters/ApiVersion" + "$ref": "#/parameters/AliasApiVersionV2" } ], + "x-ms-pageable": { + "itemName": "aliases", + "nextLinkName": "nextLink" + }, "responses": { "200": { "description": "List alias request completed successfully. The response body contains a list of all the previously created aliases.", @@ -233,27 +149,14 @@ "$ref": "#/definitions/AliasListResponse" } }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" + "default": { + "$ref": "../../../Common/preview/1.0/common.json#/responses/default" } } } }, "/aliases/{aliasId}": { "put": { - "x-publish": true, "description": "**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).\n\nCreator makes it possible to develop applications based on your private indoor map data using Azure Maps API and SDK. [This](https://docs.microsoft.com/azure/azure-maps/creator-indoor-maps) article introduces concepts and tools that apply to Azure Maps Creator.\n\nThis API allows the caller to assign an alias to reference a resource.\n\n### Submit Assign Request\n\nTo assign your alias to a resource, you will use a `PUT` request with the `aliasId` in the path and the `creatorDataItemId` passed as a query parameter.\n\n### Assign Alias Response\n\nThe Assign API returns a HTTP `200 OK` response with the updated alias resource in the body, if the alias was assigned successfully. A sample of the assign response is\n\n```json\n{\n \"createdTimestamp\": \"2020-02-13T21:19:11.123Z\",\n \"aliasId\": \"a8a4b8bb-ecf4-fb27-a618-f41721552766\",\n \"creatorDataItemId\": \"e89aebb9-70a3-8fe1-32bb-1fbd0c725f14\",\n \"lastUpdatedTimestamp\": \"2020-02-13T21:19:22.123Z\"\n}\n```", "operationId": "Alias_Assign", "x-ms-examples": { @@ -266,10 +169,7 @@ "$ref": "#/parameters/AliasId" }, { - "$ref": "#/parameters/SubscriptionKey" - }, - { - "$ref": "#/parameters/ApiVersion" + "$ref": "#/parameters/AliasApiVersionV2" }, { "$ref": "#/parameters/AssignCreatorDataItemId" @@ -282,25 +182,12 @@ "$ref": "#/definitions/AliasListItem" } }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" + "default": { + "$ref": "../../../Common/preview/1.0/common.json#/responses/default" } } }, "delete": { - "x-publish": true, "description": "**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).\n\nCreator makes it possible to develop applications based on your private indoor map data using Azure Maps API and SDK. [This](https://docs.microsoft.com/azure/azure-maps/creator-indoor-maps) article introduces concepts and tools that apply to Azure Maps Creator.\n\nThis API allows the caller to delete a previously created alias. You can also use this API to delete old/unused aliases to create space for new content.This API does not delete the references resource, only the alias referencing the resource.\n\n### Submit Delete Request\n\nTo delete your alias you will issue a `DELETE` request where the path will contain the `aliasId` of the alias to delete.\n\n### Delete Alias Response\n\nThe Delete API returns a HTTP `204 No Content` response with an empty body, if the alias was deleted successfully.", "operationId": "Alias_Delete", "x-ms-examples": { @@ -313,35 +200,19 @@ "$ref": "#/parameters/AliasId" }, { - "$ref": "#/parameters/SubscriptionKey" - }, - { - "$ref": "#/parameters/ApiVersion" + "$ref": "#/parameters/AliasApiVersionV2" } ], "responses": { "204": { "description": "Alias delete request completed successfully. The content for `aliasId` was deleted on the server." }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" + "default": { + "$ref": "../../../Common/preview/1.0/common.json#/responses/default" } } }, "get": { - "x-publish": true, "description": "**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).\n\nCreator makes it possible to develop applications based on your private indoor map data using Azure Maps API and SDK. [This](https://docs.microsoft.com/azure/azure-maps/creator-indoor-maps) article introduces concepts and tools that apply to Azure Maps Creator.\n\nThis API allows the caller to fetch the details of a previously created alias.\n\n### Submit Get Details Request\n\nTo get the details of your alias, you will issue a `GET` request with the `aliasId` in the path.\n\n### Get Details Response\n\nThe Get Details API returns the previously created alias in `json` format. The response contains the following details for the alias resource:\n > createdTimestamp - The timestamp that the alias was created.\n > aliasId - The id for the alias.\n > creatorDataItemId - The id for the creator data item that this alias references (could be null if the alias has not been assigned).\n > lastUpdatedTimestamp - The last time the alias was assigned to a resource.\n\nHere's a sample response:\n```json\n{\n \"createdTimestamp\": \"2020-02-13T21:19:11.123Z\",\n \"aliasId\": \"a8a4b8bb-ecf4-fb27-a618-f41721552766\",\n \"creatorDataItemId\": \"e89aebb9-70a3-8fe1-32bb-1fbd0c725f14\",\n \"lastUpdatedTimestamp\": \"2020-02-13T21:19:22.123Z\"\n}\n```", "operationId": "Alias_GetDetails", "x-ms-examples": { @@ -354,10 +225,7 @@ "$ref": "#/parameters/AliasId" }, { - "$ref": "#/parameters/SubscriptionKey" - }, - { - "$ref": "#/parameters/ApiVersion" + "$ref": "#/parameters/AliasApiVersionV2" } ], "responses": { @@ -367,63 +235,15 @@ "$ref": "#/definitions/AliasListItem" } }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" + "default": { + "$ref": "../../../Common/preview/1.0/common.json#/responses/default" } } } } }, "definitions": { - "ODataErrorResponse": { - "type": "object", - "description": "This response object is returned when an error occurs in the Maps API.", - "properties": { - "error": { - "$ref": "#/definitions/ODataError" - } - } - }, - "ODataError": { - "type": "object", - "description": "This object is returned when an error occurs in the 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." - } - } - }, - "AliasCreateResponse": { + "AliasesCreateResponse": { "description": "The response model for the Alias Create API for the case when the alias was successfully created.", "type": "object", "properties": { @@ -485,6 +305,7 @@ "creatorDataItemId": { "description": "The id for the creator data item that this alias references (could be null if the alias has not been assigned).", "type": "string", + "x-nullable": true, "readOnly": true }, "lastUpdatedTimestamp": { diff --git a/specification/maps/data-plane/Microsoft.Maps/Alias/preview/2.0/examples/Alias_Assign.json b/specification/maps/data-plane/Microsoft.Maps/Alias/preview/2.0/examples/Alias_Assign.json index 06c22746fa8a..08e05a94045e 100644 --- a/specification/maps/data-plane/Microsoft.Maps/Alias/preview/2.0/examples/Alias_Assign.json +++ b/specification/maps/data-plane/Microsoft.Maps/Alias/preview/2.0/examples/Alias_Assign.json @@ -2,7 +2,6 @@ "parameters": { "geography": "us", "api-version": "2.0", - "subscription-key": "[subscription-key]", "aliasId": "[aliasId]", "creatorDataItemId": "[creatorDataItemId]" }, @@ -14,51 +13,6 @@ "creatorDataItemId": "633a009a-dfa2-4d51-a419-420122e11c94", "lastUpdatedTimestamp": "2021-05-01T01:02:03.456Z" } - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request - Error message." - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found - The requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "Unknown error - An error occurred while processing the request. Please try again later." - } - } } } } diff --git a/specification/maps/data-plane/Microsoft.Maps/Alias/preview/2.0/examples/Alias_Create.json b/specification/maps/data-plane/Microsoft.Maps/Alias/preview/2.0/examples/Alias_Create.json index 5f84baa43a03..c1fff0412624 100644 --- a/specification/maps/data-plane/Microsoft.Maps/Alias/preview/2.0/examples/Alias_Create.json +++ b/specification/maps/data-plane/Microsoft.Maps/Alias/preview/2.0/examples/Alias_Create.json @@ -1,8 +1,7 @@ { "parameters": { "geography": "us", - "api-version": "2.0", - "subscription-key": "[subscription-key]" + "api-version": "2.0" }, "responses": { "201": { @@ -13,51 +12,6 @@ "creatorDataItemId": null, "lastUpdatedTimestamp": "2021-05-01T01:02:03.456Z" } - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request - Error message." - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found - The requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "Unknown error - An error occurred while processing the request. Please try again later." - } - } } } } diff --git a/specification/maps/data-plane/Microsoft.Maps/Alias/preview/2.0/examples/Alias_Delete.json b/specification/maps/data-plane/Microsoft.Maps/Alias/preview/2.0/examples/Alias_Delete.json index 5e847f338d4e..1fc205ce43c3 100644 --- a/specification/maps/data-plane/Microsoft.Maps/Alias/preview/2.0/examples/Alias_Delete.json +++ b/specification/maps/data-plane/Microsoft.Maps/Alias/preview/2.0/examples/Alias_Delete.json @@ -2,55 +2,9 @@ "parameters": { "geography": "us", "api-version": "2.0", - "subscription-key": "[subscription-key]", "aliasId": "[aliasId]" }, "responses": { - "204": {}, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request - One or more parameters were incorrectly specified or are mutually exclusive." - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found - The requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "Unknown error - An error occurred while processing the request. Please try again later." - } - } - } + "204": {} } } diff --git a/specification/maps/data-plane/Microsoft.Maps/Alias/preview/2.0/examples/Alias_GetDetails.json b/specification/maps/data-plane/Microsoft.Maps/Alias/preview/2.0/examples/Alias_GetDetails.json index 432cd5547706..55034a1c734f 100644 --- a/specification/maps/data-plane/Microsoft.Maps/Alias/preview/2.0/examples/Alias_GetDetails.json +++ b/specification/maps/data-plane/Microsoft.Maps/Alias/preview/2.0/examples/Alias_GetDetails.json @@ -2,7 +2,6 @@ "parameters": { "geography": "us", "api-version": "2.0", - "subscription-key": "[subscription-key]", "aliasId": "[aliasId]" }, "responses": { @@ -13,51 +12,6 @@ "creatorDataItemId": "e89aebb9-70a3-8fe1-32bb-1fbd0c725f14", "lastUpdatedTimestamp": "2020-02-13T21:19:22+00:00" } - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request - One or more parameters were incorrectly specified or are mutually exclusive." - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found - The requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "Unknown error - An error occurred while processing the request. Please try again later." - } - } } } } diff --git a/specification/maps/data-plane/Microsoft.Maps/Alias/preview/2.0/examples/Alias_List.json b/specification/maps/data-plane/Microsoft.Maps/Alias/preview/2.0/examples/Alias_List.json index 078148c410a1..12612ec5ff9c 100644 --- a/specification/maps/data-plane/Microsoft.Maps/Alias/preview/2.0/examples/Alias_List.json +++ b/specification/maps/data-plane/Microsoft.Maps/Alias/preview/2.0/examples/Alias_List.json @@ -1,8 +1,7 @@ { "parameters": { "geography": "us", - "api-version": "2.0", - "subscription-key": "[subscription-key]" + "api-version": "2.0" }, "responses": { "200": { @@ -22,51 +21,6 @@ } ] } - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request - One or more parameters were incorrectly specified or are mutually exclusive." - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found - The requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "Unknown error - An error occurred while processing the request. Please try again later." - } - } } } } diff --git a/specification/maps/data-plane/Microsoft.Maps/Common/preview/1.0/common.json b/specification/maps/data-plane/Microsoft.Maps/Common/preview/1.0/common.json new file mode 100644 index 000000000000..812d12252b83 --- /dev/null +++ b/specification/maps/data-plane/Microsoft.Maps/Common/preview/1.0/common.json @@ -0,0 +1,685 @@ +{ + "swagger": "2.0", + "info": { + "title": "Azure Maps Common Types", + "version": "1.0" + }, + "x-ms-parameterized-host": { + "hostTemplate": "{geography}.atlas.microsoft.com", + "parameters": [ + { + "$ref": "../../../Common/preview/1.0/common.json#/parameters/GeographicResourceLocation" + } + ] + }, + "schemes": [ + "https" + ], + "consumes": [], + "produces": [ + "application/json" + ], + "paths": {}, + "definitions": { + "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": "LroStatus", + "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 + }, + "resourceLocation": { + "description": "The location URI for details about the created resource. This is only provided when the request was successfully completed.", + "type": "string", + "readOnly": true + }, + "error": { + "$ref": "../../../../../../common-types/data-plane/v1/types.json#/definitions/ErrorDetail" + }, + "warning": { + "$ref": "../../../../../../common-types/data-plane/v1/types.json#/definitions/ErrorDetail" + } + } + }, + "BatchRequestBody": { + "description": "This type represents the request body for the Batch service.", + "type": "object", + "properties": { + "batchItems": { + "description": "The list of queries to process.", + "type": "array", + "items": { + "description": "Batch Query object", + "type": "object", + "properties": { + "query": { + "description": "Partial query string.", + "type": "string", + "example": "?query=One, Microsoft Way, Redmond, WA 98052&limit=3" + } + } + } + } + } + }, + "BatchResponse": { + "description": "This object is returned from a successful Batch service call. Extend with 'batchItems' property.", + "type": "object", + "properties": { + "summary": { + "description": "Summary for the batch request", + "type": "object", + "readOnly": true, + "properties": { + "successfulRequests": { + "description": "Number of successful requests in the batch", + "type": "integer", + "readOnly": true + }, + "totalRequests": { + "description": "Total number of requests in the batch", + "type": "integer", + "readOnly": true + } + } + } + } + }, + "BatchItem": { + "description": "An item returned from Batch API. Extend with 'response' property.", + "type": "object", + "properties": { + "statusCode": { + "description": "HTTP request status code.", + "type": "number", + "readOnly": true, + "example": 200 + } + } + }, + "CoordinatesPair": { + "description": "A location represented as a latitude and longitude.", + "type": "object", + "properties": { + "latitude": { + "description": "Latitude property", + "type": "number", + "format": "double" + }, + "longitude": { + "description": "Longitude property", + "type": "number", + "format": "double" + } + } + }, + "CoordinatesPairAbbreviated": { + "description": "A location represented as a latitude and longitude using short names 'lat' & 'lon'.", + "type": "object", + "properties": { + "lat": { + "description": "Latitude property", + "type": "number", + "format": "double" + }, + "lon": { + "description": "Longitude property", + "type": "number", + "format": "double" + } + } + }, + "GeoJsonPosition": { + "description": "A `Position` is an array of numbers with two or more elements. The first two elements are _longitude_ and _latitude_, precisely in that order. _Altitude/Elevation_ is an optional third element. Please refer to [RFC 7946](https://tools.ietf.org/html/rfc7946#section-3.1.1) for details.", + "type": "array", + "items": { + "type": "number", + "format": "double" + } + }, + "GeoJsonLinearRing": { + "description": "Though a linear ring is not explicitly represented as a GeoJSON geometry type, it helps in defining the polygon as an array of linear rings. Please refer to [RFC 7946](https://tools.ietf.org/html/rfc7946#section-3.1.6) for details.", + "type": "array", + "items": { + "$ref": "#/definitions/GeoJsonPosition" + } + }, + "GeoJsonObject": { + "description": "A valid `GeoJSON` object. Please refer to [RFC 7946](https://tools.ietf.org/html/rfc7946#section-3) for details.", + "type": "object", + "discriminator": "type", + "required": [ + "type" + ], + "properties": { + "type": { + "description": "Specifies the `GeoJSON` type. Must be one of the nine valid GeoJSON object types - Point, MultiPoint, LineString, MultiLineString, Polygon, MultiPolygon, GeometryCollection, Feature and FeatureCollection.", + "type": "string", + "enum": [ + "Point", + "MultiPoint", + "LineString", + "MultiLineString", + "Polygon", + "MultiPolygon", + "GeometryCollection", + "Feature", + "FeatureCollection" + ], + "x-ms-enum": { + "name": "GeoJsonObjectType", + "modelAsString": true, + "values": [ + { + "value": "Point", + "description": "`GeoJSON Point` geometry.", + "name": "GeoJsonPoint" + }, + { + "value": "MultiPoint", + "description": "`GeoJSON MultiPoint` geometry.", + "name": "GeoJsonMultiPoint" + }, + { + "value": "LineString", + "description": "`GeoJSON LineString` geometry.", + "name": "GeoJsonLineString" + }, + { + "value": "MultiLineString", + "description": "`GeoJSON MultiLineString` geometry.", + "name": "GeoJsonMultiLineString" + }, + { + "value": "Polygon", + "description": "`GeoJSON Polygon` geometry.", + "name": "GeoJsonPolygon" + }, + { + "value": "MultiPolygon", + "description": "`GeoJSON MultiPolygon` geometry.", + "name": "GeoJsonMultiPolygon" + }, + { + "value": "GeometryCollection", + "description": "`GeoJSON GeometryCollection` geometry.", + "name": "GeoJsonGeometryCollection" + }, + { + "value": "Feature", + "description": "`GeoJSON Feature` object.", + "name": "GeoJsonFeature" + }, + { + "value": "FeatureCollection", + "description": "`GeoJSON FeatureCollection` object.", + "name": "GeoJsonFeatureCollection" + } + ] + } + } + } + }, + "GeoJsonGeometry": { + "description": "A valid `GeoJSON` geometry object. The type must be one of the seven valid GeoJSON geometry types - Point, MultiPoint, LineString, MultiLineString, Polygon, MultiPolygon and GeometryCollection. Please refer to [RFC 7946](https://tools.ietf.org/html/rfc7946#section-3.1) for details.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/GeoJsonObject" + } + ] + }, + "GeoJsonPoint": { + "description": "A valid `GeoJSON Point` geometry type. Please refer to [RFC 7946](https://tools.ietf.org/html/rfc7946#section-3.1.2) for details.", + "x-ms-discriminator-value": "Point", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/GeoJsonGeometry" + }, + { + "$ref": "#/definitions/GeoJsonPointData" + } + ] + }, + "GeoJsonPointData": { + "description": "Data contained by a `GeoJson Point`.", + "type": "object", + "properties": { + "coordinates": { + "$ref": "#/definitions/GeoJsonPosition" + } + }, + "required": [ + "coordinates" + ] + }, + "GeoJsonMultiPoint": { + "description": "A valid `GeoJSON MultiPoint` geometry type. Please refer to [RFC 7946](https://tools.ietf.org/html/rfc7946#section-3.1.3) for details.", + "x-ms-discriminator-value": "MultiPoint", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/GeoJsonGeometry" + }, + { + "$ref": "#/definitions/GeoJsonMultiPointData" + } + ] + }, + "GeoJsonMultiPointData": { + "type": "object", + "description": "Data contained by a `GeoJson MultiPoint`.", + "properties": { + "coordinates": { + "description": "Coordinates for the `GeoJson MultiPoint` geometry.", + "type": "array", + "items": { + "$ref": "#/definitions/GeoJsonPosition" + } + } + }, + "required": [ + "coordinates" + ] + }, + "GeoJsonLineString": { + "description": "A valid `GeoJSON LineString` geometry type. Please refer to [RFC 7946](https://tools.ietf.org/html/rfc7946#section-3.1.4) for details.", + "x-ms-discriminator-value": "LineString", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/GeoJsonGeometry" + }, + { + "$ref": "#/definitions/GeoJsonLineStringData" + } + ] + }, + "GeoJsonLineStringData": { + "type": "object", + "properties": { + "coordinates": { + "description": "Coordinates for the `GeoJson LineString` geometry.", + "type": "array", + "items": { + "$ref": "#/definitions/GeoJsonPosition" + } + } + }, + "required": [ + "coordinates" + ] + }, + "GeoJsonMultiLineString": { + "description": "A valid `GeoJSON MultiLineString` geometry type. Please refer to [RFC 7946](https://tools.ietf.org/html/rfc7946#section-3.1.5) for details.", + "x-ms-discriminator-value": "MultiLineString", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/GeoJsonGeometry" + }, + { + "$ref": "#/definitions/GeoJsonMultiLineStringData" + } + ] + }, + "GeoJsonMultiLineStringData": { + "type": "object", + "properties": { + "coordinates": { + "description": "Coordinates for the `GeoJson MultiLineString` geometry.", + "type": "array", + "items": { + "$ref": "#/definitions/GeoJsonLinearRing" + } + } + }, + "required": [ + "coordinates" + ] + }, + "GeoJsonPolygon": { + "description": "A valid `GeoJSON Polygon` geometry type. Please refer to [RFC 7946](https://tools.ietf.org/html/rfc7946#section-3.1.6) for details.", + "x-ms-discriminator-value": "Polygon", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/GeoJsonGeometry" + }, + { + "$ref": "#/definitions/GeoJsonPolygonData" + } + ] + }, + "GeoJsonPolygonData": { + "type": "object", + "properties": { + "coordinates": { + "description": "Coordinates for the `GeoJson Polygon` geometry type.", + "type": "array", + "items": { + "$ref": "#/definitions/GeoJsonLinearRing" + } + } + }, + "required": [ + "coordinates" + ] + }, + "GeoJsonMultiPolygon": { + "description": "A valid `GeoJSON MultiPolygon` object type. Please refer to [RFC 7946](https://tools.ietf.org/html/rfc7946#section-3.1.7) for details.", + "x-ms-discriminator-value": "MultiPolygon", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/GeoJsonGeometry" + }, + { + "$ref": "#/definitions/GeoJsonMultiPolygonData" + } + ] + }, + "GeoJsonMultiPolygonData": { + "type": "object", + "properties": { + "coordinates": { + "description": "Contains a list of valid `GeoJSON Polygon` objects. **Note** that coordinates in GeoJSON are in x, y order (longitude, latitude).", + "type": "array", + "items": { + "type": "array", + "items": { + "$ref": "#/definitions/GeoJsonLinearRing" + } + } + } + }, + "required": [ + "coordinates" + ] + }, + "GeoJsonGeometryCollection": { + "description": "A valid `GeoJSON GeometryCollection` object type. Please refer to [RFC 7946](https://tools.ietf.org/html/rfc7946#section-3.1.8) for details.", + "x-ms-discriminator-value": "GeometryCollection", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/GeoJsonGeometry" + }, + { + "$ref": "#/definitions/GeoJsonGeometryCollectionData" + } + ] + }, + "GeoJsonGeometryCollectionData": { + "type": "object", + "properties": { + "geometries": { + "description": "Contains a list of valid `GeoJSON` geometry objects. **Note** that coordinates in GeoJSON are in x, y order (longitude, latitude).", + "type": "array", + "items": { + "$ref": "#/definitions/GeoJsonGeometry" + } + } + }, + "required": [ + "geometries" + ] + }, + "GeoJsonFeature": { + "description": "A valid `GeoJSON Feature` object type. Please refer to [RFC 7946](https://tools.ietf.org/html/rfc7946#section-3.2) for details.", + "x-ms-discriminator-value": "Feature", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/GeoJsonObject" + }, + { + "$ref": "#/definitions/GeoJsonFeatureData" + } + ] + }, + "GeoJsonFeatureData": { + "type": "object", + "properties": { + "geometry": { + "$ref": "#/definitions/GeoJsonGeometry" + }, + "properties": { + "x-ms-client-flatten": true, + "description": "Properties can contain any additional metadata about the `Feature`. Value can be any JSON object or a JSON null value", + "type": "object" + }, + "id": { + "description": "Identifier for the feature.", + "type": "string" + }, + "featureType": { + "description": "The type of the feature. The value depends on the data model the current feature is part of. Some data models may have an empty value.", + "type": "string" + } + }, + "required": [ + "geometry" + ] + }, + "GeoJsonFeatureCollection": { + "description": "A valid `GeoJSON FeatureCollection` object type. Please refer to [RFC 7946](https://tools.ietf.org/html/rfc7946#section-3.3) for details.", + "x-ms-discriminator-value": "FeatureCollection", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/GeoJsonObject" + }, + { + "$ref": "#/definitions/GeoJsonFeatureCollectionData" + } + ] + }, + "GeoJsonFeatureCollectionData": { + "type": "object", + "properties": { + "features": { + "description": "Contains a list of valid `GeoJSON Feature` objects.", + "type": "array", + "items": { + "$ref": "#/definitions/GeoJsonFeature" + } + } + }, + "required": [ + "features" + ] + }, + "Ontology": { + "type": "string", + "description": "The ontology version of this dataset.", + "readOnly": true + } + }, + "parameters": { + "ClientId": { + "name": "x-ms-client-id", + "description": "Specifies which account is intended for usage in conjunction with the Azure AD 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 Azure AD security in Azure Maps see the following [articles](https://aka.ms/amauthdetails) for guidance.", + "type": "string", + "in": "header", + "x-ms-parameter-location": "client" + }, + "ResponseFormat": { + "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": "ResponseFormat", + "modelAsString": true, + "values": [ + { + "value": "json", + "description": "[The JavaScript Object Notation Data Interchange Format](https://tools.ietf.org/html/rfc8259)" + } + ] + }, + "x-ms-parameter-location": "method" + }, + "TextFormat": { + "name": "format", + "description": "Desired format of the response. Value can be either _json_ or _xml_.", + "type": "string", + "in": "path", + "required": true, + "enum": [ + "json", + "xml" + ], + "x-ms-enum": { + "name": "TextFormat", + "modelAsString": true, + "values": [ + { + "value": "json", + "description": "[The JavaScript Object Notation Data Interchange Format](https://tools.ietf.org/html/rfc8259)" + }, + { + "value": "xml", + "description": "[The Extensible Markup Language](https://www.w3.org/TR/xml/)" + } + ] + }, + "x-ms-parameter-location": "method" + }, + "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" + } + }, + "responses": { + "200AsyncV2": { + "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" + }, + "headers": { + "Resource-Location": { + "type": "string", + "description": "If successful, a URI where details on the newly created resource can be found." + } + } + }, + "202Async": { + "description": "**Supported only for async request.**\nRequest Accepted: The request has been accepted for processing. Please use the URL in the Location Header to retry or access the results.", + "headers": { + "Location": { + "type": "string", + "description": "New URL to check for the results of the long running process." + } + } + }, + "202Batch": { + "description": "Batch request was accepted but is still being processed. Please try again in some time." + }, + "202AsyncV2": { + "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 process." + } + } + }, + "408": { + "description": "Timeout: The request took longer to finish than the maximum amount of time defined in the api.", + "schema": { + "$ref": "../../../../../../common-types/data-plane/v1/types.json#/definitions/ErrorResponse" + }, + "x-ms-error-response": true + }, + "409": { + "description": "The request could not be completed due to a conflict with the current state of the resource. Likely caused by a parallel update to the same resource.", + "schema": { + "$ref": "../../../../../../common-types/data-plane/v1/types.json#/definitions/ErrorResponse" + }, + "x-ms-error-response": true + }, + "409StorageLimit": { + "description": "The [data storage limit](https://docs.microsoft.com/en-us/azure/azure-resource-manager/management/azure-subscription-service-limits#azure-maps-limits) is reached on the Azure Maps account. You can always use the [Data Delete API](https://docs.microsoft.com/en-us/rest/api/maps/data/deletepreview) to delete old/unused content and create space for new uploads.", + "schema": { + "$ref": "../../../../../../common-types/data-plane/v1/types.json#/definitions/ErrorResponse" + }, + "x-ms-error-response": true + }, + "default": { + "description": "An unexpected error occurred.", + "schema": { + "$ref": "../../../../../../common-types/data-plane/v1/types.json#/definitions/ErrorResponse" + }, + "x-ms-error-response": true + } + } +} diff --git a/specification/maps/data-plane/Microsoft.Maps/DEM/preview/1.0/elevation.json b/specification/maps/data-plane/Microsoft.Maps/DEM/preview/1.0/elevation.json index d5cbc47fbca0..4f25fb8d872c 100644 --- a/specification/maps/data-plane/Microsoft.Maps/DEM/preview/1.0/elevation.json +++ b/specification/maps/data-plane/Microsoft.Maps/DEM/preview/1.0/elevation.json @@ -5,124 +5,60 @@ "version": "1.0", "description": "The Azure Maps Elevation API provides an HTTP interface to query elevation data on the surface of the Earth. Elevation data can be retrieved at specific locations by sending lat/lon coordinates, by defining an ordered set of vertices that form a Polyline and a number of sample points along the length of a Polyline, or by defining a bounding box that consists of equally spaced vertices as rows and columns. The vertical datum is EPSG:3855. This datum uses the EGM2008 geoid model applied to the WGS84 ellipsoid as its zero height reference surface. The vertical unit is measured in meters, the spatial resolution of the elevation data is 0.8 arc-second for global coverage (~24 meters)." }, - "host": "atlas.microsoft.com", + "x-ms-parameterized-host": { + "hostTemplate": "{geography}.atlas.microsoft.com", + "parameters": [ + { + "$ref": "../../../Common/preview/1.0/common.json#/parameters/GeographicResourceLocation" + } + ] + }, "schemes": [ "https" ], "consumes": [], "produces": [ - "application/json", - "application/xml" + "application/json" + ], + "security": [ + { + "azure_auth": [ + "user_impersonation" + ] + }, + { + "SubscriptionKeyInHeader": [] + }, + { + "SubscriptionKeyInQuery": [] + } ], "securityDefinitions": { "azure_auth": { "type": "oauth2", "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", "flow": "implicit", - "description": "These are the [Azure Active Directory OAuth2](https://docs.microsoft.com/en-us/azure/active-directory/develop/v1-overview) Flows. When paired with [Azure role-based access](https://docs.microsoft.com/en-us/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* Currently, Azure Active Directory [v1.0](https://docs.microsoft.com/en-us/azure/active-directory/develop/azure-ad-endpoint-comparison) tokens are supported.", + "description": "These are the [Azure Active Directory OAuth2](https://docs.microsoft.com/en-us/azure/active-directory/develop/v1-overview) Flows. When paired with [Azure Role Based Access](https://docs.microsoft.com/en-us/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#### Note\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* The `Authorization URL` is specific to the Azure public cloud instance. Sovereign clouds have unique Authorization URLs and Azure Active directory configurations. \n* 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.\n* Usage of the [Azure Maps Web SDK](https://aka.ms/amaadmc) allows for configuration based setup of an application for multiple use cases.\n* Currently Azure Active Directory [v1.0](https://docs.microsoft.com/en-us/azure/active-directory/develop/azure-ad-endpoint-comparison) tokens are supported.", "scopes": { - "user_impersonation": "Impersonates a user's Azure Active Directory account." + "user_impersonation": "impersonate your user account" } }, - "apiKeyQuery": { + "SubscriptionKeyInHeader": { "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 which 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": "query" - } - }, - "security": [ - { - "azure_auth": [] - }, - { - "apiKeyQuery": [] - } - ], - "responses": { - "400": { - "description": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive.", - "schema": { - "$ref": "#/definitions/ODataErrorResponse" - }, - "x-ms-error-response": true - }, - "401": { - "description": "Access denied due to invalid subscription key or invalid Azure Active Directory (Azure AD) 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 Azure AD bearer token.", - "schema": { - "$ref": "#/definitions/ODataErrorResponse" - }, - "headers": { - "WWW-Authenticate": { - "type": "string", - "description": "Bearer realm=\"https://atlas.microsoft.com/\", error=\"invalid_token\", error_description=\"The access token expired\"" - } - }, - "x-ms-error-response": true - }, - "403": { - "description": "Permission, capacity, or authentication issues.", - "schema": { - "$ref": "#/definitions/ODataErrorResponse" - }, - "x-ms-error-response": true - }, - "404": { - "description": "Not Found: the requested resource could not be found, but it may be available again in the future.", - "schema": { - "$ref": "#/definitions/ODataErrorResponse" - }, - "x-ms-error-response": true + "in": "header" }, - "500": { - "description": "An error occurred while processing the request. Please try again later.", - "schema": { - "$ref": "#/definitions/ODataErrorResponse" - }, - "x-ms-error-response": true + "SubscriptionKeyInQuery": { + "type": "apiKey", + "name": "subscription-key", + "in": "query" } }, + "responses": {}, "parameters": { - "ClientId": { - "name": "x-ms-client-id", - "description": "Specifies which account is intended for usage in conjunction with the Azure AD 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 Azure AD 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" - }, - "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" - }, - "ApiVersion": { + "ElevationApiVersion": { "name": "api-version", - "description": "Version number of Azure Maps API. Current version is 1.0", + "description": "Version number of Azure Maps API.", "type": "string", "in": "query", "required": true, @@ -143,30 +79,25 @@ }, "parameters": [ { - "$ref": "#/parameters/ClientId" - }, - { - "$ref": "#/parameters/SubscriptionKey" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ClientId" }, { - "$ref": "#/parameters/ApiVersion" + "$ref": "#/parameters/ElevationApiVersion" }, { - "$ref": "#/parameters/JsonFormat" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ResponseFormat" }, { "name": "points", "in": "query", - "description": "The string representation of a list of points. A point is defined in lat/lon WGS84 coordinate reference system format. If multiple points are requested, each of the points in a list should be separated by the pipe ('|') character. The maximum number of points that can be requested in a single request is 2,000. The resolution of the elevation data will be the highest for a single point and will decrease if multiple points are spread further apart. ", + "description": "The string representation of a list of points. A point is defined in lon/lat WGS84 coordinate reference system format. If multiple points are requested, each of the points in a list should be separated by the pipe ('|') character. The maximum number of points that can be requested in a single request is 2,000. The resolution of the elevation data will be the highest for a single point and will decrease if multiple points are spread further apart. ", "required": true, "type": "array", "collectionFormat": "pipes", + "x-ms-skip-url-encoding": true, "items": { - "type": "array", - "collectionFormat": "csv", - "items": { - "type": "string" - } + "type": "string", + "pattern": "\\s*[-]?\\d+[.]\\d+\\s*[,]\\s*[-]?\\d+[.]\\d+\\s*" } } ], @@ -180,26 +111,14 @@ "$ref": "#/definitions/PointsResult" } }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" + "default": { + "$ref": "../../../Common/preview/1.0/common.json#/responses/default" } } }, "post": { "summary": "Query Elevation Data for Multiple Points", - "description": "**Applies to**: S1 pricing tier.\n\nThe Post Data for Points API provides elevation data for multiple points. A point is defined in lat/lon coordinate format. Use the POST endpoint only if you intend to pass multiple points in the request. If you intend to pass a single coordinate into the API, use the [GET Data For Points API](https://docs.microsoft.com/en-us/rest/api/maps/elevation/getdataforpoints).", + "description": "**Applies to**: S1 pricing tier.\n\nThe Post Data for Points API provides elevation data for multiple points. A point is defined lon/lat coordinate format. Use the POST endpoint only if you intend to pass multiple points in the request. If you intend to pass a single coordinate into the API, use the [GET Data For Points API](https://docs.microsoft.com/en-us/rest/api/maps/elevation/getdataforpoints).", "operationId": "Elevation_PostDataForPoints", "x-ms-examples": { "PostDataForPoints": { @@ -208,21 +127,18 @@ }, "parameters": [ { - "$ref": "#/parameters/ClientId" - }, - { - "$ref": "#/parameters/SubscriptionKey" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ClientId" }, { - "$ref": "#/parameters/ApiVersion" + "$ref": "#/parameters/ElevationApiVersion" }, { - "$ref": "#/parameters/JsonFormat" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ResponseFormat" }, { "name": "pointsRequestBody", "in": "body", - "description": "The string representation of a list of points. A point is defined in lat/lon WGS84 coordinate reference system format. Each points in a list should be separated by the pipe ('|') character. The number of points that can be requested in a POST request ranges from 2 to 2,000. The resolution of the elevation data will be the highest for a single point and will decrease if multiple points are spread further apart. ", + "description": "The string representation of a list of points. A point is defined in lon/lat WGS84 coordinate reference system format. Each points in a list should be separated by the pipe ('|') character. The number of points that can be requested in a POST request ranges from 2 to 2,000. The resolution of the elevation data will be the highest for a single point and will decrease if multiple points are spread further apart. ", "required": true, "schema": { "$ref": "#/definitions/PointsInRequestBody" @@ -239,20 +155,8 @@ "$ref": "#/definitions/PointsResult" } }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" + "default": { + "$ref": "../../../Common/preview/1.0/common.json#/responses/default" } } } @@ -269,16 +173,13 @@ }, "parameters": [ { - "$ref": "#/parameters/ClientId" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ClientId" }, { - "$ref": "#/parameters/SubscriptionKey" + "$ref": "#/parameters/ElevationApiVersion" }, { - "$ref": "#/parameters/ApiVersion" - }, - { - "$ref": "#/parameters/JsonFormat" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ResponseFormat" }, { "name": "lines", @@ -287,23 +188,19 @@ "required": true, "type": "array", "collectionFormat": "pipes", + "x-ms-skip-url-encoding": true, "items": { - "type": "array", - "collectionFormat": "csv", - "items": { - "type": "string" - } + "type": "string", + "pattern": "\\s*[-]?\\d+[.]\\d+\\s*[,]\\s*[-]?\\d+[.]\\d+\\s*" } }, { "name": "samples", "in": "query", "description": "The samples parameter specifies the number of equally spaced points at which elevation values should be provided along a polyline path. The number of samples should range from 2 to 2,000. Default value is 10.", - "type": "number", + "type": "integer", "minimum": 2, - "maximum": 2000, - "default": 10, - "required": false + "maximum": 2000 } ], "produces": [ @@ -316,20 +213,8 @@ "$ref": "#/definitions/LinesResult" } }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" + "default": { + "$ref": "../../../Common/preview/1.0/common.json#/responses/default" } } }, @@ -344,16 +229,13 @@ }, "parameters": [ { - "$ref": "#/parameters/ClientId" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ClientId" }, { - "$ref": "#/parameters/SubscriptionKey" + "$ref": "#/parameters/ElevationApiVersion" }, { - "$ref": "#/parameters/ApiVersion" - }, - { - "$ref": "#/parameters/JsonFormat" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ResponseFormat" }, { "name": "linesRequestBody", @@ -368,11 +250,9 @@ "name": "samples", "in": "query", "description": "The samples parameter specifies the number of equally spaced points at which elevation values should be provided along a polyline path. The number of samples should range from 2 to 2,000. Default value is 10.", - "type": "number", + "type": "integer", "minimum": 2, - "maximum": 2000, - "default": 10, - "required": false + "maximum": 2000 } ], "produces": [ @@ -385,20 +265,8 @@ "$ref": "#/definitions/LinesResult" } }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" + "default": { + "$ref": "../../../Common/preview/1.0/common.json#/responses/default" } } } @@ -415,16 +283,13 @@ }, "parameters": [ { - "$ref": "#/parameters/ClientId" - }, - { - "$ref": "#/parameters/SubscriptionKey" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ClientId" }, { - "$ref": "#/parameters/ApiVersion" + "$ref": "#/parameters/ElevationApiVersion" }, { - "$ref": "#/parameters/JsonFormat" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ResponseFormat" }, { "name": "bounds", @@ -432,7 +297,6 @@ "description": "The string that represents the rectangular area of a bounding box. The bounds parameter is defined by the 4 bounding box coordinates, with WGS84 longitude and latitude of the southwest corner followed by WGS84 longitude and latitude of the northeast corner. The string is presented in the following format: `[SouthwestCorner_Longitude, SouthwestCorner_Latitude, NortheastCorner_Longitude, NortheastCorner_Latitude]`.", "required": true, "type": "array", - "collectionFormat": "csv", "items": { "type": "string" } @@ -441,7 +305,7 @@ "name": "rows", "in": "query", "description": "Specifies the number of rows to use to divide the bounding box area into a grid. The number of vertices in the grid should be less than 2,000. ", - "type": "number", + "type": "integer", "minimum": 2, "maximum": 1000, "required": true @@ -450,7 +314,7 @@ "name": "columns", "in": "query", "description": "Specifies the number of columns to use to divide the bounding box area into a grid. The number of vertices in the grid should be less than 2,000. ", - "type": "number", + "type": "integer", "minimum": 2, "maximum": 1000, "required": true @@ -466,96 +330,14 @@ "$ref": "#/definitions/BoundingBoxResult" } }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" + "default": { + "$ref": "../../../Common/preview/1.0/common.json#/responses/default" } } } } }, "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." - } - } - }, - "Coordinate": { - "description": "A location represented as a latitude and longitude.", - "type": "object", - "properties": { - "latitude": { - "description": "Latitude property", - "type": "number", - "format": "double", - "readOnly": true - }, - "longitude": { - "description": "Longitude property", - "type": "number", - "format": "double", - "readOnly": true - } - } - }, - "CoordinateAbbreviated": { - "description": "A location represented as a latitude and longitude.", - "type": "object", - "properties": { - "lat": { - "description": "Latitude property", - "type": "number", - "format": "double" - }, - "lon": { - "description": "Longitude property", - "type": "number", - "format": "double" - } - } - }, "ElevationPointResponse": { "description": "The response for point/points elevation API. The result will be in same sequence of points listed in request.", "type": "array", @@ -569,7 +351,7 @@ "description": "The elevation data.", "properties": { "coordinate": { - "$ref": "#/definitions/Coordinate" + "$ref": "../../../Common/preview/1.0/common.json#/definitions/CoordinatesPair" }, "elevationInMeter": { "description": "The elevation value in meters.", @@ -625,14 +407,14 @@ "type": "array", "description": "The post elevation points array request body. The length of the array ranges from 2 to 2000.", "items": { - "$ref": "#/definitions/CoordinateAbbreviated" + "$ref": "../../../Common/preview/1.0/common.json#/definitions/CoordinatesPairAbbreviated" } }, "LinesInRequestBody": { "type": "array", "description": "The post elevation lines request body.", "items": { - "$ref": "#/definitions/CoordinateAbbreviated" + "$ref": "../../../Common/preview/1.0/common.json#/definitions/CoordinatesPairAbbreviated" } } } diff --git a/specification/maps/data-plane/Microsoft.Maps/DEM/preview/1.0/examples/GetDataForBoundingBox.json b/specification/maps/data-plane/Microsoft.Maps/DEM/preview/1.0/examples/GetDataForBoundingBox.json index 71f1f2f6115b..fdb2508355c7 100644 --- a/specification/maps/data-plane/Microsoft.Maps/DEM/preview/1.0/examples/GetDataForBoundingBox.json +++ b/specification/maps/data-plane/Microsoft.Maps/DEM/preview/1.0/examples/GetDataForBoundingBox.json @@ -1,9 +1,9 @@ { "parameters": { + "geography": "us", "format": "json", "api-version": "1.0", "bounds": "-121.66853362143818, 46.84646479863713,-121.65853362143818, 46.85646479863713", - "subscription-key": "[subscription-key]", "rows": 2, "columns": 3 }, @@ -55,51 +55,6 @@ } ] } - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive." - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found: the requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "An error occurred while processing the request. Please try again later." - } - } } } } diff --git a/specification/maps/data-plane/Microsoft.Maps/DEM/preview/1.0/examples/GetDataForPoints.json b/specification/maps/data-plane/Microsoft.Maps/DEM/preview/1.0/examples/GetDataForPoints.json index 05ceee407a70..fde68073dbe8 100644 --- a/specification/maps/data-plane/Microsoft.Maps/DEM/preview/1.0/examples/GetDataForPoints.json +++ b/specification/maps/data-plane/Microsoft.Maps/DEM/preview/1.0/examples/GetDataForPoints.json @@ -1,9 +1,9 @@ { "parameters": { + "geography": "us", "format": "json", "api-version": "1.0", - "points": "-121.66853362143818, 46.84646479863713|-121.68853362143818, 46.856464798637127", - "subscription-key": "[subscription-key]" + "points": "-121.66853362143818, 46.84646479863713|-121.68853362143818, 46.856464798637127" }, "responses": { "200": { @@ -25,51 +25,6 @@ } ] } - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive." - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found: the requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "An error occurred while processing the request. Please try again later." - } - } } } } diff --git a/specification/maps/data-plane/Microsoft.Maps/DEM/preview/1.0/examples/GetDataForPolyline.json b/specification/maps/data-plane/Microsoft.Maps/DEM/preview/1.0/examples/GetDataForPolyline.json index 06df7292796a..5ca4133edee3 100644 --- a/specification/maps/data-plane/Microsoft.Maps/DEM/preview/1.0/examples/GetDataForPolyline.json +++ b/specification/maps/data-plane/Microsoft.Maps/DEM/preview/1.0/examples/GetDataForPolyline.json @@ -1,9 +1,9 @@ { "parameters": { + "geography": "us", "format": "json", "api-version": "1.0", "lines": "-121.66853362143818, 46.84646479863713|-121.67853362143818, 46.85646479863713", - "subscription-key": "[subscription-key]", "samples": 5 }, "responses": { @@ -47,51 +47,6 @@ } ] } - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive." - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found: the requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "An error occurred while processing the request. Please try again later." - } - } } } } diff --git a/specification/maps/data-plane/Microsoft.Maps/DEM/preview/1.0/examples/PostDataForPoints.json b/specification/maps/data-plane/Microsoft.Maps/DEM/preview/1.0/examples/PostDataForPoints.json index fe40a6045efd..75541a1da2f1 100644 --- a/specification/maps/data-plane/Microsoft.Maps/DEM/preview/1.0/examples/PostDataForPoints.json +++ b/specification/maps/data-plane/Microsoft.Maps/DEM/preview/1.0/examples/PostDataForPoints.json @@ -1,5 +1,6 @@ { "parameters": { + "geography": "us", "format": "json", "api-version": "1.0", "pointsRequestBody": [ @@ -11,8 +12,7 @@ "lon": -121.68853362143818, "lat": 46.856464798637127 } - ], - "subscription-key": "[subscription-key]" + ] }, "responses": { "200": { @@ -34,51 +34,6 @@ } ] } - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive." - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found: the requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "An error occurred while processing the request. Please try again later." - } - } } } } diff --git a/specification/maps/data-plane/Microsoft.Maps/DEM/preview/1.0/examples/PostDataForPolyline.json b/specification/maps/data-plane/Microsoft.Maps/DEM/preview/1.0/examples/PostDataForPolyline.json index 1ca08132ac95..dd20977f9124 100644 --- a/specification/maps/data-plane/Microsoft.Maps/DEM/preview/1.0/examples/PostDataForPolyline.json +++ b/specification/maps/data-plane/Microsoft.Maps/DEM/preview/1.0/examples/PostDataForPolyline.json @@ -1,5 +1,6 @@ { "parameters": { + "geography": "us", "format": "json", "api-version": "1.0", "linesRequestBody": [ @@ -12,7 +13,6 @@ "lat": 46.85646479863713 } ], - "subscription-key": "[subscription-key]", "samples": 5 }, "responses": { @@ -56,51 +56,6 @@ } ] } - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive." - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found: the requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "An error occurred while processing the request. Please try again later." - } - } } } } diff --git a/specification/maps/data-plane/Microsoft.Maps/Data/preview/1.0/data.json b/specification/maps/data-plane/Microsoft.Maps/Data/preview/1.0/data.json deleted file mode 100644 index 329cb1ec6e98..000000000000 --- a/specification/maps/data-plane/Microsoft.Maps/Data/preview/1.0/data.json +++ /dev/null @@ -1,652 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "Azure Maps Data Service", - "version": "1.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": { - "azure_auth": { - "type": "oauth2", - "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", - "flow": "implicit", - "description": "These are the [Azure Active Directory OAuth2](https://docs.microsoft.com/en-us/azure/active-directory/develop/v1-overview) Flows. When paired with [Azure Role Based Access](https://docs.microsoft.com/en-us/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#### Note\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* The `Authorization URL` is specific to the Azure public cloud instance. Sovereign clouds have unique Authorization URLs and Azure Active directory configurations. \n* 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.\n* Usage of the [Azure Maps Web SDK](https://aka.ms/amaadmc) allows for configuration based setup of an application for multiple use cases.\n* Currently Azure Active Directory [v1.0](https://docs.microsoft.com/en-us/azure/active-directory/develop/azure-ad-endpoint-comparison) tokens are supported.", - "scopes": { - "user_impersonation": "Impersonates a user's Azure Active Directory account." - } - }, - "apiKeyQuery": { - "type": "apiKey", - "description": "This is a shared key which 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 which 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": "query" - } - }, - "security": [ - { - "azure_auth": [] - }, - { - "apiKeyQuery": [] - } - ], - "responses": { - "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 Azure Active Directory 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 AAD bearer token.", - "schema": { - "$ref": "#/definitions/ODataErrorResponse" - }, - "headers": { - "WWW-Authenticate": { - "type": "string", - "description": "Bearer realm=\"https://atlas.microsoft.com/\", error=\"invalid_token\", error_description=\"The access token expired\"" - } - } - }, - "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" - } - }, - "201Async": { - "description": "The resource has been created successfully.", - "schema": { - "$ref": "#/definitions/LongRunningOperationResult" - }, - "headers": { - "Location": { - "type": "string", - "description": "A URI where details on the newly created resource can be found." - } - } - }, - "202Async": { - "description": "**Supported only for async request.**\nRequest Accepted: The request has been accepted for processing. Please use the URL in the Location Header to retry or access the results.", - "headers": { - "Location": { - "type": "string", - "description": "New URL to check for the results of the long running process." - } - } - } - }, - "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 Azure AD security model. It represents a unique ID for the Azure Maps account and can be retrieved from Azure Maps management plane Account API. To use Azure AD 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 1.0", - "type": "string", - "in": "query", - "required": true, - "default": "1.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" - ], - "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." - } - ] - }, - "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/uploadpreview) call.", - "type": "string", - "in": "path", - "required": true, - "x-ms-parameter-location": "method" - } - }, - "paths": { - "/mapData/upload": { - "post": { - "x-publish": true, - "description": "**Data Upload API**\n\n**Applies to:** S1 pricing tier.\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 \n`dataFormat` query parameter will contain the format for the data, the `dataSharingLevel` query parameter \ncan contain the sharing level for the data. 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`\n- `application/vnd.geo+json`\n- `application/octet-stream`\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 \n[long-running request](https://docs.microsoft.com/azure/azure-maps/private-atlas-long-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/deletepreview) 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/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" - } - }, - "201": { - "$ref": "#/responses/201Async" - }, - "202": { - "$ref": "#/responses/202Async" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" - } - } - } - }, - "/mapData/{udid}": { - "put": { - "x-publish": true, - "description": "**Data Update API**\n\n**Applies to:** S1 pricing tier.\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/uploadpreview), 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`\n- `application/vnd.geo+json`\n- `application/octet-stream`\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 \n[long-running request](https://docs.microsoft.com/azure/azure-maps/private-atlas-long-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/deletepreview) 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" - }, - { - "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" - } - }, - "201": { - "$ref": "#/responses/201Async" - }, - "202": { - "$ref": "#/responses/202Async" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" - } - } - }, - "get": { - "x-publish": true, - "description": "**Data Download API**\n\n**Applies to:** S1 pricing tier.\n
\n\nThis API allows the caller to download a previously uploaded data content.
\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/uploadpreview) 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.
\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`\n - `application/vnd.geo+json`\n - `application/octet-stream`\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.
\nA HTTP `400 Bad Request` error response will be returned if the data resource with the passed-in `udid` is not found.
\n\nHere's a sample response body for a simple geofence represented in `GeoJSON` uploaded previously using the Upload API:\n
\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": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" - } - } - }, - "delete": { - "x-publish": true, - "description": "**Data Delete API**\n\n**Applies to:** S1 pricing tier.\n
\n\nThis API allows the caller to delete a previously uploaded data content.
\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/uploadpreview) 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.
\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.
\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.", - "schema": { - "$ref": "#/definitions/MapDataDeleteResponse" - } - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" - } - } - } - }, - "/mapData": { - "get": { - "x-publish": true, - "description": "**Data List API**\n\n**Applies to:** S1 pricing tier.\n
\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/uploadpreview). \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
\n\n```json\n{\n \"mapDataList\": \n [\n {\n \"udid\": \"9a1288fa-1858-4a3b-b68d-13a8j5af7d7c\",\n \"location\": \"https://atlas.microsoft.com/mapData/9a1288fa-1858-4a3b-b68d-13a8j5af7d7c?api-version=1.0\",\n \"sizeInBytes\": 29920,\n \"uploadStatus\": \"Completed\"\n },\n {\n \"udid\": \"8b1288fa-1958-4a2b-b68e-13a7i5af7d7c\",\n \"location\": \"https://atlas.microsoft.com/mapData/8b1288fa-1958-4a2b-b68e-13a7i5af7d7c?api-version=1.0\",\n \"sizeInBytes\": 1339,\n \"uploadStatus\": \"Completed\"\n },\n {\n \"udid\": \"7c1288fa-2058-4a1b-b68f-13a6h5af7d7c\",\n \"location\": \"https://atlas.microsoft.com/mapData/7c1288fa-2058-4a1b-b68f-13a6h5af7d7c?api-version=1.0\",\n \"sizeInBytes\": 1650,\n \"uploadStatus\": \"Pending\"\n }]\n}\n```\n\n
", - "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": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" - } - } - } - } - }, - "definitions": { - "ODataErrorResponse": { - "type": "object", - "description": "This response object is returned when an error occurs in the Maps API.", - "properties": { - "error": { - "$ref": "#/definitions/ODataError" - } - } - }, - "ODataError": { - "type": "object", - "description": "This object is returned when an error occurs in the 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 - }, - "resourceLocation": { - "description": "The location URI for details about the created resource. This is only provided when the request was successfully completed.", - "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" - }, - "MapDataDeleteResponse": { - "description": "The response model for the Data Delete API. The response body will be empty signifying there's no content available for the `udid` anymore.", - "type": "object" - }, - "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 - } - } - } - } -} diff --git a/specification/maps/data-plane/Microsoft.Maps/Data/preview/1.0/examples/Delete.json b/specification/maps/data-plane/Microsoft.Maps/Data/preview/1.0/examples/Delete.json deleted file mode 100644 index 50c9ce448af5..000000000000 --- a/specification/maps/data-plane/Microsoft.Maps/Data/preview/1.0/examples/Delete.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "parameters": { - "geography": "us", - "api-version": "1.0", - "subscription-key": "[subscription-key]", - "udid": "25084fb7-307a-4720-8f91-7952a0b91012" - }, - "responses": { - "204": { - "body": {} - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive." - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found: the requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "An error occurred while processing the request. Please try again later." - } - } - } - } -} diff --git a/specification/maps/data-plane/Microsoft.Maps/Data/preview/1.0/examples/Download.json b/specification/maps/data-plane/Microsoft.Maps/Data/preview/1.0/examples/Download.json deleted file mode 100644 index 92222b3078f2..000000000000 --- a/specification/maps/data-plane/Microsoft.Maps/Data/preview/1.0/examples/Download.json +++ /dev/null @@ -1,77 +0,0 @@ -{ - "parameters": { - "geography": "us", - "api-version": "1.0", - "subscription-key": "[subscription-key]", - "udid": "25084fb7-307a-4720-8f91-7952a0b91012" - }, - "responses": { - "200": { - "headers": {}, - "body": { - "type": "FeatureCollection", - "features": [ - { - "type": "Feature", - "geometry": { - "type": "Point", - "coordinates": [ - -122.126986, - 47.639754 - ] - }, - "properties": { - "geometryId": "001", - "radius": 500 - } - } - ] - } - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive." - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found: the requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "An error occurred while processing the request. Please try again later." - } - } - } - } -} diff --git a/specification/maps/data-plane/Microsoft.Maps/Data/preview/1.0/examples/List.json b/specification/maps/data-plane/Microsoft.Maps/Data/preview/1.0/examples/List.json deleted file mode 100644 index 5123768fe957..000000000000 --- a/specification/maps/data-plane/Microsoft.Maps/Data/preview/1.0/examples/List.json +++ /dev/null @@ -1,78 +0,0 @@ -{ - "parameters": { - "geography": "us", - "api-version": "1.0", - "subscription-key": "[subscription-key]" - }, - "responses": { - "200": { - "body": { - "mapDataList": [ - { - "udid": "f6495f62-94f8-0ec2-c252-45626f82fcb2", - "location": "https://atlas.microsoft.com/mapData/f6495f62-94f8-0ec2-c252-45626f82fcb2?api-version=1.0", - "sizeInBytes": 29920, - "uploadStatus": "Completed" - }, - { - "udid": "8b1288fa-1958-4a2b-b68e-13a7i5af7d7c", - "location": "https://atlas.microsoft.com/mapData/8b1288fa-1958-4a2b-b68e-13a7i5af7d7c?api-version=1.0", - "sizeInBytes": 1339, - "uploadStatus": "Completed" - }, - { - "udid": "7c1288fa-2058-4a1b-b68f-13a6h5af7d7c", - "location": "https://atlas.microsoft.com/mapData/7c1288fa-2058-4a1b-b68f-13a6h5af7d7c?api-version=1.0", - "sizeInBytes": 1650, - "uploadStatus": "Pending" - } - ] - } - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive." - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found: the requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "An error occurred while processing the request. Please try again later." - } - } - } - } -} diff --git a/specification/maps/data-plane/Microsoft.Maps/Data/preview/1.0/examples/Update.json b/specification/maps/data-plane/Microsoft.Maps/Data/preview/1.0/examples/Update.json deleted file mode 100644 index fbefa37257db..000000000000 --- a/specification/maps/data-plane/Microsoft.Maps/Data/preview/1.0/examples/Update.json +++ /dev/null @@ -1,101 +0,0 @@ -{ - "parameters": { - "geography": "us", - "api-version": "1.0", - "subscription-key": "[subscription-key]", - "udid": "25084fb7-307a-4720-8f91-7952a0b91012", - "UpdateContent": { - "type": "FeatureCollection", - "features": [ - { - "type": "Feature", - "geometry": { - "type": "Point", - "coordinates": [ - -122.126986, - 47.639754 - ] - }, - "properties": { - "geometryId": "001", - "radius": 500 - } - } - ] - } - }, - "responses": { - "201": { - "headers": { - "Location": "https://atlas.microsoft.com/mapData/metadata/{udid}?api-version=1.0", - "Access-Control-Expose-Headers": "Location" - }, - "body": { - "operationId": "{operationId}", - "status": "Succeeded", - "created": "2020-01-02 1:02:03 AM +00:00", - "resourceLocation": "https://atlas.microsoft.com/mapData/metadata/{resourceId}?api-version=1.0" - } - }, - "202": { - "headers": { - "Location": "https://atlas.microsoft.com/mapData/operations/{operationId}?api-version=1.0", - "Access-Control-Expose-Headers": "Location" - } - }, - "200": { - "headers": {}, - "body": { - "error": { - "code": "400 Bad Request", - "message": "Upload request failed. Your data has been removed as we encountered the following problems with it: Map data is not a valid GeoJSON geometry." - } - } - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive." - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found: the requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "An error occurred while processing the request. Please try again later." - } - } - } - } -} diff --git a/specification/maps/data-plane/Microsoft.Maps/Data/preview/1.0/examples/Upload.json b/specification/maps/data-plane/Microsoft.Maps/Data/preview/1.0/examples/Upload.json deleted file mode 100644 index 1eef53581827..000000000000 --- a/specification/maps/data-plane/Microsoft.Maps/Data/preview/1.0/examples/Upload.json +++ /dev/null @@ -1,101 +0,0 @@ -{ - "parameters": { - "geography": "us", - "api-version": "1.0", - "subscription-key": "[subscription-key]", - "dataFormat": "geojson", - "UploadContent": { - "type": "FeatureCollection", - "features": [ - { - "type": "Feature", - "geometry": { - "type": "Point", - "coordinates": [ - -122.126986, - 47.639754 - ] - }, - "properties": { - "geometryId": "001", - "radius": 500 - } - } - ] - } - }, - "responses": { - "201": { - "headers": { - "Location": "https://atlas.microsoft.com/mapData/metadata/{udid}?api-version=1.0", - "Access-Control-Expose-Headers": "Location" - }, - "body": { - "operationId": "{operationId}", - "status": "Succeeded", - "created": "2020-01-02 1:02:03 AM +00:00", - "resourceLocation": "https://atlas.microsoft.com/mapData/metadata/{resourceId}?api-version=1.0" - } - }, - "202": { - "headers": { - "Location": "https://atlas.microsoft.com/mapData/operations/{operationId}?api-version=1.0", - "Access-Control-Expose-Headers": "Location" - } - }, - "200": { - "headers": {}, - "body": { - "error": { - "code": "400 Bad Request", - "message": "Upload request failed. Your data has been removed as we encountered the following problems with it: Map data is not a valid GeoJSON geometry." - } - } - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive." - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found: the requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "An error occurred while processing the request. Please try again later." - } - } - } - } -} diff --git a/specification/maps/data-plane/Microsoft.Maps/Data/preview/2.0/data.json b/specification/maps/data-plane/Microsoft.Maps/Data/preview/2.0/data.json index 858e1943bf5b..e33feb07b6b9 100644 --- a/specification/maps/data-plane/Microsoft.Maps/Data/preview/2.0/data.json +++ b/specification/maps/data-plane/Microsoft.Maps/Data/preview/2.0/data.json @@ -9,7 +9,7 @@ "hostTemplate": "{geography}.atlas.microsoft.com", "parameters": [ { - "$ref": "#/parameters/GeographicResourceLocation" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/GeographicResourceLocation" } ] }, @@ -20,6 +20,19 @@ "produces": [ "application/json" ], + "security": [ + { + "azure_auth": [ + "user_impersonation" + ] + }, + { + "SubscriptionKeyInHeader": [] + }, + { + "SubscriptionKeyInQuery": [] + } + ], "securityDefinitions": { "azure_auth": { "type": "oauth2", @@ -27,159 +40,34 @@ "flow": "implicit", "description": "These are the [Azure Active Directory OAuth2](https://docs.microsoft.com/en-us/azure/active-directory/develop/v1-overview) Flows. When paired with [Azure Role Based Access](https://docs.microsoft.com/en-us/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#### Note\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* The `Authorization URL` is specific to the Azure public cloud instance. Sovereign clouds have unique Authorization URLs and Azure Active directory configurations. \n* 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.\n* Usage of the [Azure Maps Web SDK](https://aka.ms/amaadmc) allows for configuration based setup of an application for multiple use cases.\n* Currently Azure Active Directory [v1.0](https://docs.microsoft.com/en-us/azure/active-directory/develop/azure-ad-endpoint-comparison) tokens are supported.", "scopes": { - "user_impersonation": "Impersonates a user's Azure Active Directory account." + "user_impersonation": "impersonate your user account" } }, - "apiKeyQuery": { + "SubscriptionKeyInHeader": { "type": "apiKey", - "description": "This is a shared key which 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 which 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": "query" - } - }, - "security": [ - { - "azure_auth": [] - }, - { - "apiKeyQuery": [] - } - ], - "responses": { - "400": { - "description": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive.", - "schema": { - "$ref": "#/definitions/ODataErrorResponse" - } + "in": "header" }, - "401": { - "description": "Access denied due to invalid subscription key or invalid Azure Active Directory 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 AAD bearer token.", - "schema": { - "$ref": "#/definitions/ODataErrorResponse" - }, - "headers": { - "WWW-Authenticate": { - "type": "string", - "description": "Bearer realm=\"https://atlas.microsoft.com/\", error=\"invalid_token\", error_description=\"The access token expired\"" - } - } - }, - "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" - } - }, - "200Async": { - "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" - }, - "headers": { - "Resource-Location": { - "type": "string", - "description": "If successful, a URI where details on the newly created resource can be found." - } - } - }, - "202Accepted": { - "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 process." - } - } + "SubscriptionKeyInQuery": { + "type": "apiKey", + "name": "subscription-key", + "in": "query" } }, + "responses": {}, "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 Azure AD security model. It represents a unique ID for the Azure Maps account and can be retrieved from Azure Maps management plane Account API. To use Azure AD 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": { + "DataApiVersionV2": { "name": "api-version", - "description": "Version number of Azure Maps API. Current version is 2.0", + "description": "Version number of Azure Maps API.", "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", + "x-ms-client-name": "UploadDataFormat", "description": "Data format of the content being uploaded.", "type": "string", "in": "query", @@ -203,26 +91,27 @@ }, { "value": "dwgzippackage", - "description": "" + "description": "ZIP package containing DWG file." } ] }, "x-ms-parameter-location": "method" }, - "Udid": { + "UniqueDataId": { "name": "udid", + "x-ms-client-name": "UniqueDataId", "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%20v2/uploadpreview) call.", "type": "string", "in": "path", "required": true, "x-ms-parameter-location": "method" }, - "Description": { + "UploadDataDescription": { "name": "description", + "x-ms-client-name": "UploadDataDescription", "description": "The description to be given to the upload.", "type": "string", "in": "query", - "required": false, "x-ms-parameter-location": "method" }, "DataUploadOperationId": { @@ -237,7 +126,6 @@ "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 \n`dataFormat` query parameter will contain the format for the data, the `dataSharingLevel` query parameter \ncan contain the sharing level for the data. 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`\n- `application/vnd.geo+json`\n- `application/octet-stream`\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 \n[long-running request](https://aka.ms/am-creator-lrt-v2).\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%20v2/deletepreview) to \ndelete old/unused content and create space for new uploads.", "operationId": "Data_UploadPreview", "x-ms-long-running-operation": true, @@ -251,16 +139,13 @@ }, "parameters": [ { - "$ref": "#/parameters/ClientId" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ClientId" }, { - "$ref": "#/parameters/SubscriptionKey" + "$ref": "#/parameters/DataApiVersionV2" }, { - "$ref": "#/parameters/ApiVersion" - }, - { - "$ref": "#/parameters/Description" + "$ref": "#/parameters/UploadDataDescription" }, { "$ref": "#/parameters/UploadDataFormat" @@ -277,33 +162,20 @@ ], "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" - } + "$ref": "../../../Common/preview/1.0/common.json#/responses/200AsyncV2" }, "202": { - "$ref": "#/responses/202Accepted" - }, - "400": { - "$ref": "#/responses/400" + "$ref": "../../../Common/preview/1.0/common.json#/responses/202AsyncV2" }, - "401": { - "$ref": "#/responses/401" + "409": { + "$ref": "../../../Common/preview/1.0/common.json#/responses/409StorageLimit" }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" + "default": { + "$ref": "../../../Common/preview/1.0/common.json#/responses/default" } } }, "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%20v2/uploadpreview). \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
\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 \"sizeInBytes\": 29920,\n \"uploadStatus\": \"Completed\"\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 \"sizeInBytes\": 1339,\n \"uploadStatus\": \"Completed\"\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 \"sizeInBytes\": 1650,\n \"uploadStatus\": \"Pending\"\n }]\n}\n```\n\n
", "operationId": "Data_ListPreview", "x-ms-examples": { @@ -313,13 +185,10 @@ }, "parameters": [ { - "$ref": "#/parameters/ClientId" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ClientId" }, { - "$ref": "#/parameters/SubscriptionKey" - }, - { - "$ref": "#/parameters/ApiVersion" + "$ref": "#/parameters/DataApiVersionV2" } ], "responses": { @@ -327,35 +196,16 @@ "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": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" + "default": { + "$ref": "../../../Common/preview/1.0/common.json#/responses/default" } } } }, "/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%20v2/uploadpreview), 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`\n- `application/vnd.geo+json`\n- `application/octet-stream`\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 \n[long-running request](https://aka.ms/am-creator-lrt-v2).\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%20v2/deletepreview) to \ndelete old/unused content and create space for new uploads.", "operationId": "Data_UpdatePreview", "x-ms-long-running-operation": true, @@ -369,19 +219,16 @@ }, "parameters": [ { - "$ref": "#/parameters/ClientId" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ClientId" }, { - "$ref": "#/parameters/SubscriptionKey" + "$ref": "#/parameters/DataApiVersionV2" }, { - "$ref": "#/parameters/ApiVersion" + "$ref": "#/parameters/UniqueDataId" }, { - "$ref": "#/parameters/Udid" - }, - { - "$ref": "#/parameters/Description" + "$ref": "#/parameters/UploadDataDescription" }, { "name": "UpdateContent", @@ -395,33 +242,20 @@ ], "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" - } + "$ref": "../../../Common/preview/1.0/common.json#/responses/200AsyncV2" }, "202": { - "$ref": "#/responses/202Accepted" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" + "$ref": "../../../Common/preview/1.0/common.json#/responses/202AsyncV2" }, - "403": { - "$ref": "#/responses/403" + "409": { + "$ref": "../../../Common/preview/1.0/common.json#/responses/409StorageLimit" }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" + "default": { + "$ref": "../../../Common/preview/1.0/common.json#/responses/default" } } }, "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.
\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%20v2/uploadpreview) 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.
\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`\n - `application/vnd.geo+json`\n - `application/octet-stream`\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.
\nA HTTP `400 Bad Request` error response will be returned if the data resource with the passed-in `udid` is not found.
\n\nHere's a sample response body for a simple geofence represented in `GeoJSON` uploaded previously using the Upload API:\n
\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": { @@ -429,25 +263,27 @@ "$ref": "./examples/Download.json" } }, + "produces": [ + "application/json", + "application/vnd.geo+json", + "application/octet-stream" + ], "parameters": [ { - "$ref": "#/parameters/ClientId" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ClientId" }, { - "$ref": "#/parameters/SubscriptionKey" + "$ref": "#/parameters/DataApiVersionV2" }, { - "$ref": "#/parameters/ApiVersion" - }, - { - "$ref": "#/parameters/Udid" + "$ref": "#/parameters/UniqueDataId" } ], "responses": { "200": { "description": "Data download request completed successfully. The response body will contain the content for the passed in `udid`.", "schema": { - "$ref": "#/definitions/MapDataDownloadResponse" + "type": "file" }, "headers": { "Content-Type": { @@ -456,25 +292,12 @@ } } }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" + "default": { + "$ref": "../../../Common/preview/1.0/common.json#/responses/default" } } }, "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.
\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%20v2/uploadpreview) 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.
\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.
\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": { @@ -484,36 +307,21 @@ }, "parameters": [ { - "$ref": "#/parameters/ClientId" - }, - { - "$ref": "#/parameters/SubscriptionKey" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ClientId" }, { - "$ref": "#/parameters/ApiVersion" + "$ref": "#/parameters/DataApiVersionV2" }, { - "$ref": "#/parameters/Udid" + "$ref": "#/parameters/UniqueDataId" } ], "responses": { "204": { "description": "Data delete request completed successfully. The content for `udid` was deleted on the server." }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" + "default": { + "$ref": "../../../Common/preview/1.0/common.json#/responses/default" } } } @@ -532,10 +340,7 @@ }, "parameters": [ { - "$ref": "#/parameters/SubscriptionKey" - }, - { - "$ref": "#/parameters/ApiVersion" + "$ref": "#/parameters/DataApiVersionV2" }, { "$ref": "#/parameters/DataUploadOperationId" @@ -543,106 +348,16 @@ ], "responses": { "200": { - "$ref": "#/responses/200Async" + "$ref": "../../../Common/preview/1.0/common.json#/responses/200AsyncV2" }, - "400": { - "$ref": "#/responses/400" + "default": { + "$ref": "../../../Common/preview/1.0/common.json#/responses/default" } } } } }, "definitions": { - "ODataErrorResponse": { - "type": "object", - "description": "This response object is returned when an error occurs in the Maps API.", - "properties": { - "error": { - "$ref": "#/definitions/ODataError" - } - } - }, - "ODataError": { - "type": "object", - "description": "This object is returned when an error occurs in the 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" @@ -687,12 +402,12 @@ "readOnly": true }, "dataFormat": { - "description": "", + "description": "The current data format.", "type": "string", "readOnly": true }, "description": { - "description": "", + "description": "The current description.", "type": "string", "readOnly": true } diff --git a/specification/maps/data-plane/Microsoft.Maps/Data/preview/2.0/examples/Delete.json b/specification/maps/data-plane/Microsoft.Maps/Data/preview/2.0/examples/Delete.json index b7c4a889fc7d..2e897dae615d 100644 --- a/specification/maps/data-plane/Microsoft.Maps/Data/preview/2.0/examples/Delete.json +++ b/specification/maps/data-plane/Microsoft.Maps/Data/preview/2.0/examples/Delete.json @@ -2,55 +2,9 @@ "parameters": { "geography": "us", "api-version": "2.0", - "subscription-key": "[subscription-key]", "udid": "25084fb7-307a-4720-8f91-7952a0b91012" }, "responses": { - "204": {}, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive." - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found: the requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "An error occurred while processing the request. Please try again later." - } - } - } + "204": {} } } diff --git a/specification/maps/data-plane/Microsoft.Maps/Data/preview/2.0/examples/Download.json b/specification/maps/data-plane/Microsoft.Maps/Data/preview/2.0/examples/Download.json index 4221397b08d7..8c6658d7bbe2 100644 --- a/specification/maps/data-plane/Microsoft.Maps/Data/preview/2.0/examples/Download.json +++ b/specification/maps/data-plane/Microsoft.Maps/Data/preview/2.0/examples/Download.json @@ -2,76 +2,11 @@ "parameters": { "geography": "us", "api-version": "2.0", - "subscription-key": "[subscription-key]", "udid": "25084fb7-307a-4720-8f91-7952a0b91012" }, "responses": { "200": { - "headers": {}, - "body": { - "type": "FeatureCollection", - "features": [ - { - "type": "Feature", - "geometry": { - "type": "Point", - "coordinates": [ - -122.126986, - 47.639754 - ] - }, - "properties": { - "geometryId": "001", - "radius": 500 - } - } - ] - } - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive." - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found: the requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "An error occurred while processing the request. Please try again later." - } - } + "body": "{file}" } } } diff --git a/specification/maps/data-plane/Microsoft.Maps/Data/preview/2.0/examples/GetOperation.json b/specification/maps/data-plane/Microsoft.Maps/Data/preview/2.0/examples/GetOperation.json index 2bef2e8eb555..d200cddb0cf6 100644 --- a/specification/maps/data-plane/Microsoft.Maps/Data/preview/2.0/examples/GetOperation.json +++ b/specification/maps/data-plane/Microsoft.Maps/Data/preview/2.0/examples/GetOperation.json @@ -2,7 +2,6 @@ "parameters": { "geography": "us", "api-version": "2.0", - "subscription-key": "[subscription-key]", "operationId": "8b1288fa-1958-4a2b-b68e-13a7i5af7d7c" }, "responses": { @@ -15,15 +14,6 @@ "headers": { "Resource-Location": "https://us.atlas.microsoft.com/mapData/3e36b996-f6d1-b068-0fcb-dd6b014c3447?api-version=2.0" } - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive." - } - } } } } diff --git a/specification/maps/data-plane/Microsoft.Maps/Data/preview/2.0/examples/GetOperationStillRunning.json b/specification/maps/data-plane/Microsoft.Maps/Data/preview/2.0/examples/GetOperationStillRunning.json index 4a0559be1343..52d48d34f311 100644 --- a/specification/maps/data-plane/Microsoft.Maps/Data/preview/2.0/examples/GetOperationStillRunning.json +++ b/specification/maps/data-plane/Microsoft.Maps/Data/preview/2.0/examples/GetOperationStillRunning.json @@ -2,7 +2,6 @@ "parameters": { "geography": "us", "api-version": "2.0", - "subscription-key": "[subscription-key]", "operationId": "8b1288fa-1958-4a2b-b68e-13a7i5af7d7c" }, "responses": { @@ -12,15 +11,6 @@ "created": "2021-04-23T19:14:03.2452596+00:00", "status": "Running" } - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive." - } - } } } } diff --git a/specification/maps/data-plane/Microsoft.Maps/Data/preview/2.0/examples/List.json b/specification/maps/data-plane/Microsoft.Maps/Data/preview/2.0/examples/List.json index 12b929a1bca9..132cab23e1b5 100644 --- a/specification/maps/data-plane/Microsoft.Maps/Data/preview/2.0/examples/List.json +++ b/specification/maps/data-plane/Microsoft.Maps/Data/preview/2.0/examples/List.json @@ -1,8 +1,7 @@ { "parameters": { "geography": "us", - "api-version": "2.0", - "subscription-key": "[subscription-key]" + "api-version": "2.0" }, "responses": { "200": { @@ -28,51 +27,6 @@ } ] } - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive." - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found: the requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "An error occurred while processing the request. Please try again later." - } - } } } } diff --git a/specification/maps/data-plane/Microsoft.Maps/Data/preview/2.0/examples/Update.json b/specification/maps/data-plane/Microsoft.Maps/Data/preview/2.0/examples/Update.json index daa93e7fb031..a6057f3ec929 100644 --- a/specification/maps/data-plane/Microsoft.Maps/Data/preview/2.0/examples/Update.json +++ b/specification/maps/data-plane/Microsoft.Maps/Data/preview/2.0/examples/Update.json @@ -2,7 +2,6 @@ "parameters": { "geography": "us", "api-version": "2.0", - "subscription-key": "[subscription-key]", "udid": "25084fb7-307a-4720-8f91-7952a0b91012", "UpdateContent": { "type": "FeatureCollection", @@ -25,63 +24,28 @@ } }, "responses": { - "202": { - "headers": { - "Operation-Location": "https://us.atlas.microsoft.com/mapData/operations/{operationId}?api-version=1.0", - "Access-Control-Expose-Headers": "Operation-Location" - } - }, "200": { - "headers": {}, - "body": { - "error": { - "code": "400 Bad Request", - "message": "Upload request failed. Your data has been removed as we encountered the following problems with it: Map data is not a valid GeoJSON geometry." - } - } - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive." - } - } - }, - "401": { - "headers": {}, "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } + "operationId": "8b1288fa-1958-4a2b-b68e-13a7i5af7d7c", + "created": "2021-04-20T22:43:14.9401559+00:00", + "status": "Succeeded" + }, + "headers": { + "Resource-Location": "https://us.atlas.microsoft.com/mapData/3e36b996-f6d1-b068-0fcb-dd6b014c3447?api-version=2.0" } }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found: the requested resource could not be found, but it may be available again in the future." - } + "202": { + "headers": { + "Operation-Location": "https://us.atlas.microsoft.com/mapData/operations/{operationId}?api-version=1.0", + "Access-Control-Expose-Headers": "Operation-Location" } }, - "500": { + "409": { "headers": {}, "body": { "error": { - "code": "500 InternalServerError", - "message": "An error occurred while processing the request. Please try again later." + "code": "409 Conflict", + "message": "The data storage limit is reached on the Azure Maps account. You can always use the Data Delete API to delete old/unused content and create space for new uploads." } } } diff --git a/specification/maps/data-plane/Microsoft.Maps/Data/preview/2.0/examples/Upload.json b/specification/maps/data-plane/Microsoft.Maps/Data/preview/2.0/examples/Upload.json index b6918a7d2d40..f1736046f20f 100644 --- a/specification/maps/data-plane/Microsoft.Maps/Data/preview/2.0/examples/Upload.json +++ b/specification/maps/data-plane/Microsoft.Maps/Data/preview/2.0/examples/Upload.json @@ -2,7 +2,6 @@ "parameters": { "geography": "us", "api-version": "2.0", - "subscription-key": "[subscription-key]", "dataFormat": "geojson", "UploadContent": { "type": "FeatureCollection", @@ -25,63 +24,28 @@ } }, "responses": { - "202": { - "headers": { - "Operation-Location": "https://us.atlas.microsoft.com/mapData/operations/{udid}?api-version=2.0", - "Access-Control-Expose-Headers": "Operation-Location" - } - }, "200": { - "headers": {}, - "body": { - "error": { - "code": "400 Bad Request", - "message": "Upload request failed. Your data has been removed as we encountered the following problems with it: Map data is not a valid GeoJSON geometry." - } - } - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive." - } - } - }, - "401": { - "headers": {}, "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } + "operationId": "8b1288fa-1958-4a2b-b68e-13a7i5af7d7c", + "created": "2021-04-20T22:43:14.9401559+00:00", + "status": "Succeeded" + }, + "headers": { + "Resource-Location": "https://us.atlas.microsoft.com/mapData/3e36b996-f6d1-b068-0fcb-dd6b014c3447?api-version=2.0" } }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found: the requested resource could not be found, but it may be available again in the future." - } + "202": { + "headers": { + "Operation-Location": "https://us.atlas.microsoft.com/mapData/operations/{udid}?api-version=2.0", + "Access-Control-Expose-Headers": "Operation-Location" } }, - "500": { + "409": { "headers": {}, "body": { "error": { - "code": "500 InternalServerError", - "message": "An error occurred while processing the request. Please try again later." + "code": "409 Conflict", + "message": "The data storage limit is reached on the Azure Maps account. You can always use the Data Delete API to delete old/unused content and create space for new uploads." } } } diff --git a/specification/maps/data-plane/Microsoft.Maps/Dataset/preview/1.0/dataset.json b/specification/maps/data-plane/Microsoft.Maps/Dataset/preview/1.0/dataset.json deleted file mode 100644 index 629ca82f3036..000000000000 --- a/specification/maps/data-plane/Microsoft.Maps/Dataset/preview/1.0/dataset.json +++ /dev/null @@ -1,642 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "Azure Maps Dataset Service", - "version": "1.0", - "description": "APIs for managing datasets from uploaded data in Azure Maps." - }, - "x-ms-parameterized-host": { - "hostTemplate": "{geography}.atlas.microsoft.com", - "parameters": [ - { - "$ref": "#/parameters/GeographicResourceLocation" - } - ] - }, - "schemes": [ - "https" - ], - "consumes": [], - "produces": [ - "application/json", - "application/xml" - ], - "securityDefinitions": { - "azure_auth": { - "type": "oauth2", - "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", - "flow": "implicit", - "description": "These are the [Azure Active Directory OAuth2](https://docs.microsoft.com/en-us/azure/active-directory/develop/v1-overview) Flows. When paired with [Azure Role Based Access](https://docs.microsoft.com/en-us/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#### Note\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* The `Authorization URL` is specific to the Azure public cloud instance. Sovereign clouds have unique Authorization URLs and Azure Active directory configurations. \n* 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.\n* Usage of the [Azure Maps Web SDK](https://aka.ms/amaadmc) allows for configuration based setup of an application for multiple use cases.\n* Currently Azure Active Directory [v1.0](https://docs.microsoft.com/en-us/azure/active-directory/develop/azure-ad-endpoint-comparison) tokens are supported.", - "scopes": { - "user_impersonation": "Impersonates a user's Azure Active Directory account." - } - }, - "apiKeyQuery": { - "type": "apiKey", - "description": "This is a shared key which 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 which 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": "query" - } - }, - "security": [ - { - "azure_auth": [] - }, - { - "apiKeyQuery": [] - } - ], - "responses": { - "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 Azure Active Directory 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 AAD bearer token.", - "schema": { - "$ref": "#/definitions/ODataErrorResponse" - }, - "headers": { - "WWW-Authenticate": { - "type": "string", - "description": "Bearer realm=\"https://atlas.microsoft.com/\", error=\"invalid_token\", error_description=\"The access token expired\"" - } - } - }, - "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" - } - }, - "200Async": { - "description": "The operation's status response.", - "schema": { - "$ref": "#/definitions/LongRunningOperationResult" - } - }, - "201Async": { - "description": "The resource has been created successfully.", - "schema": { - "$ref": "#/definitions/LongRunningOperationResult" - }, - "headers": { - "Location": { - "type": "string", - "description": "A URI where details on the newly created resource can be found." - } - } - }, - "202Async": { - "description": "**Supported only for async request.**\nRequest Accepted: The request has been accepted for processing. Please use the URL in the Location Header to retry or access the results.", - "headers": { - "Location": { - "type": "string", - "description": "New URL to check for the results of the long running process." - } - } - } - }, - "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" - }, - "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 1.0", - "type": "string", - "in": "query", - "required": true, - "default": "1.0", - "x-ms-parameter-location": "client" - }, - "ConversionIdQuery": { - "name": "conversionId", - "description": "The unique ID used to create the dataset. The `conversionId` must have been obtained from a successful call to the Conversion Service Convert API and must be provided with multiple query parameters with same name (if more than one is provided). May not be provided in conjunction with the `udid` query parameter.", - "type": "string", - "in": "query", - "required": false, - "x-ms-parameter-location": "method" - }, - "UdidDataset": { - "name": "udid", - "description": "The unique data ID used to create the dataset. The `udid` must have been obtained from a successful call to the Data Service Upload API and must be provided with multiple query parameters with the same name (if more than one is provided). May not be provided in conjunction with `conversionId` query parameter.", - "type": "string", - "in": "query", - "required": false, - "x-ms-parameter-location": "method" - }, - "DescriptionDataset": { - "name": "description", - "description": "The description to be given to the dataset.", - "type": "string", - "in": "query", - "required": false, - "x-ms-parameter-location": "method" - }, - "DatasetId": { - "name": "datasetId", - "type": "string", - "in": "path", - "description": "The identifier for the dataset to query from.", - "required": true, - "x-ms-parameter-location": "method" - }, - "Type": { - "name": "type", - "type": "string", - "in": "query", - "description": "The type of data to create the dataset with.", - "enum": [ - "facility" - ], - "x-ms-enum": { - "name": "DatasetType", - "modelAsString": true, - "values": [ - { - "value": "facility", - "description": "Facility Maps data type." - } - ] - }, - "required": true, - "x-ms-parameter-location": "method" - }, - "ImportUdid": { - "name": "udid", - "description": "The unique data ID used to import data into the dataset. The `udid` must have been obtained from a successful call to the Data Service Upload API.", - "type": "string", - "in": "query", - "required": false, - "x-ms-parameter-location": "method" - }, - "ImportType": { - "name": "type", - "type": "string", - "in": "query", - "description": "The type of data to import into the dataset with.", - "enum": [ - "fixture" - ], - "x-ms-enum": { - "name": "ImportDataType", - "modelAsString": true, - "values": [ - { - "value": "fixture", - "description": "Area and point element data." - } - ] - }, - "required": true, - "x-ms-parameter-location": "method" - }, - "AppendDatasetId": { - "name": "datasetId", - "type": "string", - "in": "query", - "description": "The ID for the dataset to append to.", - "required": false, - "x-ms-parameter-location": "method" - }, - "StatusId": { - "name": "statusId", - "type": "string", - "in": "path", - "description": "The ID to query the status for the dataset create/import request.", - "required": true, - "x-ms-parameter-location": "method" - } - }, - "paths": { - "/dataset/create": { - "post": { - "x-publish": true, - "description": "**Dataset Create API**\n\n**Applies to**: see pricing [tiers](https://azure.microsoft.com/en-us/pricing/details/azure-maps/).\n\nCreator makes it possible to develop applications based on your private indoor map data using Azure Maps API \nand SDK. The Dataset APIs are part of Creator. This API allows the caller to create a dataset from data that \nwas uploaded to the Azure Maps Data Service.\n\nYou can use this API in a scenario like uploading a DWG zip package for a building, converting the zip package using \nthe Azure Maps Conversion Service, creating a dataset from the converted zip package. The created dataset can be \nused to create tilesets using the Azure Maps Tileset Service and can be queried via the Azure Maps WFS Service.\n\n## Submit Create Request\n\nTo create your dataset, you will use a `POST` request where the `conversionId` query parameter is an id that represents \nthe converted DWG zip package, the `type` parameter will describe the data type to use for the dataset, the `datasetId`\nparameter will describe if the provided data should be appended to a current dataset and, optionally, the \n`description` query parameter will contain a description (if description is not provided a default description will be \ngiven).\n\nThe Create API is a \n[long-running request](https://aka.ms/am-creator-lrt).", - "operationId": "Dataset_CreatePreview", - "x-ms-long-running-operation": true, - "x-ms-long-running-operation-options": { - "final-state-via": "location" - }, - "x-ms-examples": { - "Create dataset from a converted CAD file provided by conversionId": { - "$ref": "./examples/Dataset_Create.json" - } - }, - "parameters": [ - { - "$ref": "#/parameters/SubscriptionKey" - }, - { - "$ref": "#/parameters/ApiVersion" - }, - { - "$ref": "#/parameters/ConversionIdQuery" - }, - { - "$ref": "#/parameters/UdidDataset" - }, - { - "$ref": "#/parameters/Type" - }, - { - "$ref": "#/parameters/AppendDatasetId" - }, - { - "$ref": "#/parameters/DescriptionDataset" - } - ], - "responses": { - "201": { - "$ref": "#/responses/201Async" - }, - "202": { - "$ref": "#/responses/202Async" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" - } - } - } - }, - "/dataset/import/{datasetId}": { - "patch": { - "x-publish": true, - "description": "**Dataset Import API**\n\n**Applies to**: see pricing [tiers](https://azure.microsoft.com/en-us/pricing/details/azure-maps/).\n
\n\nCreator makes it possible to develop applications based on your private indoor map data using Azure Maps API \nand SDK. The Dataset APIs are part of Creator. This API allows the caller to bulk import data into a dataset \nfrom data that was uploaded to the Azure Maps Data service.
\n\n### Submit Import Request\n\nTo import data into your dataset, you will use a `PATCH` request where the `datasetId` query parameter is the \ndataset you want to import your data into, the `udid` query parameter is the data you want to import, and the `type` \nparameter will describe the data type to use for the import data.
\n\nThe Import API is a \n[long-running request](https://aka.ms/am-creator-lrt).", - "operationId": "Dataset_ImportPreview", - "x-ms-examples": { - "Import data into previously created dataset": { - "$ref": "./examples/Dataset_Import.json" - } - }, - "parameters": [ - { - "$ref": "#/parameters/SubscriptionKey" - }, - { - "$ref": "#/parameters/ApiVersion" - }, - { - "$ref": "#/parameters/DatasetId" - }, - { - "$ref": "#/parameters/ImportUdid" - }, - { - "$ref": "#/parameters/ImportType" - } - ], - "responses": { - "200": { - "$ref": "#/responses/200Async" - }, - "202": { - "$ref": "#/responses/202Async" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" - } - } - } - }, - "/dataset/{datasetId}": { - "delete": { - "x-publish": true, - "description": "**Dataset Delete API**\n\n**Applies to**: see pricing [tiers](https://azure.microsoft.com/en-us/pricing/details/azure-maps/).\n
\n\nCreator makes it possible to develop applications based on your private indoor map data using Azure Maps API and SDK. The Dataset APIs are part of Creator.\nThis API allows the caller to delete a previously created dataset.
\nYou can also use this API to delete old/unused datasets to create space for new Creator content.\n\n\n### Submit Delete Request\n\nTo delete your content you will issue a `DELETE` request where the path will contain the `datasetId` of the dataset to delete.
\n\n\n### Delete Data Response\n\nThe Delete API returns a HTTP `204 No Content` response if the dataset resource was deleted successfully.
", - "operationId": "Dataset_DeletePreview", - "x-ms-examples": { - "Delete previously created dataset": { - "$ref": "./examples/Dataset_Delete.json" - } - }, - "parameters": [ - { - "$ref": "#/parameters/SubscriptionKey" - }, - { - "$ref": "#/parameters/ApiVersion" - }, - { - "$ref": "#/parameters/DatasetId" - } - ], - "responses": { - "204": { - "description": "The dataset delete request completed successfully. The resource referenced by the `datasetId` was deleted from the server.", - "schema": { - "$ref": "#/definitions/DatasetDeleteResponse" - } - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" - } - } - } - }, - "/dataset": { - "get": { - "x-publish": true, - "description": "**Dataset List API**\n\n**Applies to**: see pricing [tiers](https://azure.microsoft.com/en-us/pricing/details/azure-maps/).\n
\n\nCreator makes it possible to develop applications based on your private indoor map data using Azure Maps API and SDK. The Dataset APIs are part of Creator.\nThis API allows the caller to fetch a list of all previously successfully created datasets.\n\n\n### Submit List Request\n\nTo list all your datasets, you will issue a `GET` request with no additional parameters.
\n\n\n### List Data Response\n\nThe List API returns the complete list of all datasets in `json` format. The response contains the following fields (if they are not null or empty):\n > created - The timestamp the dataset was created.\n > datasetId - The id for the dataset.\n > description - The description for the dataset.\n > datasetSources - The source data that was used when the create request was issued.\n\nThe `datasetSources` describes the source data that was used when the create request was issued and contains the following elements (if they are not null or empty):\n > conversionIds - The list of `conversionId` (null if none were provided).\n > udids - The list of `udid` (null if none were provided).\n > appendDatasetId - The `datasetId` that was used for an append operation (null if none was used).\n > type - The type of data stored in the dataset that was created.\n\nHere's a sample response returning the `timestamp`, `datasetId`, `description`, and `datasetSources` of 3 dataset resources:\n\n
\n\n```json\n{\n \"datasets\": [\n {\n \"timestamp\": \"2020-01-01T22:50:48+00:00\",\n \"datasetId\": \"f6495f62-94f8-0ec2-c252-45626f82fcb2\",\n \"description\": \"Some description or comment for the dataset.\",\n \"datasetSources\": {\n \"conversionIds\": [\n \"15d21452-c9bb-27b6-5e79-743ca5c3205d\"\n ],\n \"type\": \"facility\"\n },\n \"status\": \"Succeeded\"\n },\n {\n \"timestamp\": \"2020-01-01T22:57:53+00:00\",\n \"datasetId\": \"8b1288fa-1958-4a2b-b68e-13a7i5af7d7c\",\n \"description\": \"Create from upload '0c1288fa-2058-4a1b-b68d-13a5f5af7d7c'.\",\n \"datasetSources\": {\n \"udids\": [\n \"0c1288fa-2058-4a1b-b68d-13a5f5af7d7c\"\n ],\n \"type\": \"facility\"\n },\n \"status\": \"Succeeded\"\n },\n {\n \"timestamp\": \"2020-01-01T20:39:36+00:00\",\n \"datasetId\": \"7c1288fa-2058-4a1b-b68f-13a6h5af7d7c\",\n \"description\": \"Some other description or comment for the dataset.\",\n \"datasetSources\": {\n \"conversionIds\": [\n \"15d21452-c9bb-27b6-5e79-743ca5c3205d\"\n ],\n \"appendDatasetId\": \"8b1288fa-1958-4a2b-b68e-13a7i5af7d7c\",\n \"type\": \"facility\"\n },\n \"status\": \"Succeeded\"\n }\n ]\n}\n```\n
", - "operationId": "Dataset_ListPreview", - "x-ms-examples": { - "List all the previously created datasets": { - "$ref": "./examples/Dataset_List.json" - } - }, - "parameters": [ - { - "$ref": "#/parameters/SubscriptionKey" - }, - { - "$ref": "#/parameters/ApiVersion" - } - ], - "responses": { - "200": { - "description": "The list dataset request completed successfully. The response body contains a list of all the previously created datasets.", - "schema": { - "$ref": "#/definitions/DatasetListResponse" - } - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" - } - } - } - } - }, - "definitions": { - "ODataErrorResponse": { - "type": "object", - "description": "This response object is returned when an error occurs in the Maps API.", - "properties": { - "error": { - "$ref": "#/definitions/ODataError" - } - } - }, - "ODataError": { - "type": "object", - "description": "This object is returned when an error occurs in the 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 - }, - "resourceLocation": { - "description": "The location URI for details about the created resource. This is only provided when the request was successfully completed.", - "type": "string", - "readOnly": true - }, - "error": { - "$ref": "#/definitions/ODataError" - }, - "warning": { - "$ref": "#/definitions/ODataError" - } - } - }, - "DatasetDeleteResponse": { - "description": "The response model for the Dataset Delete API. The response body will be empty signifying there's no content available for the `datasetId` anymore.", - "type": "object" - }, - "DatasetListResponse": { - "description": "The response model for the Dataset List API. The response body will contain a list of all the previously created datasets.", - "type": "object", - "properties": { - "datasets": { - "description": "A list of all the previously created datasets.", - "type": "array", - "readOnly": true, - "items": { - "$ref": "#/definitions/DatasetDetailInfo" - } - } - } - }, - "DatasetDetailInfo": { - "description": "Detail information for the dataset.", - "type": "object", - "properties": { - "created": { - "description": "The created timestamp for the dataset.", - "type": "string", - "readOnly": true - }, - "datasetId": { - "description": "The id for the dataset.", - "type": "string", - "readOnly": true - }, - "description": { - "description": "The description for the dataset.", - "type": "string", - "readOnly": true - }, - "datasetSources": { - "$ref": "#/definitions/DatasetSources" - }, - "featureCounts": { - "description": "The feature counts for the dataset.", - "type": "object", - "readOnly": true - } - } - }, - "DatasetSources": { - "description": "Information about the details of the create request for the dataset.", - "type": "object", - "properties": { - "conversionIds": { - "description": "The list of `conversionId` that were used to create the dataset.", - "type": "array", - "readOnly": true, - "items": { - "type": "string" - } - }, - "udids": { - "description": "The list of `conversionId` that were used to create the dataset.", - "type": "array", - "readOnly": true, - "items": { - "type": "string" - } - }, - "appendDatasetId": { - "description": "The dataset that was appended to to create the current dataset.", - "type": "string", - "readOnly": true - }, - "type": { - "description": "The type of data stored in the dataset.", - "type": "string", - "readOnly": true - } - } - }, - "DatasetGetDetailsResponse": { - "$ref": "#/definitions/DatasetDetailInfo" - } - } -} diff --git a/specification/maps/data-plane/Microsoft.Maps/Dataset/preview/1.0/examples/Dataset_Create.json b/specification/maps/data-plane/Microsoft.Maps/Dataset/preview/1.0/examples/Dataset_Create.json deleted file mode 100644 index e59db5d0820e..000000000000 --- a/specification/maps/data-plane/Microsoft.Maps/Dataset/preview/1.0/examples/Dataset_Create.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "parameters": { - "geography": "us", - "api-version": "1.0", - "subscription-key": "[subscription-key]", - "conversionId": "[conversionId]", - "type": "facility" - }, - "responses": { - "201": { - "headers": { - "Location": "https://us.atlas.microsoft.com/dataset/{datasetId}?api-version=1.0", - "Access-Control-Expose-Headers": "Location" - }, - "body": { - "operationId": "{operationId}", - "status": "Succeeded", - "created": "2020-01-02 1:02:03 AM +00:00", - "resourceLocation": "https://us.atlas.microsoft.com/dataset/{datasetId}?api-version=1.0" - } - }, - "202": { - "headers": { - "Location": "https://us.atlas.microsoft.com/dataset/operations/{operationId}?api-version=1.0", - "Access-Control-Expose-Headers": "Location" - } - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request - Error message." - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found - The requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "Unknown error - An error occurred while processing the request. Please try again later." - } - } - } - } -} diff --git a/specification/maps/data-plane/Microsoft.Maps/Dataset/preview/1.0/examples/Dataset_Delete.json b/specification/maps/data-plane/Microsoft.Maps/Dataset/preview/1.0/examples/Dataset_Delete.json deleted file mode 100644 index 865652b9cbd8..000000000000 --- a/specification/maps/data-plane/Microsoft.Maps/Dataset/preview/1.0/examples/Dataset_Delete.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "parameters": { - "geography": "us", - "api-version": "1.0", - "subscription-key": "[subscription-key]", - "datasetId": "[datasetId]" - }, - "responses": { - "204": { - "body": {} - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request - One or more parameters were incorrectly specified or are mutually exclusive." - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found - The requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "Unknown error - An error occurred while processing the request. Please try again later." - } - } - } - } -} diff --git a/specification/maps/data-plane/Microsoft.Maps/Dataset/preview/1.0/examples/Dataset_Import.json b/specification/maps/data-plane/Microsoft.Maps/Dataset/preview/1.0/examples/Dataset_Import.json deleted file mode 100644 index 074bd5c20371..000000000000 --- a/specification/maps/data-plane/Microsoft.Maps/Dataset/preview/1.0/examples/Dataset_Import.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "parameters": { - "geography": "us", - "api-version": "1.0", - "subscription-key": "[subscription-key]", - "datasetId": "[conversionId]", - "udid": "[udid]", - "type": "fixture" - }, - "responses": { - "200": { - "headers": {}, - "body": { - "operationId": "{operationId}", - "status": "Succeeded", - "created": "2020-01-02 03:04:05 AM +00:00", - "resourceLocation": "https://us.atlas.microsoft.com/dataset/{datasetId}?api-version=1.0" - } - }, - "202": { - "headers": { - "Location": "https://us.atlas.microsoft.com/dataset/operations/{operationId}?api-version=1.0", - "Access-Control-Expose-Headers": "Location" - } - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request - Error message." - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found - The requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "Unknown error - An error occurred while processing the request. Please try again later." - } - } - } - } -} diff --git a/specification/maps/data-plane/Microsoft.Maps/Dataset/preview/1.0/examples/Dataset_List.json b/specification/maps/data-plane/Microsoft.Maps/Dataset/preview/1.0/examples/Dataset_List.json deleted file mode 100644 index 70a28edebb38..000000000000 --- a/specification/maps/data-plane/Microsoft.Maps/Dataset/preview/1.0/examples/Dataset_List.json +++ /dev/null @@ -1,117 +0,0 @@ -{ - "parameters": { - "geography": "us", - "api-version": "1.0", - "subscription-key": "[subscription-key]" - }, - "responses": { - "200": { - "body": { - "datasets": [ - { - "created": "2020-01-02 3:04:05 AM +00:00", - "datasetId": "f6495f62-94f8-0ec2-c252-45626f82fcb2", - "description": "Some description or comment for the dataset.", - "datasetSources": { - "conversionIds": [ - "15d21452-c9bb-27b6-5e79-743ca5c3205d" - ], - "type": "facility" - }, - "featureCounts": { - "directoryInfo": 1, - "category": 18, - "facility": 1, - "level": 6, - "unit": 775, - "opening": 471, - "areaElement": 496 - } - }, - { - "created": "2020-01-02 3:04:05 PM +00:00", - "datasetId": "8b1288fa-1958-4a2b-b68e-13a7i5af7d7c", - "description": "Create from upload '0c1288fa-2058-4a1b-b68d-13a5f5af7d7c'.", - "datasetSources": { - "udids": [ - "0c1288fa-2058-4a1b-b68d-13a5f5af7d7c" - ], - "type": "facility" - }, - "featureCounts": { - "directoryInfo": 1, - "category": 2, - "facility": 1, - "level": 6, - "unit": 19 - } - }, - { - "created": "2020-01-02 3:04:05 AM +00:00", - "datasetId": "7c1288fa-2058-4a1b-b68f-13a6h5af7d7c", - "description": "Some other description or comment for the dataset.", - "datasetSources": { - "conversionIds": [ - "15d21452-c9bb-27b6-5e79-743ca5c3205d" - ], - "appendDatasetId": "8b1288fa-1958-4a2b-b68e-13a7i5af7d7c", - "type": "facility" - }, - "featureCounts": { - "directoryInfo": 1, - "category": 1, - "facility": 1, - "level": 1, - "unit": 10 - } - } - ] - } - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request - One or more parameters were incorrectly specified or are mutually exclusive." - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found - The requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "Unknown error - An error occurred while processing the request. Please try again later." - } - } - } - } -} diff --git a/specification/maps/data-plane/Microsoft.Maps/Dataset/preview/2.0/dataset.json b/specification/maps/data-plane/Microsoft.Maps/Dataset/preview/2.0/dataset.json index 28318cb9aa31..f68eeb08747f 100644 --- a/specification/maps/data-plane/Microsoft.Maps/Dataset/preview/2.0/dataset.json +++ b/specification/maps/data-plane/Microsoft.Maps/Dataset/preview/2.0/dataset.json @@ -9,7 +9,7 @@ "hostTemplate": "{geography}.atlas.microsoft.com", "parameters": [ { - "$ref": "#/parameters/GeographicResourceLocation" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/GeographicResourceLocation" } ] }, @@ -18,8 +18,20 @@ ], "consumes": [], "produces": [ - "application/json", - "application/xml" + "application/json" + ], + "security": [ + { + "azure_auth": [ + "user_impersonation" + ] + }, + { + "SubscriptionKeyInHeader": [] + }, + { + "SubscriptionKeyInQuery": [] + } ], "securityDefinitions": { "azure_auth": { @@ -28,122 +40,25 @@ "flow": "implicit", "description": "These are the [Azure Active Directory OAuth2](https://docs.microsoft.com/en-us/azure/active-directory/develop/v1-overview) Flows. When paired with [Azure Role Based Access](https://docs.microsoft.com/en-us/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#### Note\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* The `Authorization URL` is specific to the Azure public cloud instance. Sovereign clouds have unique Authorization URLs and Azure Active directory configurations. \n* 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.\n* Usage of the [Azure Maps Web SDK](https://aka.ms/amaadmc) allows for configuration based setup of an application for multiple use cases.\n* Currently Azure Active Directory [v1.0](https://docs.microsoft.com/en-us/azure/active-directory/develop/azure-ad-endpoint-comparison) tokens are supported.", "scopes": { - "user_impersonation": "Impersonates a user's Azure Active Directory account." + "user_impersonation": "impersonate your user account" } }, - "apiKeyQuery": { + "SubscriptionKeyInHeader": { "type": "apiKey", - "description": "This is a shared key which 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 which 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": "query" - } - }, - "security": [ - { - "azure_auth": [] - }, - { - "apiKeyQuery": [] - } - ], - "responses": { - "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 Azure Active Directory 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 AAD bearer token.", - "schema": { - "$ref": "#/definitions/ODataErrorResponse" - }, - "headers": { - "WWW-Authenticate": { - "type": "string", - "description": "Bearer realm=\"https://atlas.microsoft.com/\", error=\"invalid_token\", error_description=\"The access token expired\"" - } - } - }, - "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" - } - }, - "200Async": { - "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" - }, - "headers": { - "Resource-Location": { - "type": "string", - "description": "If successful, a URI where details on the newly created resource can be found." - } - } + "in": "header" }, - "202Accepted": { - "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 process." - } - } + "SubscriptionKeyInQuery": { + "type": "apiKey", + "name": "subscription-key", + "in": "query" } }, + "responses": {}, "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" - }, - "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": { + "DataApiVersionV2": { "name": "api-version", - "description": "Version number of Azure Maps API. Current version is 2.0", + "description": "Version number of Azure Maps API.", "type": "string", "in": "query", "required": true, @@ -160,10 +75,10 @@ }, "DescriptionDataset": { "name": "description", + "x-ms-client-name": "DescriptionDataset", "description": "The description to be given to the dataset.", "type": "string", "in": "query", - "required": false, "x-ms-parameter-location": "method" }, "DatasetId": { @@ -179,7 +94,6 @@ "type": "string", "in": "query", "description": "The ID for the dataset to append with. The dataset must originate from a previous dataset creation call that matches the datasetId", - "required": false, "x-ms-parameter-location": "method" }, "DatasetOperationId": { @@ -194,9 +108,12 @@ "paths": { "/datasets": { "post": { - "x-publish": true, "description": "**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).\n\nCreator makes it possible to develop applications based on your private indoor map data using Azure Maps API and SDK. [This](https://docs.microsoft.com/azure/azure-maps/creator-indoor-maps) article introduces concepts and tools that apply to Azure Maps Creator.\n\n This API allows the caller to create a dataset from data that was uploaded to the Azure Maps Data Service and converted using the Azure Maps Conversion Service.\n\nYou can use this API in a scenario like uploading a DWG zip package for a building, converting the zip package using the Azure Maps Conversion Service, and creating a dataset from the converted zip package. The created dataset can be used to create tilesets using the Azure Maps Tileset Service and can be queried via the Azure Maps WFS Service.\n\n### Submit Create Request\n\nTo create your dataset, you will use a `POST` request where the `conversionId` query parameter is an ID that represents the converted DWG zip package, the `datasetId` parameter will be the ID of a previously created dataset to append with the current dataset and, optionally, the `description` query parameter will contain a description (if description is not provided a default description will be given).\n\nThe Create API is a [long-running request](https://aka.ms/am-creator-lrt-v2).", "operationId": "Dataset_Create", + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, "x-ms-examples": { "Create dataset from a converted CAD file provided by conversionId": { "$ref": "./examples/Dataset_Create.json" @@ -204,10 +121,7 @@ }, "parameters": [ { - "$ref": "#/parameters/SubscriptionKey" - }, - { - "$ref": "#/parameters/ApiVersion" + "$ref": "#/parameters/DataApiVersionV2" }, { "$ref": "#/parameters/ConversionIdQuery" @@ -220,28 +134,18 @@ } ], "responses": { - "202": { - "$ref": "#/responses/202Accepted" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" + "200": { + "$ref": "../../../Common/preview/1.0/common.json#/responses/200AsyncV2" }, - "404": { - "$ref": "#/responses/404" + "202": { + "$ref": "../../../Common/preview/1.0/common.json#/responses/202AsyncV2" }, - "500": { - "$ref": "#/responses/500" + "default": { + "$ref": "../../../Common/preview/1.0/common.json#/responses/default" } } }, "get": { - "x-publish": true, "description": "**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).\n\nCreator makes it possible to develop applications based on your private indoor map data using Azure Maps API and SDK. [This](https://docs.microsoft.com/azure/azure-maps/creator-indoor-maps) article introduces concepts and tools that apply to Azure Maps Creator.\n\nThis API allows the caller to fetch a list of all previously successfully created datasets.\n\n### Submit List Request\n\nTo list all your datasets, you will issue a `GET` request with no additional parameters.\n\n\n### List Data Response\n\nThe List API returns the complete list of all datasets in `json` format. The response contains the following fields (if they are not null or empty):\n> created - The timestamp the dataset was created.\n> datasetId - The id for the dataset.\n> description - The description for the dataset.\n> datasetSources - The source data that was used when the create request was issued.\n> ontology - The source [ontology](https://docs.microsoft.com/en-us/azure/azure-maps/creator-facility-ontology) that was used in the conversion service for the input data.
\n\nThe `datasetSources` describes the source data that was used when the create request was issued and contains the following elements (if they are not null or empty):\n\n> conversionIds - The list of `conversionId` (null if none were provided).\n> appendDatasetId - The `datasetId` that was used for an append operation (null if none was used).\n>featureCounts - The counts for each feature type in the dataset.
\n\nHere's a sample response returning the `timestamp`, `datasetId`, `description`, `datasetSources`, and `ontology` of 3 dataset resources:\n\n\n```json\n{\n \"datasets\": [\n {\n \"timestamp\": \"2020-01-01T22:50:48.123Z\",\n \"datasetId\": \"f6495f62-94f8-0ec2-c252-45626f82fcb2\",\n \"description\": \"Some description or comment for the dataset.\",\n \"datasetSources\": {\n \"conversionIds\": [\n \"15d21452-c9bb-27b6-5e79-743ca5c3205d\"\n ], },\n \"ontology\": \"facility-2.0\",\n \"featureCounts\": {\n \"directoryInfo\": 2,\n \"category\": 10,\n \"facility\": 1,\n \"level\": 3,\n \"unit\": 183,\n \"zone\": 3,\n \"verticalPenetration\": 6,\n \"opening\": 48,\n \"areaElement\": 108\n }\n },\n {\n \"timestamp\": \"2020-01-01T22:57:53.123Z\",\n \"datasetId\": \"8b1288fa-1958-4a2b-b68e-13a7i5af7d7c\",\n \"description\": \"Create from upload '0c1288fa-2058-4a1b-b68d-13a5f5af7d7c'.\",\n \"datasetSources\": {\n \"conversionIds\": [\n \"0c1288fa-2058-4a1b-b68d-13a5f5af7d7c\"\n ],\n \"appendDatasetId\": \"46d1edb6-d29e-4786-9589-dbd4efd7a977\"\n },\n \"ontology\": \"facility-2.0\",\n \"featureCounts\": {\n \"directoryInfo\": 2,\n \"category\": 10,\n \"facility\": 1,\n \"level\": 3,\n \"unit\": 183,\n \"zone\": 3,\n \"verticalPenetration\": 6,\n \"opening\": 48,\n \"areaElement\": 108\n }\n }\n ]\n}\n```", "operationId": "Dataset_List", "x-ms-examples": { @@ -251,12 +155,13 @@ }, "parameters": [ { - "$ref": "#/parameters/SubscriptionKey" - }, - { - "$ref": "#/parameters/ApiVersion" + "$ref": "#/parameters/DataApiVersionV2" } ], + "x-ms-pageable": { + "itemName": "datasets", + "nextLinkName": "nextLink" + }, "responses": { "200": { "description": "The dataset request completed successfully. The response body contains the previously created dataset.", @@ -264,27 +169,14 @@ "$ref": "#/definitions/DatasetListResponse" } }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" + "default": { + "$ref": "../../../Common/preview/1.0/common.json#/responses/default" } } } }, "/datasets/{datasetId}": { "get": { - "x-publish": true, "description": "**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).\n\nCreator makes it possible to develop applications based on your private indoor map data using Azure Maps API and SDK. [This](https://docs.microsoft.com/azure/azure-maps/creator-indoor-maps) article introduces concepts and tools that apply to Azure Maps Creator.\n\nThis API allows the caller to fetch a previously successfully created dataset.\n\n### Submit Get Details Request\n\nTo get the details for a previously created dataset, you will issue a `GET` request with the `datasetId` in the path.\n\n### Get Details Response\n\nThe Get Details API returns the details for a dataset in `json` format. The response contains the following fields (if they are not null or empty):\n> created - The timestamp the dataset was created.\n> datasetId - The id for the dataset.\n> description - The description for the dataset.\n> datasetSources - The source data that was used when the create request was issued.\n> ontology - The source [ontology](https://docs.microsoft.com/en-us/azure/azure-maps/creator-facility-ontology) that was used in the conversion service for the input data.
\n\nThe `datasetSources` describes the source data that was used when the create request was issued and contains the following elements (if they are not null or empty):\n> conversionIds - The list of `conversionId` (null if none were provided).\n> appendDatasetId - The `datasetId` that was used for an append operation (null if none was used).\n>featureCounts - The counts for each feature type in the dataset.
\n\nHere's a sample response returning the `timestamp`, `datasetId`, `description`, `datasetSources`, and `ontology` of a dataset resource:\n\n```json\n{\n \"timestamp\": \"2020-01-01T22:50:48.123Z\",\n \"datasetId\": \"f6495f62-94f8-0ec2-c252-45626f82fcb2\",\n \"description\": \"Some description or comment for the dataset.\",\n \"datasetSources\": {\n \"conversionIds\": [\n \"15d21452-c9bb-27b6-5e79-743ca5c3205d\"\n ],\n },\n \"ontology\": \"facility-2.0\",\n \"featureCounts\": {\n \"directoryInfo\": 2,\n \"category\": 10,\n \"facility\": 1,\n \"level\": 3,\n \"unit\": 183,\n \"zone\": 3,\n \"verticalPenetration\": 6,\n \"opening\": 48,\n \"areaElement\": 108\n }\n }\n```", "operationId": "Dataset_Get", "x-ms-examples": { @@ -297,10 +189,7 @@ "$ref": "#/parameters/DatasetId" }, { - "$ref": "#/parameters/SubscriptionKey" - }, - { - "$ref": "#/parameters/ApiVersion" + "$ref": "#/parameters/DataApiVersionV2" } ], "responses": { @@ -310,25 +199,12 @@ "$ref": "#/definitions/DatasetDetailInfo" } }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" + "default": { + "$ref": "../../../Common/preview/1.0/common.json#/responses/default" } } }, "delete": { - "x-publish": true, "description": "**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).\n\nCreator makes it possible to develop applications based on your private indoor map data using Azure Maps API and SDK. [This](https://docs.microsoft.com/azure/azure-maps/creator-indoor-maps) article introduces concepts and tools that apply to Azure Maps Creator.\n\nYou can also use this API to delete old/unused datasets to create space for new Creator content.\n\n### Submit Delete Request\n\nTo delete your content you will issue a `DELETE` request where the path will contain the `datasetId` of the dataset to delete.", "operationId": "Dataset_Delete", "x-ms-examples": { @@ -338,10 +214,7 @@ }, "parameters": [ { - "$ref": "#/parameters/SubscriptionKey" - }, - { - "$ref": "#/parameters/ApiVersion" + "$ref": "#/parameters/DataApiVersionV2" }, { "$ref": "#/parameters/DatasetId" @@ -351,20 +224,8 @@ "204": { "description": "The dataset delete request completed successfully. The resource referenced by the `datasetId` was deleted from the server." }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" + "default": { + "$ref": "../../../Common/preview/1.0/common.json#/responses/default" } } } @@ -383,10 +244,7 @@ }, "parameters": [ { - "$ref": "#/parameters/SubscriptionKey" - }, - { - "$ref": "#/parameters/ApiVersion" + "$ref": "#/parameters/DataApiVersionV2" }, { "$ref": "#/parameters/DatasetOperationId" @@ -394,106 +252,16 @@ ], "responses": { "200": { - "$ref": "#/responses/200Async" + "$ref": "../../../Common/preview/1.0/common.json#/responses/200AsyncV2" }, - "400": { - "$ref": "#/responses/400" + "default": { + "$ref": "../../../Common/preview/1.0/common.json#/responses/default" } } } } }, "definitions": { - "ODataErrorResponse": { - "type": "object", - "description": "This response object is returned when an error occurs in the Maps API.", - "properties": { - "error": { - "$ref": "#/definitions/ODataError" - } - } - }, - "ODataError": { - "type": "object", - "description": "This object is returned when an error occurs in the 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" - } - } - }, "DatasetListResponse": { "description": "The response model for the Dataset List API. The response body will contain a list of all the previously created datasets.", "type": "object", @@ -528,9 +296,7 @@ "readOnly": true }, "ontology": { - "description": "", - "type": "string", - "readOnly": true + "$ref": "../../../Common/preview/1.0/common.json#/definitions/Ontology" }, "description": { "description": "The description for the dataset.", diff --git a/specification/maps/data-plane/Microsoft.Maps/Dataset/preview/2.0/examples/Dataset_Create.json b/specification/maps/data-plane/Microsoft.Maps/Dataset/preview/2.0/examples/Dataset_Create.json index 78ef1912aeed..df5d8e659524 100644 --- a/specification/maps/data-plane/Microsoft.Maps/Dataset/preview/2.0/examples/Dataset_Create.json +++ b/specification/maps/data-plane/Microsoft.Maps/Dataset/preview/2.0/examples/Dataset_Create.json @@ -2,60 +2,24 @@ "parameters": { "geography": "us", "api-version": "2.0", - "subscription-key": "[subscription-key]", "conversionId": "[conversionId]" }, "responses": { + "200": { + "body": { + "operationId": "8b1288fa-1958-4a2b-b68e-13a7i5af7d7c", + "created": "2021-04-20T22:43:14.9401559+00:00", + "status": "Succeeded" + }, + "headers": { + "Resource-Location": "https://us.atlas.microsoft.com/mapData/3e36b996-f6d1-b068-0fcb-dd6b014c3447?api-version=2.0" + } + }, "202": { "headers": { "Operation-Location": "https://us.atlas.microsoft.com/datasets/operations/{operationId}?api-version=2.0", "Access-Control-Expose-Headers": "Operation-Location" } - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request - Error message." - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found - The requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "Unknown error - An error occurred while processing the request. Please try again later." - } - } } } } diff --git a/specification/maps/data-plane/Microsoft.Maps/Dataset/preview/2.0/examples/Dataset_Delete.json b/specification/maps/data-plane/Microsoft.Maps/Dataset/preview/2.0/examples/Dataset_Delete.json index 93c5dc5ed157..b2193a7993db 100644 --- a/specification/maps/data-plane/Microsoft.Maps/Dataset/preview/2.0/examples/Dataset_Delete.json +++ b/specification/maps/data-plane/Microsoft.Maps/Dataset/preview/2.0/examples/Dataset_Delete.json @@ -2,55 +2,9 @@ "parameters": { "geography": "us", "api-version": "2.0", - "subscription-key": "[subscription-key]", "datasetId": "[datasetId]" }, "responses": { - "204": {}, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request - One or more parameters were incorrectly specified or are mutually exclusive." - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found - The requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "Unknown error - An error occurred while processing the request. Please try again later." - } - } - } + "204": {} } } diff --git a/specification/maps/data-plane/Microsoft.Maps/Dataset/preview/2.0/examples/Dataset_GetDetails.json b/specification/maps/data-plane/Microsoft.Maps/Dataset/preview/2.0/examples/Dataset_GetDetails.json index 1b096ca550d9..33836ce57754 100644 --- a/specification/maps/data-plane/Microsoft.Maps/Dataset/preview/2.0/examples/Dataset_GetDetails.json +++ b/specification/maps/data-plane/Microsoft.Maps/Dataset/preview/2.0/examples/Dataset_GetDetails.json @@ -2,7 +2,6 @@ "parameters": { "geography": "us", "api-version": "2.0", - "subscription-key": "[subscription-key]", "datasetId": "[datasetId]" }, "responses": { @@ -35,51 +34,6 @@ }, "ontology": "facility-2.0" } - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request - Error message." - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found - The requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "Unknown error - An error occurred while processing the request. Please try again later." - } - } } } } diff --git a/specification/maps/data-plane/Microsoft.Maps/Dataset/preview/2.0/examples/Dataset_List.json b/specification/maps/data-plane/Microsoft.Maps/Dataset/preview/2.0/examples/Dataset_List.json index 6f94246882ff..13e4eda45125 100644 --- a/specification/maps/data-plane/Microsoft.Maps/Dataset/preview/2.0/examples/Dataset_List.json +++ b/specification/maps/data-plane/Microsoft.Maps/Dataset/preview/2.0/examples/Dataset_List.json @@ -1,8 +1,7 @@ { "parameters": { "geography": "us", - "api-version": "2.0", - "subscription-key": "[subscription-key]" + "api-version": "2.0" }, "responses": { "200": { @@ -53,51 +52,6 @@ } ] } - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request - One or more parameters were incorrectly specified or are mutually exclusive." - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found - The requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "Unknown error - An error occurred while processing the request. Please try again later." - } - } } } } diff --git a/specification/maps/data-plane/Microsoft.Maps/Dataset/preview/2.0/examples/GetOperation.json b/specification/maps/data-plane/Microsoft.Maps/Dataset/preview/2.0/examples/GetOperation.json index f213ab7656b9..8ea9c0cb5da0 100644 --- a/specification/maps/data-plane/Microsoft.Maps/Dataset/preview/2.0/examples/GetOperation.json +++ b/specification/maps/data-plane/Microsoft.Maps/Dataset/preview/2.0/examples/GetOperation.json @@ -2,7 +2,6 @@ "parameters": { "geography": "us", "api-version": "2.0", - "subscription-key": "[subscription-key]", "operationId": "8b1288fa-1958-4a2b-b68e-13a7i5af7d7c" }, "responses": { @@ -15,15 +14,6 @@ "headers": { "Resource-Location": "https://us.atlas.microsoft.com/datasets/3e36b996-f6d1-b068-0fcb-dd6b014c3447?api-version=2.0" } - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive." - } - } } } } diff --git a/specification/maps/data-plane/Microsoft.Maps/Dataset/preview/2.0/examples/GetOperationStillRunning.json b/specification/maps/data-plane/Microsoft.Maps/Dataset/preview/2.0/examples/GetOperationStillRunning.json index 4a0559be1343..52d48d34f311 100644 --- a/specification/maps/data-plane/Microsoft.Maps/Dataset/preview/2.0/examples/GetOperationStillRunning.json +++ b/specification/maps/data-plane/Microsoft.Maps/Dataset/preview/2.0/examples/GetOperationStillRunning.json @@ -2,7 +2,6 @@ "parameters": { "geography": "us", "api-version": "2.0", - "subscription-key": "[subscription-key]", "operationId": "8b1288fa-1958-4a2b-b68e-13a7i5af7d7c" }, "responses": { @@ -12,15 +11,6 @@ "created": "2021-04-23T19:14:03.2452596+00:00", "status": "Running" } - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive." - } - } } } } diff --git a/specification/maps/data-plane/Microsoft.Maps/DwgConversion/preview/1.0/dwgconversion.json b/specification/maps/data-plane/Microsoft.Maps/DwgConversion/preview/1.0/dwgconversion.json deleted file mode 100644 index 227ec56ce6ce..000000000000 --- a/specification/maps/data-plane/Microsoft.Maps/DwgConversion/preview/1.0/dwgconversion.json +++ /dev/null @@ -1,508 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "Azure Maps Conversion Service", - "version": "1.0", - "description": "APIs for converting DWG Packages in Azure Maps." - }, - "x-ms-parameterized-host": { - "hostTemplate": "{geography}.atlas.microsoft.com", - "parameters": [ - { - "$ref": "#/parameters/GeographicResourceLocation" - } - ] - }, - "schemes": [ - "https" - ], - "consumes": [], - "produces": [ - "application/json" - ], - "securityDefinitions": { - "azure_auth": { - "type": "oauth2", - "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", - "flow": "implicit", - "description": "These are the [Azure Active Directory OAuth2](https://docs.microsoft.com/en-us/azure/active-directory/develop/v1-overview) Flows. When paired with [Azure Role Based Access](https://docs.microsoft.com/en-us/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#### Note\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* The `Authorization URL` is specific to the Azure public cloud instance. Sovereign clouds have unique Authorization URLs and Azure Active directory configurations. \n* 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.\n* Usage of the [Azure Maps Web SDK](https://aka.ms/amaadmc) allows for configuration based setup of an application for multiple use cases.\n* Currently Azure Active Directory [v1.0](https://docs.microsoft.com/en-us/azure/active-directory/develop/azure-ad-endpoint-comparison) tokens are supported.", - "scopes": { - "user_impersonation": "Impersonates a user's Azure Active Directory account." - } - }, - "apiKeyQuery": { - "type": "apiKey", - "description": "This is a shared key which 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 which 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": "query" - } - }, - "security": [ - { - "azure_auth": [] - }, - { - "apiKeyQuery": [] - } - ], - "responses": { - "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 Azure Active Directory 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 AAD bearer token.", - "schema": { - "$ref": "#/definitions/ODataErrorResponse" - }, - "headers": { - "WWW-Authenticate": { - "type": "string", - "description": "Bearer realm=\"https://atlas.microsoft.com/\", error=\"invalid_token\", error_description=\"The access token expired\"" - } - } - }, - "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" - } - }, - "201Async": { - "description": "The resource has been created successfully.", - "schema": { - "$ref": "#/definitions/LongRunningOperationResult" - }, - "headers": { - "Location": { - "type": "string", - "description": "A URI where details on the newly created resource can be found." - } - } - }, - "202Async": { - "description": "**Supported only for async request.**\nRequest Accepted: The request has been accepted for processing. Please use the URL in the Location Header to retry or access the results.", - "headers": { - "Location": { - "type": "string", - "description": "New URL to check for the results of the long running process." - } - } - } - }, - "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 Azure AD security model. It represents a unique ID for the Azure Maps account and can be retrieved from Azure Maps management plane Account API. To use Azure AD 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 1.0", - "type": "string", - "in": "query", - "required": true, - "default": "1.0", - "x-ms-parameter-location": "client" - }, - "UdidQuery": { - "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/uploadpreview) call.", - "type": "string", - "in": "query", - "required": true, - "x-ms-parameter-location": "method" - }, - "ConversionId": { - "name": "conversionId", - "description": "The conversion id for the content. The `conversionId` must have been obtained from a successful [Conversion API](https://docs.microsoft.com/en-us/rest/api/maps/conversion/convertpreview) call.", - "type": "string", - "in": "path", - "required": true, - "x-ms-parameter-location": "method" - }, - "ConversionInputType": { - "name": "inputType", - "description": "Input type of the content being converted. Currently, only `DWG` type is supported.", - "type": "string", - "in": "query", - "required": true, - "enum": [ - "DWG" - ], - "x-ms-enum": { - "name": "ConversionInputType", - "modelAsString": true, - "values": [ - { - "value": "DWG", - "description": "DWG file format." - } - ] - }, - "x-ms-parameter-location": "method" - }, - "DescriptionDwgConversion": { - "name": "description", - "description": "User provided description of the content being converted.", - "type": "string", - "in": "query", - "required": false, - "x-ms-parameter-location": "method" - } - }, - "paths": { - "/conversion/convert": { - "post": { - "x-publish": true, - "description": "**Conversion Create API**\n\n**Applies to**: see pricing [tiers](https://azure.microsoft.com/en-us/pricing/details/azure-maps/).
\n\nCreator makes it possible to develop applications based on your private indoor map data using Azure Maps API and \nSDK. [This](https://docs.microsoft.com/en-us/azure/azure-maps/creator-indoor-maps) article introduces concepts and tools that apply to Azure Maps Creator.
\n\nThe Conversion API lets the caller import a set of DWG design files as a zipped [Drawing Package](https://aka.ms/am-drawing-package) into Azure Maps. The [Drawing Package](https://aka.ms/am-drawing-package) should first be \nuploaded using the [Azure Maps Data Service](https://docs.microsoft.com/rest/api/maps/data). Once uploaded, use the \n`udid` returned by the [Data Upload API](https://docs.microsoft.com/rest/api/maps/data/uploadpreview) to call \nthis Conversion API.\n\n## Convert DWG package\n\nThe Conversion API performs a \n[long-running request](https://aka.ms/am-creator-lrt).\n\n## Debug DWG package issues\n\n\nDuring the Conversion process, if there are any issues with the DWG package [errors and warnings](https://aka.ms/am-conversion-errors) are provided in the response along with a *diagnostic package* to visualize \nand diagnose these issues. In case any issues are encountered with your DWG package, the Conversion operation status process as detailed \n[here](https://aka.ms/am-creator-lrt) returns the location of the *diagnostic\npackage* that can be downloaded by the caller to help them visualize and diagnose these issues. The *diagnostic package* location\ncan be found in the properties section of the conversion operation status response and looks like the following:\n\n```json\n{\n \"properties\": {\n \"diagnosticPackageLocation\": \"https://us.atlas.microsoft.com/mapdata/{DiagnosticPackageId}?api-version=1.0\" \n } \n}\n```\n\nThe *diagnostic package* can be downloaded by executing a `HTTP GET` request on the `diagnosticPackageLocation`.\nFor more details on how to use the tool to visualize and diagnose all the errors and warnings see [Drawing Error Visualizer](https://aka.ms/am-drawing-errors-visualizer).
\n\nA conversion operation will be marked as *success* if there are zero or more warnings but will be marked as *failed* if any errors are encountered. ", - "operationId": "Conversion_ConvertPreview", - "x-ms-long-running-operation": true, - "x-ms-long-running-operation-options": { - "final-state-via": "location" - }, - "x-ms-examples": { - "Convert previously uploaded DWG Package": { - "$ref": "./examples/Conversion.json" - } - }, - "parameters": [ - { - "$ref": "#/parameters/ClientId" - }, - { - "$ref": "#/parameters/SubscriptionKey" - }, - { - "$ref": "#/parameters/ApiVersion" - }, - { - "$ref": "#/parameters/UdidQuery" - }, - { - "$ref": "#/parameters/ConversionInputType" - }, - { - "$ref": "#/parameters/DescriptionDwgConversion" - } - ], - "responses": { - "201": { - "$ref": "#/responses/201Async" - }, - "202": { - "$ref": "#/responses/202Async" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" - } - } - } - }, - "/conversion": { - "get": { - "x-publish": true, - "description": "**Conversion List API**\n\n**Applies to**: see pricing [tiers](https://azure.microsoft.com/en-us/pricing/details/azure-maps/).
\n\nCreator makes it possible to develop applications based on your private indoor map data using Azure Maps API and SDK. [This](https://docs.microsoft.com/en-us/azure/azure-maps/creator-indoor-maps) article introduces concepts and tools that apply to Azure Maps Creator.
\n\nThis API allows the caller to fetch a list of all successful data conversions submitted previously using the [Conversion API](https://docs.microsoft.com/en-us/rest/api/maps/conversion/convertpreview). \n\n### Submit List Request\n\nTo list all successful conversions you will issue a `GET` request with no additional parameters.\n\n### List Data Response\n\nThe Conversion List API returns the complete list of all conversion details in `json` format.
\n\nHere is a sample response returning the details of two successful conversion requests: \n\n
\n\n```json\n{\n \"conversions\": \n [\n {\n \"conversionId\": \"54398242-ea6c-1f31-4fa6-79b1ae0fc24d\",\n \"udid\": \"31838736-8b84-11ea-bc55-0242ac130003\",\n \"created\": \"5/19/2020 9:00:00 AM +00:00\",\n \"description\": \"User provided description.\",\n \"featureCounts\": {\n \"DIR\": 1,\n \"LVL\": 3,\n \"FCL\": 1,\n \"UNIT\": 150,\n \"CTG\": 8,\n \"AEL\": 0,\n \"OPN\": 10\n }\n },\n {\n \"conversionId\": \"2acf7d32-8b84-11ea-bc55-0242ac130003\",\n \"udid\": \"1214bc58-8b84-11ea-bc55-0242ac1300039\",\n \"created\": \"5/19/2020 9:00:00 AM +00:00\",\n \"description\": \"User provided description.\",\n \"featureCounts\": {\n \"DIR\": 1,\n \"LVL\": 3,\n \"FCL\": 1,\n \"UNIT\": 150,\n \"CTG\": 8,\n \"AEL\": 0,\n \"OPN\": 10\n }\n }\n ]\n}\n```\n\n
", - "operationId": "Conversion_ListPreview", - "x-ms-examples": { - "Returns a list of all the data processed by the Conversion Service for the account": { - "$ref": "./examples/List.json" - } - }, - "parameters": [ - { - "$ref": "#/parameters/ClientId" - }, - { - "$ref": "#/parameters/SubscriptionKey" - }, - { - "$ref": "#/parameters/ApiVersion" - } - ], - "responses": { - "200": { - "description": "List request completed successfully.", - "schema": { - "$ref": "#/definitions/ConversionListResponse" - } - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" - } - } - } - }, - "/conversion/{conversionId}": { - "delete": { - "x-publish": true, - "description": "**Conversion Delete API**\n\n**Applies to**: see pricing [tiers](https://azure.microsoft.com/en-us/pricing/details/azure-maps/).
\n\nCreator makes it possible to develop applications based on your private indoor map data using Azure Maps API and SDK. [This](https://docs.microsoft.com/en-us/azure/azure-maps/creator-indoor-maps) article introduces concepts and tools that apply to Azure Maps Creator.
\n\nThis API allows the caller to delete any data conversions created previously using the [Conversion API](https://docs.microsoft.com/en-us/rest/api/maps/conversion/convertpreview).\n\n### Submit Delete Request\n\nTo delete your conversion data you will issue a `DELETE` request where the path will contain the `conversionId` of the data to delete.\n\n### Conversion Delete Response\n\nThe Conversion Delete API returns a HTTP `204 No Content` response with an empty body, if the converted data resources were deleted successfully.
\nA HTTP `400 Bad Request` error response will be returned if no resource associated with the passed-in `conversionId` is found. ", - "operationId": "Conversion_DeletePreview", - "x-ms-examples": { - "Delete previously converted content": { - "$ref": "./examples/Delete.json" - } - }, - "parameters": [ - { - "$ref": "#/parameters/ClientId" - }, - { - "$ref": "#/parameters/SubscriptionKey" - }, - { - "$ref": "#/parameters/ApiVersion" - }, - { - "$ref": "#/parameters/ConversionId" - } - ], - "responses": { - "204": { - "description": "Conversion delete request completed successfully. The content for `conversionId` was deleted on the server.", - "schema": { - "$ref": "#/definitions/ConversionDeleteResponse" - } - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" - } - } - } - } - }, - "definitions": { - "ODataErrorResponse": { - "type": "object", - "description": "This response object is returned when an error occurs in the Maps API.", - "properties": { - "error": { - "$ref": "#/definitions/ODataError" - } - } - }, - "ODataError": { - "type": "object", - "description": "This object is returned when an error occurs in the 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 - }, - "resourceLocation": { - "description": "The location URI for details about the created resource. This is only provided when the request was successfully completed.", - "type": "string", - "readOnly": true - }, - "error": { - "$ref": "#/definitions/ODataError" - }, - "warning": { - "$ref": "#/definitions/ODataError" - } - } - }, - "ConversionListResponse": { - "description": "The response model for the Conversion List API.", - "type": "object", - "properties": { - "conversions": { - "description": "A list of all the previously submitted conversion requests.", - "type": "array", - "readOnly": true, - "items": { - "$ref": "#/definitions/ConversionListDetailInfo" - } - } - } - }, - "ConversionListDetailInfo": { - "description": "Detail information for the conversion requests.", - "type": "object", - "properties": { - "conversionId": { - "description": "A unique id that represents the artifact of a _successfully_ completed conversion process.", - "type": "string", - "readOnly": true - }, - "udid": { - "description": "The unique id of the content provided to create this conversion.", - "type": "string", - "readOnly": true - }, - "created": { - "description": "The date and time of this conversion.", - "type": "string", - "readOnly": true - }, - "description": { - "description": "User provided description of the content being converted.", - "type": "string", - "readOnly": true - }, - "featureCounts": { - "description": "A summary of feature counts in this conversion.", - "type": "object", - "readOnly": true - } - } - }, - "ConversionDeleteResponse": { - "description": "The response model for the Conversion Delete API. The response body will be empty signifying there's no content available for the `conversionId` anymore.", - "type": "object" - } - } -} diff --git a/specification/maps/data-plane/Microsoft.Maps/DwgConversion/preview/1.0/examples/Conversion.json b/specification/maps/data-plane/Microsoft.Maps/DwgConversion/preview/1.0/examples/Conversion.json deleted file mode 100644 index 620928efd64a..000000000000 --- a/specification/maps/data-plane/Microsoft.Maps/DwgConversion/preview/1.0/examples/Conversion.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "parameters": { - "geography": "us", - "api-version": "1.0", - "subscription-key": "[subscription-key]", - "udid": "25084fb7-307a-4720-8f91-7952a0b91012", - "inputType": "DWG" - }, - "responses": { - "201": { - "headers": { - "Location": "https://us.atlas.microsoft.com/conversion/{conversionId}?api-version=1.0", - "Access-Control-Expose-Headers": "Location" - }, - "body": { - "operationId": "{operationId}", - "status": "Succeeded", - "created": "2020-01-02 1:02:03 AM +00:00", - "resourceLocation": "https://us.atlas.microsoft.com/conversion/{conversionId}?api-version=1.0" - } - }, - "202": { - "headers": { - "Location": "https://us.atlas.microsoft.com/conversion/operations/{operationId}?api-version=1.0", - "Access-Control-Expose-Headers": "Location" - } - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive." - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found: the requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "An error occurred while processing the request. Please try again later." - } - } - } - } -} diff --git a/specification/maps/data-plane/Microsoft.Maps/DwgConversion/preview/1.0/examples/Delete.json b/specification/maps/data-plane/Microsoft.Maps/DwgConversion/preview/1.0/examples/Delete.json deleted file mode 100644 index a2437b22c532..000000000000 --- a/specification/maps/data-plane/Microsoft.Maps/DwgConversion/preview/1.0/examples/Delete.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "parameters": { - "geography": "us", - "api-version": "1.0", - "subscription-key": "[subscription-key]", - "conversionId": "99884fb7-87a9-0920-7f93-7952a0b91012" - }, - "responses": { - "204": { - "body": {} - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive." - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found: the requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "An error occurred while processing the request. Please try again later." - } - } - } - } -} diff --git a/specification/maps/data-plane/Microsoft.Maps/DwgConversion/preview/1.0/examples/List.json b/specification/maps/data-plane/Microsoft.Maps/DwgConversion/preview/1.0/examples/List.json deleted file mode 100644 index 2b7782a6acf3..000000000000 --- a/specification/maps/data-plane/Microsoft.Maps/DwgConversion/preview/1.0/examples/List.json +++ /dev/null @@ -1,90 +0,0 @@ -{ - "parameters": { - "geography": "us", - "api-version": "1.0", - "subscription-key": "[subscription-key]" - }, - "responses": { - "200": { - "body": { - "conversions": [ - { - "conversionId": "54398242-ea6c-1f31-4fa6-79b1ae0fc24d", - "udid": "31838736-8b84-11ea-bc55-0242ac130003", - "created": "5/19/2020 9:00:00 AM +00:00", - "description": "User provided description.", - "featureCounts": { - "directoryInfo": 1, - "level": 3, - "facility": 1, - "unit": 150, - "category": 8, - "areaElement": 0, - "opening": 10 - } - }, - { - "conversionId": "2acf7d32-8b84-11ea-bc55-0242ac130003", - "udid": "1214bc58-8b84-11ea-bc55-0242ac1300039", - "created": "5/19/2020 9:00:00 AM +00:00", - "description": "User provided description.", - "featureCounts": { - "directoryInfo": 1, - "level": 3, - "facility": 1, - "unit": 150, - "category": 8, - "areaElement": 0, - "opening": 10 - } - } - ] - } - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive." - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found: the requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "An error occurred while processing the request. Please try again later." - } - } - } - } -} diff --git a/specification/maps/data-plane/Microsoft.Maps/DwgConversion/preview/2.0/dwgconversion.json b/specification/maps/data-plane/Microsoft.Maps/DwgConversion/preview/2.0/dwgconversion.json index 013f51c645f5..c2ec44f2094f 100644 --- a/specification/maps/data-plane/Microsoft.Maps/DwgConversion/preview/2.0/dwgconversion.json +++ b/specification/maps/data-plane/Microsoft.Maps/DwgConversion/preview/2.0/dwgconversion.json @@ -9,7 +9,7 @@ "hostTemplate": "{geography}.atlas.microsoft.com", "parameters": [ { - "$ref": "#/parameters/GeographicResourceLocation" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/GeographicResourceLocation" } ] }, @@ -20,6 +20,19 @@ "produces": [ "application/json" ], + "security": [ + { + "azure_auth": [ + "user_impersonation" + ] + }, + { + "SubscriptionKeyInHeader": [] + }, + { + "SubscriptionKeyInQuery": [] + } + ], "securityDefinitions": { "azure_auth": { "type": "oauth2", @@ -27,130 +40,25 @@ "flow": "implicit", "description": "These are the [Azure Active Directory OAuth2](https://docs.microsoft.com/en-us/azure/active-directory/develop/v1-overview) Flows. When paired with [Azure Role Based Access](https://docs.microsoft.com/en-us/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#### Note\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* The `Authorization URL` is specific to the Azure public cloud instance. Sovereign clouds have unique Authorization URLs and Azure Active directory configurations. \n* 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.\n* Usage of the [Azure Maps Web SDK](https://aka.ms/amaadmc) allows for configuration based setup of an application for multiple use cases.\n* Currently Azure Active Directory [v1.0](https://docs.microsoft.com/en-us/azure/active-directory/develop/azure-ad-endpoint-comparison) tokens are supported.", "scopes": { - "user_impersonation": "Impersonates a user's Azure Active Directory account." + "user_impersonation": "impersonate your user account" } }, - "apiKeyQuery": { + "SubscriptionKeyInHeader": { "type": "apiKey", - "description": "This is a shared key which 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 which 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": "query" - } - }, - "security": [ - { - "azure_auth": [] - }, - { - "apiKeyQuery": [] - } - ], - "responses": { - "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 Azure Active Directory 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 AAD bearer token.", - "schema": { - "$ref": "#/definitions/ODataErrorResponse" - }, - "headers": { - "WWW-Authenticate": { - "type": "string", - "description": "Bearer realm=\"https://atlas.microsoft.com/\", error=\"invalid_token\", error_description=\"The access token expired\"" - } - } - }, - "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" - } - }, - "200Async": { - "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" - }, - "headers": { - "Resource-Location": { - "type": "string", - "description": "If successful, a URI where details on the newly created resource can be found." - } - } + "in": "header" }, - "202Accepted": { - "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 process." - } - } + "SubscriptionKeyInQuery": { + "type": "apiKey", + "name": "subscription-key", + "in": "query" } }, + "responses": {}, "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 Azure AD security model. It represents a unique ID for the Azure Maps account and can be retrieved from Azure Maps management plane Account API. To use Azure AD 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": { + "ConversionApiVersionV2": { "name": "api-version", - "description": "Version number of Azure Maps API. Current version is 2.0", + "description": "Version number of Azure Maps API.", "type": "string", "in": "query", "required": true, @@ -186,7 +94,6 @@ "description": "User provided description of the content being converted.", "type": "string", "in": "query", - "required": false, "x-ms-parameter-location": "method" }, "ConversionOperationId": { @@ -201,9 +108,12 @@ "paths": { "/conversions": { "post": { - "x-publish": true, "description": "**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).\n\nCreator makes it possible to develop applications based on your private indoor map data using Azure Maps API and SDK. [This](https://docs.microsoft.com/azure/azure-maps/creator-indoor-maps) article introduces concepts and tools that apply to Azure Maps Creator.\n\nThe Conversion API lets the caller import a set of DWG design files as a zipped [Drawing Package](https://aka.ms/am-drawing-package) into Azure Maps. The [Drawing Package](https://aka.ms/am-drawing-package) should first be uploaded using the [Azure Maps Data Service](https://docs.microsoft.com/rest/api/maps/data). Once uploaded, use the `udid` returned by the [Data Upload API](https://docs.microsoft.com/rest/api/maps/data/uploadpreview) to call this Conversion API.\n\n## Convert DWG package\n\nThe Conversion API performs a [long-running request](https://aka.ms/am-creator-lrt-v2).\n\n## Debug DWG package issues\n\n\nDuring the Conversion process, if there are any issues with the DWG package [errors and warnings](https://aka.ms/am-conversion-errors) are provided in the response along with a *diagnostic package* to visualize and diagnose these issues. In case any issues are encountered with your DWG package, the Conversion operation status process as detailed [here](https://aka.ms/am-creator-lrt-v2) returns the location of the *diagnostic package* that can be downloaded by the caller to help them visualize and diagnose these issues. The *diagnostic package* location can be found in the properties section of the conversion operation status response and looks like the following:\n\n```json\n{\n \"properties\": {\n \"diagnosticPackageLocation\": \"https://us.atlas.microsoft.com/mapdata/{DiagnosticPackageId}?api-version=1.0\" \n } \n}\n```\n\nThe *diagnostic package* can be downloaded by executing a `HTTP GET` request on the `diagnosticPackageLocation`.\nFor more details on how to use the tool to visualize and diagnose all the errors and warnings see [Drawing Error Visualizer](https://aka.ms/am-drawing-errors-visualizer).
\n\nA conversion operation will be marked as *success* if there are zero or more warnings but will be marked as *failed* if any errors are encountered. ", "operationId": "Conversion_Convert", + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, "x-ms-examples": { "Convert previously uploaded DWG Package": { "$ref": "./examples/Conversion.json" @@ -211,13 +121,10 @@ }, "parameters": [ { - "$ref": "#/parameters/ClientId" - }, - { - "$ref": "#/parameters/SubscriptionKey" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ClientId" }, { - "$ref": "#/parameters/ApiVersion" + "$ref": "#/parameters/ConversionApiVersionV2" }, { "$ref": "#/parameters/UdidQuery" @@ -230,28 +137,18 @@ } ], "responses": { - "202": { - "$ref": "#/responses/202Accepted" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" + "200": { + "$ref": "../../../Common/preview/1.0/common.json#/responses/200AsyncV2" }, - "404": { - "$ref": "#/responses/404" + "202": { + "$ref": "../../../Common/preview/1.0/common.json#/responses/202AsyncV2" }, - "500": { - "$ref": "#/responses/500" + "default": { + "$ref": "../../../Common/preview/1.0/common.json#/responses/default" } } }, "get": { - "x-publish": true, "description": "**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).\n\nCreator makes it possible to develop applications based on your private indoor map data using Azure Maps API and SDK. [This](https://docs.microsoft.com/azure/azure-maps/creator-indoor-maps) article introduces concepts and tools that apply to Azure Maps Creator.\n\nThis API allows the caller to fetch a list of all successful data conversions submitted previously using the [Conversion API](https://docs.microsoft.com/en-us/rest/api/maps/conversion/convertpreview). \n\n### Submit List Request\n\nTo list all successful conversions you will issue a `GET` request with no additional parameters.\n\n### List Data Response\n\nThe Conversion List API returns the complete list of all conversion details in `json` format.
\n\nHere is a sample response returning the details of two successful conversion requests: \n\n
\n\n```json\n{\n \"conversions\": \n [\n {\n \"conversionId\": \"54398242-ea6c-1f31-4fa6-79b1ae0fc24d\",\n \"udid\": \"31838736-8b84-11ea-bc55-0242ac130003\",\n \"created\": \"5/19/2020 9:00:00 AM +00:00\",\n \"description\": \"User provided description.\",\n \"featureCounts\": {\n \"DIR\": 1,\n \"LVL\": 3,\n \"FCL\": 1,\n \"UNIT\": 150,\n \"CTG\": 8,\n \"AEL\": 0,\n \"OPN\": 10\n }\n },\n {\n \"conversionId\": \"2acf7d32-8b84-11ea-bc55-0242ac130003\",\n \"udid\": \"1214bc58-8b84-11ea-bc55-0242ac1300039\",\n \"created\": \"5/19/2020 9:00:00 AM +00:00\",\n \"description\": \"User provided description.\",\n \"featureCounts\": {\n \"DIR\": 1,\n \"LVL\": 3,\n \"FCL\": 1,\n \"UNIT\": 150,\n \"CTG\": 8,\n \"AEL\": 0,\n \"OPN\": 10\n }\n }\n ]\n}\n```\n\n
", "operationId": "Conversion_List", "x-ms-examples": { @@ -261,15 +158,16 @@ }, "parameters": [ { - "$ref": "#/parameters/ClientId" - }, - { - "$ref": "#/parameters/SubscriptionKey" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ClientId" }, { - "$ref": "#/parameters/ApiVersion" + "$ref": "#/parameters/ConversionApiVersionV2" } ], + "x-ms-pageable": { + "itemName": "conversions", + "nextLinkName": "nextLink" + }, "responses": { "200": { "description": "List request completed successfully.", @@ -277,27 +175,14 @@ "$ref": "#/definitions/ConversionListResponse" } }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" + "default": { + "$ref": "../../../Common/preview/1.0/common.json#/responses/default" } } } }, "/conversions/{conversionId}": { "get": { - "x-publish": true, "description": "**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).\n\nCreator makes it possible to develop applications based on your private indoor map data using Azure Maps API and SDK. [This](https://docs.microsoft.com/azure/azure-maps/creator-indoor-maps) article introduces concepts and tools that apply to Azure Maps Creator.\n\nThis API allows the caller to fetch a successful data conversion submitted previously using the [Conversion API](https://docs.microsoft.com/en-us/rest/api/maps/conversion/convertpreview). ", "operationId": "Conversion_Get", "x-ms-examples": { @@ -307,13 +192,10 @@ }, "parameters": [ { - "$ref": "#/parameters/ClientId" - }, - { - "$ref": "#/parameters/SubscriptionKey" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ClientId" }, { - "$ref": "#/parameters/ApiVersion" + "$ref": "#/parameters/ConversionApiVersionV2" }, { "$ref": "#/parameters/ConversionId" @@ -326,25 +208,12 @@ "$ref": "#/definitions/ConversionListDetailInfo" } }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" + "default": { + "$ref": "../../../Common/preview/1.0/common.json#/responses/default" } } }, "delete": { - "x-publish": true, "description": "**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).\n\nCreator makes it possible to develop applications based on your private indoor map data using Azure Maps API and SDK. [This](https://docs.microsoft.com/azure/azure-maps/creator-indoor-maps) article introduces concepts and tools that apply to Azure Maps Creator.\n\nThis API allows the caller to delete any data conversions created previously using the [Conversion API](https://docs.microsoft.com/en-us/rest/api/maps/conversion/convertpreview).\n\n### Submit Delete Request\n\nTo delete your conversion data you will issue a `DELETE` request where the path will contain the `conversionId` of the data to delete.\n\n### Conversion Delete Response\n\nThe Conversion Delete API returns a HTTP `204 No Content` response with an empty body, if the converted data resources were deleted successfully.
\nA HTTP `400 Bad Request` error response will be returned if no resource associated with the passed-in `conversionId` is found. ", "operationId": "Conversion_Delete", "x-ms-examples": { @@ -354,13 +223,10 @@ }, "parameters": [ { - "$ref": "#/parameters/ClientId" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ClientId" }, { - "$ref": "#/parameters/SubscriptionKey" - }, - { - "$ref": "#/parameters/ApiVersion" + "$ref": "#/parameters/ConversionApiVersionV2" }, { "$ref": "#/parameters/ConversionId" @@ -370,20 +236,8 @@ "204": { "description": "Conversion delete request completed successfully. The content for `conversionId` was deleted on the server." }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" + "default": { + "$ref": "../../../Common/preview/1.0/common.json#/responses/default" } } } @@ -402,10 +256,7 @@ }, "parameters": [ { - "$ref": "#/parameters/SubscriptionKey" - }, - { - "$ref": "#/parameters/ApiVersion" + "$ref": "#/parameters/ConversionApiVersionV2" }, { "$ref": "#/parameters/ConversionOperationId" @@ -413,106 +264,16 @@ ], "responses": { "200": { - "$ref": "#/responses/200Async" + "$ref": "../../../Common/preview/1.0/common.json#/responses/200AsyncV2" }, - "400": { - "$ref": "#/responses/400" + "default": { + "$ref": "../../../Common/preview/1.0/common.json#/responses/default" } } } } }, "definitions": { - "ODataErrorResponse": { - "type": "object", - "description": "This response object is returned when an error occurs in the Maps API.", - "properties": { - "error": { - "$ref": "#/definitions/ODataError" - } - } - }, - "ODataError": { - "type": "object", - "description": "This object is returned when an error occurs in the 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" - } - } - }, "ConversionListResponse": { "description": "The response model for the Conversion List API.", "type": "object", @@ -542,9 +303,7 @@ "readOnly": true }, "ontology": { - "description": "", - "type": "string", - "readOnly": true + "$ref": "../../../Common/preview/1.0/common.json#/definitions/Ontology" }, "udid": { "description": "The unique id of the content provided to create this conversion.", diff --git a/specification/maps/data-plane/Microsoft.Maps/DwgConversion/preview/2.0/examples/Conversion.json b/specification/maps/data-plane/Microsoft.Maps/DwgConversion/preview/2.0/examples/Conversion.json index 90672fcd2a75..149a34a8eda2 100644 --- a/specification/maps/data-plane/Microsoft.Maps/DwgConversion/preview/2.0/examples/Conversion.json +++ b/specification/maps/data-plane/Microsoft.Maps/DwgConversion/preview/2.0/examples/Conversion.json @@ -2,62 +2,25 @@ "parameters": { "geography": "us", "api-version": "2.0", - "subscription-key": "[subscription-key]", "udid": "25084fb7-307a-4720-8f91-7952a0b91012", - "inputType": "DWG", "outputOntology": "facility-2.0" }, "responses": { + "200": { + "body": { + "operationId": "8b1288fa-1958-4a2b-b68e-13a7i5af7d7c", + "created": "2021-04-20T22:43:14.9401559+00:00", + "status": "Succeeded" + }, + "headers": { + "Resource-Location": "https://us.atlas.microsoft.com/mapData/3e36b996-f6d1-b068-0fcb-dd6b014c3447?api-version=2.0" + } + }, "202": { "headers": { "Operation-Location": "https://us.atlas.microsoft.com/conversions/operations/{operationId}?api-version=2.0", "Access-Control-Expose-Headers": "Operation-Location" } - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive." - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found: the requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "An error occurred while processing the request. Please try again later." - } - } } } } diff --git a/specification/maps/data-plane/Microsoft.Maps/DwgConversion/preview/2.0/examples/Delete.json b/specification/maps/data-plane/Microsoft.Maps/DwgConversion/preview/2.0/examples/Delete.json index 4c85aa105362..5cf093ae5d8a 100644 --- a/specification/maps/data-plane/Microsoft.Maps/DwgConversion/preview/2.0/examples/Delete.json +++ b/specification/maps/data-plane/Microsoft.Maps/DwgConversion/preview/2.0/examples/Delete.json @@ -2,55 +2,9 @@ "parameters": { "geography": "us", "api-version": "2.0", - "subscription-key": "[subscription-key]", "conversionId": "99884fb7-87a9-0920-7f93-7952a0b91012" }, "responses": { - "204": {}, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive." - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found: the requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "An error occurred while processing the request. Please try again later." - } - } - } + "204": {} } } diff --git a/specification/maps/data-plane/Microsoft.Maps/DwgConversion/preview/2.0/examples/Get.json b/specification/maps/data-plane/Microsoft.Maps/DwgConversion/preview/2.0/examples/Get.json index 58c847dd3957..f081d3945f4e 100644 --- a/specification/maps/data-plane/Microsoft.Maps/DwgConversion/preview/2.0/examples/Get.json +++ b/specification/maps/data-plane/Microsoft.Maps/DwgConversion/preview/2.0/examples/Get.json @@ -2,7 +2,6 @@ "parameters": { "geography": "us", "api-version": "2.0", - "subscription-key": "[subscription-key]", "conversionId": "54398242-ea6c-1f31-4fa6-79b1ae0fc24d" }, "responses": { @@ -22,51 +21,6 @@ "opening": 10 } } - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive." - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found: the requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "An error occurred while processing the request. Please try again later." - } - } } } } diff --git a/specification/maps/data-plane/Microsoft.Maps/DwgConversion/preview/2.0/examples/GetOperation.json b/specification/maps/data-plane/Microsoft.Maps/DwgConversion/preview/2.0/examples/GetOperation.json index a5e709e1acb8..0b718ab1da2e 100644 --- a/specification/maps/data-plane/Microsoft.Maps/DwgConversion/preview/2.0/examples/GetOperation.json +++ b/specification/maps/data-plane/Microsoft.Maps/DwgConversion/preview/2.0/examples/GetOperation.json @@ -2,7 +2,6 @@ "parameters": { "geography": "us", "api-version": "2.0", - "subscription-key": "[subscription-key]", "operationId": "8b1288fa-1958-4a2b-b68e-13a7i5af7d7c" }, "responses": { @@ -29,15 +28,6 @@ "headers": { "Resource-Location": "https://us.atlas.microsoft.com/conversions/3e36b996-f6d1-b068-0fcb-dd6b014c3447?api-version=2.0" } - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive." - } - } } } } diff --git a/specification/maps/data-plane/Microsoft.Maps/DwgConversion/preview/2.0/examples/GetOperationStillRunning.json b/specification/maps/data-plane/Microsoft.Maps/DwgConversion/preview/2.0/examples/GetOperationStillRunning.json index 4a0559be1343..52d48d34f311 100644 --- a/specification/maps/data-plane/Microsoft.Maps/DwgConversion/preview/2.0/examples/GetOperationStillRunning.json +++ b/specification/maps/data-plane/Microsoft.Maps/DwgConversion/preview/2.0/examples/GetOperationStillRunning.json @@ -2,7 +2,6 @@ "parameters": { "geography": "us", "api-version": "2.0", - "subscription-key": "[subscription-key]", "operationId": "8b1288fa-1958-4a2b-b68e-13a7i5af7d7c" }, "responses": { @@ -12,15 +11,6 @@ "created": "2021-04-23T19:14:03.2452596+00:00", "status": "Running" } - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive." - } - } } } } diff --git a/specification/maps/data-plane/Microsoft.Maps/DwgConversion/preview/2.0/examples/List.json b/specification/maps/data-plane/Microsoft.Maps/DwgConversion/preview/2.0/examples/List.json index 1f95d858a3f5..158b416cefb8 100644 --- a/specification/maps/data-plane/Microsoft.Maps/DwgConversion/preview/2.0/examples/List.json +++ b/specification/maps/data-plane/Microsoft.Maps/DwgConversion/preview/2.0/examples/List.json @@ -1,8 +1,7 @@ { "parameters": { "geography": "us", - "api-version": "2.0", - "subscription-key": "[subscription-key]" + "api-version": "2.0" }, "responses": { "200": { @@ -40,51 +39,6 @@ } ] } - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive." - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found: the requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "An error occurred while processing the request. Please try again later." - } - } } } } diff --git a/specification/maps/data-plane/Microsoft.Maps/FeatureState/preview/1.0/examples/CreateStateset.json b/specification/maps/data-plane/Microsoft.Maps/FeatureState/preview/1.0/examples/CreateStateset.json deleted file mode 100644 index 26077a93784b..000000000000 --- a/specification/maps/data-plane/Microsoft.Maps/FeatureState/preview/1.0/examples/CreateStateset.json +++ /dev/null @@ -1,117 +0,0 @@ -{ - "parameters": { - "geography": "us", - "api-version": "1.0", - "subscription-key": "[subscription-key]", - "datasetId": "5d34fbe8-87b7-f7c0-3144-c50e003a3c75", - "statesetCreateRequestBody": { - "styles": [ - { - "keyname": "s1", - "type": "boolean", - "rules": [ - { - "true": "#FF0000", - "false": "#00FF00" - } - ] - }, - { - "keyname": "s2", - "type": "number", - "rules": [ - { - "range": { - "exclusiveMaximum": 50 - }, - "color": "#343deb" - }, - { - "range": { - "minimum": 50, - "exclusiveMaximum": 70 - }, - "color": "#34ebb1" - }, - { - "range": { - "minimum": 70, - "exclusiveMaximum": 90 - }, - "color": "#eba834" - }, - { - "range": { - "minimum": 90 - }, - "color": "#eb3434" - } - ] - }, - { - "keyname": "s3", - "type": "string", - "rules": [ - { - "stateValue1": "#FF0000", - "stateValue2": "#FF00AA", - "stateValueN": "#00FF00" - } - ] - } - ] - } - }, - "responses": { - "200": { - "body": { - "statesetId": "b24bdb73-1305-3212-1909-a428d937b64f" - } - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive." - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found: the requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "An error occurred while processing the request. Please try again later." - } - } - } - } -} diff --git a/specification/maps/data-plane/Microsoft.Maps/FeatureState/preview/1.0/examples/DeleteFeatureState.json b/specification/maps/data-plane/Microsoft.Maps/FeatureState/preview/1.0/examples/DeleteFeatureState.json deleted file mode 100644 index 4fae12773bc9..000000000000 --- a/specification/maps/data-plane/Microsoft.Maps/FeatureState/preview/1.0/examples/DeleteFeatureState.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "parameters": { - "geography": "us", - "api-version": "1.0", - "subscription-key": "[subscription-key]", - "statesetId": "b24bdb73-1305-3212-1909-a428d937b64", - "featureId": "SPC4709", - "stateKeyName": "keyName1" - }, - "responses": { - "200": {}, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive." - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found: the requested resource could not be found, but it may be available again in the future." - } - } - }, - "409": { - "headers": {}, - "body": { - "error": { - "code": "409 Conflict", - "message": "The request could not be completed due to a conflict with the current state of the resource." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "An error occurred while processing the request. Please try again later." - } - } - } - } -} diff --git a/specification/maps/data-plane/Microsoft.Maps/FeatureState/preview/1.0/examples/DeleteStateset.json b/specification/maps/data-plane/Microsoft.Maps/FeatureState/preview/1.0/examples/DeleteStateset.json deleted file mode 100644 index 18a62b07b2d0..000000000000 --- a/specification/maps/data-plane/Microsoft.Maps/FeatureState/preview/1.0/examples/DeleteStateset.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "parameters": { - "geography": "us", - "api-version": "1.0", - "subscription-key": "[subscription-key]", - "statesetId": "b24bdb73-1305-3212-1909-a428d937b64f" - }, - "responses": { - "204": {}, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive." - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found: the requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "An error occurred while processing the request. Please try again later." - } - } - } - } -} diff --git a/specification/maps/data-plane/Microsoft.Maps/FeatureState/preview/1.0/examples/GetStates.json b/specification/maps/data-plane/Microsoft.Maps/FeatureState/preview/1.0/examples/GetStates.json deleted file mode 100644 index 0f83e1814041..000000000000 --- a/specification/maps/data-plane/Microsoft.Maps/FeatureState/preview/1.0/examples/GetStates.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "parameters": { - "geography": "us", - "api-version": "1.0", - "subscription-key": "[subscription-key]", - "statesetId": "b24bdb73-1305-3212-1909-a428d937b64", - "featureId": "SPC4709" - }, - "responses": { - "200": { - "body": { - "states": [ - { - "keyName": "s1", - "value": true, - "eventTimestamp": "2019-08-16 13:01" - } - ] - } - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive." - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found: the requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "An error occurred while processing the request. Please try again later." - } - } - } - } -} diff --git a/specification/maps/data-plane/Microsoft.Maps/FeatureState/preview/1.0/examples/GetStateset.json b/specification/maps/data-plane/Microsoft.Maps/FeatureState/preview/1.0/examples/GetStateset.json deleted file mode 100644 index 655b55546d1c..000000000000 --- a/specification/maps/data-plane/Microsoft.Maps/FeatureState/preview/1.0/examples/GetStateset.json +++ /dev/null @@ -1,118 +0,0 @@ -{ - "parameters": { - "geography": "us", - "api-version": "1.0", - "subscription-key": "[subscription-key]", - "statesetId": "b24bdb73-1305-3212-1909-a428d937b64" - }, - "responses": { - "200": { - "body": { - "datasetIdList": [ - "8d700cc7-fd2c-4e21-b402-ad3f5e524f36" - ], - "statesetStyle": { - "styles": [ - { - "keyName": "s1", - "type": "boolean", - "rules": [ - { - "true": "#FFFF00", - "false": "#FFFFFF" - } - ] - }, - { - "keyName": "s2", - "type": "number", - "rules": [ - { - "range": { - "minimum": null, - "maximum": null, - "exclusiveMinumum": null, - "exclusiveMaximum": "50" - }, - "color": "#343deb" - }, - { - "range": { - "minimum": "50", - "maximum": null, - "exclusiveMinumum": null, - "exclusiveMaximum": "69" - }, - "color": "#34ebb1" - }, - { - "range": { - "minimum": "69", - "maximum": null, - "exclusiveMinumum": null, - "exclusiveMaximum": "90" - }, - "color": "#eba834" - }, - { - "range": { - "minimum": "90", - "maximum": null, - "exclusiveMinumum": null, - "exclusiveMaximum": null - }, - "color": "#eb3434" - } - ] - } - ] - } - } - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive." - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found: the requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "An error occurred while processing the request. Please try again later." - } - } - } - } -} diff --git a/specification/maps/data-plane/Microsoft.Maps/FeatureState/preview/1.0/examples/Stateset_List.json b/specification/maps/data-plane/Microsoft.Maps/FeatureState/preview/1.0/examples/Stateset_List.json deleted file mode 100644 index 94eede94963b..000000000000 --- a/specification/maps/data-plane/Microsoft.Maps/FeatureState/preview/1.0/examples/Stateset_List.json +++ /dev/null @@ -1,122 +0,0 @@ -{ - "parameters": { - "geography": "us", - "api-version": "1.0", - "subscription-key": "[subscription-key]" - }, - "responses": { - "200": { - "body": { - "statesetDetailList": [ - { - "statesetId": "09abcdf8-cad0-b3dd-a38f-d5ee3cff5eea", - "datasetIdList": [ - "8d700cc7-fd2c-4e21-b402-ad3f5e524f36" - ], - "statesetStyle": { - "styles": [ - { - "keyName": "s1", - "type": "boolean", - "rules": [ - { - "true": "#0FFF00", - "false": "#00FFF0" - } - ] - }, - { - "keyName": "s2", - "type": "number", - "rules": [ - { - "range": { - "minimum": null, - "maximum": null, - "exclusiveMinumum": null, - "exclusiveMaximum": "50" - }, - "color": "#343deb" - }, - { - "range": { - "minimum": "50", - "maximum": null, - "exclusiveMinumum": null, - "exclusiveMaximum": "69" - }, - "color": "#34ebb1" - }, - { - "range": { - "minimum": "69", - "maximum": null, - "exclusiveMinumum": null, - "exclusiveMaximum": "90" - }, - "color": "#eba834" - }, - { - "range": { - "minimum": "90", - "maximum": null, - "exclusiveMinumum": null, - "exclusiveMaximum": null - }, - "color": "#eb3434" - } - ] - } - ] - } - } - ] - } - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive." - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found: the requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "An error occurred while processing the request. Please try again later." - } - } - } - } -} diff --git a/specification/maps/data-plane/Microsoft.Maps/FeatureState/preview/1.0/examples/UpdateStates.json b/specification/maps/data-plane/Microsoft.Maps/FeatureState/preview/1.0/examples/UpdateStates.json deleted file mode 100644 index a2e115192cc9..000000000000 --- a/specification/maps/data-plane/Microsoft.Maps/FeatureState/preview/1.0/examples/UpdateStates.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "parameters": { - "geography": "us", - "api-version": "1.0", - "subscription-key": "[subscription-key]", - "statesetId": "b24bdb73-1305-3212-1909-a428d937b64", - "featureId": "SPC4709", - "featureStateUpdateRequestBody": { - "states": [ - { - "keyName": "s1", - "value": true, - "eventTimestamp": "2019-08-16 13:01" - } - ] - } - }, - "responses": { - "200": {}, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive." - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found: the requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "An error occurred while processing the request. Please try again later." - } - } - } - } -} diff --git a/specification/maps/data-plane/Microsoft.Maps/FeatureState/preview/1.0/examples/UpdateStateset.json b/specification/maps/data-plane/Microsoft.Maps/FeatureState/preview/1.0/examples/UpdateStateset.json deleted file mode 100644 index 02d4c988a0a1..000000000000 --- a/specification/maps/data-plane/Microsoft.Maps/FeatureState/preview/1.0/examples/UpdateStateset.json +++ /dev/null @@ -1,102 +0,0 @@ -{ - "parameters": { - "geography": "us", - "api-version": "1.0", - "subscription-key": "[subscription-key]", - "statesetId": "b24bdb73-1305-3212-1909-a428d937b64", - "statesetStyleUpdateRequestBody": { - "styles": [ - { - "keyname": "s1", - "type": "boolean", - "rules": [ - { - "true": "#FFFF00", - "false": "#FFFFFF" - } - ] - }, - { - "keyname": "s2", - "type": "number", - "rules": [ - { - "range": { - "exclusiveMaximum": 50 - }, - "color": "#343deb" - }, - { - "range": { - "minimum": 50, - "exclusiveMaximum": 69 - }, - "color": "#34ebb1" - }, - { - "range": { - "minimum": 69, - "exclusiveMaximum": 90 - }, - "color": "#eba834" - }, - { - "range": { - "minimum": 90 - }, - "color": "#eb3434" - } - ] - } - ] - } - }, - "responses": { - "200": {}, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive." - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found: the requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "An error occurred while processing the request. Please try again later." - } - } - } - } -} diff --git a/specification/maps/data-plane/Microsoft.Maps/FeatureState/preview/1.0/featurestate.json b/specification/maps/data-plane/Microsoft.Maps/FeatureState/preview/1.0/featurestate.json deleted file mode 100644 index df8b036ffb72..000000000000 --- a/specification/maps/data-plane/Microsoft.Maps/FeatureState/preview/1.0/featurestate.json +++ /dev/null @@ -1,875 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "Azure Maps Feature State Service", - "version": "1.0", - "description": "APIs for managing the dynamic feature states in Azure Maps." - }, - "x-ms-parameterized-host": { - "hostTemplate": "{geography}.atlas.microsoft.com", - "parameters": [ - { - "$ref": "#/parameters/GeographicResourceLocation" - } - ] - }, - "schemes": [ - "https" - ], - "consumes": [], - "produces": [ - "application/json" - ], - "securityDefinitions": { - "azure_auth": { - "type": "oauth2", - "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", - "flow": "implicit", - "description": "These are the [Azure Active Directory OAuth2](https://docs.microsoft.com/en-us/azure/active-directory/develop/v1-overview) Flows. When paired with [Azure Role Based Access](https://docs.microsoft.com/en-us/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#### Note\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* The `Authorization URL` is specific to the Azure public cloud instance. Sovereign clouds have unique Authorization URLs and Azure Active directory configurations. \n* 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.\n* Usage of the [Azure Maps Web SDK](https://aka.ms/amaadmc) allows for configuration based setup of an application for multiple use cases.\n* Currently Azure Active Directory [v1.0](https://docs.microsoft.com/en-us/azure/active-directory/develop/azure-ad-endpoint-comparison) tokens are supported.", - "scopes": { - "user_impersonation": "Impersonates a user's Azure Active Directory account." - } - }, - "apiKeyQuery": { - "type": "apiKey", - "description": "This is a shared key which 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 which 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": "query" - } - }, - "security": [ - { - "azure_auth": [] - }, - { - "apiKeyQuery": [] - } - ], - "responses": { - "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 Azure Active Directory 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 AAD bearer token.", - "schema": { - "$ref": "#/definitions/ODataErrorResponse" - }, - "headers": { - "WWW-Authenticate": { - "type": "string", - "description": "Bearer realm=\"https://atlas.microsoft.com/\", error=\"invalid_token\", error_description=\"The access token expired\"" - } - } - }, - "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" - } - }, - "409": { - "description": "The request could not be completed due to a conflict with the current state of the resource. Likely caused by a parallel update to the same resource.", - "schema": { - "$ref": "#/definitions/ODataErrorResponse" - } - }, - "500": { - "description": "An error occurred while processing the request. Please try again later.", - "schema": { - "$ref": "#/definitions/ODataErrorResponse" - } - } - }, - "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" - }, - "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 1.0", - "type": "string", - "in": "query", - "required": true, - "default": "1.0", - "x-ms-parameter-location": "client" - }, - "DatasetIdForCreate": { - "name": "datasetId", - "description": "The datasetId must have been obtained from a successful [Dataset Create API](https://review.docs.microsoft.com/en-us/rest-staging/api/maps-master/dataset/createpreview?branch=lbs) call.", - "type": "string", - "in": "query", - "required": true, - "x-ms-parameter-location": "method" - }, - "StatesetId": { - "name": "statesetId", - "description": "The stateset id that was created.", - "type": "string", - "in": "query", - "required": true, - "x-ms-parameter-location": "method" - }, - "StatesetIdInPath": { - "name": "statesetId", - "description": "The stateset id that was created.", - "type": "string", - "in": "path", - "required": true, - "x-ms-parameter-location": "method" - }, - "FeatureIdSet": { - "name": "featureId", - "description": "The id of a feature in the given dataset. If the featureId is not present in the dataset, Bad Request response will be returned.", - "type": "string", - "in": "query", - "required": true, - "x-ms-parameter-location": "method" - }, - "FeatureIdGet": { - "name": "featureId", - "description": "The id of a feature in the given stateset. If no state was set for the featureId in the stateset earlier, Bad Request response will be returned.", - "type": "string", - "in": "query", - "required": true, - "x-ms-parameter-location": "method" - }, - "FeatureIdDelete": { - "name": "featureId", - "description": "The id of a feature in the given stateset. If no state was set for the featureId in the stateset earlier, Bad Request response will be returned.", - "type": "string", - "in": "query", - "required": true, - "x-ms-parameter-location": "method" - }, - "StateKeyNameDelete": { - "name": "stateKeyName", - "description": "The Name of the state to be deleted.", - "type": "string", - "in": "query", - "required": true, - "x-ms-parameter-location": "method" - } - }, - "paths": { - "/featureState/stateset/{statesetId}": { - "get": { - "x-publish": true, - "description": "**Applies to**: see pricing [tiers](https://azure.microsoft.com/en-us/pricing/details/azure-maps/).\n
\n\nThis GET API allows the user to get the stateset Information.\n\nThe stateset Information includes the datasetId associated to the stateset, and the styles of that stateset.", - "operationId": "FeatureState_GetStatesetPreview", - "x-ms-examples": { - "Get stateset information with a statesetId": { - "$ref": "./examples/GetStateset.json" - } - }, - "parameters": [ - { - "$ref": "#/parameters/SubscriptionKey" - }, - { - "$ref": "#/parameters/ApiVersion" - }, - { - "$ref": "#/parameters/StatesetIdInPath" - } - ], - "responses": { - "200": { - "description": "Get request completed successfully.", - "schema": { - "$ref": "#/definitions/StatesetGetResponse" - } - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" - } - } - }, - "delete": { - "x-publish": true, - "description": "**Applies to**: see pricing [tiers](https://azure.microsoft.com/en-us/pricing/details/azure-maps/).
This DELETE API allows the user to delete the stateset and the associated data.", - "operationId": "FeatureState_DeleteStatesetPreview", - "x-ms-examples": { - "Delete an existing stateset": { - "$ref": "./examples/DeleteStateset.json" - } - }, - "parameters": [ - { - "$ref": "#/parameters/SubscriptionKey" - }, - { - "$ref": "#/parameters/ApiVersion" - }, - { - "$ref": "#/parameters/StatesetIdInPath" - } - ], - "responses": { - "204": { - "description": "Stateset Deleted." - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" - } - } - }, - "put": { - "x-publish": true, - "description": "**Applies to**: see pricing [tiers](https://azure.microsoft.com/en-us/pricing/details/azure-maps/).\n
\n\nThis PUT API allows the user to update the stateset style rules.", - "operationId": "FeatureState_PutStatesetPreview", - "x-ms-examples": { - "Update stateset style rules with a statesetId": { - "$ref": "./examples/UpdateStateset.json" - } - }, - "parameters": [ - { - "$ref": "#/parameters/SubscriptionKey" - }, - { - "$ref": "#/parameters/ApiVersion" - }, - { - "$ref": "#/parameters/StatesetIdInPath" - }, - { - "name": "statesetStyleUpdateRequestBody", - "in": "body", - "description": "The stateset style JSON data. Only style rules are allowed to be updated, update on keyname and type is not allowed.", - "required": true, - "schema": { - "$ref": "#/definitions/StylesObject" - } - } - ], - "responses": { - "200": { - "description": "Stateset styles are updated successfully." - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" - } - } - } - }, - "/featureState/stateset": { - "post": { - "x-publish": true, - "description": "**Applies to**: see pricing [tiers](https://azure.microsoft.com/en-us/pricing/details/azure-maps/).\n
\n\nThis POST API allows the user to create a new Stateset and define stateset style using request body.\n\nCreator makes it possible to develop applications based on your private indoor map data using Azure Maps API and SDK. The Feature State API is part of Creator. \n\nThe Feature State service allows the user to update the states of a feature and query them to be used in other services. The dynamic properties of a feature that don't belong to the dataset are referred to as *states* here.\n\nThis Feature State service pivot on the Stateset. Like Tileset, Stateset encapsulates the storage mechanism for feature states for a dataset.\n\nOnce the stateset is created, users can use that statesetId to post feature state updates and retrieve the current feature states. A feature can have only one state at a given point in time. \n\nFeature state is defined by the key name, value and the timestamp. When a feature state update is posted to Azure Maps, the state value gets updated only if the provided state’s timestamp is later than the stored timestamp. \n\nAzure Maps MapControl provides a way to use these feature states to style the features. Please refer to the State Tile documentation for more information.", - "operationId": "FeatureState_CreateStatesetPreview", - "x-ms-examples": { - "Create a new stateset with a datasetId": { - "$ref": "./examples/CreateStateset.json" - } - }, - "parameters": [ - { - "$ref": "#/parameters/SubscriptionKey" - }, - { - "$ref": "#/parameters/ApiVersion" - }, - { - "$ref": "#/parameters/DatasetIdForCreate" - }, - { - "name": "statesetCreateRequestBody", - "in": "body", - "description": "The stateset style JSON data.", - "required": true, - "schema": { - "$ref": "#/definitions/StylesObject" - } - } - ], - "responses": { - "200": { - "description": "Stateset created.", - "schema": { - "$ref": "#/definitions/StatesetCreatedResponse" - } - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" - } - } - }, - "get": { - "x-publish": true, - "description": "**Applies to**: see pricing [tiers](https://azure.microsoft.com/en-us/pricing/details/azure-maps/).
This API allows the caller to fetch a list of all previously successfully created statesets.", - "operationId": "FeatureState_ListStatesetPreview", - "x-ms-examples": { - "List all the previously created statesets": { - "$ref": "./examples/Stateset_List.json" - } - }, - "parameters": [ - { - "$ref": "#/parameters/SubscriptionKey" - }, - { - "$ref": "#/parameters/ApiVersion" - } - ], - "responses": { - "200": { - "description": "The list stateset request completed successfully. The response body contains a list of all the previously created statesets.", - "schema": { - "$ref": "#/definitions/StatesetListResponse" - } - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" - } - } - } - }, - "/featureState/state": { - "get": { - "x-publish": true, - "operationId": "FeatureState_GetStatesPreview", - "description": "**Applies to**: see pricing [tiers](https://azure.microsoft.com/en-us/pricing/details/azure-maps/).
This API returns the current state information associated with the given feature in the given stateset.", - "x-ms-examples": { - "Get the current states of a feature": { - "$ref": "./examples/GetStates.json" - } - }, - "parameters": [ - { - "$ref": "#/parameters/SubscriptionKey" - }, - { - "$ref": "#/parameters/ApiVersion" - }, - { - "$ref": "#/parameters/StatesetId" - }, - { - "$ref": "#/parameters/FeatureIdGet" - } - ], - "responses": { - "200": { - "description": "Get request completed successfully.", - "schema": { - "$ref": "#/definitions/FeatureStatesStructure" - } - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" - } - } - }, - "post": { - "x-publish": true, - "operationId": "FeatureState_UpdateStatesPreview", - "description": "**Applies to**: see pricing [tiers](https://azure.microsoft.com/en-us/pricing/details/azure-maps/).
\nThis POST API allows the user to update the state of the given feature in the given stateset.", - "x-ms-examples": { - "Update the states of a feature": { - "$ref": "./examples/UpdateStates.json" - } - }, - "parameters": [ - { - "$ref": "#/parameters/SubscriptionKey" - }, - { - "$ref": "#/parameters/ApiVersion" - }, - { - "$ref": "#/parameters/StatesetId" - }, - { - "$ref": "#/parameters/FeatureIdSet" - }, - { - "name": "featureStateUpdateRequestBody", - "in": "body", - "description": "The feature state JSON data. A feature can have only one state at a given point in time. The specified state keyname must have been defined during the stateset creation.", - "required": true, - "schema": { - "$ref": "#/definitions/FeatureStatesStructure" - } - } - ], - "responses": { - "200": { - "description": "Feature states are updated successfully." - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" - } - } - }, - "delete": { - "x-publish": true, - "operationId": "FeatureState_DeleteStatePreview", - "description": "**Applies to**: see pricing [tiers](https://azure.microsoft.com/en-us/pricing/details/azure-maps/).
This API deletes the state information identified by the StateKeyName parameter for the feature identified by the FeatureId parameter in the the stateset.", - "x-ms-examples": { - "Delete the given feature state": { - "$ref": "./examples/DeleteFeatureState.json" - } - }, - "parameters": [ - { - "$ref": "#/parameters/SubscriptionKey" - }, - { - "$ref": "#/parameters/ApiVersion" - }, - { - "$ref": "#/parameters/StatesetId" - }, - { - "$ref": "#/parameters/FeatureIdDelete" - }, - { - "$ref": "#/parameters/StateKeyNameDelete" - } - ], - "responses": { - "200": { - "description": "Feature states deleted successfully." - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "409": { - "$ref": "#/responses/409" - }, - "500": { - "$ref": "#/responses/500" - } - } - } - } - }, - "definitions": { - "ODataErrorResponse": { - "type": "object", - "description": "This response object is returned when an error occurs in the Maps API.", - "properties": { - "error": { - "$ref": "#/definitions/ODataError" - } - } - }, - "ODataError": { - "type": "object", - "description": "This object is returned when an error occurs in the 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." - } - } - }, - "StatesetGetResponse": { - "description": "The response model for the successful Stateset Get API.", - "type": "object", - "properties": { - "datasetIdList": { - "description": "Dataset ID associated with the stateset.", - "type": "array", - "items": { - "type": "string" - } - }, - "statesetStyle": { - "$ref": "#/definitions/StylesObject" - } - } - }, - "StatesetListResponse": { - "description": "The response model for the successful Stateset List API.", - "type": "object", - "properties": { - "statesetDetailList": { - "description": "A list of statesets information.", - "type": "array", - "items": { - "$ref": "#/definitions/StatesetInfoObject" - } - } - } - }, - "StatesetInfoObject": { - "description": "The stateset information detail.", - "type": "object", - "properties": { - "statesetId": { - "description": "The stateset ID of this stateset.", - "type": "string" - }, - "datasetIdList": { - "description": "Dataset ID associated with the stateset.", - "type": "array", - "items": { - "type": "string" - } - }, - "statesetStyle": { - "$ref": "#/definitions/StylesObject" - } - } - }, - "StatesetCreatedResponse": { - "description": "The response model for the successful Stateset Create API.", - "type": "object", - "properties": { - "statesetId": { - "description": "The ID for the new stateset created.", - "type": "string", - "readOnly": true - } - } - }, - "FeatureStatesStructure": { - "description": "The feature states model for a feature.", - "type": "object", - "properties": { - "states": { - "description": "The feature states array.", - "type": "array", - "items": { - "$ref": "#/definitions/FeatureStateObject" - } - } - } - }, - "FeatureStateObject": { - "description": "Single feature state model.", - "type": "object", - "properties": { - "keyName": { - "description": "Feature state Keyname.", - "type": "string" - }, - "value": { - "description": "Value for the feature state.", - "type": "object" - }, - "eventTimestamp": { - "description": "Timestamp when the feature state was captured.", - "type": "string" - } - } - }, - "StylesObject": { - "description": "The styles model.", - "type": "object", - "properties": { - "styles": { - "description": "An array of stateset styles. The style rule could be a numeric or string or a boolean type style rule. Refer to NumberRuleObject, StringRuleObject and BooleanRuleObject definitions [here](https://aka.ms/AzureMapsStatesetStylesObject). ", - "type": "array", - "items": { - "$ref": "#/definitions/StyleObject" - } - } - } - }, - "StyleObject": { - "description": "The stateset style model. The style rule could be a numeric type style rule or a boolean type style rule. Refer to NumberRuleObject, StringRuleObject and BooleanRuleObject definitions [here](https://aka.ms/AzureMapsStatesetStylesObject). ", - "type": "object" - }, - "NumberRuleObject": { - "description": "The numeric rule", - "type": "object", - "properties": { - "range": { - "$ref": "#/definitions/RangeObject" - }, - "color": { - "description": "Color is a JSON string in a variety of permitted formats, HTML-style hex values, RGB (\"#ff0\", \"#ffff00\", \"rgb(255, 255, 0)\"), RGBA (\"rgba(255, 255, 0, 1)\"), HSL(\"hsl(100, 50%, 50%)\"), and HSLA(\"hsla(100, 50%, 50%, 1)\"). Predefined HTML colors names, like yellow and blue, are also permitted.", - "type": "string" - } - } - }, - "RangeObject": { - "description": "The numeric value range for this style rule, If the value is in the range, all the conditions must hold true.", - "type": "object", - "properties": { - "minimum": { - "description": "All the number x that x ≥ minimum.", - "type": "number", - "format": "double" - }, - "maximum": { - "description": "All the number x that x ≤ maximum.", - "type": "number", - "format": "double" - }, - "exclusiveMinimum": { - "description": "All the number x that x > exclusiveMinimum.", - "type": "number", - "format": "double" - }, - "exclusiveMaximum": { - "description": "All the number x that x < exclusiveMaximum.", - "type": "number", - "format": "double" - } - } - }, - "BooleanRuleObject": { - "description": "the boolean rule", - "type": "object", - "properties": { - "true": { - "description": "The color when value is true.", - "type": "string" - }, - "false": { - "description": "The color when value is false.", - "type": "string" - } - } - }, - "StringRuleObject": { - "description": "The string rule. The string value matching is case sensitive. If a feature's state doesn't match any of the values defined here, that feature will not have any dynamic style. If duplicate string values are given, the first one takes precedence.", - "type": "object", - "properties": { - "stateValue1": { - "description": "The color when value string is stateValue1.", - "type": "string" - }, - "stateValue2": { - "description": "The color when value string is stateValue2.", - "type": "string" - }, - "stateValueN": { - "description": "The color when value string is stateValueN.", - "type": "string" - } - } - }, - "StyleRuleBase": { - "description": "contains common properties for numeric, string and boolean style rules.", - "discriminator": "type", - "required": [ - "keyName", - "type" - ], - "properties": { - "keyName": { - "description": "Stateset style key name. Key names are random strings but they should be unique inside style array.", - "type": "string" - }, - "type": { - "description": "The type of stateset style.", - "type": "string", - "enum": [ - "number", - "boolean", - "string" - ] - } - } - }, - "BooleanTypeStyleRule": { - "description": "the boolean type style rule object.", - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/StyleRuleBase" - } - ], - "properties": { - "rules": { - "description": "Boolean style rules.", - "type": "array", - "items": { - "$ref": "#/definitions/BooleanRuleObject" - } - } - } - }, - "NumberTypeStyleRule": { - "description": "The numeric type style rule object.", - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/StyleRuleBase" - } - ], - "properties": { - "rules": { - "description": "Numeric style rules.", - "type": "array", - "items": { - "$ref": "#/definitions/NumberRuleObject" - } - } - } - }, - "StringTypeStyleRule": { - "description": "The string type style rule object.", - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/StyleRuleBase" - } - ], - "properties": { - "rules": { - "description": "String style rules.", - "type": "array", - "items": { - "$ref": "#/definitions/StringRuleObject" - } - } - } - } - } -} diff --git a/specification/maps/data-plane/Microsoft.Maps/FeatureState/preview/2.0/examples/CreateStateset.json b/specification/maps/data-plane/Microsoft.Maps/FeatureState/preview/2.0/examples/CreateStateset.json index 5b802bba7f5d..880d8ffa2a42 100644 --- a/specification/maps/data-plane/Microsoft.Maps/FeatureState/preview/2.0/examples/CreateStateset.json +++ b/specification/maps/data-plane/Microsoft.Maps/FeatureState/preview/2.0/examples/CreateStateset.json @@ -2,13 +2,12 @@ "parameters": { "geography": "us", "api-version": "2.0", - "subscription-key": "[subscription-key]", "description": "Stateset for Azure Maps POC.", "datasetId": "5d34fbe8-87b7-f7c0-3144-c50e003a3c75", "statesetCreateRequestBody": { "styles": [ { - "keyname": "s1", + "keyName": "s1", "type": "boolean", "rules": [ { @@ -18,7 +17,7 @@ ] }, { - "keyname": "s2", + "keyName": "s2", "type": "number", "rules": [ { @@ -50,7 +49,7 @@ ] }, { - "keyname": "s3", + "keyName": "s3", "type": "string", "rules": [ { @@ -68,51 +67,6 @@ "body": { "statesetId": "b24bdb73-1305-3212-1909-a428d937b64f" } - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive." - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found: the requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "An error occurred while processing the request. Please try again later." - } - } } } } diff --git a/specification/maps/data-plane/Microsoft.Maps/FeatureState/preview/2.0/examples/DeleteFeatureState.json b/specification/maps/data-plane/Microsoft.Maps/FeatureState/preview/2.0/examples/DeleteFeatureState.json index ed49ef199221..1b5f29227d13 100644 --- a/specification/maps/data-plane/Microsoft.Maps/FeatureState/preview/2.0/examples/DeleteFeatureState.json +++ b/specification/maps/data-plane/Microsoft.Maps/FeatureState/preview/2.0/examples/DeleteFeatureState.json @@ -2,66 +2,11 @@ "parameters": { "geography": "us", "api-version": "2.0", - "subscription-key": "[subscription-key]", "statesetId": "b24bdb73-1305-3212-1909-a428d937b64", "featureId": "SPC4709", "stateKeyName": "keyName1" }, "responses": { - "204": {}, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive." - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found: the requested resource could not be found, but it may be available again in the future." - } - } - }, - "409": { - "headers": {}, - "body": { - "error": { - "code": "409 Conflict", - "message": "The request could not be completed due to a conflict with the current state of the resource." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "An error occurred while processing the request. Please try again later." - } - } - } + "204": {} } } diff --git a/specification/maps/data-plane/Microsoft.Maps/FeatureState/preview/2.0/examples/DeleteStateset.json b/specification/maps/data-plane/Microsoft.Maps/FeatureState/preview/2.0/examples/DeleteStateset.json index 0cf29bde1d89..ae9a27be981f 100644 --- a/specification/maps/data-plane/Microsoft.Maps/FeatureState/preview/2.0/examples/DeleteStateset.json +++ b/specification/maps/data-plane/Microsoft.Maps/FeatureState/preview/2.0/examples/DeleteStateset.json @@ -2,55 +2,9 @@ "parameters": { "geography": "us", "api-version": "2.0", - "subscription-key": "[subscription-key]", "statesetId": "b24bdb73-1305-3212-1909-a428d937b64f" }, "responses": { - "204": {}, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive." - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found: the requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "An error occurred while processing the request. Please try again later." - } - } - } + "204": {} } } diff --git a/specification/maps/data-plane/Microsoft.Maps/FeatureState/preview/2.0/examples/GetStates.json b/specification/maps/data-plane/Microsoft.Maps/FeatureState/preview/2.0/examples/GetStates.json index 4d25498eb5a2..cfcd52089403 100644 --- a/specification/maps/data-plane/Microsoft.Maps/FeatureState/preview/2.0/examples/GetStates.json +++ b/specification/maps/data-plane/Microsoft.Maps/FeatureState/preview/2.0/examples/GetStates.json @@ -2,7 +2,6 @@ "parameters": { "geography": "us", "api-version": "2.0", - "subscription-key": "[subscription-key]", "statesetId": "b24bdb73-1305-3212-1909-a428d937b64", "featureId": "SPC4709" }, @@ -17,51 +16,6 @@ } ] } - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive." - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found: the requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "An error occurred while processing the request. Please try again later." - } - } } } } diff --git a/specification/maps/data-plane/Microsoft.Maps/FeatureState/preview/2.0/examples/GetStateset.json b/specification/maps/data-plane/Microsoft.Maps/FeatureState/preview/2.0/examples/GetStateset.json index 3a745cac530e..e853a767027e 100644 --- a/specification/maps/data-plane/Microsoft.Maps/FeatureState/preview/2.0/examples/GetStateset.json +++ b/specification/maps/data-plane/Microsoft.Maps/FeatureState/preview/2.0/examples/GetStateset.json @@ -2,7 +2,6 @@ "parameters": { "geography": "us", "api-version": "2.0", - "subscription-key": "[subscription-key]", "statesetId": "b24bdb73-1305-3212-1909-a428d937b64" }, "responses": { @@ -32,34 +31,34 @@ "range": { "minimum": null, "maximum": null, - "exclusiveMinumum": null, - "exclusiveMaximum": "50" + "exclusiveMinimum": null, + "exclusiveMaximum": 50 }, "color": "#343deb" }, { "range": { - "minimum": "50", + "minimum": 50, "maximum": null, - "exclusiveMinumum": null, - "exclusiveMaximum": "69" + "exclusiveMinimum": null, + "exclusiveMaximum": 69 }, "color": "#34ebb1" }, { "range": { - "minimum": "69", + "minimum": 69, "maximum": null, - "exclusiveMinumum": null, - "exclusiveMaximum": "90" + "exclusiveMinimum": null, + "exclusiveMaximum": 90 }, "color": "#eba834" }, { "range": { - "minimum": "90", + "minimum": 90, "maximum": null, - "exclusiveMinumum": null, + "exclusiveMinimum": null, "exclusiveMaximum": null }, "color": "#eb3434" @@ -69,51 +68,6 @@ ] } } - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive." - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found: the requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "An error occurred while processing the request. Please try again later." - } - } } } } diff --git a/specification/maps/data-plane/Microsoft.Maps/FeatureState/preview/2.0/examples/Stateset_List.json b/specification/maps/data-plane/Microsoft.Maps/FeatureState/preview/2.0/examples/Stateset_List.json index bd356007f6f9..555e8e54f3e7 100644 --- a/specification/maps/data-plane/Microsoft.Maps/FeatureState/preview/2.0/examples/Stateset_List.json +++ b/specification/maps/data-plane/Microsoft.Maps/FeatureState/preview/2.0/examples/Stateset_List.json @@ -1,8 +1,7 @@ { "parameters": { "geography": "us", - "api-version": "2.0", - "subscription-key": "[subscription-key]" + "api-version": "2.0" }, "responses": { "200": { @@ -34,34 +33,34 @@ "range": { "minimum": null, "maximum": null, - "exclusiveMinumum": null, - "exclusiveMaximum": "50" + "exclusiveMinimum": null, + "exclusiveMaximum": 50 }, "color": "#343deb" }, { "range": { - "minimum": "50", + "minimum": 50, "maximum": null, - "exclusiveMinumum": null, - "exclusiveMaximum": "69" + "exclusiveMinimum": null, + "exclusiveMaximum": 69 }, "color": "#34ebb1" }, { "range": { - "minimum": "69", + "minimum": 69, "maximum": null, - "exclusiveMinumum": null, - "exclusiveMaximum": "90" + "exclusiveMinimum": null, + "exclusiveMaximum": 90 }, "color": "#eba834" }, { "range": { - "minimum": "90", + "minimum": 90, "maximum": null, - "exclusiveMinumum": null, + "exclusiveMinimum": null, "exclusiveMaximum": null }, "color": "#eb3434" @@ -73,51 +72,6 @@ } ] } - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive." - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found: the requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "An error occurred while processing the request. Please try again later." - } - } } } } diff --git a/specification/maps/data-plane/Microsoft.Maps/FeatureState/preview/2.0/examples/UpdateStates.json b/specification/maps/data-plane/Microsoft.Maps/FeatureState/preview/2.0/examples/UpdateStates.json index ce3ec07ee9c6..48873f8a32d9 100644 --- a/specification/maps/data-plane/Microsoft.Maps/FeatureState/preview/2.0/examples/UpdateStates.json +++ b/specification/maps/data-plane/Microsoft.Maps/FeatureState/preview/2.0/examples/UpdateStates.json @@ -2,7 +2,6 @@ "parameters": { "geography": "us", "api-version": "2.0", - "subscription-key": "[subscription-key]", "statesetId": "b24bdb73-1305-3212-1909-a428d937b64", "featureId": "SPC4709", "featureStateUpdateRequestBody": { @@ -16,51 +15,6 @@ } }, "responses": { - "200": {}, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive." - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found: the requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "An error occurred while processing the request. Please try again later." - } - } - } + "200": {} } } diff --git a/specification/maps/data-plane/Microsoft.Maps/FeatureState/preview/2.0/examples/UpdateStateset.json b/specification/maps/data-plane/Microsoft.Maps/FeatureState/preview/2.0/examples/UpdateStateset.json index 2fd16cb893d5..9c3e9e62f2d3 100644 --- a/specification/maps/data-plane/Microsoft.Maps/FeatureState/preview/2.0/examples/UpdateStateset.json +++ b/specification/maps/data-plane/Microsoft.Maps/FeatureState/preview/2.0/examples/UpdateStateset.json @@ -2,12 +2,11 @@ "parameters": { "geography": "us", "api-version": "2.0", - "subscription-key": "[subscription-key]", "statesetId": "b24bdb73-1305-3212-1909-a428d937b64", "statesetStyleUpdateRequestBody": { "styles": [ { - "keyname": "s1", + "keyName": "s1", "type": "boolean", "rules": [ { @@ -17,7 +16,7 @@ ] }, { - "keyname": "s2", + "keyName": "s2", "type": "number", "rules": [ { @@ -52,51 +51,6 @@ } }, "responses": { - "200": {}, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive." - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found: the requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "An error occurred while processing the request. Please try again later." - } - } - } + "200": {} } } diff --git a/specification/maps/data-plane/Microsoft.Maps/FeatureState/preview/2.0/featurestate.json b/specification/maps/data-plane/Microsoft.Maps/FeatureState/preview/2.0/featurestate.json index 7398a11f654f..45ecc634c193 100644 --- a/specification/maps/data-plane/Microsoft.Maps/FeatureState/preview/2.0/featurestate.json +++ b/specification/maps/data-plane/Microsoft.Maps/FeatureState/preview/2.0/featurestate.json @@ -9,7 +9,7 @@ "hostTemplate": "{geography}.atlas.microsoft.com", "parameters": [ { - "$ref": "#/parameters/GeographicResourceLocation" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/GeographicResourceLocation" } ] }, @@ -20,6 +20,19 @@ "produces": [ "application/json" ], + "security": [ + { + "azure_auth": [ + "user_impersonation" + ] + }, + { + "SubscriptionKeyInHeader": [] + }, + { + "SubscriptionKeyInQuery": [] + } + ], "securityDefinitions": { "azure_auth": { "type": "oauth2", @@ -27,107 +40,25 @@ "flow": "implicit", "description": "These are the [Azure Active Directory OAuth2](https://docs.microsoft.com/en-us/azure/active-directory/develop/v1-overview) Flows. When paired with [Azure Role Based Access](https://docs.microsoft.com/en-us/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#### Note\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* The `Authorization URL` is specific to the Azure public cloud instance. Sovereign clouds have unique Authorization URLs and Azure Active directory configurations. \n* 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.\n* Usage of the [Azure Maps Web SDK](https://aka.ms/amaadmc) allows for configuration based setup of an application for multiple use cases.\n* Currently Azure Active Directory [v1.0](https://docs.microsoft.com/en-us/azure/active-directory/develop/azure-ad-endpoint-comparison) tokens are supported.", "scopes": { - "user_impersonation": "Impersonates a user's Azure Active Directory account." + "user_impersonation": "impersonate your user account" } }, - "apiKeyQuery": { + "SubscriptionKeyInHeader": { "type": "apiKey", - "description": "This is a shared key which 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 which 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": "query" - } - }, - "security": [ - { - "azure_auth": [] - }, - { - "apiKeyQuery": [] - } - ], - "responses": { - "400": { - "description": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive.", - "schema": { - "$ref": "#/definitions/ODataErrorResponse" - } + "in": "header" }, - "401": { - "description": "Access denied due to invalid subscription key or invalid Azure Active Directory 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 AAD bearer token.", - "schema": { - "$ref": "#/definitions/ODataErrorResponse" - }, - "headers": { - "WWW-Authenticate": { - "type": "string", - "description": "Bearer realm=\"https://atlas.microsoft.com/\", error=\"invalid_token\", error_description=\"The access token expired\"" - } - } - }, - "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" - } - }, - "409": { - "description": "The request could not be completed due to a conflict with the current state of the resource. Likely caused by a parallel update to the same resource.", - "schema": { - "$ref": "#/definitions/ODataErrorResponse" - } - }, - "500": { - "description": "An error occurred while processing the request. Please try again later.", - "schema": { - "$ref": "#/definitions/ODataErrorResponse" - } + "SubscriptionKeyInQuery": { + "type": "apiKey", + "name": "subscription-key", + "in": "query" } }, + "responses": {}, "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" - }, - "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": { + "FeaturestateApiVersionV2": { "name": "api-version", - "description": "Version number of Azure Maps API. Current version is 2.0", + "description": "Version number of Azure Maps API.", "type": "string", "in": "query", "required": true, @@ -194,7 +125,6 @@ "paths": { "/featureStateSets": { "post": { - "x-publish": true, "description": "**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).\n\nCreator makes it possible to develop applications based on your private indoor map data using Azure Maps API and SDK. [This](https://docs.microsoft.com/azure/azure-maps/creator-indoor-maps) article introduces concepts and tools that apply to Azure Maps Creator.\n\nThis POST API allows the user to create a new Stateset and define stateset style using request body.\n\nCreator makes it possible to develop applications based on your private indoor map data using Azure Maps API and SDK. The Feature State API is part of Creator. \n\nThe Feature State service allows the user to update the states of a feature and query them to be used in other services. The dynamic properties of a feature that don't belong to the dataset are referred to as *states* here.\n\nThis Feature State service pivot on the Stateset. Like Tileset, Stateset encapsulates the storage mechanism for feature states for a dataset.\n\nOnce the stateset is created, users can use that statesetId to post feature state updates and retrieve the current feature states. A feature can have only one state at a given point in time. \n\nFeature state is defined by the key name, value and the timestamp. When a feature state update is posted to Azure Maps, the state value gets updated only if the provided state’s timestamp is later than the stored timestamp. \n\nAzure Maps MapControl provides a way to use these feature states to style the features. Please refer to the State Tile documentation for more information.", "operationId": "FeatureState_CreateStateset", "x-ms-examples": { @@ -204,10 +134,7 @@ }, "parameters": [ { - "$ref": "#/parameters/SubscriptionKey" - }, - { - "$ref": "#/parameters/ApiVersion" + "$ref": "#/parameters/FeaturestateApiVersionV2" }, { "$ref": "#/parameters/DatasetIdForCreate" @@ -232,25 +159,12 @@ "$ref": "#/definitions/StatesetCreatedResponse" } }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" + "default": { + "$ref": "../../../Common/preview/1.0/common.json#/responses/default" } } }, "get": { - "x-publish": true, "description": "**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).\n\nCreator makes it possible to develop applications based on your private indoor map data using Azure Maps API and SDK. [This](https://docs.microsoft.com/azure/azure-maps/creator-indoor-maps) article introduces concepts and tools that apply to Azure Maps Creator.\n\n This API allows the caller to fetch a list of all previously successfully created statesets.", "operationId": "FeatureState_ListStateset", "x-ms-examples": { @@ -260,12 +174,13 @@ }, "parameters": [ { - "$ref": "#/parameters/SubscriptionKey" - }, - { - "$ref": "#/parameters/ApiVersion" + "$ref": "#/parameters/FeaturestateApiVersionV2" } ], + "x-ms-pageable": { + "itemName": "statesets", + "nextLinkName": "nextLink" + }, "responses": { "200": { "description": "The list stateset request completed successfully. The response body contains a list of all the previously created statesets.", @@ -273,27 +188,14 @@ "$ref": "#/definitions/StatesetListResponse" } }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" + "default": { + "$ref": "../../../Common/preview/1.0/common.json#/responses/default" } } } }, "/featureStateSets/{statesetId}": { "put": { - "x-publish": true, "description": "**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).\n\nCreator makes it possible to develop applications based on your private indoor map data using Azure Maps API and SDK. [This](https://docs.microsoft.com/azure/azure-maps/creator-indoor-maps) article introduces concepts and tools that apply to Azure Maps Creator.\n\nThis PUT API allows the user to update the stateset style rules.", "operationId": "FeatureState_PutStateset", "x-ms-examples": { @@ -303,10 +205,7 @@ }, "parameters": [ { - "$ref": "#/parameters/SubscriptionKey" - }, - { - "$ref": "#/parameters/ApiVersion" + "$ref": "#/parameters/FeaturestateApiVersionV2" }, { "$ref": "#/parameters/StatesetIdInPath" @@ -325,25 +224,12 @@ "200": { "description": "Stateset styles are updated successfully." }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" + "default": { + "$ref": "../../../Common/preview/1.0/common.json#/responses/default" } } }, "delete": { - "x-publish": true, "description": "**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).\n\nCreator makes it possible to develop applications based on your private indoor map data using Azure Maps API and SDK. [This](https://docs.microsoft.com/azure/azure-maps/creator-indoor-maps) article introduces concepts and tools that apply to Azure Maps Creator.\n\n This DELETE API allows the user to delete the stateset and the associated data.", "operationId": "FeatureState_DeleteStateset", "x-ms-examples": { @@ -353,10 +239,7 @@ }, "parameters": [ { - "$ref": "#/parameters/SubscriptionKey" - }, - { - "$ref": "#/parameters/ApiVersion" + "$ref": "#/parameters/FeaturestateApiVersionV2" }, { "$ref": "#/parameters/StatesetIdInPath" @@ -366,25 +249,12 @@ "204": { "description": "Stateset Deleted." }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" + "default": { + "$ref": "../../../Common/preview/1.0/common.json#/responses/default" } } }, "get": { - "x-publish": true, "description": "**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).\n\nCreator makes it possible to develop applications based on your private indoor map data using Azure Maps API and SDK. [This](https://docs.microsoft.com/azure/azure-maps/creator-indoor-maps) article introduces concepts and tools that apply to Azure Maps Creator.\n\nThis GET API allows the user to get the stateset Information.\n\nThe stateset Information includes the datasetId associated to the stateset, and the styles of that stateset.", "operationId": "FeatureState_GetStateset", "x-ms-examples": { @@ -394,10 +264,7 @@ }, "parameters": [ { - "$ref": "#/parameters/SubscriptionKey" - }, - { - "$ref": "#/parameters/ApiVersion" + "$ref": "#/parameters/FeaturestateApiVersionV2" }, { "$ref": "#/parameters/StatesetIdInPath" @@ -410,27 +277,14 @@ "$ref": "#/definitions/StatesetGetResponse" } }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" + "default": { + "$ref": "../../../Common/preview/1.0/common.json#/responses/default" } } } }, "/featureStateSets/{statesetId}/featureStates/{featureId}": { "put": { - "x-publish": true, "operationId": "FeatureState_UpdateStates", "description": "**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).\n\nCreator makes it possible to develop applications based on your private indoor map data using Azure Maps API and SDK. [This](https://docs.microsoft.com/azure/azure-maps/creator-indoor-maps) article introduces concepts and tools that apply to Azure Maps Creator.\n\nThis PUT API allows the user to update the state of the given feature in the given stateset.", "x-ms-examples": { @@ -440,10 +294,7 @@ }, "parameters": [ { - "$ref": "#/parameters/SubscriptionKey" - }, - { - "$ref": "#/parameters/ApiVersion" + "$ref": "#/parameters/FeaturestateApiVersionV2" }, { "$ref": "#/parameters/StatesetIdInPath" @@ -465,25 +316,12 @@ "200": { "description": "Feature states are updated successfully." }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" + "default": { + "$ref": "../../../Common/preview/1.0/common.json#/responses/default" } } }, "delete": { - "x-publish": true, "operationId": "FeatureState_DeleteState", "description": "**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).\n\nCreator makes it possible to develop applications based on your private indoor map data using Azure Maps API and SDK. [This](https://docs.microsoft.com/azure/azure-maps/creator-indoor-maps) article introduces concepts and tools that apply to Azure Maps Creator.\n\n This API deletes the state information identified by the StateKeyName parameter for the feature identified by the FeatureId parameter in the the stateset.", "x-ms-examples": { @@ -493,10 +331,7 @@ }, "parameters": [ { - "$ref": "#/parameters/SubscriptionKey" - }, - { - "$ref": "#/parameters/ApiVersion" + "$ref": "#/parameters/FeaturestateApiVersionV2" }, { "$ref": "#/parameters/StatesetIdInPath" @@ -512,28 +347,12 @@ "204": { "description": "Feature states deleted successfully." }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "409": { - "$ref": "#/responses/409" - }, - "500": { - "$ref": "#/responses/500" + "default": { + "$ref": "../../../Common/preview/1.0/common.json#/responses/default" } } }, "get": { - "x-publish": true, "operationId": "FeatureState_GetStates", "description": "**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).\n\nCreator makes it possible to develop applications based on your private indoor map data using Azure Maps API and SDK. [This](https://docs.microsoft.com/azure/azure-maps/creator-indoor-maps) article introduces concepts and tools that apply to Azure Maps Creator.\n\n This API returns the current state information associated with the given feature in the given stateset.", "x-ms-examples": { @@ -543,10 +362,7 @@ }, "parameters": [ { - "$ref": "#/parameters/SubscriptionKey" - }, - { - "$ref": "#/parameters/ApiVersion" + "$ref": "#/parameters/FeaturestateApiVersionV2" }, { "$ref": "#/parameters/StatesetIdInPath" @@ -562,62 +378,14 @@ "$ref": "#/definitions/FeatureStatesStructure" } }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" + "default": { + "$ref": "../../../Common/preview/1.0/common.json#/responses/default" } } } } }, "definitions": { - "ODataErrorResponse": { - "type": "object", - "description": "This response object is returned when an error occurs in the Maps API.", - "properties": { - "error": { - "$ref": "#/definitions/ODataError" - } - } - }, - "ODataError": { - "type": "object", - "description": "This object is returned when an error occurs in the 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." - } - } - }, "StatesetGetResponse": { "description": "The response model for the successful Stateset Get API.", "type": "object", @@ -737,25 +505,21 @@ } } }, - "StyleObject": { - "description": "The stateset style model. The style rule could be a numeric type style rule or a boolean type style rule. Refer to NumberRuleObject, StringRuleObject and BooleanRuleObject definitions [here](https://aka.ms/AzureMapsStatesetStylesObject). ", - "type": "object" - }, "NumberRuleObject": { - "description": "The numeric rule", + "description": "The numeric rule. The color is selected from the first range it falls into.", "type": "object", "properties": { "range": { "$ref": "#/definitions/RangeObject" }, "color": { - "description": "Color is a JSON string in a variety of permitted formats, HTML-style hex values, RGB (\"#ff0\", \"#ffff00\", \"rgb(255, 255, 0)\"), RGBA (\"rgba(255, 255, 0, 1)\"), HSL(\"hsl(100, 50%, 50%)\"), and HSLA(\"hsla(100, 50%, 50%, 1)\"). Predefined HTML colors names, like yellow and blue, are also permitted.", + "description": "The color when value is within the range. Color is a JSON string in a variety of permitted formats, HTML-style hex values, RGB (\"#ff0\", \"#ffff00\", \"rgb(255, 255, 0)\"), RGBA (\"rgba(255, 255, 0, 1)\"), HSL(\"hsl(100, 50%, 50%)\"), and HSLA(\"hsla(100, 50%, 50%, 1)\"). Predefined HTML colors names, like yellow and blue, are also permitted.", "type": "string" } } }, "RangeObject": { - "description": "The numeric value range for this style rule, If the value is in the range, all the conditions must hold true.", + "description": "The numeric value range for this style rule. If the value is in the range, all the conditions must hold true.", "type": "object", "properties": { "minimum": { @@ -781,15 +545,15 @@ } }, "BooleanRuleObject": { - "description": "the boolean rule", + "description": "The boolean rule. The color is selected based on the logic value of the key.", "type": "object", "properties": { "true": { - "description": "The color when value is true.", + "description": "The color when value is true. Color is a JSON string in a variety of permitted formats, HTML-style hex values, RGB (\"#ff0\", \"#ffff00\", \"rgb(255, 255, 0)\"), RGBA (\"rgba(255, 255, 0, 1)\"), HSL(\"hsl(100, 50%, 50%)\"), and HSLA(\"hsla(100, 50%, 50%, 1)\"). Predefined HTML colors names, like yellow and blue, are also permitted.", "type": "string" }, "false": { - "description": "The color when value is false.", + "description": "The color when value is false. Color is a JSON string in a variety of permitted formats, HTML-style hex values, RGB (\"#ff0\", \"#ffff00\", \"rgb(255, 255, 0)\"), RGBA (\"rgba(255, 255, 0, 1)\"), HSL(\"hsl(100, 50%, 50%)\"), and HSLA(\"hsla(100, 50%, 50%, 1)\"). Predefined HTML colors names, like yellow and blue, are also permitted.", "type": "string" } } @@ -797,50 +561,63 @@ "StringRuleObject": { "description": "The string rule. The string value matching is case sensitive. If a feature's state doesn't match any of the values defined here, that feature will not have any dynamic style. If duplicate string values are given, the first one takes precedence.", "type": "object", - "properties": { - "stateValue1": { - "description": "The color when value string is stateValue1.", - "type": "string" - }, - "stateValue2": { - "description": "The color when value string is stateValue2.", - "type": "string" - }, - "stateValueN": { - "description": "The color when value string is stateValueN.", - "type": "string" - } + "additionalProperties": { + "description": "The color when the keyName value string is equal to this property name. Color is a JSON string in a variety of permitted formats, HTML-style hex values, RGB (\"#ff0\", \"#ffff00\", \"rgb(255, 255, 0)\"), RGBA (\"rgba(255, 255, 0, 1)\"), HSL(\"hsl(100, 50%, 50%)\"), and HSLA(\"hsla(100, 50%, 50%, 1)\"). Predefined HTML colors names, like yellow and blue, are also permitted.", + "type": "string" } }, - "StyleRuleBase": { - "description": "contains common properties for numeric, string and boolean style rules.", + "StyleObject": { + "description": "The stateset style model. The style rule could be a numeric type style rule or a boolean type style rule. Refer to NumberRuleObject, StringRuleObject and BooleanRuleObject definitions [here](https://aka.ms/AzureMapsStatesetStylesObject). ", "discriminator": "type", + "type": "object", "required": [ "keyName", "type" ], "properties": { "keyName": { - "description": "Stateset style key name. Key names are random strings but they should be unique inside style array. Maximum length allowed is 1000.", + "description": "Stateset style key name. Key names are random strings but they should be unique inside style array.", "type": "string" }, "type": { "description": "The type of stateset style.", "type": "string", "enum": [ - "number", "boolean", + "number", "string" - ] + ], + "x-ms-enum": { + "name": "StyleObjectType", + "modelAsString": true, + "values": [ + { + "value": "boolean", + "description": "Boolean type of stateset style.", + "name": "BooleanTypeStyleRule" + }, + { + "value": "number", + "description": "Number type of stateset style.", + "name": "NumberTypeStyleRule" + }, + { + "value": "string", + "description": "String type of stateset style.", + "name": "StringTypeStyleRule" + } + ] + } } } }, "BooleanTypeStyleRule": { - "description": "the boolean type style rule object.", + "description": "The boolean type style rule object.", + "x-ms-discriminator-value": "boolean", "type": "object", "allOf": [ { - "$ref": "#/definitions/StyleRuleBase" + "$ref": "#/definitions/StyleObject" } ], "properties": { @@ -851,14 +628,18 @@ "$ref": "#/definitions/BooleanRuleObject" } } - } + }, + "required": [ + "rules" + ] }, "NumberTypeStyleRule": { "description": "The numeric type style rule object.", + "x-ms-discriminator-value": "number", "type": "object", "allOf": [ { - "$ref": "#/definitions/StyleRuleBase" + "$ref": "#/definitions/StyleObject" } ], "properties": { @@ -869,14 +650,18 @@ "$ref": "#/definitions/NumberRuleObject" } } - } + }, + "required": [ + "rules" + ] }, "StringTypeStyleRule": { "description": "The string type style rule object.", + "x-ms-discriminator-value": "string", "type": "object", "allOf": [ { - "$ref": "#/definitions/StyleRuleBase" + "$ref": "#/definitions/StyleObject" } ], "properties": { @@ -887,7 +672,10 @@ "$ref": "#/definitions/StringRuleObject" } } - } + }, + "required": [ + "rules" + ] } } } diff --git a/specification/maps/data-plane/Microsoft.Maps/Feedback/preview/1.0/feedback.json b/specification/maps/data-plane/Microsoft.Maps/Feedback/preview/1.0/feedback.json deleted file mode 100644 index e32a48a67715..000000000000 --- a/specification/maps/data-plane/Microsoft.Maps/Feedback/preview/1.0/feedback.json +++ /dev/null @@ -1,685 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "Azure Maps Feedback Service", - "version": "1.0" - }, - "host": "atlas.microsoft.com", - "schemes": [ - "https" - ], - "consumes": [], - "produces": [ - "application/json", - "application/xml" - ], - "securityDefinitions": { - "azure_auth": { - "type": "oauth2", - "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", - "flow": "implicit", - "description": "These are the [Azure Active Directory OAuth2](https://docs.microsoft.com/en-us/azure/active-directory/develop/v1-overview) Flows. When paired with [Azure Role Based Access](https://docs.microsoft.com/en-us/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#### Note\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* The `Authorization URL` is specific to the Azure public cloud instance. Sovereign clouds have unique Authorization URLs and Azure Active directory configurations. \n* 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.\n* Usage of the [Azure Maps Web SDK](https://aka.ms/amaadmc) allows for configuration based setup of an application for multiple use cases.\n* Currently Azure Active Directory [v1.0](https://docs.microsoft.com/en-us/azure/active-directory/develop/azure-ad-endpoint-comparison) tokens are supported.", - "scopes": { - "user_impersonation": "Impersonates a user's Azure Active Directory account." - } - }, - "apiKeyQuery": { - "type": "apiKey", - "description": "This is a shared key which 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 which 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": "query" - } - }, - "security": [ - { - "azure_auth": [] - }, - { - "apiKeyQuery": [] - } - ], - "responses": { - "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 Azure Active Directory 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 AAD bearer token.", - "schema": { - "$ref": "#/definitions/ODataErrorResponse" - }, - "headers": { - "WWW-Authenticate": { - "type": "string", - "description": "Bearer realm=\"https://atlas.microsoft.com/\", error=\"invalid_token\", error_description=\"The access token expired\"" - } - } - }, - "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" - } - } - }, - "parameters": { - "ClientId": { - "name": "x-ms-client-id", - "description": "Specifies which account is intended for usage in conjunction with the Azure AD security model. It represents a unique ID for the Azure Maps account and can be retrieved from Azure Maps management plane Account API. To use Azure AD 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 1.0", - "type": "string", - "in": "query", - "required": true, - "default": "1.0", - "x-ms-parameter-location": "client" - } - }, - "paths": {}, - "definitions": { - "ODataErrorResponse": { - "type": "object", - "description": "This response object is returned when an error occurs in the Maps API.", - "properties": { - "error": { - "$ref": "#/definitions/ODataError" - } - } - }, - "ODataError": { - "type": "object", - "description": "This object is returned when an error occurs in the 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." - } - } - }, - "GeoJSONPosition": { - "description": "A valid `GeoJSON Position` geometry type. A `Position` is an array of numbers with two or more elements. The first two elements are _longitude_ and _latitude_, precisely in that order. _Altitude/Elevation_ is an optional third element. Please refer to [RFC 7946](https://tools.ietf.org/html/rfc7946#section-3.1.1) for details.", - "type": "array", - "items": { - "type": "number", - "format": "double" - } - }, - "GeoJSONGeometry": { - "description": "A valid `GeoJSON` geometry object. Please refer to [RFC 7946](https://tools.ietf.org/html/rfc7946#section-3.1) for details.", - "type": "object", - "discriminator": "type", - "required": [ - "type" - ], - "properties": { - "type": { - "description": "Specifies the `GeoJSON` geometry type. Must be one of the seven valid GeoJSON geometry types - Point, MultiPoint, LineString, MultiLineString, Polygon, MultiPolygon and GeometryCollection.", - "type": "string", - "enum": [ - "Point", - "MultiPoint", - "LineString", - "MultiLineString", - "Polygon", - "MultiPolygon", - "GeometryCollection" - ], - "x-ms-enum": { - "name": "GeoJSONGeometryType", - "modelAsString": true, - "values": [ - { - "value": "Point", - "description": "`GeoJSON Point` geometry." - }, - { - "value": "MultiPoint", - "description": "`GeoJSON MultiPoint` geometry." - }, - { - "value": "LineString", - "description": "`GeoJSON LineString` geometry." - }, - { - "value": "MultiLineString", - "description": "`GeoJSON MultiLineString` geometry." - }, - { - "value": "Polygon", - "description": "`GeoJSON Polygon` geometry." - }, - { - "value": "MultiPolygon", - "description": "`GeoJSON MultiPolygon` geometry." - }, - { - "value": "GeometryCollection", - "description": "`GeoJSON GeometryCollection` geometry." - } - ] - } - } - } - }, - "Point": { - "description": "A valid `GeoJSON Point` geometry type. Please refer to [RFC 7946](https://tools.ietf.org/html/rfc7946#section-3.1.2) for details.", - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/GeoJSONGeometry" - }, - { - "properties": { - "type": { - "description": "Specifies the `type` for the geometry. Value should always be equal to \"Point\".", - "type": "string" - }, - "coordinates": { - "$ref": "#/definitions/GeoJSONPosition" - } - }, - "required": [ - "coordinates" - ] - } - ] - }, - "GeoJsonBoundingBox": { - "description": "Bounding Box. The bounding box is an array of length 2*n where n is\nthe number of dimensions represented in the contained geometries,\nwith all axes of the most southwesterly point followed by all axes\nof the more northeasterly point. The axes order of a bbox follows\nthe axes order of geometries.\n\nThe edges of the bounding box follow lines of constant longitude,\nlatitude, and elevation.", - "type": "array", - "items": { - "type": "number", - "format": "double" - } - }, - "Geometry": { - "description": "This represents the geometry for one or more geographical features (parks, state boundary etc.) and should be a `GeoJSON` compliant type. Please refer to [RFC 7946](https://tools.ietf.org/html/rfc7946) for details.", - "type": "object" - }, - "FeedbackStatusResponse": { - "type": "object", - "required": [ - "formatVersion", - "feedbackId", - "status", - "createDate", - "featureType", - "action", - "request" - ], - "properties": { - "formatVersion": { - "type": "string" - }, - "feedbackId": { - "type": "string" - }, - "status": { - "type": "string" - }, - "createDate": { - "type": "string" - }, - "featureType": { - "type": "string" - }, - "action": { - "type": "string" - }, - "request": { - "description": "The original request object.", - "type": "object" - } - } - }, - "FeedbackAddPoiRequestBody": { - "type": "object", - "required": [ - "location", - "bbox", - "feature" - ], - "properties": { - "isMock": { - "type": "boolean" - }, - "location": { - "$ref": "#/definitions/GeoJSONPosition" - }, - "bbox": { - "$ref": "#/definitions/GeoJsonBoundingBox" - }, - "comments": { - "type": "string" - }, - "contactInformation": { - "$ref": "#/definitions/FeedbackContactInformation" - }, - "feature": { - "$ref": "#/definitions/FeedbackPoiFeature" - } - } - }, - "FeedbackFixPoiRequestBody": { - "type": "object", - "required": [ - "location", - "bbox", - "feature" - ], - "properties": { - "isMock": { - "type": "boolean" - }, - "location": { - "$ref": "#/definitions/GeoJSONPosition" - }, - "bbox": { - "$ref": "#/definitions/GeoJsonBoundingBox" - }, - "comments": { - "type": "string" - }, - "contactInformation": { - "$ref": "#/definitions/FeedbackContactInformation" - }, - "feature": { - "$ref": "#/definitions/FeedbackPoiUpdateFeature" - } - } - }, - "FeedbackDeletePoiRequestBody": { - "type": "object", - "required": [ - "location", - "bbox", - "feature" - ], - "properties": { - "isMock": { - "type": "boolean" - }, - "location": { - "$ref": "#/definitions/GeoJSONPosition" - }, - "bbox": { - "$ref": "#/definitions/GeoJsonBoundingBox" - }, - "comments": { - "type": "string" - }, - "contactInformation": { - "$ref": "#/definitions/FeedbackContactInformation" - }, - "feature": { - "$ref": "#/definitions/FeedbackPoiFeature" - } - } - }, - "FeedbackPoiFeature": { - "type": "object", - "required": [ - "name", - "category", - "geometry" - ], - "properties": { - "featureId": { - "type": "string" - }, - "name": { - "type": "string" - }, - "category": { - "type": "string" - }, - "subcategory": { - "type": "string" - }, - "emailAddress": { - "type": "string" - }, - "faxNumber": { - "type": "string" - }, - "telephoneNumber": { - "type": "string" - }, - "website": { - "type": "string" - }, - "houseNumber": { - "type": "string" - }, - "streetName": { - "type": "string" - }, - "city": { - "type": "string" - }, - "postCode": { - "type": "string" - }, - "stateName": { - "type": "string" - }, - "country": { - "type": "string" - }, - "geometry": { - "$ref": "#/definitions/Point" - } - } - }, - "FeedbackPoiUpdateFeature": { - "type": "object", - "required": [ - "name", - "category", - "geometry" - ], - "properties": { - "featureId": { - "type": "string" - }, - "name": { - "$ref": "#/definitions/FeedbackStringFieldUpdate" - }, - "category": { - "$ref": "#/definitions/FeedbackStringFieldUpdate" - }, - "subcategory": { - "$ref": "#/definitions/FeedbackStringFieldUpdate" - }, - "emailAddress": { - "$ref": "#/definitions/FeedbackStringFieldUpdate" - }, - "faxNumber": { - "$ref": "#/definitions/FeedbackStringFieldUpdate" - }, - "telephoneNumber": { - "$ref": "#/definitions/FeedbackStringFieldUpdate" - }, - "website": { - "$ref": "#/definitions/FeedbackStringFieldUpdate" - }, - "houseNumber": { - "$ref": "#/definitions/FeedbackStringFieldUpdate" - }, - "streetName": { - "$ref": "#/definitions/FeedbackStringFieldUpdate" - }, - "city": { - "$ref": "#/definitions/FeedbackStringFieldUpdate" - }, - "postCode": { - "$ref": "#/definitions/FeedbackStringFieldUpdate" - }, - "stateName": { - "$ref": "#/definitions/FeedbackStringFieldUpdate" - }, - "country": { - "$ref": "#/definitions/FeedbackStringFieldUpdate" - }, - "geometry": { - "$ref": "#/definitions/FeedbackGeometryFieldUpdate" - } - } - }, - "FeedbackAddAddressRequestBody": { - "type": "object", - "required": [ - "location", - "bbox", - "feature" - ], - "properties": { - "isMock": { - "type": "boolean" - }, - "location": { - "$ref": "#/definitions/GeoJSONPosition" - }, - "bbox": { - "$ref": "#/definitions/GeoJsonBoundingBox" - }, - "comments": { - "type": "string" - }, - "contactInformation": { - "$ref": "#/definitions/FeedbackContactInformation" - }, - "feature": { - "$ref": "#/definitions/FeedbackAddressFeature" - } - } - }, - "FeedbackFixAddressRequestBody": { - "type": "object", - "required": [ - "location", - "bbox", - "feature" - ], - "properties": { - "isMock": { - "type": "boolean" - }, - "location": { - "$ref": "#/definitions/GeoJSONPosition" - }, - "bbox": { - "$ref": "#/definitions/GeoJsonBoundingBox" - }, - "comments": { - "type": "string" - }, - "contactInformation": { - "$ref": "#/definitions/FeedbackContactInformation" - }, - "feature": { - "$ref": "#/definitions/FeedbackAddressUpdateFeature" - } - } - }, - "FeedbackDeleteAddressRequestBody": { - "type": "object", - "required": [ - "location", - "bbox", - "feature" - ], - "properties": { - "isMock": { - "type": "boolean" - }, - "location": { - "$ref": "#/definitions/GeoJSONPosition" - }, - "bbox": { - "$ref": "#/definitions/GeoJsonBoundingBox" - }, - "comments": { - "type": "string" - }, - "contactInformation": { - "$ref": "#/definitions/FeedbackContactInformation" - }, - "feature": { - "$ref": "#/definitions/FeedbackAddressFeature" - } - } - }, - "FeedbackAddressFeature": { - "type": "object", - "required": [ - "houseNumber", - "streetName", - "city", - "postCode", - "geometry" - ], - "properties": { - "featureId": { - "type": "string" - }, - "houseNumber": { - "type": "string" - }, - "streetName": { - "type": "string" - }, - "city": { - "type": "string" - }, - "postCode": { - "type": "string" - }, - "stateName": { - "type": "string" - }, - "country": { - "type": "string" - }, - "geometry": { - "$ref": "#/definitions/Point" - } - } - }, - "FeedbackAddressUpdateFeature": { - "type": "object", - "required": [ - "houseNumber", - "streetName", - "city", - "postCode", - "geometry" - ], - "properties": { - "featureId": { - "type": "string" - }, - "houseNumber": { - "$ref": "#/definitions/FeedbackStringFieldUpdate" - }, - "streetName": { - "$ref": "#/definitions/FeedbackStringFieldUpdate" - }, - "city": { - "$ref": "#/definitions/FeedbackStringFieldUpdate" - }, - "postCode": { - "$ref": "#/definitions/FeedbackStringFieldUpdate" - }, - "stateName": { - "$ref": "#/definitions/FeedbackStringFieldUpdate" - }, - "country": { - "$ref": "#/definitions/FeedbackStringFieldUpdate" - }, - "geometry": { - "$ref": "#/definitions/FeedbackGeometryFieldUpdate" - } - } - }, - "FeedbackFixOtherRequestBody": { - "type": "object", - "required": [ - "location", - "bbox" - ], - "properties": { - "isMock": { - "type": "boolean" - }, - "location": { - "$ref": "#/definitions/GeoJSONPosition" - }, - "bbox": { - "$ref": "#/definitions/GeoJsonBoundingBox" - }, - "comments": { - "type": "string" - }, - "contactInformation": { - "$ref": "#/definitions/FeedbackContactInformation" - } - } - }, - "FeedbackContactInformation": { - "type": "object", - "properties": { - "emailAddress": { - "type": "string" - } - } - }, - "FeedbackStringFieldUpdate": { - "type": "object", - "properties": { - "current": { - "type": "string" - }, - "proposed": { - "type": "string" - } - } - }, - "FeedbackGeometryFieldUpdate": { - "type": "object", - "properties": { - "current": { - "$ref": "#/definitions/Geometry" - }, - "proposed": { - "$ref": "#/definitions/Geometry" - } - } - } - } -} diff --git a/specification/maps/data-plane/Microsoft.Maps/Geolocation/preview/1.0/examples/GetLocationByIpAddress.json b/specification/maps/data-plane/Microsoft.Maps/Geolocation/preview/1.0/examples/GetLocationByIpAddress.json index 4723a73f3579..33c30b016801 100644 --- a/specification/maps/data-plane/Microsoft.Maps/Geolocation/preview/1.0/examples/GetLocationByIpAddress.json +++ b/specification/maps/data-plane/Microsoft.Maps/Geolocation/preview/1.0/examples/GetLocationByIpAddress.json @@ -1,6 +1,6 @@ { "parameters": { - "subscription-key": "[subscription-key]", + "geography": "us", "api-version": "1.0", "format": "json", "ip": "2001:4898:80e8:b::189" @@ -14,51 +14,6 @@ }, "ipAddress": "2001:4898:80e8:b::189" } - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive." - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found: the requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "An error occurred while processing the request. Please try again later." - } - } } } } diff --git a/specification/maps/data-plane/Microsoft.Maps/Geolocation/preview/1.0/geolocation.json b/specification/maps/data-plane/Microsoft.Maps/Geolocation/preview/1.0/geolocation.json index 237abbe0d7c6..e1a6e177ddbe 100644 --- a/specification/maps/data-plane/Microsoft.Maps/Geolocation/preview/1.0/geolocation.json +++ b/specification/maps/data-plane/Microsoft.Maps/Geolocation/preview/1.0/geolocation.json @@ -5,7 +5,14 @@ "version": "1.0", "description": "Azure Maps Geolocation REST APIs" }, - "host": "atlas.microsoft.com", + "x-ms-parameterized-host": { + "hostTemplate": "{geography}.atlas.microsoft.com", + "parameters": [ + { + "$ref": "../../../Common/preview/1.0/common.json#/parameters/GeographicResourceLocation" + } + ] + }, "schemes": [ "https" ], @@ -13,6 +20,19 @@ "produces": [ "application/json" ], + "security": [ + { + "azure_auth": [ + "user_impersonation" + ] + }, + { + "SubscriptionKeyInHeader": [] + }, + { + "SubscriptionKeyInQuery": [] + } + ], "securityDefinitions": { "azure_auth": { "type": "oauth2", @@ -20,114 +40,35 @@ "flow": "implicit", "description": "These are the [Azure Active Directory OAuth2](https://docs.microsoft.com/en-us/azure/active-directory/develop/v1-overview) Flows. When paired with [Azure Role Based Access](https://docs.microsoft.com/en-us/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#### Note\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* The `Authorization URL` is specific to the Azure public cloud instance. Sovereign clouds have unique Authorization URLs and Azure Active directory configurations. \n* 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.\n* Usage of the [Azure Maps Web SDK](https://aka.ms/amaadmc) allows for configuration based setup of an application for multiple use cases.\n* Currently Azure Active Directory [v1.0](https://docs.microsoft.com/en-us/azure/active-directory/develop/azure-ad-endpoint-comparison) tokens are supported.", "scopes": { - "user_impersonation": "Impersonates a user's Azure Active Directory account." + "user_impersonation": "impersonate your user account" } }, - "apiKeyQuery": { + "SubscriptionKeyInHeader": { "type": "apiKey", - "description": "This is a shared key which 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 which 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": "query" - } - }, - "security": [ - { - "azure_auth": [] + "in": "header" }, - { - "apiKeyQuery": [] - } - ], - "responses": { - "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 Azure Active Directory 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 AAD bearer token.", - "schema": { - "$ref": "#/definitions/ODataErrorResponse" - }, - "headers": { - "WWW-Authenticate": { - "type": "string", - "description": "Bearer realm=\"https://atlas.microsoft.com/\", error=\"invalid_token\", error_description=\"The access token expired\"" - } - } - }, - "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" - } + "SubscriptionKeyInQuery": { + "type": "apiKey", + "name": "subscription-key", + "in": "query" } }, + "responses": {}, "parameters": { - "ClientId": { - "name": "x-ms-client-id", - "description": "Specifies which account is intended for usage in conjunction with the Azure AD security model. It represents a unique ID for the Azure Maps account and can be retrieved from Azure Maps management plane Account API. To use Azure AD 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": { + "GeolocationApiVersion": { "name": "api-version", - "description": "Version number of Azure Maps API. Current version is 1.0", + "description": "Version number of Azure Maps API.", "type": "string", "in": "query", "required": true, "default": "1.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" } }, "paths": { "/geolocation/ip/{format}": { "get": { - "x-publish": true, "description": "\n**Applies to**: S0 and S1 pricing tiers.\n\n\nThis service will return the ISO country code for the provided IP address. Developers can use this information to block or alter certain content based on geographical locations where the application is being viewed from. \n\n\n__Note:__ This service returns results from IANA and does not necessarily reflect the views of Microsoft Corporation.", "operationId": "Geolocation_GetIPToLocationPreview", "x-ms-examples": { @@ -137,16 +78,13 @@ }, "parameters": [ { - "$ref": "#/parameters/ClientId" - }, - { - "$ref": "#/parameters/SubscriptionKey" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ClientId" }, { - "$ref": "#/parameters/ApiVersion" + "$ref": "#/parameters/GeolocationApiVersion" }, { - "$ref": "#/parameters/JsonFormat" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ResponseFormat" }, { "name": "ip", @@ -163,65 +101,18 @@ "$ref": "#/definitions/IpAddressToLocationResult" } }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" + "default": { + "$ref": "../../../Common/preview/1.0/common.json#/responses/default" } } } } }, "definitions": { - "ODataErrorResponse": { - "type": "object", - "description": "This response object is returned when an error occurs in the Maps API.", - "properties": { - "error": { - "$ref": "#/definitions/ODataError" - } - } - }, - "ODataError": { - "type": "object", - "description": "This object is returned when an error occurs in the 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." - } - } - }, "IpAddressToLocationResult": { "description": "This object is returned from a successful call to IP Address to country/region API", "type": "object", + "readOnly": true, "properties": { "countryRegion": { "$ref": "#/definitions/CountryRegion" diff --git a/specification/maps/data-plane/Microsoft.Maps/Mobility/preview/1.0/examples/GetMetroArea.json b/specification/maps/data-plane/Microsoft.Maps/Mobility/preview/1.0/examples/GetMetroArea.json index 82d62473f11d..ca4ea99b20e2 100644 --- a/specification/maps/data-plane/Microsoft.Maps/Mobility/preview/1.0/examples/GetMetroArea.json +++ b/specification/maps/data-plane/Microsoft.Maps/Mobility/preview/1.0/examples/GetMetroArea.json @@ -1,5 +1,6 @@ { "parameters": { + "geography": "us", "api-version": "1.0", "format": "json", "query": "40.648677,-74.010535", @@ -60,51 +61,6 @@ } ] } - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive." - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found: the requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "An error occurred while processing the request. Please try again later." - } - } } } } diff --git a/specification/maps/data-plane/Microsoft.Maps/Mobility/preview/1.0/examples/GetMetroAreaInfo.json b/specification/maps/data-plane/Microsoft.Maps/Mobility/preview/1.0/examples/GetMetroAreaInfo.json index 34064024fa0d..281ee7427c10 100644 --- a/specification/maps/data-plane/Microsoft.Maps/Mobility/preview/1.0/examples/GetMetroAreaInfo.json +++ b/specification/maps/data-plane/Microsoft.Maps/Mobility/preview/1.0/examples/GetMetroAreaInfo.json @@ -1,5 +1,6 @@ { "parameters": { + "geography": "us", "api-version": "1.0", "format": "json", "query": "121", @@ -310,51 +311,6 @@ ], "isFaresSupported": "true" } - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive." - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found: the requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "An error occurred while processing the request. Please try again later." - } - } } } } diff --git a/specification/maps/data-plane/Microsoft.Maps/Mobility/preview/1.0/examples/GetNearbyTransit.json b/specification/maps/data-plane/Microsoft.Maps/Mobility/preview/1.0/examples/GetNearbyTransit.json index 963d9675101b..4e7ef19c6fdf 100644 --- a/specification/maps/data-plane/Microsoft.Maps/Mobility/preview/1.0/examples/GetNearbyTransit.json +++ b/specification/maps/data-plane/Microsoft.Maps/Mobility/preview/1.0/examples/GetNearbyTransit.json @@ -1,5 +1,6 @@ { "parameters": { + "geography": "us", "api-version": "1.0", "format": "json", "query": "40.693393,-73.988310", @@ -86,51 +87,6 @@ } ] } - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive." - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found: the requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "An error occurred while processing the request. Please try again later." - } - } } } } diff --git a/specification/maps/data-plane/Microsoft.Maps/Mobility/preview/1.0/examples/GetRealTimeArrivals.json b/specification/maps/data-plane/Microsoft.Maps/Mobility/preview/1.0/examples/GetRealTimeArrivals.json index 60933fce0b9f..45a903baf381 100644 --- a/specification/maps/data-plane/Microsoft.Maps/Mobility/preview/1.0/examples/GetRealTimeArrivals.json +++ b/specification/maps/data-plane/Microsoft.Maps/Mobility/preview/1.0/examples/GetRealTimeArrivals.json @@ -1,5 +1,6 @@ { "parameters": { + "geography": "us", "api-version": "1.0", "format": "json", "query": "121---19919516" @@ -91,51 +92,6 @@ } ] } - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive." - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found: the requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "An error occurred while processing the request. Please try again later." - } - } } } } diff --git a/specification/maps/data-plane/Microsoft.Maps/Mobility/preview/1.0/examples/GetTransitItinerary.json b/specification/maps/data-plane/Microsoft.Maps/Mobility/preview/1.0/examples/GetTransitItinerary.json index 91f2c104f189..c3595704e485 100644 --- a/specification/maps/data-plane/Microsoft.Maps/Mobility/preview/1.0/examples/GetTransitItinerary.json +++ b/specification/maps/data-plane/Microsoft.Maps/Mobility/preview/1.0/examples/GetTransitItinerary.json @@ -1,5 +1,6 @@ { "parameters": { + "geography": "us", "api-version": "1.0", "format": "json", "query": "6f1eb44e-255f-4d06-9491-a35ee7864e19---20200929FF43D18907D24B35A1A7454DE7231C89:0---81", @@ -203,51 +204,6 @@ ] } } - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive." - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found: the requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "An error occurred while processing the request. Please try again later." - } - } } } } diff --git a/specification/maps/data-plane/Microsoft.Maps/Mobility/preview/1.0/examples/GetTransitLineInfo.json b/specification/maps/data-plane/Microsoft.Maps/Mobility/preview/1.0/examples/GetTransitLineInfo.json index ea4d8d7bf140..e99bb9a702b5 100644 --- a/specification/maps/data-plane/Microsoft.Maps/Mobility/preview/1.0/examples/GetTransitLineInfo.json +++ b/specification/maps/data-plane/Microsoft.Maps/Mobility/preview/1.0/examples/GetTransitLineInfo.json @@ -1,5 +1,6 @@ { "parameters": { + "geography": "us", "api-version": "1.0", "format": "json", "query": "121---373227", @@ -549,51 +550,6 @@ } ] } - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive." - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found: the requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "An error occurred while processing the request. Please try again later." - } - } } } } diff --git a/specification/maps/data-plane/Microsoft.Maps/Mobility/preview/1.0/examples/GetTransitRoute.json b/specification/maps/data-plane/Microsoft.Maps/Mobility/preview/1.0/examples/GetTransitRoute.json index 280920327153..8c70e20bf4b5 100644 --- a/specification/maps/data-plane/Microsoft.Maps/Mobility/preview/1.0/examples/GetTransitRoute.json +++ b/specification/maps/data-plane/Microsoft.Maps/Mobility/preview/1.0/examples/GetTransitRoute.json @@ -1,5 +1,6 @@ { "parameters": { + "geography": "us", "api-version": "1.0", "format": "json", "origin": "41.948437, -87.655334", @@ -218,51 +219,6 @@ } ] } - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive." - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found: the requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "An error occurred while processing the request. Please try again later." - } - } } } } diff --git a/specification/maps/data-plane/Microsoft.Maps/Mobility/preview/1.0/examples/GetTransitStopInfo.json b/specification/maps/data-plane/Microsoft.Maps/Mobility/preview/1.0/examples/GetTransitStopInfo.json index 1f7fc7684b6d..a36fb12a1615 100644 --- a/specification/maps/data-plane/Microsoft.Maps/Mobility/preview/1.0/examples/GetTransitStopInfo.json +++ b/specification/maps/data-plane/Microsoft.Maps/Mobility/preview/1.0/examples/GetTransitStopInfo.json @@ -1,5 +1,6 @@ { "parameters": { + "geography": "us", "api-version": "1.0", "format": "json", "query": "121---14013676", @@ -116,51 +117,6 @@ } ] } - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive." - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found: the requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "An error occurred while processing the request. Please try again later." - } - } } } } diff --git a/specification/maps/data-plane/Microsoft.Maps/Mobility/preview/1.0/mobility.json b/specification/maps/data-plane/Microsoft.Maps/Mobility/preview/1.0/mobility.json index 82686274d07f..d7cc7d83c173 100644 --- a/specification/maps/data-plane/Microsoft.Maps/Mobility/preview/1.0/mobility.json +++ b/specification/maps/data-plane/Microsoft.Maps/Mobility/preview/1.0/mobility.json @@ -4,7 +4,14 @@ "title": "Azure Maps Mobility Service", "version": "1.0" }, - "host": "atlas.microsoft.com", + "x-ms-parameterized-host": { + "hostTemplate": "{geography}.atlas.microsoft.com", + "parameters": [ + { + "$ref": "../../../Common/preview/1.0/common.json#/parameters/GeographicResourceLocation" + } + ] + }, "schemes": [ "https" ], @@ -12,6 +19,19 @@ "produces": [ "application/json" ], + "security": [ + { + "azure_auth": [ + "user_impersonation" + ] + }, + { + "SubscriptionKeyInHeader": [] + }, + { + "SubscriptionKeyInQuery": [] + } + ], "securityDefinitions": { "azure_auth": { "type": "oauth2", @@ -19,116 +39,37 @@ "flow": "implicit", "description": "These are the [Azure Active Directory OAuth2](https://docs.microsoft.com/en-us/azure/active-directory/develop/v1-overview) Flows. When paired with [Azure Role Based Access](https://docs.microsoft.com/en-us/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#### Note\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* The `Authorization URL` is specific to the Azure public cloud instance. Sovereign clouds have unique Authorization URLs and Azure Active directory configurations. \n* 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.\n* Usage of the [Azure Maps Web SDK](https://aka.ms/amaadmc) allows for configuration based setup of an application for multiple use cases.\n* Currently Azure Active Directory [v1.0](https://docs.microsoft.com/en-us/azure/active-directory/develop/azure-ad-endpoint-comparison) tokens are supported.", "scopes": { - "user_impersonation": "Impersonates a user's Azure Active Directory account." + "user_impersonation": "impersonate your user account" } }, - "apiKeyQuery": { + "SubscriptionKeyInHeader": { "type": "apiKey", - "description": "This is a shared key which 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 which 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": "query" - } - }, - "security": [ - { - "azure_auth": [] + "in": "header" }, - { - "apiKeyQuery": [] - } - ], - "responses": { - "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 Azure Active Directory 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 AAD bearer token.", - "schema": { - "$ref": "#/definitions/ODataErrorResponse" - }, - "headers": { - "WWW-Authenticate": { - "type": "string", - "description": "Bearer realm=\"https://atlas.microsoft.com/\", error=\"invalid_token\", error_description=\"The access token expired\"" - } - } - }, - "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" - } + "SubscriptionKeyInQuery": { + "type": "apiKey", + "name": "subscription-key", + "in": "query" } }, + "responses": {}, "parameters": { - "ClientId": { - "name": "x-ms-client-id", - "description": "Specifies which account is intended for usage in conjunction with the Azure AD security model. It represents a unique ID for the Azure Maps account and can be retrieved from Azure Maps management plane Account API. To use Azure AD 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": { + "MobilityApiVersion": { "name": "api-version", - "description": "Version number of Azure Maps API. Current version is 1.0", + "description": "Version number of Azure Maps API.", "type": "string", "in": "query", "required": true, "default": "1.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" - }, "MetroId": { "name": "metroId", "description": "The unique id of the metro area. Can be retrieved via [Get Metro Area API](https://aka.ms/AzureMapsMobilityMetro).", "type": "integer", "format": "int32", "in": "query", - "required": false, "x-ms-parameter-location": "method" }, "MobilityLanguage": { @@ -136,14 +77,12 @@ "description": "Language in which search results will be returned. Only NGT is supported. Please refer to [Supported languages](https://docs.microsoft.com/azure/azure-maps/supported-languages) for details.", "type": "string", "in": "query", - "required": false, "x-ms-parameter-location": "method" } }, "paths": { "/mobility/metroArea/id/{format}": { "get": { - "x-publish": true, "operationId": "Mobility_GetMetroAreaPreview", "description": "**Metro Area API**\n\n**Applies to**: S1 pricing tier.\n\nService allows users to request metro areas in which the Azure Maps Mobility Service is available. The service supports filtering results by country or coordinate location. Information returned includes Metro Area details such as metro Id, name and a representation of the metro area geometry in GeoJSON format.", "x-ms-examples": { @@ -153,16 +92,13 @@ }, "parameters": [ { - "$ref": "#/parameters/ClientId" - }, - { - "$ref": "#/parameters/SubscriptionKey" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ClientId" }, { - "$ref": "#/parameters/ApiVersion" + "$ref": "#/parameters/MobilityApiVersion" }, { - "$ref": "#/parameters/JsonFormat" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ResponseFormat" }, { "name": "query", @@ -175,9 +111,7 @@ "name": "queryType", "description": "The type of the query. By default originType=position, specified as a comma separated string composed by latitude followed by longitude, e.g. \"47.641268,-122.125679”.", "in": "query", - "required": false, "type": "string", - "default": "position", "enum": [ "position", "countryCode" @@ -195,8 +129,7 @@ "description": "2-character [ISO 3166-1](https://www.iso.org/iso-3166-country-codes.html) alpha-2 country code. E.g. US." } ] - }, - "x-ms-parameter-location": "method" + } }, { "$ref": "#/parameters/MobilityLanguage" @@ -209,27 +142,14 @@ "$ref": "#/definitions/MetroAreaResponse" } }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" + "default": { + "$ref": "../../../Common/preview/1.0/common.json#/responses/default" } } } }, "/mobility/metroArea/info/{format}": { "get": { - "x-publish": true, "operationId": "Mobility_GetMetroAreaInfoPreview", "description": "**Metro Area Info API**\n\n**Applies to**: S1 pricing tier.\n\nService allows users to request additional information for metro areas in which the Azure Maps Mobility services are available. Information such as supported transit types, transit agencies and active alerts is available, depending on the options selected. Also, the service returns information if the public transit fare information is available for the requested metro area.", "x-ms-examples": { @@ -239,16 +159,13 @@ }, "parameters": [ { - "$ref": "#/parameters/ClientId" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ClientId" }, { - "$ref": "#/parameters/SubscriptionKey" + "$ref": "#/parameters/MobilityApiVersion" }, { - "$ref": "#/parameters/ApiVersion" - }, - { - "$ref": "#/parameters/JsonFormat" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ResponseFormat" }, { "name": "query", @@ -294,8 +211,7 @@ } ] } - }, - "x-ms-parameter-location": "method" + } }, { "$ref": "#/parameters/MobilityLanguage" @@ -308,27 +224,14 @@ "$ref": "#/definitions/MetroAreaInfoResponse" } }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" + "default": { + "$ref": "../../../Common/preview/1.0/common.json#/responses/default" } } } }, "/mobility/transit/nearby/{format}": { "get": { - "x-publish": true, "operationId": "Mobility_GetNearbyTransitPreview", "description": "**Find Nearby Transit API**\n\n**Applies to**: S1 pricing tier.\n\nGet Nearby Transit service allows you to search public transit stops around a given location returning the transit object details. Service allows users to search for public transit stops within a given radius returning a set of stops with stop details. Additional information such as transit operator information is returned depending on the options selected. The returned information can be used for further processing such as requesting [real-time arrivals](https://aka.ms/AzureMapsMobilityRealTimeArrivals) for the stop or [transit stop details](https://aka.ms/AzureMapsMobilityTransitStop) such as main transit type of most lines stopping for a given public, active service alerts or main transport agency.", "x-ms-examples": { @@ -338,16 +241,13 @@ }, "parameters": [ { - "$ref": "#/parameters/ClientId" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ClientId" }, { - "$ref": "#/parameters/SubscriptionKey" + "$ref": "#/parameters/MobilityApiVersion" }, { - "$ref": "#/parameters/ApiVersion" - }, - { - "$ref": "#/parameters/JsonFormat" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ResponseFormat" }, { "$ref": "#/parameters/MetroId" @@ -363,7 +263,6 @@ "name": "limit", "description": "Maximum number of responses that will be returned. Default is 3, minimum 1 and maximum 100. Sort order is based on distance from input location.", "in": "query", - "required": false, "type": "integer", "format": "int32" }, @@ -371,7 +270,6 @@ "name": "radius", "description": "Specifies the search area to constrain a search. The radius in meters to for the results to be constrained to the defined area. Default value is 30 meters, minimum 1 meter and maximum 5000 meters (5km).", "in": "query", - "required": false, "type": "integer", "format": "int32" }, @@ -379,8 +277,6 @@ "name": "objectType", "description": "The transit object type. By default, objectType is set to `stop`", "in": "query", - "required": false, - "default": "stop", "type": "string" }, { @@ -394,27 +290,14 @@ "$ref": "#/definitions/NearbyTransitResponse" } }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" + "default": { + "$ref": "../../../Common/preview/1.0/common.json#/responses/default" } } } }, "/mobility/transit/line/{format}": { "get": { - "x-publish": true, "operationId": "Mobility_GetTransitLineInfoPreview", "description": "**Transit Line Info API**\n\n**Applies to**: S1 pricing tier.\n\nYour scenario might require requesting transit line specific data such as stops and line geometry. Transit Line Info service allows you to request line group by line group id returning a line group comprised a set of lines. Additional information such as 24 hours static schedule, active alerts for the line group and line patterns is also available, depending on the options selected. Mobility services uses a parallel data model for public transit lines and line groups. Usually line group contains 2 lines, one going from A to B, and the other returning from B to A, both operating by the same Public Transport Agency having the same line number. We recommend you review our guidance [article](https://aka.ms/AMapsPublicTRansitConcepts) to understand the concepts of lines and line groups.", "x-ms-examples": { @@ -424,16 +307,13 @@ }, "parameters": [ { - "$ref": "#/parameters/ClientId" - }, - { - "$ref": "#/parameters/SubscriptionKey" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ClientId" }, { - "$ref": "#/parameters/ApiVersion" + "$ref": "#/parameters/MobilityApiVersion" }, { - "$ref": "#/parameters/JsonFormat" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ResponseFormat" }, { "$ref": "#/parameters/MetroId" @@ -449,7 +329,6 @@ "name": "detailType", "description": "Specify additional details requested respective to the line group as a comma separated list. As a default service returns line basic info. Supported values are:\n * `alerts` - Return any active service alerts for the specified stop. Response provides brief information for disruption in service and all basic data associated with the alert.\n * `alertDetails` - Can only be used in conjunction with detailType=alerts.Return additional details associated with the active service alerts.\n * `lines` - Return transit lines that stops at the specified stop.\n * `stops` - Return list of stops the line group goes through.\n * `schedule` - Return a 24h static schedule for the specified line group from the current time of the day to the end of the current day.\n * `patterns` - Return list of patterns this group is comprised of. A pattern consists of a stop sequence and shape per line.", "in": "query", - "required": false, "type": "array", "items": { "type": "string", @@ -504,27 +383,14 @@ "$ref": "#/definitions/TransitLineInfoResponse" } }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" + "default": { + "$ref": "../../../Common/preview/1.0/common.json#/responses/default" } } } }, "/mobility/transit/stop/{format}": { "get": { - "x-publish": true, "operationId": "Mobility_GetTransitStopInfoPreview", "description": "**Transit Stop Info API**\n\n**Applies to**: S1 pricing tier.\n\nGet Transit Stop Info service allows you to request information for a given public transit stop. Basic information returned includes details such as main transit type of most lines stopping for a given public and main transport agency. Additional details such as stop lines and active service alerts for specified stop are also available, depending on the options selected.", "x-ms-examples": { @@ -534,16 +400,13 @@ }, "parameters": [ { - "$ref": "#/parameters/ClientId" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ClientId" }, { - "$ref": "#/parameters/SubscriptionKey" + "$ref": "#/parameters/MobilityApiVersion" }, { - "$ref": "#/parameters/ApiVersion" - }, - { - "$ref": "#/parameters/JsonFormat" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ResponseFormat" }, { "$ref": "#/parameters/MetroId" @@ -559,13 +422,11 @@ "name": "queryType", "description": "The type of the unique query parameter of the stop. By default queryType=stopId.", "in": "query", - "required": false, "type": "string", "enum": [ "stopId", "stopKey" ], - "default": "stopId", "x-ms-enum": { "name": "TransitStopQueryType", "modelAsString": true, @@ -579,14 +440,12 @@ "description": "The GTFS stop Id. GTFS stop Ids are provided by the transit authority and are subject to change.
**Note**: When this value is used, the metroId parameter is required." } ] - }, - "x-ms-parameter-location": "method" + } }, { "name": "detailType", "description": "Specify additional details requested respective to the transit stop as a comma separated list. Supported values are:\n * `alerts` - Return any active service alerts for the specified stop. Response provides brief information for disruption in service and all basic data associated with the alert.\n * `alertDetails` - Can only be used in conjunction with detailType=alerts.Return additional details associated with the active service alerts.\n * `lines` - Return transit lines that stops at the specified stop.\n * `lineGroups` - Return line groups that stops at the specified stop.", "in": "query", - "required": false, "type": "array", "items": { "type": "string", @@ -631,27 +490,14 @@ "$ref": "#/definitions/TransitStopInfoResponse" } }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" + "default": { + "$ref": "../../../Common/preview/1.0/common.json#/responses/default" } } } }, "/mobility/transit/route/{format}": { "get": { - "x-publish": true, "operationId": "Mobility_GetTransitRoutePreview", "description": "**Transit Route API**\n\n**Applies to**: S1 pricing tier.\n\nGet Transit Route API will allow trip planning returning the best possible route options between an origin and destination by using multi-modal search. Service provides a variety of travel modes, including walk, bike, and public transit. The API supports parameters to request one or multiple public transit types such as bus, tram and subway, and prefer a specific transit agency operating in the area. Also, service provides transit fare details and options to choose optimal route with least walk or transfers and specify arrival or departure times when user need to be at a specific destination by a certain time.", "x-ms-examples": { @@ -661,16 +507,13 @@ }, "parameters": [ { - "$ref": "#/parameters/ClientId" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ClientId" }, { - "$ref": "#/parameters/SubscriptionKey" + "$ref": "#/parameters/MobilityApiVersion" }, { - "$ref": "#/parameters/ApiVersion" - }, - { - "$ref": "#/parameters/JsonFormat" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ResponseFormat" }, { "$ref": "#/parameters/MetroId" @@ -686,14 +529,12 @@ "name": "originType", "description": "The type of the origin. By default originType=position, specified as a comma separated string composed by latitude followed by longitude, e.g., \"47.641268,-122.125679”.", "in": "query", - "required": false, "type": "string", "enum": [ "position", "stopId", "stopKey" ], - "default": "position", "x-ms-enum": { "name": "OriginType", "modelAsString": true, @@ -711,8 +552,7 @@ "description": "The GTFS stop Id. GTFS stop Ids are provided by the transit authority and are subject to change.
**Note**: When this value is used, the metroId parameter is required." } ] - }, - "x-ms-parameter-location": "method" + } }, { "name": "destination", @@ -725,9 +565,7 @@ "name": "destinationType", "description": "The type of the destination.", "in": "query", - "required": false, "type": "string", - "default": "position", "enum": [ "position", "stopId", @@ -750,13 +588,11 @@ "description": "The GTFS stop Id. GTFS stop Ids are provided by the transit authority and are subject to change.
**Note**: When this value is used, the metroId parameter is required." } ] - }, - "x-ms-parameter-location": "method" + } }, { "name": "modeType", "description": "The mode of travel for the requested route; as comma separated list. If not specified, all modes will be allowed. All modes might not be available in all metro areas. If valid trip is not found, empty result will be returned. Supported values are:\n * `walk` - Walk (pedestrian)\n * `bike` - Bike\n * `publicTransit` - Public transit", - "required": false, "in": "query", "type": "array", "items": { @@ -784,14 +620,12 @@ } ] } - }, - "x-ms-parameter-location": "method" + } }, { "name": "transitType", "description": "Applicable only with modeType = publicTransit. Allow only a specific set of public transit types (as a comma separated list) to be returned for the route. Note that the requested transitType may not be available for the entire route. If not specified, all modes will be allowed. Supported values are:\n * `bus` - Bus\n * `cableCar` - Cable car\n * `ferry` - Ferry\n * `funicular` - Funicular\n * `gondola` - Gondola\n * `rail` - Rail\n * `tram` - Tram\n * `subway` - Subway/Metro", "in": "query", - "required": false, "type": "array", "items": { "type": "string", @@ -843,14 +677,12 @@ } ] } - }, - "x-ms-parameter-location": "method" + } }, { "name": "agency", "description": "Specifies whether to prefer routes from a specific set of agencies if possible; as a comma separated list. If valid trip isn’t found with the preferred agency, or only one with very long trips or with large number of transfers, itineraries with other agencies will be returned.", "in": "query", - "required": false, "type": "array", "items": { "type": "string" @@ -860,9 +692,7 @@ "name": "agencyType", "description": "Specifies the agency identifier to request routes from preferred agencies. By default the agencyType=agencyId.", "in": "query", - "required": false, "type": "string", - "default": "agencyId", "enum": [ "agencyId", "agencyKey", @@ -885,23 +715,19 @@ "description": "The name of the transit agency, e.g. Metro Transit." } ] - }, - "x-ms-parameter-location": "method" + } }, { "name": "time", "description": "The time of departure or arrival in the local time in ISO format (2019-04-05T14:24:18-04:00). If timeType is not specified, it will be assumed to be 'departure' and time is the current local time at the origin point.", "in": "query", - "required": false, "type": "string" }, { "name": "timeType", "description": "Specifies whether the time signifies departure time or arrival time. If not defined, default value is 'departure'.", "in": "query", - "required": false, "type": "string", - "default": "departure", "enum": [ "arrival", "departure", @@ -930,9 +756,7 @@ "name": "routeType", "description": "The type of route requested. If not specified, 'optimal' will be used.", "in": "query", - "required": false, "type": "string", - "default": "optimal", "enum": [ "optimal", "leastWalk", @@ -961,9 +785,7 @@ "name": "bikeType", "description": "Bike type of the bike. Specifies which type of bikes will be used. Only private bikes are supported.", "in": "query", - "required": false, - "type": "string", - "default": "privateBike" + "type": "string" }, { "$ref": "#/parameters/MobilityLanguage" @@ -976,27 +798,14 @@ "$ref": "#/definitions/TransitRouteResponse" } }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" + "default": { + "$ref": "../../../Common/preview/1.0/common.json#/responses/default" } } } }, "/mobility/transit/itinerary/{format}": { "get": { - "x-publish": true, "operationId": "Mobility_GetTransitItineraryPreview", "description": "**Transit Itinerary API**\n\n**Applies to**: S1 pricing tier.\n\nReturns data according to an itinerary Id previously returned by [Transit Route API](https://aka.ms/AzureMapsMobilityTransitRoute). The basic info contains data as to the various legs comprising the itinerary, including the locations, public transit lines, start and end times and fare information. Users can request additional routing information such as the shape of the itinerary and detailed itinerary schedules is also available, depending on the options selected. An itinerary is available up to 24 hours following a search request.", "x-ms-examples": { @@ -1006,16 +815,13 @@ }, "parameters": [ { - "$ref": "#/parameters/ClientId" - }, - { - "$ref": "#/parameters/SubscriptionKey" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ClientId" }, { - "$ref": "#/parameters/ApiVersion" + "$ref": "#/parameters/MobilityApiVersion" }, { - "$ref": "#/parameters/JsonFormat" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ResponseFormat" }, { "name": "query", @@ -1027,7 +833,6 @@ { "name": "detailType", "description": "Specify additional details returned in the transit route itinerary response, as a comma separated list. Supported values are:\n * `geometry` - Shape of an in GeoJSON format. For public transit legs will return also the stops that the leg passes through. For walk and bike legs, will return also the turn-by-turn navigation data. \n * `schedule` - Static schedule data as to all departures of Public Transit legs from the current time of the day to the end of the current day.", - "required": false, "in": "query", "type": "array", "items": { @@ -1050,8 +855,7 @@ } ] } - }, - "x-ms-parameter-location": "method" + } }, { "$ref": "#/parameters/MobilityLanguage" @@ -1064,27 +868,14 @@ "$ref": "#/definitions/TransitItineraryResponse" } }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" + "default": { + "$ref": "../../../Common/preview/1.0/common.json#/responses/default" } } } }, "/mobility/realtime/arrivals/{format}": { "get": { - "x-publish": true, "operationId": "Mobility_GetRealTimeArrivalsPreview", "description": "**Real-time Arrivals API**\n\n**Applies to**: S1 pricing tier.\n\nGet Real Time Arrivals API returns for a given a stop, line or location the requested number of real-time arrivals. Endpoint support different modes to request real-time arrivals such as number of live arrivals for all lines arriving at the specified stop or all arrivals of a line to stops near the user’s location. The API supports parameters to request one or multiple public transit types such as bus, tram and subway, maximum number if arrivals, and prefer a specific transit agency operating in the area. In some cases real-time arrivals may not be available, for example, if arrival is too far in the future or transit vehicle does not have capability to share the real-time location. This is symbolized in a scheduleType field present in all responses.", "x-ms-examples": { @@ -1094,16 +885,13 @@ }, "parameters": [ { - "$ref": "#/parameters/ClientId" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ClientId" }, { - "$ref": "#/parameters/SubscriptionKey" + "$ref": "#/parameters/MobilityApiVersion" }, { - "$ref": "#/parameters/ApiVersion" - }, - { - "$ref": "#/parameters/JsonFormat" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ResponseFormat" }, { "$ref": "#/parameters/MetroId" @@ -1119,7 +907,6 @@ "name": "queryType", "description": "The type of the query parameter. Defines the mode of the request. Only one mode per request is supported. By default queryType is set to be ‘stops’ returning the requested number of Live Arrivals for all lines arriving at the specified stop.", "in": "query", - "required": false, "type": "string", "enum": [ "stops", @@ -1127,7 +914,6 @@ "lineAndStop", "position" ], - "default": "stops", "x-ms-enum": { "name": "RealTimeArrivalsQueryType", "modelAsString": true, @@ -1149,20 +935,17 @@ "description": "Returns arrivals of a line to stops near the user’s location. The applicable location query specified as a comma separated string composed by latitude followed by longitude e.g. \"47.641268,-122.125679\"." } ] - }, - "x-ms-parameter-location": "method" + } }, { "name": "stopQueryType", "description": "The type of the unique query parameter of the stop. By default stopQueryType=stopId. This parameter can only be used in conjunction with queryType=stops or queryType=lineAndStop.", "in": "query", - "required": false, "type": "string", "enum": [ "stopId", "stopKey" ], - "default": "stopId", "x-ms-enum": { "name": "StopQueryType", "modelAsString": true, @@ -1176,21 +959,18 @@ "description": "The GTFS stop Id. GTFS stop Ids are provided by the transit authority and are subject to change.
**Note**: When this value is used, the metroId parameter is required." } ] - }, - "x-ms-parameter-location": "method" + } }, { "name": "limit", "description": "The maximum arrivals to return. If not specified, the system default will be used. For stops max number of arrivals per stop. For lines max arrivals per stop on the line. For everything else max arrivals overall.", "in": "query", - "required": false, "type": "integer", "format": "int32" }, { "name": "maxMinutesInFuture", "description": "The maximum time (in minutes) in the future to return arrivals for. If not specified, the system default (30 minutes) will be used. The minimum value is 0 and maximum value is 60 minutes.", - "required": false, "type": "integer", "format": "int32", "in": "query" @@ -1199,7 +979,6 @@ "name": "transitType", "description": "Type of public transit user is requesting respective transit stop, as a comma separated list. For example, transitType=Bus,Subway. If not specified, all will be allowed. This parameter can only be used in conjunction with queryType=stops. Supported values are:\n * `bus` - Bus\n * `cableCar` - Cable car\n * `ferry` - Ferry\n * `funicular` - Funicular\n * `gondola` - Gondola\n * `rail` - Rail\n * `tram` - Tram\n * `subway` - Subway/Metro", "in": "query", - "required": false, "type": "array", "items": { "type": "string", @@ -1251,14 +1030,12 @@ } ] } - }, - "x-ms-parameter-location": "method" + } }, { "name": "agency", "description": "In case you prefer routes from a specific set of agencies to be returned. Specified as a comma separated string.", "in": "query", - "required": false, "type": "array", "items": { "type": "string" @@ -1268,9 +1045,7 @@ "name": "agencyType", "description": "Specifies the agency identifier to request routes from a specific set of agencies to be returned. By default the agencyType=agencyId.", "in": "query", - "required": false, "type": "string", - "default": "agencyId", "enum": [ "agencyId", "agencyKey", @@ -1293,14 +1068,12 @@ "description": "The name of the transit agency, e.g. Metro Transit." } ] - }, - "x-ms-parameter-location": "method" + } }, { "name": "timeoutInSeconds", "description": "Time in seconds within which if the provider doesn’t respond, end point will return static data.", "in": "query", - "required": false, "type": "integer", "format": "int32" }, @@ -1315,211 +1088,20 @@ "$ref": "#/definitions/RealTimeArrivalsResponse" } }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" + "default": { + "$ref": "../../../Common/preview/1.0/common.json#/responses/default" } } } } }, "definitions": { - "ODataErrorResponse": { - "type": "object", - "description": "This response object is returned when an error occurs in the Maps API.", - "properties": { - "error": { - "$ref": "#/definitions/ODataError" - } - } - }, - "ODataError": { - "type": "object", - "description": "This object is returned when an error occurs in the 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." - } - } - }, - "Coordinate": { - "description": "A location represented as a latitude and longitude.", - "type": "object", - "properties": { - "latitude": { - "description": "Latitude property", - "type": "number", - "format": "double", - "readOnly": true - }, - "longitude": { - "description": "Longitude property", - "type": "number", - "format": "double", - "readOnly": true - } - } - }, - "GeoJSONGeometry": { - "description": "A valid `GeoJSON` geometry object. Please refer to [RFC 7946](https://tools.ietf.org/html/rfc7946#section-3.1) for details.", - "type": "object", - "discriminator": "type", - "required": [ - "type" - ], - "properties": { - "type": { - "description": "Specifies the `GeoJSON` geometry type. Must be one of the seven valid GeoJSON geometry types - Point, MultiPoint, LineString, MultiLineString, Polygon, MultiPolygon and GeometryCollection.", - "type": "string", - "enum": [ - "Point", - "MultiPoint", - "LineString", - "MultiLineString", - "Polygon", - "MultiPolygon", - "GeometryCollection" - ], - "x-ms-enum": { - "name": "GeoJSONGeometryType", - "modelAsString": true, - "values": [ - { - "value": "Point", - "description": "`GeoJSON Point` geometry." - }, - { - "value": "MultiPoint", - "description": "`GeoJSON MultiPoint` geometry." - }, - { - "value": "LineString", - "description": "`GeoJSON LineString` geometry." - }, - { - "value": "MultiLineString", - "description": "`GeoJSON MultiLineString` geometry." - }, - { - "value": "Polygon", - "description": "`GeoJSON Polygon` geometry." - }, - { - "value": "MultiPolygon", - "description": "`GeoJSON MultiPolygon` geometry." - }, - { - "value": "GeometryCollection", - "description": "`GeoJSON GeometryCollection` geometry." - } - ] - } - } - } - }, - "Polygon": { - "description": "A valid `GeoJSON Polygon` geometry type. Please refer to [RFC 7946](https://tools.ietf.org/html/rfc7946#section-3.1.6) for details.", - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/GeoJSONGeometry" - }, - { - "properties": { - "type": { - "description": "Specifies the `type` for the object. Value should always be equal to \"Polygon\".", - "type": "string" - }, - "coordinates": { - "description": "Coordinates for the `Polygon` geometry type.", - "type": "array", - "items": { - "$ref": "#/definitions/GeoJSONLinearRing" - } - } - }, - "required": [ - "coordinates" - ] - } - ] - }, - "LineString": { - "description": "A valid `GeoJSON LineString` geometry type. Please refer to [RFC 7946](https://tools.ietf.org/html/rfc7946#section-3.1.4) for details.", - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/GeoJSONGeometry" - }, - { - "properties": { - "type": { - "description": "Specifies the `type` for the geometry. Value should always be equal to \"LineString\".", - "type": "string" - }, - "coordinates": { - "description": "Coordinates for the `LineString` geometry.", - "type": "array", - "items": { - "$ref": "#/definitions/GeoJSONPosition" - } - } - }, - "required": [ - "coordinates" - ] - } - ] - }, - "GeoJSONLinearRing": { - "description": "Though a linear ring is not explicitly represented as a GeoJSON geometry type, it helps in defining the polygon as an array of linear rings. Please refer to [RFC 7946](https://tools.ietf.org/html/rfc7946#section-3.1.6) for details.", - "type": "array", - "items": { - "$ref": "#/definitions/GeoJSONPosition" - } - }, - "GeoJSONPosition": { - "description": "A valid `GeoJSON Position` geometry type. A `Position` is an array of numbers with two or more elements. The first two elements are _longitude_ and _latitude_, precisely in that order. _Altitude/Elevation_ is an optional third element. Please refer to [RFC 7946](https://tools.ietf.org/html/rfc7946#section-3.1.1) for details.", - "type": "array", - "items": { - "type": "number", - "format": "double" - } - }, "MetroAreaResponse": { "description": "This object is returned from a successful Get Metro Area call", "type": "object", "properties": { "results": { + "description": "All resulting metro area details.", "type": "array", "items": { "$ref": "#/definitions/MetroAreaResult" @@ -1547,15 +1129,17 @@ } }, "agencies": { + "description": "A list of all public transit agencies operating in the given metro area.", "type": "array", "items": { - "$ref": "#/definitions/Agency" + "$ref": "#/definitions/AgencyDetails" } }, "alerts": { + "description": "A list of all public transit alerts within the given metro area.", "type": "array", "items": { - "$ref": "#/definitions/Alert" + "$ref": "#/definitions/AlertInformation" } } } @@ -1565,6 +1149,7 @@ "type": "object", "properties": { "results": { + "description": "All resulting nearby transit details.", "type": "array", "items": { "$ref": "#/definitions/TransitObjectResult" @@ -1572,21 +1157,53 @@ } } }, + "TransitLineInfoResponse": { + "description": "This object is returned from a successful Transit Line Info call.", + "type": "object", + "properties": { + "lineGroup": { + "description": "Groups together all lines that are logically part of the same group. Typically contains 2 lines having the same agency and line, one going from A to B, and the other from B to A.", + "$ref": "#/definitions/ItineraryLineGroup" + }, + "lines": { + "description": "The line group’s basic info and list of the lines.", + "$ref": "#/definitions/ItineraryLines" + }, + "stops": { + "description": "List of stops the line group goes through.", + "type": "array", + "items": { + "$ref": "#/definitions/LegStop" + } + }, + "patterns": { + "description": "List of patterns this group is comprised of. A pattern consists of a stop sequence and shape per a line in GeoJSON format.", + "type": "array", + "items": { + "$ref": "#/definitions/ItineraryPattern" + } + }, + "schedule": { + "description": "Line schedule for the current 24h. May be null in case no schedule exists for the current time.", + "$ref": "#/definitions/LineArrival" + } + } + }, "TransitStopInfoResponse": { "description": "This object is returned from a successful Get Transit Stop Info call", "type": "object", "properties": { "stop": { - "$ref": "#/definitions/Stop" + "$ref": "#/definitions/LegStop" }, "lines": { - "$ref": "#/definitions/Lines" + "$ref": "#/definitions/ItineraryLines" }, "lineGroups": { - "$ref": "#/definitions/LineGroups" + "$ref": "#/definitions/ItineraryLineGroups" }, "alerts": { - "$ref": "#/definitions/Alerts" + "$ref": "#/definitions/ItineraryStopAlerts" } } }, @@ -1595,6 +1212,7 @@ "type": "object", "properties": { "results": { + "description": "All resulting transit stops details.", "type": "array", "items": { "$ref": "#/definitions/ItineraryResult" @@ -1623,38 +1241,6 @@ } } }, - "TransitLineInfoResponse": { - "description": "This object is returned from a successful Transit Line Info call.", - "type": "object", - "properties": { - "lineGroup": { - "description": "Groups together all lines that are logically part of the same group. Typically contains 2 lines having the same agency and line, one going from A to B, and the other from B to A.", - "$ref": "#/definitions/LineGroup" - }, - "lines": { - "description": "The line group’s basic info and list of the lines.", - "$ref": "#/definitions/Lines" - }, - "stops": { - "description": "List of stops the line group goes through.", - "type": "array", - "items": { - "$ref": "#/definitions/Stop" - } - }, - "patterns": { - "description": "List of patterns this group is comprised of. A pattern consists of a stop sequence and shape per a line in GeoJSON format.", - "type": "array", - "items": { - "$ref": "#/definitions/Pattern" - } - }, - "schedule": { - "description": "Line schedule for the current 24h. May be null in case no schedule exists for the current time.", - "$ref": "#/definitions/LineArrival" - } - } - }, "RealTimeArrivalsResponse": { "description": "This object is returned from a successful Get Real Time Arrival Info call.", "type": "object", @@ -1682,7 +1268,7 @@ "type": "string" }, "geometry": { - "$ref": "#/definitions/Polygon" + "$ref": "../../../Common/preview/1.0/common.json#/definitions/GeoJsonPolygon" }, "viewport": { "$ref": "#/definitions/ResultViewport" @@ -1694,10 +1280,10 @@ "type": "object", "properties": { "topLeftPoint": { - "$ref": "#/definitions/Coordinate" + "$ref": "../../../Common/preview/1.0/common.json#/definitions/CoordinatesPair" }, "btmRightPoint": { - "$ref": "#/definitions/Coordinate" + "$ref": "../../../Common/preview/1.0/common.json#/definitions/CoordinatesPair" } } }, @@ -1718,14 +1304,14 @@ }, "position": { "description": "The transit object's position.", - "$ref": "#/definitions/Coordinate" + "$ref": "../../../Common/preview/1.0/common.json#/definitions/CoordinatesPair" }, "viewport": { "$ref": "#/definitions/ResultViewport" } } }, - "Stop": { + "LegStop": { "description": "The stop's basic info", "type": "object", "properties": { @@ -1747,7 +1333,7 @@ }, "position": { "description": "The Stop's location, latitude and longitude.", - "$ref": "#/definitions/Coordinate" + "$ref": "../../../Common/preview/1.0/common.json#/definitions/CoordinatesPair" }, "mainTransitType": { "description": "The transit type of most lines stopping at this stop. One of Tram, Subway, Rail, Bus, Ferry, CableCar, Gondola, Funicular", @@ -1763,14 +1349,14 @@ } } }, - "Lines": { + "ItineraryLines": { "description": "A list of stop lines", "type": "array", "items": { - "$ref": "#/definitions/Line" + "$ref": "#/definitions/ItineraryLine" } }, - "Line": { + "ItineraryLine": { "description": "A stop line", "type": "object", "properties": { @@ -1816,14 +1402,14 @@ } } }, - "LineGroups": { + "ItineraryLineGroups": { "description": "A list of line groups", "type": "array", "items": { - "$ref": "#/definitions/LineGroup" + "$ref": "#/definitions/ItineraryLineGroup" } }, - "LineGroup": { + "ItineraryLineGroup": { "description": "A line group", "type": "object", "properties": { @@ -1861,14 +1447,14 @@ } } }, - "Alerts": { + "ItineraryStopAlerts": { "description": "A list of stop alerts", "type": "array", "items": { - "$ref": "#/definitions/Alert" + "$ref": "#/definitions/AlertInformation" } }, - "Alert": { + "AlertInformation": { "description": "Basic information associated with the active alert. Returned if specified in the request and there is an active alert in the metro area.", "type": "object", "properties": { @@ -2007,10 +1593,10 @@ "description": "An array summarizing the legs of this itinerary.", "type": "array", "items": { - "$ref": "#/definitions/Leg" + "$ref": "#/definitions/ItineraryLeg" } }, - "Leg": { + "ItineraryLeg": { "type": "object", "properties": { "legType": { @@ -2029,7 +1615,7 @@ "description": "In case of walk or bike leg, the directions.", "type": "array", "items": { - "$ref": "#/definitions/Step" + "$ref": "#/definitions/ItineraryStep" } }, "origin": { @@ -2041,23 +1627,23 @@ "$ref": "#/definitions/LegPoint" }, "geometry": { - "$ref": "#/definitions/LineString" + "$ref": "../../../Common/preview/1.0/common.json#/definitions/GeoJsonLineString" }, "lineGroup": { "description": "In case of a public transit leg, the line group serving this leg.", - "$ref": "#/definitions/LineGroup" + "$ref": "#/definitions/ItineraryLineGroup" }, "line": { "description": "In case of a public transit leg, the line serving this leg.", - "$ref": "#/definitions/Line" + "$ref": "#/definitions/ItineraryLine" }, "stops": { "description": "List of stops comprising the line’s route within the leg (e.g. the stops the leg passes through).", - "$ref": "#/definitions/Stops" + "$ref": "#/definitions/LegStops" }, "departures": { "description": "Relevant for Public Transit and Wait legs only", - "$ref": "#/definitions/Departures" + "$ref": "#/definitions/LegDepartures" }, "legFare": { "description": "Leg level public transit fare information. Returned only if fare information is available for the entire itinerary.", @@ -2151,19 +1737,19 @@ "properties": { "price": { "description": "The total price for all tickets a user is expected to purchase in order to complete this itinerary.", - "$ref": "#/definitions/Price" + "$ref": "#/definitions/FarePrice" }, "tickets": { "description": "An array describing the individual prices of each of the tickets that the user is expected to purchase throughout this itinerary. The list isn’t ordered.", "type": "array", "items": { - "$ref": "#/definitions/Tickets" + "$ref": "#/definitions/FareTicket" } } } }, - "Tickets": { - "description": "An array describing the individual prices of each of the tickets that the user is expected to purchase throughout this itinerary. The list isn’t ordered.", + "FareTicket": { + "description": "The price of a ticket that the user is expected to purchase throughout this itinerary.", "type": "object", "properties": { "amount": { @@ -2182,20 +1768,21 @@ "type": "object", "properties": { "fares": { + "description": "Details of the fare.", "type": "array", "items": { - "$ref": "#/definitions/Fares" + "$ref": "#/definitions/FareDetail" } } } }, - "Fares": { + "FareDetail": { "description": "Detailed fare information for the leg.", "type": "object", "properties": { "price": { "description": "The price of the ticket when purchased for the individual leg, not for the entire route at once.", - "$ref": "#/definitions/Price" + "$ref": "#/definitions/FarePrice" }, "usage": { "description": "Supported values are:\n\n * pay – user is expected to pay for this ticket in order to consume the current leg\n * transfer – user can use a ticket purchased in a previous leg in order to consume the current leg. In general, when transfer is specified, the number of transfers is counted, and has a limit.\n * continue – user can use a ticket purchased in a previous leg in order to consume the current leg. In general, when continue is specified, the number of transfers isn’t incremented for this leg.\n * upgrade – user is expected to upgrade a ticket purchased in a previous leg in order to consume the current leg.", @@ -2203,7 +1790,7 @@ } } }, - "Price": { + "FarePrice": { "type": "object", "properties": { "amount": { @@ -2221,22 +1808,22 @@ "type": "object", "properties": { "position": { - "$ref": "#/definitions/Coordinate" + "$ref": "../../../Common/preview/1.0/common.json#/definitions/CoordinatesPair" } } }, - "Stops": { + "LegStops": { "type": "array", "items": { - "$ref": "#/definitions/Stop" + "$ref": "#/definitions/LegStop" } }, - "Step": { + "ItineraryStep": { "type": "object", "properties": { "direction": { "description": "The walking direction associated with this step.", - "$ref": "#/definitions/Direction" + "$ref": "#/definitions/WalkingDirection" }, "streetName": { "description": "The name of the street in which this step takes place.", @@ -2244,7 +1831,7 @@ } } }, - "Direction": { + "WalkingDirection": { "description": "The walking directions guidance.", "type": "object", "properties": { @@ -2379,7 +1966,7 @@ } } }, - "Departures": { + "LegDepartures": { "type": "array", "items": { "$ref": "#/definitions/LineArrival" @@ -2407,7 +1994,7 @@ } } }, - "Pattern": { + "ItineraryPattern": { "type": "object", "description": "Stop-shape-segments of the trip pattern, which are an ordered list of the stops and the shapes connecting them.", "properties": { @@ -2428,7 +2015,7 @@ }, "geometry": { "description": "Stop sequence and shape per a line in GeoJSON format.", - "$ref": "#/definitions/LineString" + "$ref": "../../../Common/preview/1.0/common.json#/definitions/GeoJsonLineString" } } }, @@ -2445,7 +2032,7 @@ } } }, - "Agency": { + "AgencyDetails": { "type": "object", "description": "Details of the agency. Returned if specified in the request.", "properties": { @@ -2554,11 +2141,11 @@ }, "line": { "description": "The public transit type of the line.", - "$ref": "#/definitions/Line" + "$ref": "#/definitions/ItineraryLine" }, "stop": { "description": "Object for the given stop.", - "$ref": "#/definitions/Stop" + "$ref": "#/definitions/LegStop" } } }, diff --git a/specification/maps/data-plane/Microsoft.Maps/Render/preview/1.0/examples/GetCopyrightCaption.json b/specification/maps/data-plane/Microsoft.Maps/Render/preview/1.0/examples/GetCopyrightCaption.json index d6e9b47100f2..5168f6a0fe19 100644 --- a/specification/maps/data-plane/Microsoft.Maps/Render/preview/1.0/examples/GetCopyrightCaption.json +++ b/specification/maps/data-plane/Microsoft.Maps/Render/preview/1.0/examples/GetCopyrightCaption.json @@ -1,8 +1,8 @@ { "parameters": { + "geography": "us", "api-version": "1.0", - "format": "json", - "subscription-key": "[subscription-key]" + "format": "json" }, "responses": { "200": { @@ -10,51 +10,6 @@ "formatVersion": "0.0.1", "copyrightsCaption": "© 1992 - 2017 TomTom." } - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive." - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found: the requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "An error occurred while processing the request. Please try again later." - } - } } } } diff --git a/specification/maps/data-plane/Microsoft.Maps/Render/preview/1.0/examples/GetCopyrightForTile.json b/specification/maps/data-plane/Microsoft.Maps/Render/preview/1.0/examples/GetCopyrightForTile.json index ebbf26fccc88..18e9b9644d2b 100644 --- a/specification/maps/data-plane/Microsoft.Maps/Render/preview/1.0/examples/GetCopyrightForTile.json +++ b/specification/maps/data-plane/Microsoft.Maps/Render/preview/1.0/examples/GetCopyrightForTile.json @@ -1,11 +1,11 @@ { "parameters": { + "geography": "us", "api-version": "1.0", "format": "json", "zoom": 6, "x": 9, - "y": 22, - "subscription-key": "[subscription-key]" + "y": 22 }, "responses": { "200": { @@ -75,51 +75,6 @@ } ] } - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive." - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found: the requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "An error occurred while processing the request. Please try again later." - } - } } } } diff --git a/specification/maps/data-plane/Microsoft.Maps/Render/preview/1.0/examples/GetCopyrightForWorld.json b/specification/maps/data-plane/Microsoft.Maps/Render/preview/1.0/examples/GetCopyrightForWorld.json index ab7e51c902d4..7a55e043297c 100644 --- a/specification/maps/data-plane/Microsoft.Maps/Render/preview/1.0/examples/GetCopyrightForWorld.json +++ b/specification/maps/data-plane/Microsoft.Maps/Render/preview/1.0/examples/GetCopyrightForWorld.json @@ -1,8 +1,8 @@ { "parameters": { + "geography": "us", "api-version": "1.0", - "format": "json", - "subscription-key": "[subscription-key]" + "format": "json" }, "responses": { "200": { @@ -334,51 +334,6 @@ } ] } - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive." - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found: the requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "An error occurred while processing the request. Please try again later." - } - } } } } diff --git a/specification/maps/data-plane/Microsoft.Maps/Render/preview/1.0/examples/GetCopyrightFromBoundingBox.json b/specification/maps/data-plane/Microsoft.Maps/Render/preview/1.0/examples/GetCopyrightFromBoundingBox.json index 0f73246575f9..392a6ef6eda9 100644 --- a/specification/maps/data-plane/Microsoft.Maps/Render/preview/1.0/examples/GetCopyrightFromBoundingBox.json +++ b/specification/maps/data-plane/Microsoft.Maps/Render/preview/1.0/examples/GetCopyrightFromBoundingBox.json @@ -1,11 +1,11 @@ { "parameters": { + "geography": "us", "api-version": "1.0", "format": "json", "mincoordinates": "52.41064,4.84228", "maxcoordinates": "52.41072,4.84239", - "text": "yes", - "subscription-key": "[subscription-key]" + "text": "yes" }, "responses": { "200": { @@ -29,51 +29,6 @@ } ] } - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive." - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found: the requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "An error occurred while processing the request. Please try again later." - } - } } } } diff --git a/specification/maps/data-plane/Microsoft.Maps/Render/preview/1.0/examples/GetMapImage.json b/specification/maps/data-plane/Microsoft.Maps/Render/preview/1.0/examples/GetMapImage.json deleted file mode 100644 index b316545d0ef1..000000000000 --- a/specification/maps/data-plane/Microsoft.Maps/Render/preview/1.0/examples/GetMapImage.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "parameters": { - "api-version": "1.0", - "format": "png", - "zoom": 2, - "bbox": "1.355233,42.982261,24.980233,56.526017", - "layer": "basic", - "style": "main", - "subscription-key": "[subscription-key]" - }, - "responses": { - "200": { - "headers": {}, - "body": "binary string image" - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive." - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found: the requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "An error occurred while processing the request. Please try again later." - } - } - } - } -} diff --git a/specification/maps/data-plane/Microsoft.Maps/Render/preview/1.0/examples/GetMapImageryTile.json b/specification/maps/data-plane/Microsoft.Maps/Render/preview/1.0/examples/GetMapImageryTile.json index e3f6cda8376f..ba3242718b24 100644 --- a/specification/maps/data-plane/Microsoft.Maps/Render/preview/1.0/examples/GetMapImageryTile.json +++ b/specification/maps/data-plane/Microsoft.Maps/Render/preview/1.0/examples/GetMapImageryTile.json @@ -1,52 +1,19 @@ { "parameters": { + "geography": "us", "api-version": "1.0", "format": "png", "style": "satellite", "zoom": 6, "x": 10, - "y": 22, - "subscription-key": "[subscription-key]" + "y": 22 }, "responses": { "200": { - "headers": {}, - "body": "binary string image" - }, - "400": { - "headers": {}, - "body": { - "statuscode": "400", - "message": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive." - } - }, - "401": { - "headers": {}, - "body": { - "statuscode": "401", - "message": "Unauthorized: Access is denied due to invalid credentials." - } - }, - "403": { - "headers": {}, - "body": { - "statuscode": "403", - "message": "Permission, capacity, or authentication issues." - } - }, - "404": { - "headers": {}, - "body": { - "statuscode": "404", - "message": "Not Found: the requested resource could not be found, but it may be available again in the future." - } - }, - "500": { - "headers": {}, - "body": { - "statuscode": "500", - "message": "An error occurred while processing the request. Please try again later." - } + "headers": { + "Content-Type": "image/png" + }, + "body": "{file}" } } } diff --git a/specification/maps/data-plane/Microsoft.Maps/Render/preview/1.0/examples/GetMapStateTile.json b/specification/maps/data-plane/Microsoft.Maps/Render/preview/1.0/examples/GetMapStateTile.json index 997c25929649..72ef3cb5deed 100644 --- a/specification/maps/data-plane/Microsoft.Maps/Render/preview/1.0/examples/GetMapStateTile.json +++ b/specification/maps/data-plane/Microsoft.Maps/Render/preview/1.0/examples/GetMapStateTile.json @@ -1,63 +1,18 @@ { "parameters": { + "geography": "us", "api-version": "1.0", "statesetId": "[statesetId]", "zoom": 6, "x": 10, - "y": 22, - "subscription-key": "[subscription-key]" + "y": 22 }, "responses": { "200": { "headers": { "Content-Type": "application/vnd.mapbox-vector-tile" }, - "body": "state tile vector graphic content" - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive." - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found: the requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "An error occurred while processing the request. Please try again later." - } - } + "body": "{file}" } } } diff --git a/specification/maps/data-plane/Microsoft.Maps/Render/preview/1.0/examples/GetMapStaticImage.json b/specification/maps/data-plane/Microsoft.Maps/Render/preview/1.0/examples/GetMapStaticImage.json new file mode 100644 index 000000000000..2ff157d8f994 --- /dev/null +++ b/specification/maps/data-plane/Microsoft.Maps/Render/preview/1.0/examples/GetMapStaticImage.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "geography": "us", + "api-version": "1.0", + "format": "png", + "zoom": 2, + "bbox": "1.355233,42.982261,24.980233,56.526017", + "layer": "basic", + "style": "main" + }, + "responses": { + "200": { + "headers": { + "Content-Type": "image/png" + }, + "body": "{file}" + } + } +} diff --git a/specification/maps/data-plane/Microsoft.Maps/Render/preview/1.0/examples/GetMapTile.json b/specification/maps/data-plane/Microsoft.Maps/Render/preview/1.0/examples/GetMapTile.json index b24399f4e996..e96464d77c53 100644 --- a/specification/maps/data-plane/Microsoft.Maps/Render/preview/1.0/examples/GetMapTile.json +++ b/specification/maps/data-plane/Microsoft.Maps/Render/preview/1.0/examples/GetMapTile.json @@ -1,5 +1,6 @@ { "parameters": { + "geography": "us", "api-version": "1.0", "format": "png", "layer": "basic", @@ -7,58 +8,14 @@ "zoom": 6, "x": 10, "y": 22, - "tilesize": 512, - "subscription-key": "[subscription-key]" + "tilesize": 512 }, "responses": { "200": { - "headers": {}, - "body": "binary string image" - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive." - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found: the requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "An error occurred while processing the request. Please try again later." - } - } + "headers": { + "Content-Type": "image/png" + }, + "body": "{file}" } } } diff --git a/specification/maps/data-plane/Microsoft.Maps/Render/preview/1.0/render.json b/specification/maps/data-plane/Microsoft.Maps/Render/preview/1.0/render.json index 3fe229eaf2f9..a5475bdafc62 100644 --- a/specification/maps/data-plane/Microsoft.Maps/Render/preview/1.0/render.json +++ b/specification/maps/data-plane/Microsoft.Maps/Render/preview/1.0/render.json @@ -5,14 +5,33 @@ "version": "1.0", "description": "Azure Maps Render REST APIs" }, - "host": "atlas.microsoft.com", + "x-ms-parameterized-host": { + "hostTemplate": "{geography}.atlas.microsoft.com", + "parameters": [ + { + "$ref": "../../../Common/preview/1.0/common.json#/parameters/GeographicResourceLocation" + } + ] + }, "schemes": [ "https" ], "consumes": [], "produces": [ - "application/json", - "application/xml" + "application/json" + ], + "security": [ + { + "azure_auth": [ + "user_impersonation" + ] + }, + { + "SubscriptionKeyInHeader": [] + }, + { + "SubscriptionKeyInQuery": [] + } ], "securityDefinitions": { "azure_auth": { @@ -21,82 +40,25 @@ "flow": "implicit", "description": "These are the [Azure Active Directory OAuth2](https://docs.microsoft.com/en-us/azure/active-directory/develop/v1-overview) Flows. When paired with [Azure Role Based Access](https://docs.microsoft.com/en-us/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#### Note\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* The `Authorization URL` is specific to the Azure public cloud instance. Sovereign clouds have unique Authorization URLs and Azure Active directory configurations. \n* 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.\n* Usage of the [Azure Maps Web SDK](https://aka.ms/amaadmc) allows for configuration based setup of an application for multiple use cases.\n* Currently Azure Active Directory [v1.0](https://docs.microsoft.com/en-us/azure/active-directory/develop/azure-ad-endpoint-comparison) tokens are supported.", "scopes": { - "user_impersonation": "Impersonates a user's Azure Active Directory account." + "user_impersonation": "impersonate your user account" } }, - "apiKeyQuery": { + "SubscriptionKeyInHeader": { "type": "apiKey", - "description": "This is a shared key which 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 which 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": "query" - } - }, - "security": [ - { - "azure_auth": [] - }, - { - "apiKeyQuery": [] - } - ], - "responses": { - "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 Azure Active Directory 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 AAD bearer token.", - "schema": { - "$ref": "#/definitions/ODataErrorResponse" - }, - "headers": { - "WWW-Authenticate": { - "type": "string", - "description": "Bearer realm=\"https://atlas.microsoft.com/\", error=\"invalid_token\", error_description=\"The access token expired\"" - } - } + "in": "header" }, - "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" - } + "SubscriptionKeyInQuery": { + "type": "apiKey", + "name": "subscription-key", + "in": "query" } }, + "responses": {}, "parameters": { - "ClientId": { - "name": "x-ms-client-id", - "description": "Specifies which account is intended for usage in conjunction with the Azure AD security model. It represents a unique ID for the Azure Maps account and can be retrieved from Azure Maps management plane Account API. To use Azure AD 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": { + "RenderApiVersion": { "name": "api-version", - "description": "Version number of Azure Maps API. Current version is 1.0", + "description": "Version number of Azure Maps API.", "type": "string", "in": "query", "required": true, @@ -124,14 +86,6 @@ }, "x-ms-parameter-location": "method" }, - "Language": { - "name": "language", - "in": "query", - "description": "Language in which search results should be returned. Should be one of supported IETF language tags, case insensitive. When data in specified language is not available for a specific field, default language is used.\n\nPlease refer to [Supported Languages](https://docs.microsoft.com/en-us/azure/azure-maps/supported-languages) for details.", - "required": false, - "type": "string", - "x-ms-parameter-location": "method" - }, "TileFormat": { "name": "format", "description": "Desired format of the response. Possible values are png & pbf.", @@ -178,32 +132,6 @@ "format": "int32", "x-ms-parameter-location": "method" }, - "TextFormat": { - "name": "format", - "description": "Desired format of the response. Value can be either _json_ or _xml_.", - "type": "string", - "in": "path", - "required": true, - "enum": [ - "json", - "xml" - ], - "x-ms-enum": { - "name": "TextFormat", - "modelAsString": true, - "values": [ - { - "value": "json", - "description": "[The JavaScript Object Notation Data Interchange Format](https://tools.ietf.org/html/rfc8259)" - }, - { - "value": "xml", - "description": "[The Extensible Markup Language](https://www.w3.org/TR/xml/)" - } - ] - }, - "x-ms-parameter-location": "method" - }, "RasterZoom18": { "name": "zoom", "in": "query", @@ -240,48 +168,48 @@ "format": "int32", "x-ms-parameter-location": "method" }, - "Text": { + "IncludeText": { "name": "text", "in": "query", "description": "Yes/no value to exclude textual data from response. Only images and country names will be in response.", - "required": false, "type": "string", "enum": [ "yes", "no" ], - "default": "yes", - "x-ms-parameter-location": "method" - }, - "View": { - "name": "view", - "in": "query", - "description": "The View parameter specifies which set of geopolitically disputed content is returned via Azure Maps services, including borders and labels displayed on the map. The View parameter (also referred to as “user region parameter”) will show the correct maps for that country/region. By default, the View parameter is set to “Unified” even if you haven’t defined it in the request. It is your responsibility to determine the location of your users, and then set the View parameter correctly for that location. Alternatively, you have the option to set ‘View=Auto’, which will return the map data based on the IP address of the request. The View parameter in Azure Maps must be used in compliance with applicable laws, including those regarding mapping, of the country where maps, images and other data and third party content that you are authorized to access via Azure Maps is made available. Example: view=IN.\n\nPlease refer to [Supported Views](https://aka.ms/AzureMapsLocalizationViews) for details and to see the available Views.", - "required": false, - "type": "string", + "x-ms-enum": { + "name": "IncludeText", + "modelAsString": true, + "values": [ + { + "value": "yes", + "description": "Include all textual data in response." + }, + { + "value": "no", + "description": "Exclude textual data from response. Only images and country names will be in response." + } + ] + }, "x-ms-parameter-location": "method" } }, "paths": { "/map/static/{format}": { "get": { - "x-publish": true, "description": "**Applies to**: S0 and S1 pricing tiers.\n\n\nThe static image service renders a user-defined, rectangular image containing a map section using a zoom level from 0 to 20. The static image service renders a user-defined, rectangular image containing a map section using a zoom level from 0 to 20. The supported resolution range for the map image is from 1x1 to 8192x8192. If you are deciding when to use the static image service over the map tile service, you may want to consider how you would like to interact with the rendered map. If the map contents will be relatively unchanging, a static map is a good choice. If you want to support a lot of zooming, panning and changing of the map content, the map tile service would be a better choice. \n\nService also provides Image Composition functionality to get a static image back with additional data like; pushpins and geometry overlays with following S0 and S1 capabilities. \n\nIn S0 you can:\n- Render up to 5 pushpins specified in the request\n- Provide one custom image for the pins referenced in the request\n- Add labels to the pushpins\n\nIn S1 you can:\n- Render pushpins through [Azure Maps Data Service](https://aka.ms/AzureMapsMapDataService)\n- Specify multiple pushpin styles\n- Provide custom pushpin images stored in [Azure Maps Data Service](https://aka.ms/AzureMapsMapDataService)\n- Render circle, polyline and polygon geometry types.\n- Render of supported GeoJSON geometry types uploaded through [Azure Maps Data Service](https://aka.ms/AzureMapsMapDataService)\n\nPlease see [How-to-Guide](https://aka.ms/AzureMapsHowToGuideImageCompositor) for detailed examples.\n\n_Note_ : Either **center** or **bbox** parameter must be supplied to the\nAPI.\n

\nThe supported Lat and Lon ranges when using the **bbox** parameter, are as follows:\n

\n\n |Zoom Level | Max Lon Range | Max Lat Range|\n |:----------|:----------------|:-------------|\n |0 | 360.0 | 170.0 | \n |1 | 360.0 | 170.0 |\n |2 | 360.0 | 170.0 |\n |3 | 360.0 | 170.0 |\n |4 | 360.0 | 170.0 |\n |5 | 180.0 | 85.0 |\n |6 | 90.0 | 42.5 |\n |7 | 45.0 | 21.25 |\n |8 | 22.5 | 10.625 |\n |9 | 11.25 | 5.3125 |\n |10 | 5.625 | 2.62625 |\n |11 | 2.8125 | 1.328125 |\n |12 | 1.40625 | 0.6640625 |\n |13 | 0.703125 | 0.33203125 |\n |14 | 0.3515625 | 0.166015625 |\n |15 | 0.17578125 | 0.0830078125 | \n |16 | 0.087890625 | 0.0415039063 | \n |17 | 0.0439453125 | 0.0207519531 |\n |18 | 0.0219726563 | 0.0103759766 |\n |19 | 0.0109863281 | 0.0051879883 |\n |20 | 0.0054931641 | 0.0025939941 |", - "operationId": "Render_GetMapImage", + "operationId": "Render_GetMapStaticImage", "x-ms-examples": { "GetMapStaticImage": { - "$ref": "./examples/GetMapImage.json" + "$ref": "./examples/GetMapStaticImage.json" } }, "parameters": [ { - "$ref": "#/parameters/ClientId" - }, - { - "$ref": "#/parameters/SubscriptionKey" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ClientId" }, { - "$ref": "#/parameters/ApiVersion" + "$ref": "#/parameters/RenderApiVersion" }, { "$ref": "#/parameters/RasterTileFormat" @@ -290,8 +218,6 @@ "name": "layer", "in": "query", "description": "Map layer requested. If layer is set to labels or hybrid, the format should be png.", - "required": false, - "default": "basic", "type": "string", "enum": [ "basic", @@ -321,8 +247,6 @@ "name": "style", "in": "query", "description": "Map style to be returned. Possible values are main and dark.", - "required": false, - "default": "main", "type": "string", "enum": [ "main", @@ -347,8 +271,6 @@ "name": "zoom", "in": "query", "description": "Desired zoom level of the map. Zoom value must be in the range: 0-20 (inclusive). Default value is 12.

Please see [Zoom Levels and Tile Grid](https://docs.microsoft.com/en-us/azure/location-based-services/zoom-levels-and-tile-grid) for details.", - "required": false, - "default": 12, "type": "integer", "format": "int32", "minimum": 0, @@ -358,102 +280,89 @@ "name": "center", "in": "query", "description": "Coordinates of the center point. Format: 'lon,lat'. Projection used\n- EPSG:3857. Longitude range: -180 to 180. Latitude range: -85 to 85. \n\nNote: Either center or bbox are required parameters. They are\nmutually exclusive.", - "required": false, "type": "string" }, { "name": "bbox", "in": "query", "description": "Bounding box. Projection used - EPSG:3857. Format : 'minLon, minLat,\nmaxLon, maxLat'. \n\nNote: Either bbox or center are required\nparameters. They are mutually exclusive. It shouldn’t be used with\nheight or width.\n\nThe maximum allowed ranges for Lat and Lon are defined for each zoom level\nin the table at the top of this page.", - "required": false, "type": "string" }, { "name": "height", "in": "query", "description": "Height of the resulting image in pixels. Range is 1 to 8192. Default\nis 512. It shouldn’t be used with bbox.", - "required": false, "type": "integer", "format": "int32", "minimum": 1, - "maximum": 8192, - "default": 512 + "maximum": 8192 }, { "name": "width", "in": "query", "description": "Width of the resulting image in pixels. Range is 1 to 8192. Default is 512. It shouldn’t be used with bbox.", - "required": false, "type": "integer", "format": "int32", "minimum": 1, - "maximum": 8192, - "default": 512 + "maximum": 8192 }, { - "$ref": "#/parameters/Language" + "$ref": "../../../Search/preview/1.0/search.json#/parameters/Language" }, { - "$ref": "#/parameters/View" + "$ref": "../../../Search/preview/1.0/search.json#/parameters/View" }, { "name": "pins", "description": "Pushpin style and instances. Use this parameter to optionally add pushpins to the image.\nThe pushpin style describes the appearance of the pushpins, and the instances specify\nthe coordinates of the pushpins and optional labels for each pin. (Be sure to properly URL-encode values of this\nparameter since it will contain reserved characters such as pipes and punctuation.)\n\nThe Azure Maps account S0 SKU only supports a single instance of the pins parameter. Other SKUs\nallow multiple instances of the pins parameter to specify multiple pin styles.\n\nTo render a pushpin at latitude 45°N and longitude 122°W using the default built-in pushpin style, add the\nquerystring parameter \n\n`pins=default||-122 45` \n\nNote that the longitude comes before the latitude.\nAfter URL encoding this will look like\n\n`pins=default%7C%7C-122+45`\n\nAll of the examples here show the pins\nparameter without URL encoding, for clarity.\n\nTo render a pin at multiple locations, separate each location with a pipe character. For example, use\n\n`pins=default||-122 45|-119.5 43.2|-121.67 47.12`\n\nThe S0 Azure Maps account SKU only allows five pushpins. Other account SKUs do not have this limitation.\n\n### Style Modifiers\n\nYou can modify the appearance of the pins by adding style modifiers. These are added after the style but before\nthe locations and labels. Style modifiers each have a two-letter name. These abbreviated names are used to help\nreduce the length of the URL.\n\nTo change the color of the pushpin, use the 'co' style modifier and specify the color using the HTML/CSS RGB color\nformat which is a six-digit hexadecimal number (the three-digit form is not supported). For example, to use\na deep pink color which you would specify as #FF1493 in CSS, use\n\n`pins=default|coFF1493||-122 45`\n\n### Pushpin Labels\n\nTo add a label to the pins, put the label in single quotes just before the coordinates. For example, to label\nthree pins with the values '1', '2', and '3', use\n\n`pins=default||'1'-122 45|'2'-119.5 43.2|'3'-121.67 47.12`\n\nThere is a built in pushpin style called 'none' that does not display a pushpin image. You can use this if\nyou want to display labels without any pin image. For example,\n\n`pins=none||'A'-122 45|'B'-119.5 43.2`\n\nTo change the color of the pushpin labels, use the 'lc' label color style modifier. For example, to use pink\npushpins with black labels, use\n\n`pins=default|coFF1493|lc000000||-122 45`\n\nTo change the size of the labels, use the 'ls' label size style modifier. The label size represents the approximate\nheight of the label text in pixels. For example, to increase the label size to 12, use\n\n`pins=default|ls12||'A'-122 45|'B'-119 43`\n\nThe labels are centered at the pushpin 'label anchor.' The anchor location is predefined for built-in pushpins and\nis at the top center of custom pushpins (see below). To override the label anchor, using the 'la' style modifier\nand provide X and Y pixel coordinates for the anchor. These coordinates are relative to the top left corner of the\npushpin image. Positive X values move the anchor to the right, and positive Y values move the anchor down. For example,\nto position the label anchor 10 pixels right and 4 pixels above the top left corner of the pushpin image,\nuse\n\n`pins=default|la10 -4||'A'-122 45|'B'-119 43`\n\n### Custom Pushpins\n\nTo use a custom pushpin image, use the word 'custom' as the pin style name, and then specify a URL after the\nlocation and label information. Use two pipe characters to indicate that you're done specifying locations and are\nstarting the URL. For example,\n\n`pins=custom||-122 45||http://contoso.com/pushpins/red.png`\n\nAfter URL encoding, this would look like\n\n`pins=custom%7C%7C-122+45%7C%7Chttp%3A%2F%2Fcontoso.com%2Fpushpins%2Fred.png`\n\nBy default, custom pushpin images are drawn centered at the pin coordinates. This usually isn't ideal as it obscures\nthe location that you're trying to highlight. To override the anchor location of the pin image, use the 'an'\nstyle modifier. This uses the same format as the 'la' label anchor style modifier. For example, if your custom\npin image has the tip of the pin at the top left corner of the image, you can set the anchor to that spot by\nusing\n\n`pins=custom|an0 0||-122 45||http://contoso.com/pushpins/red.png`\n\nNote: If you use the 'co' color modifier with a custom pushpin image, the specified color will replace the RGB \nchannels of the pixels in the image but will leave the alpha (opacity) channel unchanged. This would usually\nonly be done with a solid-color custom image.\n\n### Getting Pushpins from Azure Maps Data Storage\n\nFor all Azure Maps account SKUs other than S0,\nthe pushpin image and location information can be obtained from Azure Maps Data Storage. After uploading a pushpin image\nor a GeoJSON document containing pin locations, the Data Storage service returns a Unique Data ID (UDID) that you can use\nto reference the data in the pins parameter.\n\nTo use a custom pushpin image from Azure Maps Data Storage, specify the UDID prefixed by 'udid-' as the name of the\npushpin style. For example,\n\n`pins=udid-fe22c504-3a81-4fcd-adc6-a3507ce866c1||-122 45`\n\nTo use the point geometry from an uploaded GeoJSON document as the pin locations, specify the UDID in the locations\nsection of the pins parameter. For example,\n\n`pins=default||udid-29dc105a-dee7-409f-a3f9-22b066ae4713`\n\nNote that\nonly point and multipoint geometry, points and multipoints from geometry collections, and point geometry from features\nwill be used. Linestring and polygon geometry will be ignored. If the point comes from a feature and the feature\nhas a string property called \"label\", the value of that property will be used as the label for the pin.\n\nYou can mix pin locations from Data Storage and pin locations specified in the pins parameter. Any of the pipe-delimited\npin locations can be a longitude and latitude or a UDID. For example,\n\n`pins=default||-122 45|udid-29dc105a-dee7-409f-a3f9-22b066ae4713|-119 43`\n\n### Scale, Rotation, and Opacity\n\nYou can make pushpins and their labels larger or smaller by using the 'sc' scale style modifier. This is a\nvalue greater than zero. A value of 1 is the standard scale. Values larger than 1 will make the pins larger, and\nvalues smaller than 1 will make them smaller. For example, to draw the pushpins 50% larger than normal, use\n\n`pins=default|sc1.5||-122 45`\n\nYou can rotate pushpins and their labels by using the 'ro' rotation style modifier. This is a number of degrees\nof clockwise rotation. Use a negative number to rotate counter-clockwise. For example, to rotate the pushpins\n90 degrees clockwise and double their size, use\n\n`pins=default|ro90|sc2||-122 45`\n\nYou can make pushpins and their labels partially transparent by specifying the 'al' alpha style modifier.\nThis is a number between 0 and 1 indicating the opacity of the pushpins. Zero makes them completely transparent\n(and not visible) and 1 makes them completely opaque (which is the default). For example, to make pushpins\nand their labels only 67% opaque, use\n\n`pins=default|al.67||-122 45`\n\n### Style Modifier Summary\n\nModifier | Description | Range \n:--------:|-----------------|------------------\nal | Alpha (opacity) | 0 to 1 \nan | Pin anchor | * \nco | Pin color | 000000 to FFFFFF \nla | Label anchor | * \nlc | Label color | 000000 to FFFFFF \nls | Label size | Greater than 0 \nro | Rotation | -360 to 360 \nsc | Scale | Greater than 0 \n\n* X and Y coordinates can be anywhere within pin image or a margin around it.\nThe margin size is the minimum of the pin width and height.", "in": "query", - "required": false, "type": "array", "collectionFormat": "multi", "items": { "type": "string" - }, - "x-publish": true + } }, { "name": "path", "description": "Path style and locations. Use this parameter to optionally add lines, polygons or circles to the image.\nThe path style describes the appearance of the line and fill. (Be sure to properly URL-encode values of this\nparameter since it will contain reserved characters such as pipes and punctuation.)\n\nPath parameter is supported in Azure Maps account SKU starting with S1. Multiple instances of the path parameter \nallow to specify multiple geometries with their styles. Number of parameters per request is limited to 10 and\nnumber of locations is limited to 100 per path.\n\nTo render a circle with radius 100 meters and center point at latitude 45°N and longitude 122°W using the default style, add the\nquerystring parameter \n\n`path=ra100||-122 45` \n\nNote that the longitude comes before the latitude.\nAfter URL encoding this will look like\n\n`path=ra100%7C%7C-122+45`\n\nAll of the examples here show the path parameter without URL encoding, for clarity.\n\nTo render a line, separate each location with a pipe character. For example, use\n\n`path=||-122 45|-119.5 43.2|-121.67 47.12`\n\nTo render a polygon, last location must be equal to the start location. For example, use\n\n`path=||-122 45|-119.5 43.2|-121.67 47.12|-122 45`\n\nLongitude and latitude values for locations of lines and polygons can be in the range from -360 to 360 to allow for rendering of geometries crossing the anti-meridian.\n\n### Style Modifiers\n\nYou can modify the appearance of the path by adding style modifiers. These are added before the locations. \nStyle modifiers each have a two-letter name. These abbreviated names are used to help reduce the length\nof the URL.\n\nTo change the color of the outline, use the 'lc' style modifier and specify the color using the HTML/CSS RGB color\nformat which is a six-digit hexadecimal number (the three-digit form is not supported). For example, to use\na deep pink color which you would specify as #FF1493 in CSS, use\n\n`path=lcFF1493||-122 45|-119.5 43.2`\n\nMultiple style modifiers may be combined together to create a more complex visual style.\n\n`lc0000FF|lw3|la0.60|fa0.50||-122.2 47.6|-122.2 47.7|-122.3 47.7|-122.3 47.6|-122.2 47.6`\n\n### Getting Path locations from Azure Maps Data Storage\n\nFor all Azure Maps account SKUs other than S0, the path location information can be obtained from Azure Maps Data Storage. \nAfter uploading a GeoJSON document containing path locations, the Data Storage service returns a Unique Data ID (UDID) that you can use\nto reference the data in the path parameter.\n\nTo use the point geometry from an uploaded GeoJSON document as the path locations, specify the UDID in the locations\nsection of the path parameter. For example,\n\n`path=||udid-29dc105a-dee7-409f-a3f9-22b066ae4713`\n\nNote the it is not allowed to mix path locations from Data Storage with locations specified in the path parameter. \n\n### Style Modifier Summary\n\nModifier | Description | Range \n:--------:|------------------------|------------------\nlc | Line color | 000000 to FFFFFF\nfc | Fill color | 000000 to FFFFFF\nla | Line alpha (opacity) | 0 to 1 \nfa | Fill alpha (opacity) | 0 to 1 \nlw | Line width | Greater than 0 \nra | Circle radius (meters) | Greater than 0", "in": "query", - "required": false, "type": "array", "collectionFormat": "multi", "items": { "type": "string" - }, - "x-publish": true + } } ], "produces": [ "application/json", "image/jpeg", - "image/png" + "image/png", + "image/pbf", + "application/vnd.mapbox-vector-tile" ], "responses": { "200": { - "description": "OK", + "description": "This image is returned from a successful Get Map Static Image call", "schema": { - "$ref": "#/definitions/MapStaticResult" + "type": "object", + "format": "file", + "readOnly": true + }, + "headers": { + "Content-Type": { + "type": "string", + "description": "The content-type for the response." + } } }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" + "default": { + "$ref": "../../../Common/preview/1.0/common.json#/responses/default" } } } }, "/map/tile/{format}": { "get": { - "x-publish": true, "description": "**Applies to**: S0 and S1 pricing tiers.\n\n\nFetches map tiles in vector or raster format typically to be integrated into a new map control or SDK. By default, Azure uses vector map tiles for its web map control (see [Zoom Levels and Tile Grid](https://docs.microsoft.com/en-us/azure/location-based-services/zoom-levels-and-tile-grid))\n\n**Note**: Weather tiles are only available via [Get Map Tile V2 API](https://aka.ms/AzureMapsWeatherTiles). We recommend to start to use the new [Get Map Tile V2 API](https://aka.ms/GetMapTileV2).", "operationId": "Render_GetMapTile", "x-ms-examples": { @@ -463,13 +372,10 @@ }, "parameters": [ { - "$ref": "#/parameters/ClientId" - }, - { - "$ref": "#/parameters/SubscriptionKey" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ClientId" }, { - "$ref": "#/parameters/ApiVersion" + "$ref": "#/parameters/RenderApiVersion" }, { "$ref": "#/parameters/TileFormat" @@ -552,9 +458,7 @@ "name": "tileSize", "in": "query", "description": "The size of the returned map tile in pixels.", - "required": false, "type": "string", - "default": "256", "enum": [ "256", "512" @@ -575,45 +479,42 @@ } }, { - "$ref": "#/parameters/Language" + "$ref": "../../../Search/preview/1.0/search.json#/parameters/Language" }, { - "$ref": "#/parameters/View" + "$ref": "../../../Search/preview/1.0/search.json#/parameters/View" } ], "produces": [ "application/json", "image/jpeg", - "image/png" + "image/png", + "image/pbf", + "application/vnd.mapbox-vector-tile" ], "responses": { "200": { - "description": "OK", + "description": "This image is returned from a successful Get Map Tile call", "schema": { - "$ref": "#/definitions/MapTileResult" + "type": "object", + "format": "file", + "readOnly": true + }, + "headers": { + "Content-Type": { + "type": "string", + "description": "The content-type for the response." + } } }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" + "default": { + "$ref": "../../../Common/preview/1.0/common.json#/responses/default" } } } }, "/map/statetile": { "get": { - "x-publish": true, "description": "**Applies to**: S0 and S1 pricing tiers.\n\n\nFetches state tiles in vector format typically to be integrated into indoor maps module of map control or SDK. The map control will call this API after user turns on dynamic styling (see [Zoom Levels and Tile Grid](https://docs.microsoft.com/en-us/azure/location-based-services/zoom-levels-and-tile-grid))", "operationId": "Render_GetMapStateTilePreview", "x-ms-examples": { @@ -623,13 +524,10 @@ }, "parameters": [ { - "$ref": "#/parameters/ClientId" - }, - { - "$ref": "#/parameters/SubscriptionKey" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ClientId" }, { - "$ref": "#/parameters/ApiVersion" + "$ref": "#/parameters/RenderApiVersion" }, { "$ref": "#/parameters/VectorZoom" @@ -645,8 +543,7 @@ "in": "query", "description": "The stateset id.", "required": true, - "type": "string", - "x-ms-parameter-location": "method" + "type": "string" } ], "produces": [ @@ -655,32 +552,27 @@ ], "responses": { "200": { - "description": "OK", + "description": "This tile is returned from a successful Get Map State Tile call", "schema": { - "$ref": "#/definitions/MapStateTileResult" + "type": "object", + "format": "file", + "readOnly": true + }, + "headers": { + "Content-Type": { + "type": "string", + "description": "The content-type for the response." + } } }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" + "default": { + "$ref": "../../../Common/preview/1.0/common.json#/responses/default" } } } }, "/map/copyright/caption/{format}": { "get": { - "x-publish": true, "description": "**Applies to**: S0 and S1 pricing tiers.\n\n\n\nCopyrights API is designed to serve copyright information for Render Tile \nservice. In addition to basic copyright for the whole map, API is serving \nspecific groups of copyrights for some countries.\n\nAs an alternative to copyrights for map request, one can receive captions\nfor displaying the map provider information on the map.", "operationId": "Render_GetCopyrightCaption", "x-ms-examples": { @@ -690,62 +582,43 @@ }, "parameters": [ { - "$ref": "#/parameters/ClientId" - }, - { - "$ref": "#/parameters/SubscriptionKey" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ClientId" }, { - "$ref": "#/parameters/ApiVersion" + "$ref": "#/parameters/RenderApiVersion" }, { - "$ref": "#/parameters/TextFormat" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/TextFormat" } ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/CopyrightCaptionResult" + "$ref": "#/definitions/GetCopyrightCaptionResult" } }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" + "default": { + "$ref": "../../../Common/preview/1.0/common.json#/responses/default" } } } }, "/map/imagery/{format}": { "get": { - "x-publish": true, "description": "**Applies to:** S1 pricing tier.\n\n\nThis service returns a map image tile with size 256x256, given the x and y coordinates and zoom\nlevel. Zoom level ranges from 1 to 19. The current available style value is 'satellite' which provides satellite\nimagery alone.\n\n\n**Note**: We recommend to start to use the new [Get Map Tile V2 API](https://aka.ms/GetMapTileV2).", "operationId": "Render_GetMapImageryTile", "x-ms-examples": { - "GetMapImagery": { + "GetMapImageryTile": { "$ref": "./examples/GetMapImageryTile.json" } }, "parameters": [ { - "$ref": "#/parameters/ClientId" - }, - { - "$ref": "#/parameters/SubscriptionKey" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ClientId" }, { - "$ref": "#/parameters/ApiVersion" + "$ref": "#/parameters/RenderApiVersion" }, { "$ref": "#/parameters/RasterTileFormat" @@ -787,51 +660,43 @@ ], "responses": { "200": { - "description": "OK", + "description": "This image is returned from a successful Get Map Imagery Tile call", "schema": { - "$ref": "#/definitions/MapImageryResult" + "type": "object", + "format": "file", + "readOnly": true + }, + "headers": { + "Content-Type": { + "type": "string", + "description": "The content-type for the response." + } } }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" + "default": { + "$ref": "../../../Common/preview/1.0/common.json#/responses/default" } } } }, "/map/copyright/bounding/{format}": { "get": { - "x-publish": true, "description": "**Applies to**: S0 and S1 pricing tiers.\n\n\nReturns copyright information for a given bounding box. Bounding-box requests should specify the minimum and maximum longitude and latitude (EPSG-3857) coordinates", "operationId": "Render_GetCopyrightFromBoundingBox", "x-ms-examples": { - "GetCopyrightBounding": { + "GetCopyrightFromBoundingBox": { "$ref": "./examples/GetCopyrightFromBoundingBox.json" } }, "parameters": [ { - "$ref": "#/parameters/ClientId" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ClientId" }, { - "$ref": "#/parameters/SubscriptionKey" + "$ref": "#/parameters/RenderApiVersion" }, { - "$ref": "#/parameters/ApiVersion" - }, - { - "$ref": "#/parameters/TextFormat" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/TextFormat" }, { "name": "mincoordinates", @@ -848,56 +713,40 @@ "type": "string" }, { - "$ref": "#/parameters/Text" + "$ref": "#/parameters/IncludeText" } ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/CopyrightBoundingResult" + "$ref": "#/definitions/GetCopyrightFromBoundingBoxResult" } }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" + "default": { + "$ref": "../../../Common/preview/1.0/common.json#/responses/default" } } } }, "/map/copyright/tile/{format}": { "get": { - "x-publish": true, "description": "**Applies to**: S0 and S1 pricing tiers.\n\n\n\nCopyrights API is designed to serve copyright information for Render Tile service. In addition to basic copyright for the whole map, API is serving specific groups of copyrights for some countries.\nReturns the copyright information for a given tile. To obtain the copyright information for a particular tile, the request should specify the tile's zoom level and x and y coordinates (see: Zoom Levels and Tile Grid).", "operationId": "Render_GetCopyrightForTile", "x-ms-examples": { - "GetCopyrightTile": { + "GetCopyrightForTile": { "$ref": "./examples/GetCopyrightForTile.json" } }, "parameters": [ { - "$ref": "#/parameters/ClientId" - }, - { - "$ref": "#/parameters/SubscriptionKey" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ClientId" }, { - "$ref": "#/parameters/ApiVersion" + "$ref": "#/parameters/RenderApiVersion" }, { - "$ref": "#/parameters/TextFormat" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/TextFormat" }, { "$ref": "#/parameters/RasterZoom18" @@ -909,126 +758,62 @@ "$ref": "#/parameters/yTileIndex" }, { - "$ref": "#/parameters/Text" + "$ref": "#/parameters/IncludeText" } ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/CopyrightTileResult" + "$ref": "#/definitions/GetCopyrightForTileResult" } }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" + "default": { + "$ref": "../../../Common/preview/1.0/common.json#/responses/default" } } } }, "/map/copyright/world/{format}": { "get": { - "x-publish": true, "description": "**Applies to**: S0 and S1 pricing tiers.\n\n\nCopyrights API is designed to serve copyright information for Render Tile service. In addition to basic copyright for the whole map, API is serving specific groups of copyrights for some countries.\nReturns the copyright information for the world. To obtain the default copyright information for the whole world, do not specify a tile or bounding box.", "operationId": "Render_GetCopyrightForWorld", "x-ms-examples": { - "GetCopyrightWorld": { + "GetCopyrightForWorld": { "$ref": "./examples/GetCopyrightForWorld.json" } }, "parameters": [ { - "$ref": "#/parameters/ClientId" - }, - { - "$ref": "#/parameters/SubscriptionKey" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ClientId" }, { - "$ref": "#/parameters/ApiVersion" + "$ref": "#/parameters/RenderApiVersion" }, { - "$ref": "#/parameters/TextFormat" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/TextFormat" }, { - "$ref": "#/parameters/Text" + "$ref": "#/parameters/IncludeText" } ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/CopyrightWorldResult" + "$ref": "#/definitions/GetCopyrightForWorldResult" } }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" + "default": { + "$ref": "../../../Common/preview/1.0/common.json#/responses/default" } } } } }, "definitions": { - "ODataErrorResponse": { - "type": "object", - "description": "This response object is returned when an error occurs in the Maps API.", - "properties": { - "error": { - "$ref": "#/definitions/ODataError" - } - } - }, - "ODataError": { - "type": "object", - "description": "This object is returned when an error occurs in the 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." - } - } - }, - "CopyrightBoundingResult": { - "description": "This object is returned from a successful Copyright Bounding call", + "GetCopyrightFromBoundingBoxResult": { + "description": "This object is returned from a successful Get Copyright From Bounding Box call", "type": "object", "properties": { "formatVersion": { @@ -1050,12 +835,12 @@ "type": "array", "readOnly": true, "items": { - "$ref": "#/definitions/Region" + "$ref": "#/definitions/RegionCopyrights" } } } }, - "Region": { + "RegionCopyrights": { "type": "object", "properties": { "copyrights": { @@ -1086,8 +871,8 @@ } } }, - "CopyrightCaptionResult": { - "description": "This object is returned from a successful Copyright Caption call", + "GetCopyrightCaptionResult": { + "description": "This object is returned from a successful Get Copyright Caption call", "type": "object", "properties": { "formatVersion": { @@ -1102,8 +887,8 @@ } } }, - "CopyrightWorldResult": { - "description": "This object is returned from a successful Copyright World call", + "GetCopyrightForWorldResult": { + "description": "This object is returned from a successful Get Copyright For World call", "type": "object", "properties": { "formatVersion": { @@ -1125,13 +910,13 @@ "type": "array", "readOnly": true, "items": { - "$ref": "#/definitions/Region" + "$ref": "#/definitions/RegionCopyrights" } } } }, - "CopyrightTileResult": { - "description": "This object is returned from a successful Copyright Tile call", + "GetCopyrightForTileResult": { + "description": "This object is returned from a successful Get Copyright For Tile call", "type": "object", "properties": { "formatVersion": { @@ -1153,34 +938,10 @@ "type": "array", "readOnly": true, "items": { - "$ref": "#/definitions/Region" + "$ref": "#/definitions/RegionCopyrights" } } } - }, - "MapStaticResult": { - "description": "This image is returned from a successful Map Static call", - "type": "object", - "format": "file", - "readOnly": true - }, - "MapTileResult": { - "description": "This image is returned from a successful Map Tile call", - "type": "object", - "format": "file", - "readOnly": true - }, - "MapStateTileResult": { - "description": "This tile is returned from a successful Map State Tile call", - "type": "object", - "format": "file", - "readOnly": true - }, - "MapImageryResult": { - "description": "This image is returned from a successful Map Imagery call", - "type": "object", - "format": "file", - "readOnly": true } } } diff --git a/specification/maps/data-plane/Microsoft.Maps/Render/preview/2.0/examples/GetMapTileV2.json b/specification/maps/data-plane/Microsoft.Maps/Render/preview/2.0/examples/GetMapTileV2.json index a7f739006589..589af57c24fe 100644 --- a/specification/maps/data-plane/Microsoft.Maps/Render/preview/2.0/examples/GetMapTileV2.json +++ b/specification/maps/data-plane/Microsoft.Maps/Render/preview/2.0/examples/GetMapTileV2.json @@ -1,61 +1,18 @@ { "parameters": { + "geography": "us", "api-version": "2.0", "tilesetId": "microsoft.base", "zoom": 6, "x": 10, - "y": 22, - "subscription-key": "[subscription-key]" + "y": 22 }, "responses": { "200": { - "headers": {}, - "body": "binary string image" - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive." - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found: the requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "An error occurred while processing the request. Please try again later." - } - } + "headers": { + "Content-Type": "application/vnd.mapbox-vector-tile" + }, + "body": "{file}" } } } diff --git a/specification/maps/data-plane/Microsoft.Maps/Render/preview/2.0/render.json b/specification/maps/data-plane/Microsoft.Maps/Render/preview/2.0/render.json index 3035ae4e980e..cb59312ded62 100644 --- a/specification/maps/data-plane/Microsoft.Maps/Render/preview/2.0/render.json +++ b/specification/maps/data-plane/Microsoft.Maps/Render/preview/2.0/render.json @@ -5,14 +5,33 @@ "version": "2.0", "description": "Azure Maps Render REST APIs" }, - "host": "atlas.microsoft.com", + "x-ms-parameterized-host": { + "hostTemplate": "{geography}.atlas.microsoft.com", + "parameters": [ + { + "$ref": "../../../Common/preview/1.0/common.json#/parameters/GeographicResourceLocation" + } + ] + }, "schemes": [ "https" ], "consumes": [], "produces": [ - "application/json", - "application/xml" + "application/json" + ], + "security": [ + { + "azure_auth": [ + "user_impersonation" + ] + }, + { + "SubscriptionKeyInHeader": [] + }, + { + "SubscriptionKeyInQuery": [] + } ], "securityDefinitions": { "azure_auth": { @@ -21,82 +40,25 @@ "flow": "implicit", "description": "These are the [Azure Active Directory OAuth2](https://docs.microsoft.com/en-us/azure/active-directory/develop/v1-overview) Flows. When paired with [Azure Role Based Access](https://docs.microsoft.com/en-us/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#### Note\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* The `Authorization URL` is specific to the Azure public cloud instance. Sovereign clouds have unique Authorization URLs and Azure Active directory configurations. \n* 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.\n* Usage of the [Azure Maps Web SDK](https://aka.ms/amaadmc) allows for configuration based setup of an application for multiple use cases.\n* Currently Azure Active Directory [v1.0](https://docs.microsoft.com/en-us/azure/active-directory/develop/azure-ad-endpoint-comparison) tokens are supported.", "scopes": { - "user_impersonation": "Impersonates a user's Azure Active Directory account." + "user_impersonation": "impersonate your user account" } }, - "apiKeyQuery": { + "SubscriptionKeyInHeader": { "type": "apiKey", - "description": "This is a shared key which 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 which 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": "query" - } - }, - "security": [ - { - "azure_auth": [] + "in": "header" }, - { - "apiKeyQuery": [] - } - ], - "responses": { - "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 Azure Active Directory 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 AAD bearer token.", - "schema": { - "$ref": "#/definitions/ODataErrorResponse" - }, - "headers": { - "WWW-Authenticate": { - "type": "string", - "description": "Bearer realm=\"https://atlas.microsoft.com/\", error=\"invalid_token\", error_description=\"The access token expired\"" - } - } - }, - "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" - } + "SubscriptionKeyInQuery": { + "type": "apiKey", + "name": "subscription-key", + "in": "query" } }, + "responses": {}, "parameters": { - "ClientId": { - "name": "x-ms-client-id", - "description": "Specifies which account is intended for usage in conjunction with the Azure AD security model. It represents a unique ID for the Azure Maps account and can be retrieved from Azure Maps management plane Account API. To use Azure AD 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": { + "RenderApiVersionV2": { "name": "api-version", - "description": "Version number of Azure Maps API. Current version is 2.0", + "description": "Version number of Azure Maps API.", "type": "string", "in": "query", "required": true, @@ -179,26 +141,6 @@ }, "x-ms-parameter-location": "method" }, - "xTileIndex": { - "name": "x", - "x-ms-client-name": "xTileIndex", - "in": "query", - "description": "X coordinate of the tile on zoom grid. Value must be in the range [0, 2`zoom` -1].\n\nPlease see [Zoom Levels and Tile Grid](https://docs.microsoft.com/en-us/azure/location-based-services/zoom-levels-and-tile-grid) for details.", - "required": true, - "type": "integer", - "format": "int32", - "x-ms-parameter-location": "method" - }, - "yTileIndex": { - "name": "y", - "x-ms-client-name": "yTileIndex", - "in": "query", - "description": "Y coordinate of the tile on zoom grid. Value must be in the range [0, 2`zoom` -1].\n\nPlease see [Zoom Levels and Tile Grid](https://docs.microsoft.com/en-us/azure/location-based-services/zoom-levels-and-tile-grid) for details.", - "required": true, - "type": "integer", - "format": "int32", - "x-ms-parameter-location": "method" - }, "MapTileV2Zoom": { "name": "zoom", "in": "query", @@ -207,35 +149,6 @@ "type": "integer", "format": "int32", "x-ms-parameter-location": "method" - }, - "Language": { - "name": "language", - "in": "query", - "description": "Language in which search results should be returned. Should be one of supported IETF language tags, case insensitive. When data in specified language is not available for a specific field, default language is used.\n\nPlease refer to [Supported Languages](https://docs.microsoft.com/en-us/azure/azure-maps/supported-languages) for details.", - "required": false, - "type": "string", - "x-ms-parameter-location": "method" - }, - "Text": { - "name": "text", - "in": "query", - "description": "Yes/no value to exclude textual data from response. Only images and country names will be in response.", - "required": false, - "type": "string", - "enum": [ - "yes", - "no" - ], - "default": "yes", - "x-ms-parameter-location": "method" - }, - "View": { - "name": "view", - "in": "query", - "description": "The View parameter specifies which set of geopolitically disputed content is returned via Azure Maps services, including borders and labels displayed on the map. The View parameter (also referred to as “user region parameter”) will show the correct maps for that country/region. By default, the View parameter is set to “Unified” even if you haven’t defined it in the request. It is your responsibility to determine the location of your users, and then set the View parameter correctly for that location. Alternatively, you have the option to set ‘View=Auto’, which will return the map data based on the IP address of the request. The View parameter in Azure Maps must be used in compliance with applicable laws, including those regarding mapping, of the country where maps, images and other data and third party content that you are authorized to access via Azure Maps is made available. Example: view=IN.\n\nPlease refer to [Supported Views](https://aka.ms/AzureMapsLocalizationViews) for details and to see the available Views.", - "required": false, - "type": "string", - "x-ms-parameter-location": "method" } }, "paths": { @@ -250,13 +163,10 @@ }, "parameters": [ { - "$ref": "#/parameters/ClientId" - }, - { - "$ref": "#/parameters/SubscriptionKey" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ClientId" }, { - "$ref": "#/parameters/ApiVersion" + "$ref": "#/parameters/RenderApiVersionV2" }, { "$ref": "#/parameters/TilesetId_rv2" @@ -265,25 +175,22 @@ "$ref": "#/parameters/MapTileV2Zoom" }, { - "$ref": "#/parameters/xTileIndex" + "$ref": "../1.0/render.json#/parameters/xTileIndex" }, { - "$ref": "#/parameters/yTileIndex" + "$ref": "../1.0/render.json#/parameters/yTileIndex" }, { "name": "timeStamp", "in": "query", "description": "The desired date and time of the requested tile. This parameter must be specified in the standard date-time format (e.g. 2019-11-14T16:03:00-08:00), as defined by [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601). This parameter is only supported when tilesetId parameter is set to one of the values below.\n \n* microsoft.weather.infrared.main: We provide tiles up to 3 hours in the past. Tiles are available in 10-minute intervals. We round the timeStamp value to the nearest 10-minute time frame.\n* microsoft.weather.radar.main: We provide tiles up to 1.5 hours in the past and up to 2 hours in the future. Tiles are available in 5-minute intervals. We round the timeStamp value to the nearest 5-minute time frame.", - "required": false, "type": "string" }, { "name": "tileSize", "in": "query", "description": "The size of the returned map tile in pixels.", - "required": false, "type": "string", - "default": "256", "enum": [ "256", "512" @@ -304,83 +211,39 @@ } }, { - "$ref": "#/parameters/Language" + "$ref": "../../../Search/preview/1.0/search.json#/parameters/Language" }, { - "$ref": "#/parameters/View" + "$ref": "../../../Search/preview/1.0/search.json#/parameters/View" } ], "produces": [ - "application/json" + "application/json", + "image/jpeg", + "image/png", + "image/pbf", + "application/vnd.mapbox-vector-tile" ], "responses": { "200": { - "description": "OK", + "description": "The tile returned from a successful API call.", "schema": { - "$ref": "#/definitions/MapTileResultv2" + "type": "object", + "format": "file", + "readOnly": true + }, + "headers": { + "Content-Type": { + "type": "string", + "description": "The content-type for the response." + } } }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" + "default": { + "$ref": "../../../Common/preview/1.0/common.json#/responses/default" } } } } - }, - "definitions": { - "ODataErrorResponse": { - "type": "object", - "description": "This response object is returned when an error occurs in the Maps API.", - "properties": { - "error": { - "$ref": "#/definitions/ODataError" - } - } - }, - "ODataError": { - "type": "object", - "description": "This object is returned when an error occurs in the 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." - } - } - }, - "MapTileResultv2": { - "description": "The tile returned from a successful API call.", - "type": "string", - "format": "binary", - "readOnly": true - } } } diff --git a/specification/maps/data-plane/Microsoft.Maps/Route/preview/1.0/examples/GetRouteDirections.json b/specification/maps/data-plane/Microsoft.Maps/Route/preview/1.0/examples/GetRouteDirections.json index a5937068ffe5..942b27eba948 100644 --- a/specification/maps/data-plane/Microsoft.Maps/Route/preview/1.0/examples/GetRouteDirections.json +++ b/specification/maps/data-plane/Microsoft.Maps/Route/preview/1.0/examples/GetRouteDirections.json @@ -1,9 +1,9 @@ { "parameters": { + "geography": "us", "format": "json", "api-version": "1.0", - "query": "52.50931,13.42936:52.50274,13.43872", - "subscription-key": "[subscription-key]" + "query": "52.50931,13.42936:52.50274,13.43872" }, "responses": { "200": { @@ -106,51 +106,6 @@ } ] } - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive." - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found: the requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "An error occurred while processing the request. Please try again later." - } - } } } } diff --git a/specification/maps/data-plane/Microsoft.Maps/Route/preview/1.0/examples/GetRouteDirectionsBatch.json b/specification/maps/data-plane/Microsoft.Maps/Route/preview/1.0/examples/GetRouteDirectionsBatch.json new file mode 100644 index 000000000000..c07f0afe9931 --- /dev/null +++ b/specification/maps/data-plane/Microsoft.Maps/Route/preview/1.0/examples/GetRouteDirectionsBatch.json @@ -0,0 +1,152 @@ +{ + "parameters": { + "geography": "us", + "format": "11111111-2222-3333-4444-555555555555", + "api-version": "1.0" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "batchItems": [ + { + "statusCode": 400, + "response": { + "error": { + "code": "400 BadRequest", + "message": "maxAlternatives parameter value should be between 0 and 5 inclusive" + } + } + }, + { + "statusCode": 200, + "response": { + "formatVersion": "0.0.12", + "routes": [ + { + "summary": { + "lengthInMeters": 1754, + "travelTimeInSeconds": 386, + "trafficDelayInSeconds": 0, + "departureTime": "2019-06-21T22:56:23+00:00", + "arrivalTime": "2019-06-21T23:02:49+00:00" + }, + "legs": [ + { + "summary": { + "lengthInMeters": 1754, + "travelTimeInSeconds": 386, + "trafficDelayInSeconds": 0, + "departureTime": "2019-06-21T22:56:23+00:00", + "arrivalTime": "2019-06-21T23:02:49+00:00" + }, + "points": [ + { + "latitude": 47.62094, + "longitude": -122.34892 + }, + { + "latitude": 47.62094, + "longitude": -122.3485 + }, + { + "latitude": 47.62095, + "longitude": -122.3476 + }, + { + "latitude": 47.60995, + "longitude": -122.34174 + }, + { + "latitude": 47.61011, + "longitude": -122.342 + } + ] + } + ], + "sections": [ + { + "startPointIndex": 0, + "endPointIndex": 44, + "sectionType": "TRAVEL_MODE", + "travelMode": "bicycle" + } + ] + } + ] + } + }, + { + "statusCode": 200, + "response": { + "formatVersion": "0.0.12", + "routes": [ + { + "summary": { + "lengthInMeters": 1772, + "travelTimeInSeconds": 1276, + "trafficDelayInSeconds": 0, + "departureTime": "2019-06-21T22:56:23+00:00", + "arrivalTime": "2019-06-21T23:17:38+00:00" + }, + "legs": [ + { + "summary": { + "lengthInMeters": 1772, + "travelTimeInSeconds": 1276, + "trafficDelayInSeconds": 0, + "departureTime": "2019-06-21T22:56:23+00:00", + "arrivalTime": "2019-06-21T23:17:38+00:00" + }, + "points": [ + { + "latitude": 40.75982, + "longitude": -73.98493 + }, + { + "latitude": 40.7601, + "longitude": -73.98483 + }, + { + "latitude": 40.75984, + "longitude": -73.98417 + }, + { + "latitude": 40.76047, + "longitude": -73.9837 + }, + { + "latitude": 40.77095, + "longitude": -73.9736 + }, + { + "latitude": 40.77114, + "longitude": -73.97356 + } + ] + } + ], + "sections": [ + { + "startPointIndex": 0, + "endPointIndex": 47, + "sectionType": "TRAVEL_MODE", + "travelMode": "pedestrian" + } + ] + } + ] + } + } + ], + "summary": { + "successfulRequests": 2, + "totalRequests": 3 + } + } + }, + "202": { + "description": "Batch request was accepted but is still being processed. Please try again in some time." + } + } +} diff --git a/specification/maps/data-plane/Microsoft.Maps/Route/preview/1.0/examples/GetRouteMatrix.json b/specification/maps/data-plane/Microsoft.Maps/Route/preview/1.0/examples/GetRouteMatrix.json new file mode 100644 index 000000000000..207804bf7ae6 --- /dev/null +++ b/specification/maps/data-plane/Microsoft.Maps/Route/preview/1.0/examples/GetRouteMatrix.json @@ -0,0 +1,76 @@ +{ + "parameters": { + "geography": "us", + "format": "11111111-2222-3333-4444-555555555555", + "api-version": "1.0" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "formatVersion": "0.0.1", + "matrix": [ + [ + { + "statusCode": 200, + "response": { + "routeSummary": { + "lengthInMeters": 495, + "travelTimeInSeconds": 134, + "trafficDelayInSeconds": 0, + "departureTime": "2018-07-27T22:55:29+00:00", + "arrivalTime": "2018-07-27T22:57:43+00:00" + } + } + }, + { + "statusCode": 200, + "response": { + "routeSummary": { + "lengthInMeters": 647651, + "travelTimeInSeconds": 26835, + "trafficDelayInSeconds": 489, + "departureTime": "2018-07-27T22:55:29+00:00", + "arrivalTime": "2018-07-28T06:22:44+00:00" + } + } + } + ], + [ + { + "statusCode": 200, + "response": { + "routeSummary": { + "lengthInMeters": 338, + "travelTimeInSeconds": 104, + "trafficDelayInSeconds": 0, + "departureTime": "2018-07-27T22:55:29+00:00", + "arrivalTime": "2018-07-27T22:57:13+00:00" + } + } + }, + { + "statusCode": 200, + "response": { + "routeSummary": { + "lengthInMeters": 647494, + "travelTimeInSeconds": 26763, + "trafficDelayInSeconds": 469, + "departureTime": "2018-07-27T22:55:29+00:00", + "arrivalTime": "2018-07-28T06:21:32+00:00" + } + } + } + ] + ], + "summary": { + "successfulRoutes": 4, + "totalRoutes": 4 + } + } + }, + "202": { + "headers": {} + } + } +} diff --git a/specification/maps/data-plane/Microsoft.Maps/Route/preview/1.0/examples/GetRouteRange.json b/specification/maps/data-plane/Microsoft.Maps/Route/preview/1.0/examples/GetRouteRange.json index a013418cbf93..868987b7241e 100644 --- a/specification/maps/data-plane/Microsoft.Maps/Route/preview/1.0/examples/GetRouteRange.json +++ b/specification/maps/data-plane/Microsoft.Maps/Route/preview/1.0/examples/GetRouteRange.json @@ -1,9 +1,9 @@ { "parameters": { + "geography": "us", "format": "json", "api-version": "1.0", "query": "50.97452,5.86605", - "subscription-key": "[subscription-key]", "timeBudgetInSec": 6000 }, "responses": { @@ -219,51 +219,6 @@ ] } } - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive." - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found: the requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "An error occurred while processing the request. Please try again later." - } - } } } } diff --git a/specification/maps/data-plane/Microsoft.Maps/Route/preview/1.0/examples/PostRouteDirections.json b/specification/maps/data-plane/Microsoft.Maps/Route/preview/1.0/examples/PostRouteDirections.json index 898a94a17dd5..d114884cbb3e 100644 --- a/specification/maps/data-plane/Microsoft.Maps/Route/preview/1.0/examples/PostRouteDirections.json +++ b/specification/maps/data-plane/Microsoft.Maps/Route/preview/1.0/examples/PostRouteDirections.json @@ -1,10 +1,10 @@ { "parameters": { + "geography": "us", "format": "json", "api-version": "1.0", "query": "52.50931,13.42936:52.50274,13.43872", - "subscription-key": "[subscription-key]", - "routeDirectionsRequestBody": { + "postRouteDirectionsRequestBody": { "supportingPoints": { "type": "GeometryCollection", "geometries": [ @@ -184,51 +184,6 @@ } ] } - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive." - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found: the requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "An error occurred while processing the request. Please try again later." - } - } } } } diff --git a/specification/maps/data-plane/Microsoft.Maps/Route/preview/1.0/examples/PostRouteDirectionsBatch.json b/specification/maps/data-plane/Microsoft.Maps/Route/preview/1.0/examples/PostRouteDirectionsBatch.json index 185d11981d0a..c99613063c91 100644 --- a/specification/maps/data-plane/Microsoft.Maps/Route/preview/1.0/examples/PostRouteDirectionsBatch.json +++ b/specification/maps/data-plane/Microsoft.Maps/Route/preview/1.0/examples/PostRouteDirectionsBatch.json @@ -1,9 +1,9 @@ { "parameters": { + "geography": "us", "format": "json", "api-version": "1.0", - "subscription-key": "[subscription-key]", - "routeDirectionsBatchRequestBody": { + "postRouteDirectionsBatchRequestBody": { "batchItems": [ { "query": "?query=47.639987,-122.128384:47.621252,-122.184408:47.596437,-122.332000&routeType=fastest&travelMode=car&maxAlternatives=99" @@ -18,195 +18,10 @@ } }, "responses": { - "200": { - "headers": {}, - "body": { - "batchItems": [ - { - "statusCode": 400, - "response": { - "error": { - "code": "400 BadRequest", - "message": "maxAlternatives parameter value should be between 0 and 5 inclusive" - } - } - }, - { - "statusCode": 200, - "response": { - "formatVersion": "0.0.12", - "routes": [ - { - "summary": { - "lengthInMeters": 1754, - "travelTimeInSeconds": 386, - "trafficDelayInSeconds": 0, - "departureTime": "2019-06-21T22:56:23+00:00", - "arrivalTime": "2019-06-21T23:02:49+00:00" - }, - "legs": [ - { - "summary": { - "lengthInMeters": 1754, - "travelTimeInSeconds": 386, - "trafficDelayInSeconds": 0, - "departureTime": "2019-06-21T22:56:23+00:00", - "arrivalTime": "2019-06-21T23:02:49+00:00" - }, - "points": [ - { - "latitude": 47.62094, - "longitude": -122.34892 - }, - { - "latitude": 47.62094, - "longitude": -122.3485 - }, - { - "latitude": 47.62095, - "longitude": -122.3476 - }, - { - "latitude": 47.60995, - "longitude": -122.34174 - }, - { - "latitude": 47.61011, - "longitude": -122.342 - } - ] - } - ], - "sections": [ - { - "startPointIndex": 0, - "endPointIndex": 44, - "sectionType": "TRAVEL_MODE", - "travelMode": "bicycle" - } - ] - } - ] - } - }, - { - "statusCode": 200, - "response": { - "formatVersion": "0.0.12", - "routes": [ - { - "summary": { - "lengthInMeters": 1772, - "travelTimeInSeconds": 1276, - "trafficDelayInSeconds": 0, - "departureTime": "2019-06-21T22:56:23+00:00", - "arrivalTime": "2019-06-21T23:17:38+00:00" - }, - "legs": [ - { - "summary": { - "lengthInMeters": 1772, - "travelTimeInSeconds": 1276, - "trafficDelayInSeconds": 0, - "departureTime": "2019-06-21T22:56:23+00:00", - "arrivalTime": "2019-06-21T23:17:38+00:00" - }, - "points": [ - { - "latitude": 40.75982, - "longitude": -73.98493 - }, - { - "latitude": 40.7601, - "longitude": -73.98483 - }, - { - "latitude": 40.75984, - "longitude": -73.98417 - }, - { - "latitude": 40.76047, - "longitude": -73.9837 - }, - { - "latitude": 40.77095, - "longitude": -73.9736 - }, - { - "latitude": 40.77114, - "longitude": -73.97356 - } - ] - } - ], - "sections": [ - { - "startPointIndex": 0, - "endPointIndex": 47, - "sectionType": "TRAVEL_MODE", - "travelMode": "pedestrian" - } - ] - } - ] - } - } - ], - "summary": { - "successfulRequests": 2, - "totalRequests": 3 - } - } - }, "202": { "headers": { "Location": "URL to download the results of the long-running batch request." } - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive." - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found: the requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "An error occurred while processing the request. Please try again later." - } - } } } } diff --git a/specification/maps/data-plane/Microsoft.Maps/Route/preview/1.0/examples/PostRouteDirectionsBatchSync.json b/specification/maps/data-plane/Microsoft.Maps/Route/preview/1.0/examples/PostRouteDirectionsBatchSync.json new file mode 100644 index 000000000000..eab66ded6b79 --- /dev/null +++ b/specification/maps/data-plane/Microsoft.Maps/Route/preview/1.0/examples/PostRouteDirectionsBatchSync.json @@ -0,0 +1,171 @@ +{ + "parameters": { + "geography": "us", + "format": "json", + "api-version": "1.0", + "postRouteDirectionsBatchRequestBody": { + "batchItems": [ + { + "query": "?query=47.639987,-122.128384:47.621252,-122.184408:47.596437,-122.332000&routeType=fastest&travelMode=car&maxAlternatives=99" + }, + { + "query": "?query=47.620659,-122.348934:47.610101,-122.342015&travelMode=bicycle&routeType=eco&traffic=false" + }, + { + "query": "?query=40.759856,-73.985108:40.771136,-73.973506&travelMode=pedestrian&routeType=shortest" + } + ] + } + }, + "responses": { + "200": { + "headers": {}, + "body": { + "batchItems": [ + { + "statusCode": 400, + "response": { + "error": { + "code": "400 BadRequest", + "message": "maxAlternatives parameter value should be between 0 and 5 inclusive" + } + } + }, + { + "statusCode": 200, + "response": { + "formatVersion": "0.0.12", + "routes": [ + { + "summary": { + "lengthInMeters": 1754, + "travelTimeInSeconds": 386, + "trafficDelayInSeconds": 0, + "departureTime": "2019-06-21T22:56:23+00:00", + "arrivalTime": "2019-06-21T23:02:49+00:00" + }, + "legs": [ + { + "summary": { + "lengthInMeters": 1754, + "travelTimeInSeconds": 386, + "trafficDelayInSeconds": 0, + "departureTime": "2019-06-21T22:56:23+00:00", + "arrivalTime": "2019-06-21T23:02:49+00:00" + }, + "points": [ + { + "latitude": 47.62094, + "longitude": -122.34892 + }, + { + "latitude": 47.62094, + "longitude": -122.3485 + }, + { + "latitude": 47.62095, + "longitude": -122.3476 + }, + { + "latitude": 47.60995, + "longitude": -122.34174 + }, + { + "latitude": 47.61011, + "longitude": -122.342 + } + ] + } + ], + "sections": [ + { + "startPointIndex": 0, + "endPointIndex": 44, + "sectionType": "TRAVEL_MODE", + "travelMode": "bicycle" + } + ] + } + ] + } + }, + { + "statusCode": 200, + "response": { + "formatVersion": "0.0.12", + "routes": [ + { + "summary": { + "lengthInMeters": 1772, + "travelTimeInSeconds": 1276, + "trafficDelayInSeconds": 0, + "departureTime": "2019-06-21T22:56:23+00:00", + "arrivalTime": "2019-06-21T23:17:38+00:00" + }, + "legs": [ + { + "summary": { + "lengthInMeters": 1772, + "travelTimeInSeconds": 1276, + "trafficDelayInSeconds": 0, + "departureTime": "2019-06-21T22:56:23+00:00", + "arrivalTime": "2019-06-21T23:17:38+00:00" + }, + "points": [ + { + "latitude": 40.75982, + "longitude": -73.98493 + }, + { + "latitude": 40.7601, + "longitude": -73.98483 + }, + { + "latitude": 40.75984, + "longitude": -73.98417 + }, + { + "latitude": 40.76047, + "longitude": -73.9837 + }, + { + "latitude": 40.77095, + "longitude": -73.9736 + }, + { + "latitude": 40.77114, + "longitude": -73.97356 + } + ] + } + ], + "sections": [ + { + "startPointIndex": 0, + "endPointIndex": 47, + "sectionType": "TRAVEL_MODE", + "travelMode": "pedestrian" + } + ] + } + ] + } + } + ], + "summary": { + "successfulRequests": 2, + "totalRequests": 3 + } + } + }, + "408": { + "headers": {}, + "body": { + "error": { + "code": "408 Timeout", + "message": "Timeout: The request took longer to finish than the maximum amount of time defined in the api." + } + } + } + } +} diff --git a/specification/maps/data-plane/Microsoft.Maps/Route/preview/1.0/examples/PostMatrixRouteCalculate.json b/specification/maps/data-plane/Microsoft.Maps/Route/preview/1.0/examples/PostRouteMatrix.json similarity index 67% rename from specification/maps/data-plane/Microsoft.Maps/Route/preview/1.0/examples/PostMatrixRouteCalculate.json rename to specification/maps/data-plane/Microsoft.Maps/Route/preview/1.0/examples/PostRouteMatrix.json index 7457cd7329dd..9798e3389e4f 100644 --- a/specification/maps/data-plane/Microsoft.Maps/Route/preview/1.0/examples/PostMatrixRouteCalculate.json +++ b/specification/maps/data-plane/Microsoft.Maps/Route/preview/1.0/examples/PostRouteMatrix.json @@ -1,10 +1,10 @@ { "parameters": { + "geography": "us", "format": "json", "api-version": "1.0", - "subscription-key": "[subscription-key]", "routeType": "shortest", - "routeMatrixBody": { + "postRouteMatrixRequestBody": { "origins": { "type": "MultiPoint", "coordinates": [ @@ -102,51 +102,6 @@ "headers": { "Location": "New URL to check the status of the long running request." } - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive." - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found: the requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "An error occurred while processing the request. Please try again later." - } - } } } } diff --git a/specification/maps/data-plane/Microsoft.Maps/Route/preview/1.0/route.json b/specification/maps/data-plane/Microsoft.Maps/Route/preview/1.0/route.json index 2a974720a1c5..5c52c5badfc9 100644 --- a/specification/maps/data-plane/Microsoft.Maps/Route/preview/1.0/route.json +++ b/specification/maps/data-plane/Microsoft.Maps/Route/preview/1.0/route.json @@ -5,14 +5,33 @@ "version": "1.0", "description": "Azure Maps Route REST APIs" }, - "host": "atlas.microsoft.com", + "x-ms-parameterized-host": { + "hostTemplate": "{geography}.atlas.microsoft.com", + "parameters": [ + { + "$ref": "../../../Common/preview/1.0/common.json#/parameters/GeographicResourceLocation" + } + ] + }, "schemes": [ "https" ], "consumes": [], "produces": [ - "application/json", - "application/xml" + "application/json" + ], + "security": [ + { + "azure_auth": [ + "user_impersonation" + ] + }, + { + "SubscriptionKeyInHeader": [] + }, + { + "SubscriptionKeyInQuery": [] + } ], "securityDefinitions": { "azure_auth": { @@ -21,158 +40,35 @@ "flow": "implicit", "description": "These are the [Azure Active Directory OAuth2](https://docs.microsoft.com/en-us/azure/active-directory/develop/v1-overview) Flows. When paired with [Azure Role Based Access](https://docs.microsoft.com/en-us/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#### Note\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* The `Authorization URL` is specific to the Azure public cloud instance. Sovereign clouds have unique Authorization URLs and Azure Active directory configurations. \n* 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.\n* Usage of the [Azure Maps Web SDK](https://aka.ms/amaadmc) allows for configuration based setup of an application for multiple use cases.\n* Currently Azure Active Directory [v1.0](https://docs.microsoft.com/en-us/azure/active-directory/develop/azure-ad-endpoint-comparison) tokens are supported.", "scopes": { - "user_impersonation": "Impersonates a user's Azure Active Directory account." + "user_impersonation": "impersonate your user account" } }, - "apiKeyQuery": { + "SubscriptionKeyInHeader": { "type": "apiKey", - "description": "This is a shared key which 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 which 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": "query" - } - }, - "security": [ - { - "azure_auth": [] - }, - { - "apiKeyQuery": [] - } - ], - "responses": { - "202": { - "description": "Request Accepted: The request has been accepted for processing. Please use the URL in the Location Header to retry or access the results.", - "headers": { - "Location": { - "type": "string", - "description": "New URL to check for the results of the long running process." - } - } - }, - "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 Azure Active Directory 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 AAD bearer token.", - "schema": { - "$ref": "#/definitions/ODataErrorResponse" - }, - "headers": { - "WWW-Authenticate": { - "type": "string", - "description": "Bearer realm=\"https://atlas.microsoft.com/\", error=\"invalid_token\", error_description=\"The access token expired\"" - } - } + "in": "header" }, - "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" - } - }, - "202Async": { - "description": "**Supported only for async request.**\nRequest Accepted: The request has been accepted for processing. Please use the URL in the Location Header to retry or access the results.", - "headers": { - "Location": { - "type": "string", - "description": "New URL to check for the results of the long running process." - } - } + "SubscriptionKeyInQuery": { + "type": "apiKey", + "name": "subscription-key", + "in": "query" } }, + "responses": {}, "parameters": { - "ClientId": { - "name": "x-ms-client-id", - "description": "Specifies which account is intended for usage in conjunction with the Azure AD security model. It represents a unique ID for the Azure Maps account and can be retrieved from Azure Maps management plane Account API. To use Azure AD 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": { + "RouteApiVersion": { "name": "api-version", - "description": "Version number of Azure Maps API. Current version is 1.0", + "description": "Version number of Azure Maps API.", "type": "string", "in": "query", "required": true, "default": "1.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" - }, - "TextFormat": { - "name": "format", - "description": "Desired format of the response. Value can be either _json_ or _xml_.", - "type": "string", - "in": "path", - "required": true, - "enum": [ - "json", - "xml" - ], - "x-ms-enum": { - "name": "TextFormat", - "modelAsString": true, - "values": [ - { - "value": "json", - "description": "[The JavaScript Object Notation Data Interchange Format](https://tools.ietf.org/html/rfc8259)" - }, - { - "value": "xml", - "description": "[The Extensible Markup Language](https://www.w3.org/TR/xml/)" - } - ] - }, - "x-ms-parameter-location": "method" - }, "VehicleLoadType": { "name": "vehicleLoadType", "in": "query", "description": "Types of cargo that may be classified as hazardous materials and restricted from some roads. Available vehicleLoadType values are US Hazmat classes 1 through 9, plus generic classifications for use in other countries. Values beginning with USHazmat are for US routing while otherHazmat should be used for all other countries. vehicleLoadType can be specified multiple times. This parameter is currently only considered for travelMode=truck.", - "required": false, "type": "string", "enum": [ "USHazmatClass1", @@ -248,9 +144,7 @@ "name": "routeType", "in": "query", "description": "The type of route requested.", - "required": false, "type": "string", - "default": "fastest", "enum": [ "fastest", "shortest", @@ -281,20 +175,18 @@ }, "x-ms-parameter-location": "method" }, - "Windingness": { + "WindingnessLevel": { "name": "windingness", "in": "query", "description": "Level of turns for thrilling route. This parameter can only be used in conjunction with `routeType`=thrilling.", - "required": false, "type": "string", - "default": "normal", "enum": [ "low", "normal", "high" ], "x-ms-enum": { - "name": "Windingness", + "name": "WindingnessLevel", "modelAsString": true, "values": [ { @@ -313,20 +205,18 @@ }, "x-ms-parameter-location": "method" }, - "Hilliness": { + "HillinessDegree": { "name": "hilliness", "in": "query", "description": "Degree of hilliness for thrilling route. This parameter can only be used in conjunction with `routeType`=thrilling.", - "required": false, "type": "string", - "default": "normal", "enum": [ "low", "normal", "high" ], "x-ms-enum": { - "name": "Hilliness", + "name": "HillinessDegree", "modelAsString": true, "values": [ { @@ -349,9 +239,7 @@ "name": "travelMode", "in": "query", "description": "The mode of travel for the requested route. If not defined, default is 'car'. Note that the requested travelMode may not be available for the entire route. Where the requested travelMode is not available for a particular section, the travelMode element of the response for that section will be \"other\". Note that travel modes bus, motorcycle, taxi and van are BETA functionality. Full restriction data is not available in all areas. In **calculateReachableRange** requests, the values bicycle and pedestrian must not be used.", - "required": false, "type": "string", - "default": "car", "enum": [ "car", "truck", @@ -402,54 +290,57 @@ }, "x-ms-parameter-location": "method" }, - "Avoid": { + "RouteAvoidList": { "name": "avoid", "in": "query", "description": "Specifies something that the route calculation should try to avoid when determining the route. Can be specified multiple times in one request, for example, '&avoid=motorways&avoid=tollRoads&avoid=ferries'. In calculateReachableRange requests, the value alreadyUsedRoads must not be used.", - "required": false, - "type": "string", - "enum": [ - "tollRoads", - "motorways", - "ferries", - "unpavedRoads", - "carpools", - "alreadyUsedRoads", - "borderCrossings" - ], - "x-ms-enum": { - "name": "Avoid", - "modelAsString": true, - "values": [ - { - "value": "tollRoads", - "description": "Avoids toll roads." - }, - { - "value": "motorways", - "description": "Avoids motorways" - }, - { - "value": "ferries", - "description": "Avoids ferries" - }, - { - "value": "unpavedRoads", - "description": "Avoids unpaved roads" - }, - { - "value": "carpools", - "description": "Avoids routes that require the use of carpool (HOV/High Occupancy Vehicle) lanes." - }, - { - "value": "alreadyUsedRoads", - "description": "Avoids using the same road multiple times. Most useful in conjunction with `routeType`=thrilling." - }, - { - "value": "borderCrossings", - "description": "Avoids border crossings in route calculation." - } - ] + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string", + "enum": [ + "tollRoads", + "motorways", + "ferries", + "unpavedRoads", + "carpools", + "alreadyUsedRoads", + "borderCrossings" + ], + "x-ms-enum": { + "name": "RouteAvoidType", + "modelAsString": true, + "values": [ + { + "value": "tollRoads", + "description": "Avoids toll roads." + }, + { + "value": "motorways", + "description": "Avoids motorways" + }, + { + "value": "ferries", + "description": "Avoids ferries" + }, + { + "value": "unpavedRoads", + "description": "Avoids unpaved roads" + }, + { + "value": "carpools", + "description": "Avoids routes that require the use of carpool (HOV/High Occupancy Vehicle) lanes." + }, + { + "value": "alreadyUsedRoads", + "description": "Avoids using the same road multiple times. Most useful in conjunction with `routeType`=thrilling." + }, + { + "value": "borderCrossings", + "description": "Avoids border crossings in route calculation." + } + ] + } }, "x-ms-parameter-location": "method" }, @@ -457,13 +348,11 @@ "name": "vehicleEngineType", "in": "query", "description": "Engine type of the vehicle. When a detailed Consumption Model is specified, it must be consistent with the value of **vehicleEngineType**.", - "required": false, "type": "string", "enum": [ "combustion", "electric" ], - "default": "combustion", "x-ms-enum": { "name": "VehicleEngineType", "modelAsString": true, @@ -484,7 +373,6 @@ "name": "constantSpeedConsumptionInLitersPerHundredkm", "in": "query", "description": "\n\nSpecifies the speed-dependent component of consumption.\n\nProvided as an unordered list of colon-delimited speed & consumption-rate pairs. The list defines points on a consumption curve. Consumption rates for speeds not in the list are found as follows:\n\n * by linear interpolation, if the given speed lies in between two speeds in the list\n\n * by linear extrapolation otherwise, assuming a constant (ΔConsumption/ΔSpeed) determined by the nearest two points in the list\n\nThe list must contain between 1 and 25 points (inclusive), and may not contain duplicate points for the same speed. If it only contains a single point, then the consumption rate of that point is used without further processing.\n\nConsumption specified for the largest speed must be greater than or equal to that of the penultimate largest speed. This ensures that extrapolation does not lead to negative consumption rates.\n\nSimilarly, consumption values specified for the two smallest speeds in the list cannot lead to a negative consumption rate for any smaller speed.\n\nThe valid range for the consumption values(expressed in l/100km) is between 0.01 and 100000.0.\n\nSensible Values : 50,6.3:130,11.5\n\n**Note** : This parameter is required for **The Combustion Consumption Model**.", - "required": false, "type": "number", "format": "float", "x-ms-parameter-location": "method" @@ -493,7 +381,6 @@ "name": "currentFuelInLiters", "in": "query", "description": "Specifies the current supply of fuel in liters.\n\nSensible Values : 55", - "required": false, "type": "number", "format": "float", "x-ms-parameter-location": "method" @@ -502,7 +389,6 @@ "name": "auxiliaryPowerInLitersPerHour", "in": "query", "description": "Specifies the amount of fuel consumed for sustaining auxiliary systems of the vehicle, in liters per hour.\n\nIt can be used to specify consumption due to devices and systems such as AC systems, radio, heating, etc.\n\nSensible Values : 0.2", - "required": false, "type": "number", "format": "float", "x-ms-parameter-location": "method" @@ -511,7 +397,6 @@ "name": "fuelEnergyDensityInMJoulesPerLiter", "in": "query", "description": "Specifies the amount of chemical energy stored in one liter of fuel in megajoules (MJ). It is used in conjunction with the ***Efficiency** parameters for conversions between saved or consumed energy and fuel. For example, energy density is 34.2 MJ/l for gasoline, and 35.8 MJ/l for Diesel fuel.\n\nThis parameter is required if any ***Efficiency** parameter is set.\n\nSensible Values : 34.2", - "required": false, "type": "number", "format": "float", "x-ms-parameter-location": "method" @@ -520,7 +405,6 @@ "name": "accelerationEfficiency", "in": "query", "description": "Specifies the efficiency of converting chemical energy stored in fuel to kinetic energy when the vehicle accelerates _(i.e. KineticEnergyGained/ChemicalEnergyConsumed). ChemicalEnergyConsumed_ is obtained by converting consumed fuel to chemical energy using **fuelEnergyDensityInMJoulesPerLiter**.\n\nMust be paired with **decelerationEfficiency**.\n\nThe range of values allowed are 0.0 to 1/**decelerationEfficiency**.\n\nSensible Values : for **Combustion Model** : 0.33, for **Electric Model** : 0.66", - "required": false, "type": "number", "format": "float", "x-ms-parameter-location": "method" @@ -529,7 +413,6 @@ "name": "decelerationEfficiency", "in": "query", "description": "Specifies the efficiency of converting kinetic energy to saved (not consumed) fuel when the vehicle decelerates _(i.e. ChemicalEnergySaved/KineticEnergyLost). ChemicalEnergySaved_ is obtained by converting saved (not consumed) fuel to energy using **fuelEnergyDensityInMJoulesPerLiter**.\n\nMust be paired with **accelerationEfficiency**.\n\nThe range of values allowed are 0.0 to 1/**accelerationEfficiency**.\n\nSensible Values : for **Combustion Model** : 0.83, for **Electric Model** : 0.91", - "required": false, "type": "number", "format": "float", "x-ms-parameter-location": "method" @@ -538,7 +421,6 @@ "name": "uphillEfficiency", "in": "query", "description": "Specifies the efficiency of converting chemical energy stored in fuel to potential energy when the vehicle gains elevation _(i.e. PotentialEnergyGained/ChemicalEnergyConsumed). ChemicalEnergyConsumed_ is obtained by converting consumed fuel to chemical energy using **fuelEnergyDensityInMJoulesPerLiter**.\n\nMust be paired with **downhillEfficiency**.\n\nThe range of values allowed are 0.0 to 1/**downhillEfficiency**.\n\nSensible Values : for **Combustion Model** : 0.27, for **Electric Model** : 0.74", - "required": false, "type": "number", "format": "float", "x-ms-parameter-location": "method" @@ -547,7 +429,6 @@ "name": "downhillEfficiency", "in": "query", "description": "Specifies the efficiency of converting potential energy to saved (not consumed) fuel when the vehicle loses elevation _(i.e. ChemicalEnergySaved/PotentialEnergyLost). ChemicalEnergySaved_ is obtained by converting saved (not consumed) fuel to energy using **fuelEnergyDensityInMJoulesPerLiter**.\n\nMust be paired with **uphillEfficiency**.\n\nThe range of values allowed are 0.0 to 1/**uphillEfficiency**.\n\nSensible Values : for **Combustion Model** : 0.51, for **Electric Model** : 0.73", - "required": false, "type": "number", "format": "float", "x-ms-parameter-location": "method" @@ -556,7 +437,6 @@ "name": "constantSpeedConsumptionInkWhPerHundredkm", "in": "query", "description": "Specifies the speed-dependent component of consumption.\n\nProvided as an unordered list of speed/consumption-rate pairs. The list defines points on a consumption curve. Consumption rates for speeds not in the list are found as follows:\n\n* by linear interpolation, if the given speed lies in between two speeds in the list\n\n* by linear extrapolation otherwise, assuming a constant (ΔConsumption/ΔSpeed) determined by the nearest two points in the list\n\nThe list must contain between 1 and 25 points (inclusive), and may not contain duplicate points for the same speed. If it only contains a single point, then the consumption rate of that point is used without further processing.\n\nConsumption specified for the largest speed must be greater than or equal to that of the penultimate largest speed. This ensures that extrapolation does not lead to negative consumption rates.\n\nSimilarly, consumption values specified for the two smallest speeds in the list cannot lead to a negative consumption rate for any smaller speed.\n\nThe valid range for the consumption values(expressed in kWh/100km) is between 0.01 and 100000.0.\n\nSensible Values : 50,8.2:130,21.3\n\nThis parameter is required for **Electric consumption model**.", - "required": false, "type": "string", "x-ms-parameter-location": "method" }, @@ -564,7 +444,6 @@ "name": "currentChargeInkWh", "in": "query", "description": "Specifies the current electric energy supply in kilowatt hours (kWh).\n\nThis parameter co-exists with **maxChargeInkWh** parameter.\n\nThe range of values allowed are 0.0 to **maxChargeInkWh**.\n\nSensible Values : 43", - "required": false, "type": "string", "x-ms-parameter-location": "method" }, @@ -572,7 +451,6 @@ "name": "maxChargeInkWh", "in": "query", "description": "Specifies the maximum electric energy supply in kilowatt hours (kWh) that may be stored in the vehicle's battery.\n\nThis parameter co-exists with **currentChargeInkWh** parameter.\n\nMinimum value has to be greater than or equal to **currentChargeInkWh**.\n\nSensible Values : 85", - "required": false, "type": "string", "x-ms-parameter-location": "method" }, @@ -580,7 +458,6 @@ "name": "auxiliaryPowerInkW", "in": "query", "description": "Specifies the amount of power consumed for sustaining auxiliary systems, in kilowatts (kW).\n\nIt can be used to specify consumption due to devices and systems such as AC systems, radio, heating, etc.\n\nSensible Values : 1.7", - "required": false, "type": "string", "x-ms-parameter-location": "method" }, @@ -588,75 +465,59 @@ "name": "vehicleWeight", "in": "query", "description": "Weight of the vehicle in kilograms.", - "required": false, "type": "integer", - "default": 0, "x-ms-parameter-location": "method" }, "VehicleWeight": { "name": "vehicleWeight", "in": "query", "description": "Weight of the vehicle in kilograms.\n\n* It is mandatory if any of the *Efficiency parameters are set.\n\n* It must be strictly positive when used in the context of the Consumption Model. Weight restrictions are considered.\n\n* If no detailed **Consumption Model** is specified and the value of **vehicleWeight** is non-zero, then weight restrictions are considered.\n\n* In all other cases, this parameter is ignored.\n\nSensible Values : for **Combustion Model** : 1600, for **Electric Model** : 1900", - "required": false, "type": "integer", - "default": 0, "x-ms-parameter-location": "method" }, "VehicleMaxSpeed": { "name": "vehicleMaxSpeed", "in": "query", "description": "Maximum speed of the vehicle in km/hour. The max speed in the vehicle profile is used to check whether a vehicle is allowed on motorways. \n\n* A value of 0 means that an appropriate value for the vehicle will be determined and applied during route planning.\n\n* A non-zero value may be overridden during route planning. For example, the current traffic flow is 60 km/hour. If the vehicle maximum speed is set to 50 km/hour, the routing engine will consider 60 km/hour as this is the current situation. If the maximum speed of the vehicle is provided as 80 km/hour but the current traffic flow is 60 km/hour, then routing engine will again use 60 km/hour.", - "required": false, "type": "integer", - "default": 0, "x-ms-parameter-location": "method" }, "VehicleLength": { "name": "vehicleLength", "in": "query", "description": "Length of the vehicle in meters. A value of 0 means that length restrictions are not considered.", - "required": false, "type": "number", "format": "float", - "default": 0, "x-ms-parameter-location": "method" }, "VehicleHeight": { "name": "vehicleHeight", "in": "query", "description": "Height of the vehicle in meters. A value of 0 means that height restrictions are not considered.", - "required": false, "type": "number", "format": "float", - "default": 0, "x-ms-parameter-location": "method" }, "VehicleWidth": { "name": "vehicleWidth", "in": "query", "description": "Width of the vehicle in meters. A value of 0 means that width restrictions are not considered.", - "required": false, "type": "number", "format": "float", - "default": 0, "x-ms-parameter-location": "method" }, "VehicleAxleWeight": { "name": "vehicleAxleWeight", "in": "query", "description": "Weight per axle of the vehicle in kg. A value of 0 means that weight restrictions per axle are not considered.", - "required": false, "type": "integer", - "default": 0, "x-ms-parameter-location": "method" }, "VehicleCommercial": { "name": "vehicleCommercial", "in": "query", "description": "Vehicle is used for commercial purposes and thus may not be allowed to drive on some roads.", - "required": false, "type": "boolean", - "default": false, "x-ms-parameter-location": "method" }, "DepartAt": { @@ -665,7 +526,6 @@ "description": "The date and time of departure from the origin point. Departure times apart from now must be specified as a dateTime. When a time zone offset is not specified, it will be assumed to be that of the origin point. The departAt value must be in the future in the date-time format (1996-12-19T16:39:57-08:00).", "type": "string", "format": "date-time", - "required": false, "x-ms-parameter-location": "method" }, "ArriveAt": { @@ -674,16 +534,13 @@ "description": "The date and time of arrival at the destination point. It must be specified as a dateTime. When a time zone offset is not specified it will be assumed to be that of the destination point. The arriveAt value must be in the future. The arriveAt parameter cannot be used in conjunction with departAt, minDeviationDistance or minDeviationTime.", "type": "string", "format": "date-time", - "required": false, "x-ms-parameter-location": "method" }, "SectionType": { "name": "sectionType", "in": "query", "description": "Specifies which of the section types is reported in the route response.

For example if sectionType = pedestrian the sections which are suited for pedestrians only are returned. Multiple types can be used. The default sectionType refers to the travelMode input. By default travelMode is set to car", - "required": false, "type": "string", - "default": "travelMode", "enum": [ "carTrain", "country", @@ -748,18 +605,14 @@ "name": "computeBestOrder", "in": "query", "description": "Re-order the route waypoints using a fast heuristic algorithm to reduce the route length. Yields best results when used in conjunction with routeType _shortest_. Notice that origin and destination are excluded from the optimized waypoint indices. To include origin and destination in the response, please increase all the indices by 1 to account for the origin, and then add the destination as the final index. Possible values are true or false. True computes a better order if possible, but is not allowed to be used in conjunction with maxAlternatives value greater than 0 or in conjunction with circle waypoints. False will use the locations in the given order and not allowed to be used in conjunction with routeRepresentation _none_.", - "required": false, "type": "boolean", - "default": false, "x-ms-parameter-location": "method" }, "RouteRepresentation": { "name": "routeRepresentation", "in": "query", "description": "Specifies the representation of the set of routes provided as response. This parameter value can only be used in conjunction with computeBestOrder=true.", - "required": false, "type": "string", - "default": "polyline", "enum": [ "polyline", "summaryOnly", @@ -789,9 +642,7 @@ "name": "computeTravelTimeFor", "in": "query", "description": "Specifies whether to return additional travel times using different types of traffic information (none, historic, live) as well as the default best-estimate travel time.", - "required": false, "type": "string", - "default": "none", "enum": [ "none", "all" @@ -816,7 +667,6 @@ "name": "vehicleHeading", "in": "query", "description": "The directional heading of the vehicle in degrees starting at true North and continuing in clockwise direction. North is 0 degrees, east is 90 degrees, south is 180 degrees, west is 270 degrees. Possible values 0-359", - "required": false, "type": "integer", "minimum": 0, "maximum": 359, @@ -826,7 +676,6 @@ "name": "report", "in": "query", "description": "Specifies which data should be reported for diagnosis purposes. The only possible value is _effectiveSettings_. Reports the effective parameters or data used when calling the API. In the case of defaulted parameters the default will be reflected where the parameter was not specified by the caller.", - "required": false, "type": "string", "x-ms-parameter-location": "method" }, @@ -834,18 +683,14 @@ "name": "traffic", "in": "query", "description": "Possible values: \n * true - Do consider all available traffic information during routing\n * false - Ignore current traffic data during routing. Note that although the current traffic data is ignored \n during routing, the effect of historic traffic on effective road speeds is still incorporated.", - "required": false, "type": "boolean", - "default": true, "x-ms-parameter-location": "method" }, "AlternativeRouteType": { "name": "alternativeType", "in": "query", "description": "Controls the optimality, with respect to the given planning criteria, of the calculated alternatives compared to the reference route.", - "required": false, "type": "string", - "default": "anyRoute", "enum": [ "anyRoute", "betterRoute" @@ -870,7 +715,6 @@ "name": "instructionsType", "in": "query", "description": "If specified, guidance instructions will be returned. Note that the instructionsType parameter cannot be used in conjunction with routeRepresentation=none", - "required": false, "type": "string", "enum": [ "coded", @@ -896,12 +740,27 @@ ] }, "x-ms-parameter-location": "method" + }, + "MatrixId": { + "name": "format", + "description": "Matrix id received after the Matrix Route request was accepted successfully.", + "type": "string", + "in": "path", + "required": true, + "x-ms-parameter-location": "method" + }, + "BatchId": { + "name": "format", + "description": "Batch id for querying the operation.", + "type": "string", + "in": "path", + "required": true, + "x-ms-parameter-location": "method" } }, "paths": { "/route/matrix/{format}": { "post": { - "x-publish": true, "description": "\n\n**Applies to**: S1 pricing tier.\n\nThe Matrix Routing service allows calculation of a matrix of route summaries for a set of routes defined by origin and destination locations by using an asynchronous (async) or synchronous (sync) POST request. For every given origin, the service calculates the cost of routing from that origin to every given destination. The set of origins and the set of destinations can be thought of as the column and row headers of a table and each cell in the table contains the costs of routing from the origin to the destination for that cell. As an example, let's say a food delivery company has 20 drivers and they need to find the closest driver to pick up the delivery from the restaurant. To solve this use case, they can call Matrix Route API.\n\n\nFor each route, the travel times and distances are returned. You can use the computed costs to determine which detailed routes to calculate using the Route Directions API.\n\n\nThe maximum size of a matrix for async request is **700** and for sync request it's **100** (the number of origins multiplied by the number of destinations).\n\n\n\n### Submit Synchronous Route Matrix Request\nIf your scenario requires synchronous requests and the maximum size of the matrix is less than or equal to 100, you might want to make synchronous request. The maximum size of a matrix for this API is **100** (the number of origins multiplied by the number of destinations). With that constraint in mind, examples of possible matrix dimensions are: 10x10, 6x8, 9x8 (it does not need to be square).\n\n```\nPOST https://atlas.microsoft.com/route/matrix/sync/json?api-version=1.0&subscription-key={subscription-key}\n```\n\n### Submit Asynchronous Route Matrix Request\nThe Asynchronous API is appropriate for processing big volumes of relatively complex routing requests. When you make a request by using async request, by default the service returns a 202 response code along a redirect URL in the Location field of the response header. This URL should be checked periodically until the response data or error information is available. If `waitForResults` parameter in the request is set to true, user will get a 200 response if the request is finished under 120 seconds.\n\n\nThe maximum size of a matrix for this API is **700** (the number of origins multiplied by the number of destinations). With that constraint in mind, examples of possible matrix dimensions are: 50x10, 10x10, 28x25. 10x70 (it does not need to be square).\n\n\nThe asynchronous responses are stored for **14** days. The redirect URL returns a 404 response if used after the expiration period.\n\n\n\n\n```\nPOST https://atlas.microsoft.com/route/matrix/json?api-version=1.0&subscription-key={subscription-key}\n```\n\nHere's a typical sequence of asynchronous operations:\n1. Client sends a Route Matrix POST request to Azure Maps\n\n2. The server will respond with one of the following:\n\n > HTTP `202 Accepted` - Route Matrix request has been accepted.\n\n > HTTP `Error` - There was an error processing your Route Matrix request. This could either be a 400 Bad Request or any other Error status code.\n\n\n3. If the Matrix Route request was accepted successfully, the Location header in the response contains the URL to download the results of the request. This status URI looks like the following:\n\n ```\n GET https://atlas.microsoft.com/route/matrix/{matrixId}?api-version=1.0?subscription-key={subscription-key}\n ```\n\n\n4. Client issues a GET request on the download URL obtained in Step 3 to download the results\n\n### Download Sync Results\nWhen you make a POST request for Route Matrix Sync API, the service returns 200 response code for successful request and a response array. The response body will contain the data and there will be no possibility to retrieve the results later.\n\n### Download Async Results\nWhen a request issues a `202 Accepted` response, the request is being processed using our async pipeline. You will be given a URL to check the progress of your async request in the location header of the response. This status URI looks like the following:\n```\n GET https://atlas.microsoft.com/route/matrix/{matrixId}?api-version=1.0?subscription-key={subscription-key}\n```\n\nThe URL provided by the location header will return the following responses when a `GET` request is issued.\n\n > HTTP `202 Accepted` - Matrix request was accepted but is still being processed. Please try again in some time.\n\n > HTTP `200 OK` - Matrix request successfully processed. The response body contains all of the results.", "operationId": "Route_PostRouteMatrix", "x-ms-long-running-operation": true, @@ -909,30 +768,25 @@ "final-state-via": "location" }, "x-ms-examples": { - "MatrixRoute": { - "$ref": "./examples/PostMatrixRouteCalculate.json" + "PostRouteMatrix": { + "$ref": "./examples/PostRouteMatrix.json" } }, "parameters": [ { - "$ref": "#/parameters/ClientId" - }, - { - "$ref": "#/parameters/SubscriptionKey" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ClientId" }, { - "$ref": "#/parameters/ApiVersion" + "$ref": "#/parameters/RouteApiVersion" }, { - "$ref": "#/parameters/JsonFormat" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ResponseFormat" }, { "name": "waitForResults", "in": "query", "description": "Boolean to indicate whether to execute the request synchronously. If set to true, user will get a 200 response if the request is finished under 120 seconds. Otherwise, user will get a 202 response right away. Please refer to the API description for more details on 202 response. **Supported only for async request**.", - "required": false, - "type": "boolean", - "default": false + "type": "boolean" }, { "$ref": "#/parameters/ComputeTravelTimeFor" @@ -965,16 +819,16 @@ "$ref": "#/parameters/VehicleWeightMatrix" }, { - "$ref": "#/parameters/Windingness" + "$ref": "#/parameters/WindingnessLevel" }, { - "$ref": "#/parameters/Hilliness" + "$ref": "#/parameters/HillinessDegree" }, { "$ref": "#/parameters/TravelMode" }, { - "$ref": "#/parameters/Avoid" + "$ref": "#/parameters/RouteAvoidList" }, { "$ref": "#/parameters/Traffic" @@ -986,12 +840,12 @@ "$ref": "#/parameters/VehicleLoadType" }, { - "name": "routeMatrixBody", + "name": "postRouteMatrixRequestBody", "description": "The matrix of origin and destination coordinates to compute the route distance, travel time and other summary for each cell of the matrix based on the input parameters. The minimum and the maximum cell count supported are 1 and **700** for async and **100** for sync respectively. For example, it can be 35 origins and 20 destinations or 25 origins and 25 destinations for async API.", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/RouteMatrixRequestBody" + "$ref": "#/definitions/PostRouteMatrixRequestBody" } } ], @@ -1003,32 +857,54 @@ } }, "202": { - "$ref": "#/responses/202Async" + "$ref": "../../../Common/preview/1.0/common.json#/responses/202Async" }, - "400": { - "$ref": "#/responses/400" + "default": { + "$ref": "../../../Common/preview/1.0/common.json#/responses/default" + } + } + }, + "get": { + "description": "If the Matrix Route request was accepted successfully, the Location header in the response contains the URL to download the results of the request. This status URI looks like the following:\n\n ```\n GET https://atlas.microsoft.com/route/matrix/{matrixId}?api-version=1.0?subscription-key={subscription-key}\n ```\n\n\n4. Client issues a GET request on the download URL obtained in Step 3 to download the results\n\n### Download Sync Results\nWhen you make a POST request for Route Matrix Sync API, the service returns 200 response code for successful request and a response array. The response body will contain the data and there will be no possibility to retrieve the results later.\n\n### Download Async Results\nWhen a request issues a `202 Accepted` response, the request is being processed using our async pipeline. You will be given a URL to check the progress of your async request in the location header of the response. This status URI looks like the following:\n```\n GET https://atlas.microsoft.com/route/matrix/{matrixId}?api-version=1.0?subscription-key={subscription-key}\n```\n\nThe URL provided by the location header will return the following responses when a `GET` request is issued.\n\n > HTTP `202 Accepted` - Matrix request was accepted but is still being processed. Please try again in some time.\n\n > HTTP `200 OK` - Matrix request successfully processed. The response body contains all of the results.", + "operationId": "Route_GetRouteMatrix", + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "original-uri" + }, + "x-ms-examples": { + "GetRouteMatrix": { + "$ref": "./examples/GetRouteMatrix.json" + } + }, + "parameters": [ + { + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ClientId" }, - "401": { - "$ref": "#/responses/401" + { + "$ref": "#/parameters/RouteApiVersion" }, - "403": { - "$ref": "#/responses/403" + { + "$ref": "#/parameters/MatrixId" + } + ], + "responses": { + "200": { + "description": "Matrix request successfully processed. The response body contains all of the results.", + "schema": { + "$ref": "#/definitions/RouteMatrixResponse" + } }, - "404": { - "$ref": "#/responses/404" + "202": { + "description": "OK" }, - "500": { - "$ref": "#/responses/500" + "default": { + "$ref": "../../../Common/preview/1.0/common.json#/responses/default" } - }, - "produces": [ - "application/json" - ] + } } }, "/route/directions/{format}": { "get": { - "x-publish": true, "description": "**Applies to**: S0 and S1 pricing tiers.\n\n\nReturns a route between an origin and a destination, passing through waypoints if they are specified. The route will take into account factors such as current traffic and the typical road speeds on the requested day of the week and time of day.\n\nInformation returned includes the distance, estimated travel time, and a representation of the route geometry. Additional routing information such as optimized waypoint order or turn by turn instructions is also available, depending on the options selected.\n\nRouting service provides a set of parameters for a detailed description of vehicle-specific Consumption Model. Please check [Consumption Model](https://docs.microsoft.com/azure/azure-maps/consumption-model) for detailed explanation of the concepts and parameters involved.", "operationId": "Route_GetRouteDirections", "x-ms-examples": { @@ -1038,16 +914,13 @@ }, "parameters": [ { - "$ref": "#/parameters/ClientId" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ClientId" }, { - "$ref": "#/parameters/SubscriptionKey" + "$ref": "#/parameters/RouteApiVersion" }, { - "$ref": "#/parameters/ApiVersion" - }, - { - "$ref": "#/parameters/TextFormat" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/TextFormat" }, { "name": "query", @@ -1060,11 +933,9 @@ "name": "maxAlternatives", "in": "query", "description": "Number of desired alternative routes to be calculated. Default: 0, minimum: 0 and maximum: 5", - "required": false, "type": "integer", "minimum": 0, - "maximum": 5, - "default": 0 + "maximum": 5 }, { "$ref": "#/parameters/AlternativeRouteType" @@ -1073,9 +944,7 @@ "name": "minDeviationDistance", "in": "query", "description": "All alternative routes returned will follow the reference route (see section POST Requests) from the origin point of the calculateRoute request for at least this number of meters. Can only be used when reconstructing a route. The minDeviationDistance parameter cannot be used in conjunction with arriveAt", - "required": false, - "type": "integer", - "default": 0 + "type": "integer" }, { "$ref": "#/parameters/ArriveAt" @@ -1087,9 +956,7 @@ "name": "minDeviationTime", "in": "query", "description": "All alternative routes returned will follow the reference route (see section POST Requests) from the origin point of the calculateRoute request for at least this number of seconds. Can only be used when reconstructing a route. The minDeviationTime parameter cannot be used in conjunction with arriveAt. Default value is 0. Setting )minDeviationTime_ to a value greater than zero has the following consequences:\n - The origin point of the _calculateRoute_ Request must be on\n (or very near) the input reference route.\n - If this is not the case, an error is returned.\n - However, the origin point does not need to be at the beginning\n of the input reference route (it can be thought of as the current\n vehicle position on the reference route).\n - The reference route, returned as the first route in the _calculateRoute_\n Response, will start at the origin point specified in the _calculateRoute_\n Request. The initial part of the input reference route up until the origin\n point will be excluded from the Response.\n - The values of _minDeviationDistance_ and _minDeviationTime_ determine\n how far alternative routes will be guaranteed to follow the reference\n route from the origin point onwards.\n - The route must use _departAt_.\n - The _vehicleHeading_ is ignored.", - "required": false, - "type": "integer", - "default": 0 + "type": "integer" }, { "$ref": "#/parameters/RouteInstructionsType" @@ -1098,7 +965,6 @@ "name": "language", "in": "query", "description": "The language parameter determines the language of the guidance messages. Proper nouns (the names of streets, plazas, etc.) are returned in the specified language, or if that is not available, they are returned in an available language that is close to it. Allowed values are (a subset of) the IETF language tags. The currently supported languages are listed in the [Supported languages section](https://docs.microsoft.com/azure/azure-maps/supported-languages).\n\nDefault value: en-GB", - "required": false, "type": "string" }, { @@ -1141,16 +1007,16 @@ "$ref": "#/parameters/VehicleCommercial" }, { - "$ref": "#/parameters/Windingness" + "$ref": "#/parameters/WindingnessLevel" }, { - "$ref": "#/parameters/Hilliness" + "$ref": "#/parameters/HillinessDegree" }, { "$ref": "#/parameters/TravelMode" }, { - "$ref": "#/parameters/Avoid" + "$ref": "#/parameters/RouteAvoidList" }, { "$ref": "#/parameters/Traffic" @@ -1208,25 +1074,12 @@ "$ref": "#/definitions/RouteDirectionsResponse" } }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" + "default": { + "$ref": "../../../Common/preview/1.0/common.json#/responses/default" } } }, "post": { - "x-publish": true, "description": "**Applies to**: S0 and S1 pricing tiers.\n\n\nReturns a route between an origin and a destination, passing through waypoints if they are specified. The route will take into account factors such as current traffic and the typical road speeds on the requested day of the week and time of day.\n\nInformation returned includes the distance, estimated travel time, and a representation of the route geometry. Additional routing information such as optimized waypoint order or turn by turn instructions is also available, depending on the options selected.\n\nRouting service provides a set of parameters for a detailed description of a vehicle-specific Consumption Model. Please check [Consumption Model](https://docs.microsoft.com/azure/azure-maps/consumption-model) for detailed explanation of the concepts and parameters involved.", "operationId": "Route_PostRouteDirections", "x-ms-examples": { @@ -1236,16 +1089,13 @@ }, "parameters": [ { - "$ref": "#/parameters/ClientId" - }, - { - "$ref": "#/parameters/SubscriptionKey" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ClientId" }, { - "$ref": "#/parameters/ApiVersion" + "$ref": "#/parameters/RouteApiVersion" }, { - "$ref": "#/parameters/TextFormat" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/TextFormat" }, { "name": "query", @@ -1258,11 +1108,9 @@ "name": "maxAlternatives", "in": "query", "description": "Number of desired alternative routes to be calculated. Default: 0, minimum: 0 and maximum: 5", - "required": false, "type": "integer", "minimum": 0, - "maximum": 5, - "default": 0 + "maximum": 5 }, { "$ref": "#/parameters/AlternativeRouteType" @@ -1271,17 +1119,13 @@ "name": "minDeviationDistance", "in": "query", "description": "All alternative routes returned will follow the reference route (see section POST Requests) from the origin point of the calculateRoute request for at least this number of meters. Can only be used when reconstructing a route. The minDeviationDistance parameter cannot be used in conjunction with arriveAt", - "required": false, - "type": "integer", - "default": 0 + "type": "integer" }, { "name": "minDeviationTime", "in": "query", "description": "All alternative routes returned will follow the reference route (see section POST Requests) from the origin point of the calculateRoute request for at least this number of seconds. Can only be used when reconstructing a route. The minDeviationTime parameter cannot be used in conjunction with arriveAt. Default value is 0. Setting )minDeviationTime_ to a value greater than zero has the following consequences:\n - The origin point of the _calculateRoute_ Request must be on\n (or very near) the input reference route.\n - If this is not the case, an error is returned.\n - However, the origin point does not need to be at the beginning\n of the input reference route (it can be thought of as the current\n vehicle position on the reference route).\n - The reference route, returned as the first route in the _calculateRoute_\n Response, will start at the origin point specified in the _calculateRoute_\n Request. The initial part of the input reference route up until the origin\n point will be excluded from the Response.\n - The values of _minDeviationDistance_ and _minDeviationTime_ determine\n how far alternative routes will be guaranteed to follow the reference\n route from the origin point onwards.\n - The route must use _departAt_.\n - The _vehicleHeading_ is ignored.", - "required": false, - "type": "integer", - "default": 0 + "type": "integer" }, { "$ref": "#/parameters/RouteInstructionsType" @@ -1290,7 +1134,6 @@ "name": "language", "in": "query", "description": "The language parameter determines the language of the guidance messages. It does not affect proper nouns (the names of streets, plazas, etc.) It has no effect when instructionsType=coded. Allowed values are (a subset of) the IETF language tags described", - "required": false, "type": "string" }, { @@ -1339,16 +1182,16 @@ "$ref": "#/parameters/VehicleCommercial" }, { - "$ref": "#/parameters/Windingness" + "$ref": "#/parameters/WindingnessLevel" }, { - "$ref": "#/parameters/Hilliness" + "$ref": "#/parameters/HillinessDegree" }, { "$ref": "#/parameters/TravelMode" }, { - "$ref": "#/parameters/Avoid" + "$ref": "#/parameters/RouteAvoidList" }, { "$ref": "#/parameters/Traffic" @@ -1399,12 +1242,12 @@ "$ref": "#/parameters/AuxiliaryPowerInkW" }, { - "name": "routeDirectionsRequestBody", + "name": "postRouteDirectionsRequestBody", "description": "Used for reconstructing a route and for calculating zero or more alternative routes to this reference route. The provided sequence of coordinates is used as input for route reconstruction. The alternative routes are calculated between the origin and destination points specified in the base path parameter locations. If both minDeviationDistance and minDeviationTime are set to zero, then these origin and destination points are expected to be at (or very near) the beginning and end of the reference route, respectively. Intermediate locations (waypoints) are not supported when using supportingPoints.\n\nSetting at least one of minDeviationDistance or minDeviationTime to a value greater than zero has the following consequences:\n\n* The origin point of the calculateRoute request must be on (or very near) the input reference route. If this is not the case, an error is returned. However, the origin point does not need to be at the beginning of the input reference route (it can be thought of as the current vehicle position on the reference route).\n* The reference route, returned as the first route in the calculateRoute response, will start at the origin point specified in the calculateRoute request. The initial part of the input reference route up until the origin point will be excluded from the response.\n* The values of minDeviationDistance and minDeviationTime determine how far alternative routes will be guaranteed to follow the reference route from the origin point onwards.\n* The route must use departAt.\n* The vehicleHeading is ignored.", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/RouteDirectionsRequestBody" + "$ref": "#/definitions/PostRouteDirectionsRequestBody" } } ], @@ -1415,27 +1258,14 @@ "$ref": "#/definitions/RouteDirectionsResponse" } }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" + "default": { + "$ref": "../../../Common/preview/1.0/common.json#/responses/default" } } } }, "/route/range/{format}": { "get": { - "x-publish": true, "description": "__Route Range (Isochrone) API__\n\n\n**Applies to**: S1 pricing tier.\n\nThis service will calculate a set of locations that can be reached from the origin point based on fuel, energy, time or distance budget that is specified. A polygon boundary (or Isochrone) is returned in a counterclockwise orientation as well as the precise polygon center which was the result of the origin point.\n\nThe returned polygon can be used for further processing such as [Search Inside Geometry](https://docs.microsoft.com/rest/api/maps/search/postsearchinsidegeometry) to search for POIs within the provided Isochrone.", "operationId": "Route_GetRouteRange", "x-ms-examples": { @@ -1445,16 +1275,13 @@ }, "parameters": [ { - "$ref": "#/parameters/ClientId" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ClientId" }, { - "$ref": "#/parameters/SubscriptionKey" + "$ref": "#/parameters/RouteApiVersion" }, { - "$ref": "#/parameters/ApiVersion" - }, - { - "$ref": "#/parameters/TextFormat" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/TextFormat" }, { "name": "query", @@ -1467,7 +1294,6 @@ "name": "fuelBudgetInLiters", "in": "query", "description": "Fuel budget in liters that determines maximal range which can be travelled using the specified Combustion Consumption Model.
When fuelBudgetInLiters is used, it is mandatory to specify a detailed Combustion Consumption Model.
Exactly one budget (fuelBudgetInLiters, energyBudgetInkWh, timeBudgetInSec, or distanceBudgetInMeters) must be used.", - "required": false, "type": "number", "format": "float" }, @@ -1475,7 +1301,6 @@ "name": "energyBudgetInkWh", "in": "query", "description": "Electric energy budget in kilowatt hours (kWh) that determines maximal range which can be travelled using the specified Electric Consumption Model.
When energyBudgetInkWh is used, it is mandatory to specify a detailed Electric Consumption Model.
Exactly one budget (fuelBudgetInLiters, energyBudgetInkWh, timeBudgetInSec, or distanceBudgetInMeters) must be used.", - "required": false, "type": "number", "format": "float" }, @@ -1483,7 +1308,6 @@ "name": "timeBudgetInSec", "in": "query", "description": "Time budget in seconds that determines maximal range which can be travelled using driving time. The Consumption Model will only affect the range when routeType is eco.
Exactly one budget (fuelBudgetInLiters, energyBudgetInkWh, timeBudgetInSec, or distanceBudgetInMeters) must be used.", - "required": false, "type": "number", "format": "float" }, @@ -1491,7 +1315,6 @@ "name": "distanceBudgetInMeters", "in": "query", "description": "Distance budget in meters that determines maximal range which can be travelled using driving distance. The Consumption Model will only affect the range when routeType is eco.
Exactly one budget (fuelBudgetInLiters, energyBudgetInkWh, timeBudgetInSec, or distanceBudgetInMeters) must be used.", - "required": false, "type": "number", "format": "float" }, @@ -1505,16 +1328,16 @@ "$ref": "#/parameters/Traffic" }, { - "$ref": "#/parameters/Avoid" + "$ref": "#/parameters/RouteAvoidList" }, { "$ref": "#/parameters/TravelMode" }, { - "$ref": "#/parameters/Hilliness" + "$ref": "#/parameters/HillinessDegree" }, { - "$ref": "#/parameters/Windingness" + "$ref": "#/parameters/WindingnessLevel" }, { "$ref": "#/parameters/VehicleAxleWeight" @@ -1584,30 +1407,17 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/RouteRangeResponse" + "$ref": "#/definitions/GetRouteRangeResponse" } }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" + "default": { + "$ref": "../../../Common/preview/1.0/common.json#/responses/default" } } } }, "/route/directions/batch/{format}": { "post": { - "x-publish": true, "description": "**Route Directions Batch API**\n\n\n**Applies to**: S1 pricing tier.\n\n\n\nThe Route Directions Batch API sends batches of queries to [Route Directions API](https://docs.microsoft.com/en-us/rest/api/maps/route/getroutedirections) using just a single API call. You can call Route Directions Batch API to run either asynchronously (async) or synchronously (sync). The async API allows caller to batch up to **700** queries and sync API up to **100** queries.\n### Submit Synchronous Batch Request\nThe Synchronous API is recommended for lightweight batch requests. When the service receives a request, it will respond as soon as the batch items are calculated and there will be no possibility to retrieve the results later. The Synchronous API will return a timeout error (a 408 response) if the request takes longer than 60 seconds. The number of batch items is limited to **100** for this API.\n```\nPOST https://atlas.microsoft.com/route/directions/batch/sync/json?api-version=1.0&subscription-key={subscription-key}\n```\n### Submit Asynchronous Batch Request\nThe Asynchronous API is appropriate for processing big volumes of relatively complex route requests\n- It allows the retrieval of results in a separate call (multiple downloads are possible).\n- The asynchronous API is optimized for reliability and is not expected to run into a timeout.\n- The number of batch items is limited to **700** for this API.\n\nWhen you make a request by using async request, by default the service returns a 202 response code along a redirect URL in the Location field of the response header. This URL should be checked periodically until the response data or error information is available.\nThe asynchronous responses are stored for **14** days. The redirect URL returns a 404 response if used after the expiration period.\n\nPlease note that asynchronous batch request is a long-running request. Here's a typical sequence of operations:\n1. Client sends a Route Directions Batch `POST` request to Azure Maps\n2. The server will respond with one of the following:\n\n > HTTP `202 Accepted` - Batch request has been accepted.\n\n > HTTP `Error` - There was an error processing your Batch request. This could either be a `400 Bad Request` or any other `Error` status code.\n\n3. If the batch request was accepted successfully, the `Location` header in the response contains the URL to download the results of the batch request.\n This status URI looks like following:\n\n``` GET https://atlas.microsoft.com/batch/{batch-id}?api-version=1.0 ```\nNote:- Please remember to add AUTH information (subscription-key/azure_auth - See [Security](#security)) to the _status URI_ before running it.
\n4. Client issues a `GET` request on the _download URL_ obtained in Step 3 to download the batch results.\n\n### POST Body for Batch Request\nTo send the _route directions_ queries you will use a `POST` request where the request body will contain the `batchItems` array in `json` format and the `Content-Type` header will be set to `application/json`. Here's a sample request body containing 3 _route directions_ queries:\n\n\n```json\n{\n \"batchItems\": [\n { \"query\": \"?query=47.620659,-122.348934:47.610101,-122.342015&travelMode=bicycle&routeType=eco&traffic=false\" },\n { \"query\": \"?query=40.759856,-73.985108:40.771136,-73.973506&travelMode=pedestrian&routeType=shortest\" },\n { \"query\": \"?query=48.923159,-122.557362:32.621279,-116.840362\" }\n ]\n}\n```\n\nA _route directions_ query in a batch is just a partial URL _without_ the protocol, base URL, path, api-version and subscription-key. It can accept any of the supported _route directions_ [URI parameters](https://docs.microsoft.com/en-us/rest/api/maps/route/getroutedirections#uri-parameters). The string values in the _route directions_ query must be properly escaped (e.g. \" character should be escaped with \\\\ ) and it should also be properly URL-encoded.\n\n\nThe async API allows caller to batch up to **700** queries and sync API up to **100** queries, and the batch should contain at least **1** query.\n\n\n### Download Asynchronous Batch Results\nTo download the async batch results you will issue a `GET` request to the batch download endpoint. This _download URL_ can be obtained from the `Location` header of a successful `POST` batch request and looks like the following:\n\n```\nhttps://atlas.microsoft.com/batch/{batch-id}?api-version=1.0&subscription-key={subscription-key}\n```\nHere's the typical sequence of operations for downloading the batch results:\n1. Client sends a `GET` request using the _download URL_.\n2. The server will respond with one of the following:\n \n > HTTP `202 Accepted` - Batch request was accepted but is still being processed. Please try again in some time.\n\n > HTTP `200 OK` - Batch request successfully processed. The response body contains all the batch results.\n\n\n\n### Batch Response Model\nThe returned data content is similar for async and sync requests. When downloading the results of an async batch request, if the batch has finished processing, the response body contains the batch response. This batch response contains a `summary` component that indicates the `totalRequests` that were part of the original batch request and `successfulRequests`i.e. queries which were executed successfully. The batch response also includes a `batchItems` array which contains a response for each and every query in the batch request. The `batchItems` will contain the results in the exact same order the original queries were sent in the batch request. Each item in `batchItems` contains `statusCode` and `response` fields. Each `response` in `batchItems` is of one of the following types:\n\n - [`RouteDirectionsResponse`](https://docs.microsoft.com/en-us/rest/api/maps/route/getroutedirections#routedirectionsresponse) - If the query completed successfully.\n\n - `Error` - If the query failed. The response will contain a `code` and a `message` in this case.\n\n\nHere's a sample Batch Response with 1 _successful_ and 1 _failed_ result:\n\n\n```json\n{\n \"summary\": {\n \"successfulRequests\": 1,\n \"totalRequests\": 2\n },\n \"batchItems\": [\n {\n \"statusCode\": 200,\n \"response\": {\n \"routes\": [\n {\n \"summary\": {\n \"lengthInMeters\": 1758,\n \"travelTimeInSeconds\": 387,\n \"trafficDelayInSeconds\": 0,\n \"departureTime\": \"2018-07-17T00:49:56+00:00\",\n \"arrivalTime\": \"2018-07-17T00:56:22+00:00\"\n },\n \"legs\": [\n {\n \"summary\": {\n \"lengthInMeters\": 1758,\n \"travelTimeInSeconds\": 387,\n \"trafficDelayInSeconds\": 0,\n \"departureTime\": \"2018-07-17T00:49:56+00:00\",\n \"arrivalTime\": \"2018-07-17T00:56:22+00:00\"\n },\n \"points\": [\n {\n \"latitude\": 47.62094,\n \"longitude\": -122.34892\n },\n {\n \"latitude\": 47.62094,\n \"longitude\": -122.3485\n },\n {\n \"latitude\": 47.62095,\n \"longitude\": -122.3476\n }\n ]\n }\n ],\n \"sections\": [\n {\n \"startPointIndex\": 0,\n \"endPointIndex\": 40,\n \"sectionType\": \"TRAVEL_MODE\",\n \"travelMode\": \"bicycle\"\n }\n ]\n }\n ]\n }\n },\n {\n \"statusCode\": 400,\n \"response\":\n {\n \"error\":\n {\n \"code\": \"400 BadRequest\",\n \"message\": \"Bad request: one or more parameters were incorrectly specified or are mutually exclusive.\"\n }\n }\n }\n ]\n}\n```", "operationId": "Route_PostRouteDirectionsBatch", "x-ms-long-running-operation": true, @@ -1621,362 +1431,126 @@ }, "parameters": [ { - "$ref": "#/parameters/ClientId" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ClientId" }, { - "$ref": "#/parameters/SubscriptionKey" + "$ref": "#/parameters/RouteApiVersion" }, { - "$ref": "#/parameters/ApiVersion" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ResponseFormat" }, { - "$ref": "#/parameters/JsonFormat" - }, - { - "name": "routeDirectionsBatchRequestBody", + "name": "postRouteDirectionsBatchRequestBody", "in": "body", "description": "The list of route directions queries/requests to process. The list can contain a max of 700 queries for async and 100 queries for sync version and must contain at least 1 query.", "required": true, "schema": { - "$ref": "#/definitions/BatchRequestBody" + "$ref": "../../../Common/preview/1.0/common.json#/definitions/BatchRequestBody" } } ], "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/BatchResponse" - } - }, "202": { - "$ref": "#/responses/202Async" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" + "$ref": "../../../Common/preview/1.0/common.json#/responses/202Batch" }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" + "default": { + "$ref": "../../../Common/preview/1.0/common.json#/responses/default" } - }, - "produces": [ - "application/json" - ] - } - } - }, - "definitions": { - "ODataErrorResponse": { - "type": "object", - "description": "This response object is returned when an error occurs in the Maps API.", - "properties": { - "error": { - "$ref": "#/definitions/ODataError" } - } - }, - "ODataError": { - "type": "object", - "description": "This object is returned when an error occurs in the 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." + }, + "get": { + "description": "### Download Asynchronous Batch Results\nTo download the async batch results you will issue a `GET` request to the batch download endpoint. This _download URL_ can be obtained from the `Location` header of a successful `POST` batch request and looks like the following:\n\n```\nhttps://atlas.microsoft.com/batch/{batch-id}?api-version=1.0&subscription-key={subscription-key}\n```\nHere's the typical sequence of operations for downloading the batch results:\n1. Client sends a `GET` request using the _download URL_.\n2. The server will respond with one of the following:\n \n > HTTP `202 Accepted` - Batch request was accepted but is still being processed. Please try again in some time.\n\n > HTTP `200 OK` - Batch request successfully processed. The response body contains all the batch results.\n\n\n\n### Batch Response Model\nThe returned data content is similar for async and sync requests. When downloading the results of an async batch request, if the batch has finished processing, the response body contains the batch response. This batch response contains a `summary` component that indicates the `totalRequests` that were part of the original batch request and `successfulRequests`i.e. queries which were executed successfully. The batch response also includes a `batchItems` array which contains a response for each and every query in the batch request. The `batchItems` will contain the results in the exact same order the original queries were sent in the batch request. Each item in `batchItems` contains `statusCode` and `response` fields. Each `response` in `batchItems` is of one of the following types:\n\n - [`RouteDirectionsResponse`](https://docs.microsoft.com/en-us/rest/api/maps/route/getroutedirections#routedirectionsresponse) - If the query completed successfully.\n\n - `Error` - If the query failed. The response will contain a `code` and a `message` in this case.\n\n\nHere's a sample Batch Response with 1 _successful_ and 1 _failed_ result:\n\n\n```json\n{\n \"summary\": {\n \"successfulRequests\": 1,\n \"totalRequests\": 2\n },\n \"batchItems\": [\n {\n \"statusCode\": 200,\n \"response\": {\n \"routes\": [\n {\n \"summary\": {\n \"lengthInMeters\": 1758,\n \"travelTimeInSeconds\": 387,\n \"trafficDelayInSeconds\": 0,\n \"departureTime\": \"2018-07-17T00:49:56+00:00\",\n \"arrivalTime\": \"2018-07-17T00:56:22+00:00\"\n },\n \"legs\": [\n {\n \"summary\": {\n \"lengthInMeters\": 1758,\n \"travelTimeInSeconds\": 387,\n \"trafficDelayInSeconds\": 0,\n \"departureTime\": \"2018-07-17T00:49:56+00:00\",\n \"arrivalTime\": \"2018-07-17T00:56:22+00:00\"\n },\n \"points\": [\n {\n \"latitude\": 47.62094,\n \"longitude\": -122.34892\n },\n {\n \"latitude\": 47.62094,\n \"longitude\": -122.3485\n },\n {\n \"latitude\": 47.62095,\n \"longitude\": -122.3476\n }\n ]\n }\n ],\n \"sections\": [\n {\n \"startPointIndex\": 0,\n \"endPointIndex\": 40,\n \"sectionType\": \"TRAVEL_MODE\",\n \"travelMode\": \"bicycle\"\n }\n ]\n }\n ]\n }\n },\n {\n \"statusCode\": 400,\n \"response\":\n {\n \"error\":\n {\n \"code\": \"400 BadRequest\",\n \"message\": \"Bad request: one or more parameters were incorrectly specified or are mutually exclusive.\"\n }\n }\n }\n ]\n}\n```", + "operationId": "Route_GetRouteDirectionsBatch", + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "original-uri" }, - "details": { - "type": "array", - "items": { - "$ref": "#/definitions/ODataError" + "x-ms-examples": { + "A Get Route Directions Batch API call containing 3 Route Directions API queries": { + "$ref": "./examples/GetRouteDirectionsBatch.json" } }, - "target": { - "type": "string", - "readOnly": true, - "description": "If available, the target causing the error." - } - } - }, - "Redirect": { - "type": "object", - "description": "This object is returned when the request is accepted but the processing has not been completed. The location header in the response contains the new URL to retry." - }, - "BatchResponse": { - "description": "This object is returned from a successful Batch service call", - "type": "object", - "properties": { - "summary": { - "description": "Summary for the batch request", - "type": "object", - "readOnly": true, - "properties": { - "successfulRequests": { - "description": "Number of successful requests in the batch", - "type": "integer", - "readOnly": true - }, - "totalRequests": { - "description": "Total number of requests in the batch", - "type": "integer", - "readOnly": true - } + "parameters": [ + { + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ClientId" + }, + { + "$ref": "#/parameters/RouteApiVersion" + }, + { + "$ref": "#/parameters/BatchId" } - }, - "batchItems": { - "description": "Array containing the batch results", - "type": "array", - "readOnly": true, - "items": { - "type": "object" + ], + "responses": { + "200": { + "description": "Batch request successfully processed. The response body contains all the batch results.", + "schema": { + "$ref": "#/definitions/RouteDirectionsBatchResponse" + } + }, + "202": { + "description": "Batch request was accepted but is still being processed. Please try again in some time." + }, + "default": { + "$ref": "../../../Common/preview/1.0/common.json#/responses/default" } } } }, - "GeoJSONGeometry": { - "description": "A valid `GeoJSON` geometry object. Please refer to [RFC 7946](https://tools.ietf.org/html/rfc7946#section-3.1) for details.", - "type": "object", - "discriminator": "type", - "required": [ - "type" - ], - "properties": { - "type": { - "description": "Specifies the `GeoJSON` geometry type. Must be one of the seven valid GeoJSON geometry types - Point, MultiPoint, LineString, MultiLineString, Polygon, MultiPolygon and GeometryCollection.", - "type": "string", - "enum": [ - "Point", - "MultiPoint", - "LineString", - "MultiLineString", - "Polygon", - "MultiPolygon", - "GeometryCollection" - ], - "x-ms-enum": { - "name": "GeoJSONGeometryType", - "modelAsString": true, - "values": [ - { - "value": "Point", - "description": "`GeoJSON Point` geometry." - }, - { - "value": "MultiPoint", - "description": "`GeoJSON MultiPoint` geometry." - }, - { - "value": "LineString", - "description": "`GeoJSON LineString` geometry." - }, - { - "value": "MultiLineString", - "description": "`GeoJSON MultiLineString` geometry." - }, - { - "value": "Polygon", - "description": "`GeoJSON Polygon` geometry." - }, - { - "value": "MultiPolygon", - "description": "`GeoJSON MultiPolygon` geometry." - }, - { - "value": "GeometryCollection", - "description": "`GeoJSON GeometryCollection` geometry." - } - ] + "/route/directions/batch/sync/{format}": { + "post": { + "description": "**Route Directions Batch API**\n\n\n**Applies to**: S1 pricing tier.\n\n\n\nThe Route Directions Batch API sends batches of queries to [Route Directions API](https://docs.microsoft.com/en-us/rest/api/maps/route/getroutedirections) using just a single API call. You can call Route Directions Batch API to run either asynchronously (async) or synchronously (sync). The async API allows caller to batch up to **700** queries and sync API up to **100** queries.\n### Submit Synchronous Batch Request\nThe Synchronous API is recommended for lightweight batch requests. When the service receives a request, it will respond as soon as the batch items are calculated and there will be no possibility to retrieve the results later. The Synchronous API will return a timeout error (a 408 response) if the request takes longer than 60 seconds. The number of batch items is limited to **100** for this API.\n```\n", + "operationId": "Route_PostRouteDirectionsBatchSync", + "x-ms-examples": { + "A Route Directions Batch Synchronous API call containing 3 Route Directions API queries": { + "$ref": "./examples/PostRouteDirectionsBatchSync.json" } - } - } - }, - "MultiPoint": { - "description": "A valid `GeoJSON MultiPoint` geometry type. Please refer to [RFC 7946](https://tools.ietf.org/html/rfc7946#section-3.1.3) for details.", - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/GeoJSONGeometry" }, - { - "properties": { - "type": { - "description": "Specifies the `type` for the geometry. Value should always be equal to \"MultiPoint\".", - "type": "string" - }, - "coordinates": { - "description": "Coordinates for the `MultiPoint` geometry.", - "type": "array", - "items": { - "$ref": "#/definitions/GeoJSONPosition" - } - } + "parameters": [ + { + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ClientId" }, - "required": [ - "coordinates" - ] - } - ] - }, - "GeoJSONLinearRing": { - "description": "Though a linear ring is not explicitly represented as a GeoJSON geometry type, it helps in defining the polygon as an array of linear rings. Please refer to [RFC 7946](https://tools.ietf.org/html/rfc7946#section-3.1.6) for details.", - "type": "array", - "items": { - "$ref": "#/definitions/GeoJSONPosition" - } - }, - "GeoJSONPosition": { - "description": "A valid `GeoJSON Position` geometry type. A `Position` is an array of numbers with two or more elements. The first two elements are _longitude_ and _latitude_, precisely in that order. _Altitude/Elevation_ is an optional third element. Please refer to [RFC 7946](https://tools.ietf.org/html/rfc7946#section-3.1.1) for details.", - "type": "array", - "items": { - "type": "number", - "format": "double" - } - }, - "Point": { - "description": "A valid `GeoJSON Point` geometry type. Please refer to [RFC 7946](https://tools.ietf.org/html/rfc7946#section-3.1.2) for details.", - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/GeoJSONGeometry" - }, - { - "properties": { - "type": { - "description": "Specifies the `type` for the geometry. Value should always be equal to \"Point\".", - "type": "string" - }, - "coordinates": { - "$ref": "#/definitions/GeoJSONPosition" - } + { + "$ref": "#/parameters/RouteApiVersion" }, - "required": [ - "coordinates" - ] - } - ] - }, - "MultiPolygon": { - "description": "A valid `GeoJSON MultiPolygon` object type. Please refer to [RFC 7946](https://tools.ietf.org/html/rfc7946#section-3.1.7) for details.", - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/GeoJSONGeometry" - }, - { - "properties": { - "type": { - "description": "Specifies the `type` for the object. Value should always be equal to \"MultiPolygon\".", - "type": "string" - }, - "coordinates": { - "description": "Contains a list of valid `GeoJSON` Polygon objects. **Note** that coordinates in GeoJSON are in x, y order (longitude, latitude).", - "type": "array", - "items": { - "type": "array", - "items": { - "$ref": "#/definitions/GeoJSONLinearRing" - } - } - } + { + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ResponseFormat" }, - "required": [ - "coordinates" - ] - } - ] - }, - "GeoJSONGeometryCollection": { - "description": "A valid `GeoJSON GeometryCollection` object type. Please refer to [RFC 7946](https://tools.ietf.org/html/rfc7946#section-3.1.8) for details.", - "type": "object", - "properties": { - "type": { - "description": "Specifies the `type` for the object. Value should always be equal to \"GeometryCollection\".", - "type": "string" - }, - "geometries": { - "description": "Contains a list of valid `GeoJSON` geometry objects. **Note** that coordinates in GeoJSON are in x, y order (longitude, latitude).", - "type": "array", - "items": { - "$ref": "#/definitions/GeoJSONGeometry" + { + "name": "postRouteDirectionsBatchRequestBody", + "in": "body", + "description": "The list of route directions queries/requests to process. The list can contain a max of 700 queries for async and 100 queries for sync version and must contain at least 1 query.", + "required": true, + "schema": { + "$ref": "../../../Common/preview/1.0/common.json#/definitions/BatchRequestBody" + } } - } - }, - "required": [ - "geometries" - ] - }, - "BatchRequestBody": { - "description": "This type represents the request body for the Batch service.", - "type": "object", - "properties": { - "batchItems": { - "description": "The list of queries/requests to process", - "type": "array", - "items": { - "description": "Batch Query object", - "type": "object", - "properties": { - "query": { - "description": "Partial query string", - "type": "string" - } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/RouteDirectionsBatchResponse" } + }, + "408": { + "$ref": "../../../Common/preview/1.0/common.json#/responses/408" + }, + "default": { + "$ref": "../../../Common/preview/1.0/common.json#/responses/default" } } } - }, - "Coordinate": { - "description": "A location represented as a latitude and longitude.", - "type": "object", - "properties": { - "latitude": { - "description": "Latitude property", - "type": "number", - "format": "double", - "readOnly": true - }, - "longitude": { - "description": "Longitude property", - "type": "number", - "format": "double", - "readOnly": true - } - } - }, - "RouteDirectionsRequestBody": { + } + }, + "definitions": { + "PostRouteDirectionsRequestBody": { "type": "object", "description": "Post body parameters for Route directions.", "properties": { "supportingPoints": { "description": "A GeoJSON Geometry collection representing sequence of coordinates used as input for route reconstruction and for calculating zero or more alternative routes to this reference route.\n - The provided sequence of supporting points is used as input for route reconstruction.\n - The alternative routes are calculated between the origin and destination points specified in the base path parameter locations.\n - If both _minDeviationDistance_ and _minDeviationTime_ are set to zero, then these origin and destination points are\n expected to be at (or very near) the beginning and end of the reference route, respectively.\n - Intermediate locations (_waypoints_) are not supported when using <_supportingPoints_>.\n - The reference route may contain traffic incidents of type _ROAD_CLOSURE_, which are\n ignored for the calculation of the reference route's travel time and traffic delay.", - "allOf": [ - { - "$ref": "#/definitions/GeoJSONGeometryCollection" - }, - { - "properties": { - "geometries": { - "type": "array", - "items": { - "$ref": "#/definitions/Point" - } - } - } - } - ] + "$ref": "../../../Common/preview/1.0/common.json#/definitions/GeoJsonGeometryCollection" }, "avoidVignette": { "description": "This is a list of 3-character, ISO 3166-1, alpha-3 country codes of countries in which all toll roads with vignettes are to be avoided, e.g. \"AUS,CHE\". Toll roads with vignettes in countries not in the list are unaffected. Note: It is an error to specify both **avoidVignette** and **allowVignette**.", @@ -1994,7 +1568,7 @@ }, "avoidAreas": { "description": "A GeoJSON MultiPolygon representing list of areas to avoid. Only rectangle polygons are supported. The maximum size of a rectangle is about 160x160 km. Maximum number of avoided areas is **10**. It cannot cross the 180th meridian. It must be between -80 and +80 degrees of latitude.", - "$ref": "#/definitions/MultiPolygon" + "$ref": "../../../Common/preview/1.0/common.json#/definitions/GeoJsonMultiPolygon" } } }, @@ -2114,7 +1688,7 @@ "type": "array", "readOnly": true, "items": { - "$ref": "#/definitions/Coordinate" + "$ref": "../../../Common/preview/1.0/common.json#/definitions/CoordinatesPair" } } } @@ -2308,7 +1882,7 @@ "readOnly": true }, "point": { - "$ref": "#/definitions/Coordinate" + "$ref": "../../../Common/preview/1.0/common.json#/definitions/CoordinatesPair" }, "pointIndex": { "description": "The index of the point in the list of polyline \"points\" corresponding to the point of the instruction.", @@ -2696,7 +2270,7 @@ } } }, - "RouteRangeResponse": { + "GetRouteRangeResponse": { "description": "This object is returned from a successful Route Reachable Range call", "type": "object", "properties": { @@ -2719,14 +2293,14 @@ "properties": { "center": { "description": "Center point of the reachable range", - "$ref": "#/definitions/Coordinate" + "$ref": "../../../Common/preview/1.0/common.json#/definitions/CoordinatesPair" }, "boundary": { "description": "Polygon boundary of the reachable range represented as a list of points.", "type": "array", "readOnly": true, "items": { - "$ref": "#/definitions/Coordinate" + "$ref": "../../../Common/preview/1.0/common.json#/definitions/CoordinatesPair" } } } @@ -2829,15 +2403,58 @@ } } }, - "RouteMatrixRequestBody": { + "PostRouteMatrixRequestBody": { "description": "An object with a matrix of coordinates.", "type": "object", "properties": { "origins": { - "$ref": "#/definitions/MultiPoint" + "$ref": "../../../Common/preview/1.0/common.json#/definitions/GeoJsonMultiPoint" }, "destinations": { - "$ref": "#/definitions/MultiPoint" + "$ref": "../../../Common/preview/1.0/common.json#/definitions/GeoJsonMultiPoint" + } + } + }, + "RouteDirectionsBatchResponse": { + "description": "This object is returned from a successful Route Directions Batch service call.", + "type": "object", + "allOf": [ + { + "$ref": "../../../Common/preview/1.0/common.json#/definitions/BatchResponse" + } + ], + "properties": { + "batchItems": { + "description": "Array containing the batch results.", + "type": "array", + "readOnly": true, + "items": { + "$ref": "#/definitions/RouteDirectionsBatchItem" + } + } + } + }, + "RouteDirectionsBatchItem": { + "description": "An item returned from Route Directions Batch service call.", + "type": "object", + "allOf": [ + { + "$ref": "../../../Common/preview/1.0/common.json#/definitions/BatchItem" + } + ], + "properties": { + "response": { + "description": "The result of the query. RouteDirectionsResponse if the query completed successfully, ErrorResponse otherwise.", + "type": "object", + "readOnly": true, + "allOf": [ + { + "$ref": "#/definitions/RouteDirectionsResponse" + }, + { + "$ref": "../../../../../../common-types/data-plane/v1/types.json#/definitions/ErrorResponse" + } + ] } } } diff --git a/specification/maps/data-plane/Microsoft.Maps/Search/preview/1.0/examples/GetSearchAddress.json b/specification/maps/data-plane/Microsoft.Maps/Search/preview/1.0/examples/GetSearchAddress.json index 25f04a4c64ec..8aa456d648f1 100644 --- a/specification/maps/data-plane/Microsoft.Maps/Search/preview/1.0/examples/GetSearchAddress.json +++ b/specification/maps/data-plane/Microsoft.Maps/Search/preview/1.0/examples/GetSearchAddress.json @@ -1,9 +1,9 @@ { "parameters": { + "geography": "us", "format": "json", "api-version": "1.0", - "query": "15127 NE 24th Street, Redmond, WA 98052", - "subscription-key": "[subscription-key]" + "query": "15127 NE 24th Street, Redmond, WA 98052" }, "responses": { "200": { @@ -64,51 +64,6 @@ } ] } - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive." - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found: the requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "An error occurred while processing the request. Please try again later." - } - } } } } diff --git a/specification/maps/data-plane/Microsoft.Maps/Search/preview/1.0/examples/GetSearchAddressBatch.json b/specification/maps/data-plane/Microsoft.Maps/Search/preview/1.0/examples/GetSearchAddressBatch.json new file mode 100644 index 000000000000..987e58519b62 --- /dev/null +++ b/specification/maps/data-plane/Microsoft.Maps/Search/preview/1.0/examples/GetSearchAddressBatch.json @@ -0,0 +1,291 @@ +{ + "parameters": { + "geography": "us", + "format": "11111111-2222-3333-4444-555555555555", + "api-version": "1.0" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "summary": { + "successfulRequests": 3, + "totalRequests": 3 + }, + "batchItems": [ + { + "statusCode": 200, + "response": { + "summary": { + "query": "400 broad st seattle wa 98109", + "queryType": "NON_NEAR", + "queryTime": 127, + "numResults": 3, + "offset": 0, + "totalResults": 9, + "fuzzyLevel": 1 + }, + "results": [ + { + "type": "Point Address", + "id": "US/PAD/p0/20843845", + "score": 11.966, + "address": { + "streetNumber": "400", + "streetName": "Broad Street", + "municipalitySubdivision": "Seattle, South Lake Union, Lower Queen Anne", + "municipality": "Seattle", + "countrySecondarySubdivision": "King", + "countryTertiarySubdivision": "Seattle", + "countrySubdivision": "WA", + "postalCode": "98109", + "countryCode": "US", + "country": "United States Of America", + "countryCodeISO3": "USA", + "freeformAddress": "400 Broad Street, Seattle, WA 98109", + "countrySubdivisionName": "Washington" + }, + "position": { + "lat": 47.62039, + "lon": -122.34928 + }, + "viewport": { + "topLeftPoint": { + "lat": 47.62129, + "lon": -122.35061 + }, + "btmRightPoint": { + "lat": 47.61949, + "lon": -122.34795 + } + }, + "entryPoints": [ + { + "type": "main", + "position": { + "lat": 47.61982, + "lon": -122.34886 + } + } + ] + }, + { + "type": "Street", + "id": "US/STR/p0/388442", + "score": 10.225, + "address": { + "streetName": "Broad Street", + "municipalitySubdivision": "Seattle, South Lake Union", + "municipality": "Seattle", + "countrySecondarySubdivision": "King", + "countryTertiarySubdivision": "Seattle", + "countrySubdivision": "WA", + "postalCode": "98109", + "extendedPostalCode": "981094612", + "countryCode": "US", + "country": "United States Of America", + "countryCodeISO3": "USA", + "freeformAddress": "Broad Street, Seattle, WA 98109", + "countrySubdivisionName": "Washington" + }, + "position": { + "lat": 47.62001, + "lon": -122.34843 + }, + "viewport": { + "topLeftPoint": { + "lat": 47.61965, + "lon": -122.34761 + }, + "btmRightPoint": { + "lat": 47.62066, + "lon": -122.349 + } + } + }, + { + "type": "Street", + "id": "US/STR/p0/388680", + "score": 10.225, + "address": { + "streetName": "Broad Street", + "municipalitySubdivision": "Seattle, Belltown", + "municipality": "Seattle", + "countrySecondarySubdivision": "King", + "countryTertiarySubdivision": "Seattle", + "countrySubdivision": "WA", + "postalCode": "98109,98121", + "extendedPostalCode": "981094991,981211117,981211237,981213206", + "countryCode": "US", + "country": "United States Of America", + "countryCodeISO3": "USA", + "freeformAddress": "Broad Street, Seattle, WA", + "countrySubdivisionName": "Washington" + }, + "position": { + "lat": 47.61691, + "lon": -122.35251 + }, + "viewport": { + "topLeftPoint": { + "lat": 47.61502, + "lon": -122.35041 + }, + "btmRightPoint": { + "lat": 47.61857, + "lon": -122.35484 + } + } + } + ] + } + }, + { + "statusCode": 200, + "response": { + "summary": { + "query": "one microsoft way redmond wa 98052", + "queryType": "NON_NEAR", + "queryTime": 169, + "numResults": 2, + "offset": 0, + "totalResults": 3292, + "fuzzyLevel": 2 + }, + "results": [ + { + "type": "Street", + "id": "US/STR/p0/1692663", + "score": 10.225, + "address": { + "streetName": "Microsoft Way", + "municipality": "Redmond", + "countrySecondarySubdivision": "King", + "countryTertiarySubdivision": "Seattle East", + "countrySubdivision": "WA", + "postalCode": "98052", + "extendedPostalCode": "980526399,980528300", + "countryCode": "US", + "country": "United States Of America", + "countryCodeISO3": "USA", + "freeformAddress": "Microsoft Way, Redmond, WA 98052", + "countrySubdivisionName": "Washington" + }, + "position": { + "lat": 47.63989, + "lon": -122.12509 + }, + "viewport": { + "topLeftPoint": { + "lat": 47.63748, + "lon": -122.12309 + }, + "btmRightPoint": { + "lat": 47.64223, + "lon": -122.13061 + } + } + }, + { + "type": "Cross Street", + "id": "US/XSTR/p1/4779971", + "score": 8.506, + "address": { + "streetName": "Microsoft Way & 157th Avenue Northeast, Microsoft Way", + "municipality": "Redmond", + "countrySecondarySubdivision": "King", + "countryTertiarySubdivision": "Seattle East", + "countrySubdivision": "WA", + "postalCode": "98052", + "countryCode": "US", + "country": "United States Of America", + "countryCodeISO3": "USA", + "freeformAddress": "Microsoft Way & 157th Avenue Northeast, Redmond, WA 98052", + "countrySubdivisionName": "Washington" + }, + "position": { + "lat": 47.63962, + "lon": -122.13061 + }, + "viewport": { + "topLeftPoint": { + "lat": 47.64052, + "lon": -122.13194 + }, + "btmRightPoint": { + "lat": 47.63872, + "lon": -122.12928 + } + } + } + ] + } + }, + { + "statusCode": 200, + "response": { + "summary": { + "query": "350 5th ave new york ny 10118", + "queryType": "NON_NEAR", + "queryTime": 233, + "numResults": 1, + "offset": 0, + "totalResults": 8032, + "fuzzyLevel": 1 + }, + "results": [ + { + "type": "Point Address", + "id": "US/PAD/p0/48052000", + "score": 14.334, + "address": { + "streetNumber": "350", + "streetName": "5th Avenue", + "municipalitySubdivision": "New York, Midtown South", + "municipality": "New York, Manhattan", + "countrySecondarySubdivision": "New York", + "countryTertiarySubdivision": "Manhattan", + "countrySubdivision": "NY", + "postalCode": "10118", + "extendedPostalCode": "1011800", + "countryCode": "US", + "country": "United States Of America", + "countryCodeISO3": "USA", + "freeformAddress": "350 5th Avenue, NYC, NY 10118", + "countrySubdivisionName": "New York" + }, + "position": { + "lat": 40.74817, + "lon": -73.985 + }, + "viewport": { + "topLeftPoint": { + "lat": 40.74907, + "lon": -73.98619 + }, + "btmRightPoint": { + "lat": 40.74727, + "lon": -73.98381 + } + }, + "entryPoints": [ + { + "type": "main", + "position": { + "lat": 40.74808, + "lon": -73.98482 + } + } + ] + } + ] + } + } + ] + } + }, + "202": { + "description": "Batch request was accepted but is still being processed. Please try again in some time." + } + } +} diff --git a/specification/maps/data-plane/Microsoft.Maps/Search/preview/1.0/examples/GetSearchAddressReverse.json b/specification/maps/data-plane/Microsoft.Maps/Search/preview/1.0/examples/GetSearchAddressReverse.json index 097316bfd647..ad5ad9cd0568 100644 --- a/specification/maps/data-plane/Microsoft.Maps/Search/preview/1.0/examples/GetSearchAddressReverse.json +++ b/specification/maps/data-plane/Microsoft.Maps/Search/preview/1.0/examples/GetSearchAddressReverse.json @@ -1,9 +1,9 @@ { "parameters": { + "geography": "us", "format": "json", "api-version": "1.0", - "query": "37.337,-121.89", - "subscription-key": "[subscription-key]" + "query": "37.337,-121.89" }, "responses": { "200": { @@ -35,51 +35,6 @@ } ] } - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive." - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found: the requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "An error occurred while processing the request. Please try again later." - } - } } } } diff --git a/specification/maps/data-plane/Microsoft.Maps/Search/preview/1.0/examples/GetSearchAddressReverseBatch.json b/specification/maps/data-plane/Microsoft.Maps/Search/preview/1.0/examples/GetSearchAddressReverseBatch.json new file mode 100644 index 000000000000..a9b1667e9418 --- /dev/null +++ b/specification/maps/data-plane/Microsoft.Maps/Search/preview/1.0/examples/GetSearchAddressReverseBatch.json @@ -0,0 +1,130 @@ +{ + "parameters": { + "geography": "us", + "format": "11111111-2222-3333-4444-555555555555", + "api-version": "1.0" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "summary": { + "successfulRequests": 3, + "totalRequests": 3 + }, + "batchItems": [ + { + "statusCode": 200, + "response": { + "summary": { + "queryTime": 8, + "numResults": 1 + }, + "addresses": [ + { + "address": { + "buildingNumber": "7", + "streetNumber": "7", + "routeNumbers": [], + "street": "Avenue Anatole France", + "streetName": "Avenue Anatole France", + "streetNameAndNumber": "7 Avenue Anatole France", + "countryCode": "FR", + "countrySubdivision": "Île-de-France", + "countrySecondarySubdivision": "Paris", + "municipality": "Paris", + "postalCode": "75007", + "municipalitySubdivision": "7ème Arrondissement", + "country": "France", + "countryCodeISO3": "FRA", + "freeformAddress": "7 Avenue Anatole France, Paris, 75007", + "boundingBox": { + "northEast": "48.858321,2.295167", + "southWest": "48.858136,2.295027", + "entity": "position" + } + }, + "position": "48.858231,2.295089" + } + ] + } + }, + { + "statusCode": 200, + "response": { + "summary": { + "queryTime": 8, + "numResults": 1 + }, + "addresses": [ + { + "address": { + "routeNumbers": [], + "countryCode": "US", + "countrySubdivision": "WA", + "countrySecondarySubdivision": "King", + "countryTertiarySubdivision": "Seattle East", + "municipality": "Redmond", + "postalCode": "98052", + "country": "United States", + "countryCodeISO3": "USA", + "freeformAddress": "Redmond, WA 98052", + "boundingBox": { + "northEast": "47.639765,-122.128661", + "southWest": "47.639502,-122.129456", + "entity": "position" + }, + "countrySubdivisionName": "Washington" + }, + "position": "47.639687,-122.128677" + } + ] + } + }, + { + "statusCode": 200, + "response": { + "summary": { + "queryTime": 19, + "numResults": 1 + }, + "addresses": [ + { + "address": { + "buildingNumber": "410", + "streetNumber": "410", + "routeNumbers": [], + "street": "Thomas Street", + "streetName": "Thomas Street", + "streetNameAndNumber": "410 Thomas Street", + "countryCode": "US", + "countrySubdivision": "WA", + "countrySecondarySubdivision": "King", + "countryTertiarySubdivision": "Seattle", + "municipality": "Seattle", + "postalCode": "98109", + "municipalitySubdivision": "Seattle, Lower Queen Anne", + "country": "United States", + "countryCodeISO3": "USA", + "freeformAddress": "410 Thomas Street, Seattle, WA 98109", + "boundingBox": { + "northEast": "47.620954,-122.347601", + "southWest": "47.620944,-122.348498", + "entity": "position" + }, + "extendedPostalCode": "981094621", + "countrySubdivisionName": "Washington" + }, + "position": "47.620945,-122.348175" + } + ] + } + } + ] + } + }, + "202": { + "description": "Batch request was accepted but is still being processed. Please try again in some time." + } + } +} diff --git a/specification/maps/data-plane/Microsoft.Maps/Search/preview/1.0/examples/GetSearchAddressReverseCrossStreet.json b/specification/maps/data-plane/Microsoft.Maps/Search/preview/1.0/examples/GetSearchAddressReverseCrossStreet.json index 762140c8db64..f37eed7e5ed5 100644 --- a/specification/maps/data-plane/Microsoft.Maps/Search/preview/1.0/examples/GetSearchAddressReverseCrossStreet.json +++ b/specification/maps/data-plane/Microsoft.Maps/Search/preview/1.0/examples/GetSearchAddressReverseCrossStreet.json @@ -1,9 +1,9 @@ { "parameters": { + "geography": "us", "format": "json", "api-version": "1.0", - "query": "37.337,-121.89", - "subscription-key": "[subscription-key]" + "query": "37.337,-121.89" }, "responses": { "200": { @@ -34,51 +34,6 @@ } ] } - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive." - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found: the requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "An error occurred while processing the request. Please try again later." - } - } } } } diff --git a/specification/maps/data-plane/Microsoft.Maps/Search/preview/1.0/examples/GetSearchAddressStructured.json b/specification/maps/data-plane/Microsoft.Maps/Search/preview/1.0/examples/GetSearchAddressStructured.json index 666e45fb7327..9c0e09610c0d 100644 --- a/specification/maps/data-plane/Microsoft.Maps/Search/preview/1.0/examples/GetSearchAddressStructured.json +++ b/specification/maps/data-plane/Microsoft.Maps/Search/preview/1.0/examples/GetSearchAddressStructured.json @@ -1,5 +1,6 @@ { "parameters": { + "geography": "us", "format": "json", "api-version": "1.0", "countryCode": "US", @@ -7,8 +8,7 @@ "streetNumber": "15127", "municipality": "Redmond", "countrySubdivision": "WA", - "postalCode": "98052", - "subscription-key": "[subscription-key]" + "postalCode": "98052" }, "responses": { "200": { @@ -74,51 +74,6 @@ } ] } - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive." - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found: the requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "An error occurred while processing the request. Please try again later." - } - } } } } diff --git a/specification/maps/data-plane/Microsoft.Maps/Search/preview/1.0/examples/GetSearchFuzzy.json b/specification/maps/data-plane/Microsoft.Maps/Search/preview/1.0/examples/GetSearchFuzzy.json index 1fbb11c89ff5..7c65cebe967e 100644 --- a/specification/maps/data-plane/Microsoft.Maps/Search/preview/1.0/examples/GetSearchFuzzy.json +++ b/specification/maps/data-plane/Microsoft.Maps/Search/preview/1.0/examples/GetSearchFuzzy.json @@ -1,9 +1,9 @@ { "parameters": { + "geography": "us", "format": "json", "api-version": "1.0", - "query": "seattle", - "subscription-key": "[subscription-key]" + "query": "seattle" }, "responses": { "200": { @@ -653,51 +653,6 @@ } ] } - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive." - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found: the requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "An error occurred while processing the request. Please try again later." - } - } } } } diff --git a/specification/maps/data-plane/Microsoft.Maps/Search/preview/1.0/examples/GetSearchFuzzyBatch.json b/specification/maps/data-plane/Microsoft.Maps/Search/preview/1.0/examples/GetSearchFuzzyBatch.json new file mode 100644 index 000000000000..91836d244612 --- /dev/null +++ b/specification/maps/data-plane/Microsoft.Maps/Search/preview/1.0/examples/GetSearchFuzzyBatch.json @@ -0,0 +1,1394 @@ +{ + "parameters": { + "geography": "us", + "format": "11111111-2222-3333-4444-555555555555", + "api-version": "1.0" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "batchItems": [ + { + "statusCode": 200, + "response": { + "summary": { + "query": "atm", + "queryType": "NON_NEAR", + "queryTime": 5, + "numResults": 5, + "offset": 0, + "totalResults": 262, + "fuzzyLevel": 1, + "geoBias": { + "lat": 47.639769, + "lon": -122.128362 + } + }, + "results": [ + { + "type": "POI", + "id": "US/POI/p0/3656546", + "score": 2.671, + "dist": 1336.1815386162032, + "info": "search:ta:840539002005905-US", + "poi": { + "name": "US Bank ATM-MONEYPASS", + "brands": [ + { + "name": "US Bank ATM" + } + ], + "categorySet": [ + { + "id": 7397 + } + ], + "classifications": [ + { + "code": "CASH_DISPENSER", + "names": [ + { + "nameLocale": "en-US", + "name": "cash dispenser" + } + ] + } + ] + }, + "address": { + "streetNumber": "14808", + "streetName": "NE 24th St", + "municipalitySubdivision": "Redmond", + "municipality": "Redmond", + "countrySecondarySubdivision": "King", + "countryTertiarySubdivision": "Seattle East", + "countrySubdivision": "WA", + "postalCode": "98052", + "countryCode": "US", + "country": "United States", + "countryCodeISO3": "USA", + "freeformAddress": "14808 NE 24th St, Redmond, WA 98052", + "localName": "Redmond", + "countrySubdivisionName": "Washington" + }, + "position": { + "lat": 47.63229, + "lon": -122.14232 + }, + "viewport": { + "topLeftPoint": { + "lat": 47.63319, + "lon": -122.14365 + }, + "btmRightPoint": { + "lat": 47.63139, + "lon": -122.14099 + } + }, + "entryPoints": [ + { + "type": "main", + "position": { + "lat": 47.63154, + "lon": -122.1423 + } + } + ] + }, + { + "type": "POI", + "id": "US/POI/p0/8673325", + "score": 2.671, + "dist": 1206.8488178244172, + "info": "search:ta:840539002022072-US", + "poi": { + "name": "US Bank ATM NATIONAL ASSOCIATION", + "brands": [ + { + "name": "US Bank ATM" + } + ], + "categorySet": [ + { + "id": 7397 + } + ], + "classifications": [ + { + "code": "CASH_DISPENSER", + "names": [ + { + "nameLocale": "en-US", + "name": "cash dispenser" + } + ] + } + ] + }, + "address": { + "streetNumber": "15000", + "streetName": "Northeast 24Th Street", + "municipalitySubdivision": "Redmond", + "municipality": "Redmond", + "countrySecondarySubdivision": "King", + "countryTertiarySubdivision": "Seattle East", + "countrySubdivision": "WA", + "postalCode": "98052", + "extendedPostalCode": "980525522", + "countryCode": "US", + "country": "United States", + "countryCodeISO3": "USA", + "freeformAddress": "15000 Northeast 24Th Street, Redmond, WA 98052", + "localName": "Redmond", + "countrySubdivisionName": "Washington" + }, + "position": { + "lat": 47.63265, + "lon": -122.14052 + }, + "viewport": { + "topLeftPoint": { + "lat": 47.63355, + "lon": -122.14185 + }, + "btmRightPoint": { + "lat": 47.63175, + "lon": -122.13919 + } + }, + "entryPoints": [ + { + "type": "minor", + "position": { + "lat": 47.63156, + "lon": -122.14056 + } + }, + { + "type": "minor", + "position": { + "lat": 47.63156, + "lon": -122.14058 + } + }, + { + "type": "main", + "position": { + "lat": 47.63156, + "lon": -122.14048 + } + }, + { + "type": "main", + "position": { + "lat": 47.6324, + "lon": -122.13938 + } + } + ] + }, + { + "type": "POI", + "id": "US/POI/p1/2736315", + "score": 2.671, + "dist": 864.75917765198585, + "info": "search:ta:840539002187855-US", + "poi": { + "name": "US Bank ATM-MONEYPASS", + "brands": [ + { + "name": "US Bank ATM" + } + ], + "categorySet": [ + { + "id": 7397 + } + ], + "classifications": [ + { + "code": "CASH_DISPENSER", + "names": [ + { + "nameLocale": "en-US", + "name": "cash dispenser" + } + ] + } + ] + }, + "address": { + "streetNumber": "15521", + "streetName": "Bel Red Rd", + "municipalitySubdivision": "Redmond, Northeast Bellevue, Bellevue", + "municipality": "Redmond, Bellevue", + "countrySecondarySubdivision": "King", + "countryTertiarySubdivision": "Seattle East", + "countrySubdivision": "WA", + "postalCode": "98052", + "extendedPostalCode": "980525501", + "countryCode": "US", + "country": "United States", + "countryCodeISO3": "USA", + "freeformAddress": "15521 Bel Red Rd, Redmond, WA 98052", + "localName": "Redmond", + "countrySubdivisionName": "Washington" + }, + "position": { + "lat": 47.63259, + "lon": -122.1328 + }, + "viewport": { + "topLeftPoint": { + "lat": 47.63349, + "lon": -122.13413 + }, + "btmRightPoint": { + "lat": 47.63169, + "lon": -122.13147 + } + }, + "entryPoints": [ + { + "type": "main", + "position": { + "lat": 47.63255, + "lon": -122.13275 + } + } + ] + }, + { + "type": "POI", + "id": "US/POI/p0/3656412", + "score": 2.67, + "dist": 2140.1985385809412, + "info": "search:ta:840539001998867-US", + "poi": { + "name": "US Bank ATM NATIONAL ASSOCIATION", + "brands": [ + { + "name": "US Bank ATM" + } + ], + "categorySet": [ + { + "id": 7397 + } + ], + "classifications": [ + { + "code": "CASH_DISPENSER", + "names": [ + { + "nameLocale": "en-US", + "name": "cash dispenser" + } + ] + } + ] + }, + "address": { + "streetNumber": "1128", + "streetName": "156th Ave NE", + "municipalitySubdivision": "Crossroads, Bellevue", + "municipality": "Bellevue", + "countrySecondarySubdivision": "King", + "countryTertiarySubdivision": "Seattle East", + "countrySubdivision": "WA", + "postalCode": "98007", + "countryCode": "US", + "country": "United States", + "countryCodeISO3": "USA", + "freeformAddress": "1128 156th Ave NE, Bellevue, WA 98007", + "localName": "Bellevue", + "countrySubdivisionName": "Washington" + }, + "position": { + "lat": 47.62069, + "lon": -122.13213 + }, + "viewport": { + "topLeftPoint": { + "lat": 47.62159, + "lon": -122.13346 + }, + "btmRightPoint": { + "lat": 47.61979, + "lon": -122.1308 + } + }, + "entryPoints": [ + { + "type": "main", + "position": { + "lat": 47.62069, + "lon": -122.13236 + } + } + ] + }, + { + "type": "POI", + "id": "US/POI/p1/2736876", + "score": 2.67, + "dist": 2140.1985385809412, + "info": "search:ta:840539001396789-US", + "poi": { + "name": "US Bank ATM", + "phone": "+(1)-(800)-8722657", + "brands": [ + { + "name": "US Bank ATM" + } + ], + "categorySet": [ + { + "id": 7397 + } + ], + "url": "www.usbank.com", + "classifications": [ + { + "code": "CASH_DISPENSER", + "names": [ + { + "nameLocale": "en-US", + "name": "cash dispenser" + } + ] + } + ] + }, + "address": { + "streetNumber": "1128", + "streetName": "156th Ave NE", + "municipalitySubdivision": "Crossroads, Bellevue", + "municipality": "Bellevue", + "countrySecondarySubdivision": "King", + "countryTertiarySubdivision": "Seattle East", + "countrySubdivision": "WA", + "postalCode": "98007", + "countryCode": "US", + "country": "United States", + "countryCodeISO3": "USA", + "freeformAddress": "1128 156th Ave NE, Bellevue, WA 98007", + "localName": "Bellevue", + "countrySubdivisionName": "Washington" + }, + "position": { + "lat": 47.62069, + "lon": -122.13213 + }, + "viewport": { + "topLeftPoint": { + "lat": 47.62159, + "lon": -122.13346 + }, + "btmRightPoint": { + "lat": 47.61979, + "lon": -122.1308 + } + }, + "entryPoints": [ + { + "type": "main", + "position": { + "lat": 47.62069, + "lon": -122.13236 + } + } + ] + } + ] + } + }, + { + "statusCode": 200, + "response": { + "summary": { + "query": "statue of liberty", + "queryType": "NON_NEAR", + "queryTime": 37, + "numResults": 2, + "offset": 0, + "totalResults": 18, + "fuzzyLevel": 1 + }, + "results": [ + { + "type": "POI", + "id": "US/POI/p0/9189660", + "score": 6.942, + "info": "search:ta:840369001174316-US", + "poi": { + "name": "Statue of Liberty", + "categorySet": [ + { + "id": 7376003 + } + ], + "classifications": [ + { + "code": "IMPORTANT_TOURIST_ATTRACTION", + "names": [ + { + "nameLocale": "en-US", + "name": "monument" + }, + { + "nameLocale": "en-US", + "name": "important tourist attraction" + } + ] + } + ] + }, + "address": { + "municipalitySubdivision": "New York", + "municipality": "New York", + "countrySecondarySubdivision": "New York", + "countryTertiarySubdivision": "Manhattan", + "countrySubdivision": "NY", + "postalCode": "10004", + "countryCode": "US", + "country": "United States", + "countryCodeISO3": "USA", + "freeformAddress": "New York, NY 10004", + "localName": "New York", + "countrySubdivisionName": "New York" + }, + "position": { + "lat": 40.68955, + "lon": -74.04483 + }, + "viewport": { + "topLeftPoint": { + "lat": 40.69045, + "lon": -74.04602 + }, + "btmRightPoint": { + "lat": 40.68865, + "lon": -74.04364 + } + }, + "entryPoints": [ + { + "type": "main", + "position": { + "lat": 40.69001, + "lon": -74.04683 + } + } + ] + }, + { + "type": "POI", + "id": "US/POI/p1/3264566", + "score": 6.942, + "info": "search:ta:840019000670588-US", + "poi": { + "name": "Statue of Liberty", + "phone": "+(1)-(205)-9700251", + "categorySet": [ + { + "id": 7376003 + } + ], + "url": "www.1bsa.org", + "classifications": [ + { + "code": "IMPORTANT_TOURIST_ATTRACTION", + "names": [ + { + "nameLocale": "en-US", + "name": "important tourist attraction" + } + ] + } + ] + }, + "address": { + "streetNumber": "516", + "streetName": "Liberty Pkwy", + "municipalitySubdivision": "Vestavia Hills", + "municipality": "Vestavia Hills, Birmingham", + "countrySecondarySubdivision": "Jefferson", + "countryTertiarySubdivision": "Leeds", + "countrySubdivision": "AL", + "postalCode": "35242", + "countryCode": "US", + "country": "United States", + "countryCodeISO3": "USA", + "freeformAddress": "516 Liberty Pkwy, Vestavia Hills, AL 35242", + "localName": "Vestavia Hills", + "countrySubdivisionName": "Alabama" + }, + "position": { + "lat": 33.48234, + "lon": -86.70719 + }, + "viewport": { + "topLeftPoint": { + "lat": 33.48324, + "lon": -86.70827 + }, + "btmRightPoint": { + "lat": 33.48144, + "lon": -86.70611 + } + }, + "entryPoints": [ + { + "type": "main", + "position": { + "lat": 33.48129, + "lon": -86.7065 + } + } + ] + } + ] + } + }, + { + "statusCode": 200, + "response": { + "summary": { + "query": "starbucks", + "queryType": "NON_NEAR", + "queryTime": 35, + "numResults": 10, + "offset": 0, + "totalResults": 17, + "fuzzyLevel": 1, + "geoBias": { + "lat": 47.639769, + "lon": -122.128362 + } + }, + "results": [ + { + "type": "POI", + "id": "US/POI/p0/153678", + "score": 2.671, + "dist": 1206.8488178244172, + "info": "search:ta:840531000006554-US", + "poi": { + "name": "Starbucks", + "phone": "+(1)-(425)-8695816", + "brands": [ + { + "name": "Starbucks" + } + ], + "categorySet": [ + { + "id": 9376006 + } + ], + "url": "www.starbucks.com/site-selector", + "classifications": [ + { + "code": "CAFE_PUB", + "names": [ + { + "nameLocale": "en-US", + "name": "coffee shop" + }, + { + "nameLocale": "en-US", + "name": "café/pub" + } + ] + } + ] + }, + "address": { + "streetNumber": "15000", + "streetName": "NE 24th St", + "municipalitySubdivision": "Redmond", + "municipality": "Redmond", + "countrySecondarySubdivision": "King", + "countryTertiarySubdivision": "Seattle East", + "countrySubdivision": "WA", + "postalCode": "98052", + "extendedPostalCode": "980525522", + "countryCode": "US", + "country": "United States", + "countryCodeISO3": "USA", + "freeformAddress": "15000 NE 24th St, Redmond, WA 98052", + "localName": "Redmond", + "countrySubdivisionName": "Washington" + }, + "position": { + "lat": 47.63265, + "lon": -122.14052 + }, + "viewport": { + "topLeftPoint": { + "lat": 47.63355, + "lon": -122.14185 + }, + "btmRightPoint": { + "lat": 47.63175, + "lon": -122.13919 + } + }, + "entryPoints": [ + { + "type": "minor", + "position": { + "lat": 47.63156, + "lon": -122.14056 + } + }, + { + "type": "minor", + "position": { + "lat": 47.63156, + "lon": -122.14058 + } + }, + { + "type": "main", + "position": { + "lat": 47.63156, + "lon": -122.14048 + } + }, + { + "type": "main", + "position": { + "lat": 47.6324, + "lon": -122.13938 + } + } + ] + }, + { + "type": "POI", + "id": "US/POI/p0/152316", + "score": 2.67, + "dist": 2315.294397491255, + "info": "search:ta:840539000484552-US", + "poi": { + "name": "Starbucks", + "phone": "+(1)-(425)-6436471", + "brands": [ + { + "name": "Starbucks" + } + ], + "categorySet": [ + { + "id": 9376006 + } + ], + "url": "www.starbucks.com/store/15097", + "classifications": [ + { + "code": "CAFE_PUB", + "names": [ + { + "nameLocale": "en-US", + "name": "coffee shop" + }, + { + "nameLocale": "en-US", + "name": "café/pub" + } + ] + } + ] + }, + "address": { + "streetNumber": "15600", + "streetName": "NE 8th St", + "municipalitySubdivision": "Crossroads, Bellevue", + "municipality": "Bellevue", + "countrySecondarySubdivision": "King", + "countryTertiarySubdivision": "Seattle East", + "countrySubdivision": "WA", + "postalCode": "98008", + "countryCode": "US", + "country": "United States", + "countryCodeISO3": "USA", + "freeformAddress": "15600 NE 8th St, Bellevue, WA 98008", + "localName": "Bellevue", + "countrySubdivisionName": "Washington" + }, + "position": { + "lat": 47.61896, + "lon": -122.12945 + }, + "viewport": { + "topLeftPoint": { + "lat": 47.61986, + "lon": -122.13078 + }, + "btmRightPoint": { + "lat": 47.61806, + "lon": -122.12812 + } + }, + "entryPoints": [ + { + "type": "main", + "position": { + "lat": 47.619, + "lon": -122.12945 + } + } + ] + }, + { + "type": "POI", + "id": "US/POI/p1/167545", + "score": 2.67, + "dist": 1979.2222952267998, + "info": "search:ta:840539001950429-US", + "poi": { + "name": "Starbucks", + "phone": "+(1)-(425)-7470690", + "brands": [ + { + "name": "Starbucks" + } + ], + "categorySet": [ + { + "id": 9376006 + } + ], + "url": "www.starbucks.com/site-selector", + "classifications": [ + { + "code": "CAFE_PUB", + "names": [ + { + "nameLocale": "en-US", + "name": "coffee shop" + }, + { + "nameLocale": "en-US", + "name": "café/pub" + } + ] + } + ] + }, + "address": { + "streetNumber": "1350", + "streetName": "156th Ave NE", + "municipalitySubdivision": "Crossroads, Bellevue", + "municipality": "Bellevue", + "countrySecondarySubdivision": "King", + "countryTertiarySubdivision": "Seattle East", + "countrySubdivision": "WA", + "postalCode": "98007", + "countryCode": "US", + "country": "United States", + "countryCodeISO3": "USA", + "freeformAddress": "1350 156th Ave NE, Bellevue, WA 98007", + "localName": "Bellevue", + "countrySubdivisionName": "Washington" + }, + "position": { + "lat": 47.62212, + "lon": -122.13179 + }, + "viewport": { + "topLeftPoint": { + "lat": 47.62302, + "lon": -122.13312 + }, + "btmRightPoint": { + "lat": 47.62122, + "lon": -122.13046 + } + }, + "entryPoints": [ + { + "type": "main", + "position": { + "lat": 47.62213, + "lon": -122.13236 + } + } + ] + }, + { + "type": "POI", + "id": "US/POI/p1/168519", + "score": 2.67, + "dist": 2490.3337046455963, + "info": "search:ta:840539001015090-US", + "poi": { + "name": "Starbucks", + "phone": "+(1)-(425)-4556500", + "brands": [ + { + "name": "Starbucks" + } + ], + "categorySet": [ + { + "id": 9376006 + } + ], + "url": "https://www.starbucks.com/store-locator/store/15901", + "classifications": [ + { + "code": "CAFE_PUB", + "names": [ + { + "nameLocale": "en-US", + "name": "coffee shop" + }, + { + "nameLocale": "en-US", + "name": "café/pub" + } + ] + } + ] + }, + "address": { + "streetNumber": "1645", + "streetName": "140th Ave NE", + "municipalitySubdivision": "Crossroads, Bellevue", + "municipality": "Bellevue", + "countrySecondarySubdivision": "King", + "countryTertiarySubdivision": "Seattle East", + "countrySubdivision": "WA", + "postalCode": "98005", + "countryCode": "US", + "country": "United States", + "countryCodeISO3": "USA", + "freeformAddress": "1645 140th Ave NE, Bellevue, WA 98005", + "localName": "Bellevue", + "countrySubdivisionName": "Washington" + }, + "position": { + "lat": 47.62626, + "lon": -122.15487 + }, + "viewport": { + "topLeftPoint": { + "lat": 47.62716, + "lon": -122.1562 + }, + "btmRightPoint": { + "lat": 47.62536, + "lon": -122.15354 + } + }, + "entryPoints": [ + { + "type": "main", + "position": { + "lat": 47.62645, + "lon": -122.15446 + } + }, + { + "type": "minor", + "position": { + "lat": 47.62579, + "lon": -122.15377 + } + } + ] + }, + { + "type": "POI", + "id": "US/POI/p0/152428", + "score": 2.668, + "dist": 3529.7080738812224, + "info": "search:ta:840539001033722-US", + "poi": { + "name": "Starbucks", + "phone": "+(1)-(425)-3789496", + "brands": [ + { + "name": "Starbucks" + } + ], + "categorySet": [ + { + "id": 9376006 + } + ], + "url": "www.starbucks.com/site-selector", + "classifications": [ + { + "code": "CAFE_PUB", + "names": [ + { + "nameLocale": "en-US", + "name": "coffee shop" + }, + { + "nameLocale": "en-US", + "name": "café/pub" + } + ] + } + ] + }, + "address": { + "streetNumber": "180", + "streetName": "148th Ave SE", + "municipalitySubdivision": "West Lake Hills, Bellevue", + "municipality": "Bellevue", + "countrySecondarySubdivision": "King", + "countryTertiarySubdivision": "Seattle East", + "countrySubdivision": "WA", + "postalCode": "98007", + "countryCode": "US", + "country": "United States", + "countryCodeISO3": "USA", + "freeformAddress": "180 148th Ave SE, Bellevue, WA 98007", + "localName": "Bellevue", + "countrySubdivisionName": "Washington" + }, + "position": { + "lat": 47.60901, + "lon": -122.14 + }, + "viewport": { + "topLeftPoint": { + "lat": 47.60991, + "lon": -122.14133 + }, + "btmRightPoint": { + "lat": 47.60811, + "lon": -122.13867 + } + }, + "entryPoints": [ + { + "type": "main", + "position": { + "lat": 47.60901, + "lon": -122.14008 + } + } + ] + }, + { + "type": "POI", + "id": "US/POI/p1/167147", + "score": 2.668, + "dist": 3479.393294615887, + "info": "search:ta:840539000326896-US", + "poi": { + "name": "Starbucks", + "phone": "+(1)-(425)-8619198", + "brands": [ + { + "name": "Starbucks" + } + ], + "categorySet": [ + { + "id": 9376006 + } + ], + "url": "www.starbucks.com/site-selector", + "classifications": [ + { + "code": "CAFE_PUB", + "names": [ + { + "nameLocale": "en-US", + "name": "coffee shop" + }, + { + "nameLocale": "en-US", + "name": "café/pub" + } + ] + } + ] + }, + "address": { + "streetNumber": "7425", + "streetName": "166th Ave NE", + "municipalitySubdivision": "Redmond", + "municipality": "Redmond", + "countrySecondarySubdivision": "King", + "countryTertiarySubdivision": "Seattle East", + "countrySubdivision": "WA", + "postalCode": "98052", + "extendedPostalCode": "980526288", + "countryCode": "US", + "country": "United States", + "countryCodeISO3": "USA", + "freeformAddress": "7425 166th Ave NE, Redmond, WA 98052", + "localName": "Redmond", + "countrySubdivisionName": "Washington" + }, + "position": { + "lat": 47.67055, + "lon": -122.12001 + }, + "viewport": { + "topLeftPoint": { + "lat": 47.67145, + "lon": -122.12135 + }, + "btmRightPoint": { + "lat": 47.66965, + "lon": -122.11867 + } + }, + "entryPoints": [ + { + "type": "main", + "position": { + "lat": 47.67069, + "lon": -122.11889 + } + } + ] + }, + { + "type": "POI", + "id": "US/POI/p0/153695", + "score": 2.667, + "dist": 3622.4410746187291, + "info": "search:ta:840531000006551-US", + "poi": { + "name": "Starbucks", + "phone": "+(1)-(425)-8822881", + "brands": [ + { + "name": "Starbucks" + } + ], + "categorySet": [ + { + "id": 9376006 + } + ], + "url": "www.starbucks.com/store/15022", + "classifications": [ + { + "code": "CAFE_PUB", + "names": [ + { + "nameLocale": "en-US", + "name": "coffee shop" + }, + { + "nameLocale": "en-US", + "name": "café/pub" + } + ] + } + ] + }, + "address": { + "streetNumber": "7625", + "streetName": "170th Ave NE", + "municipalitySubdivision": "Redmond", + "municipality": "Redmond", + "countrySecondarySubdivision": "King", + "countryTertiarySubdivision": "Seattle East", + "countrySubdivision": "WA", + "postalCode": "98052", + "extendedPostalCode": "980520910", + "countryCode": "US", + "country": "United States", + "countryCodeISO3": "USA", + "freeformAddress": "7625 170th Ave NE, Redmond, WA 98052", + "localName": "Redmond", + "countrySubdivisionName": "Washington" + }, + "position": { + "lat": 47.67086, + "lon": -122.11392 + }, + "viewport": { + "topLeftPoint": { + "lat": 47.67176, + "lon": -122.11526 + }, + "btmRightPoint": { + "lat": 47.66996, + "lon": -122.11258 + } + }, + "entryPoints": [ + { + "type": "main", + "position": { + "lat": 47.67073, + "lon": -122.1135 + } + } + ] + }, + { + "type": "POI", + "id": "US/POI/p1/167420", + "score": 2.667, + "dist": 3818.293513029088, + "info": "search:ta:840539000640782-US", + "poi": { + "name": "Starbucks", + "phone": "+(1)-(425)-8853323", + "brands": [ + { + "name": "Starbucks" + } + ], + "categorySet": [ + { + "id": 9376006 + } + ], + "url": "www.starbucks.com/site-selector", + "classifications": [ + { + "code": "CAFE_PUB", + "names": [ + { + "nameLocale": "en-US", + "name": "coffee shop" + }, + { + "nameLocale": "en-US", + "name": "café/pub" + } + ] + } + ] + }, + "address": { + "streetNumber": "17246", + "streetName": "Redmond Way", + "municipalitySubdivision": "Redmond", + "municipality": "Redmond", + "countrySecondarySubdivision": "King", + "countryTertiarySubdivision": "Seattle East", + "countrySubdivision": "WA", + "postalCode": "98052", + "extendedPostalCode": "980524403", + "countryCode": "US", + "country": "United States", + "countryCodeISO3": "USA", + "freeformAddress": "17246 Redmond Way, Redmond, WA 98052", + "localName": "Redmond", + "countrySubdivisionName": "Washington" + }, + "position": { + "lat": 47.67174, + "lon": -122.10976 + }, + "viewport": { + "topLeftPoint": { + "lat": 47.67264, + "lon": -122.1111 + }, + "btmRightPoint": { + "lat": 47.67084, + "lon": -122.10842 + } + }, + "entryPoints": [ + { + "type": "main", + "position": { + "lat": 47.6706, + "lon": -122.11026 + } + } + ] + }, + { + "type": "POI", + "id": "US/POI/p0/153686", + "score": 2.666, + "dist": 4009.9222051470738, + "info": "search:ta:840531000006548-US", + "poi": { + "name": "Starbucks", + "phone": "+(1)-(425)-8859590", + "brands": [ + { + "name": "Starbucks" + } + ], + "categorySet": [ + { + "id": 9376006 + } + ], + "url": "www.starbucks.com/site-selector", + "classifications": [ + { + "code": "CAFE_PUB", + "names": [ + { + "nameLocale": "en-US", + "name": "coffee shop" + }, + { + "nameLocale": "en-US", + "name": "café/pub" + } + ] + } + ] + }, + "address": { + "streetNumber": "15738", + "streetName": "Redmond Way Pad 3 Redmond Center", + "municipalitySubdivision": "Redmond", + "municipality": "Redmond", + "countrySecondarySubdivision": "King", + "countryTertiarySubdivision": "Seattle East", + "countrySubdivision": "WA", + "postalCode": "98052", + "extendedPostalCode": "980523873", + "countryCode": "US", + "country": "United States", + "countryCodeISO3": "USA", + "freeformAddress": "15738 Redmond Way Pad 3 Redmond Center, Redmond, WA 98052", + "localName": "Redmond", + "countrySubdivisionName": "Washington" + }, + "position": { + "lat": 47.67583, + "lon": -122.12877 + }, + "viewport": { + "topLeftPoint": { + "lat": 47.67673, + "lon": -122.13011 + }, + "btmRightPoint": { + "lat": 47.67493, + "lon": -122.12743 + } + }, + "entryPoints": [ + { + "type": "minor", + "position": { + "lat": 47.67456, + "lon": -122.12887 + } + }, + { + "type": "main", + "position": { + "lat": 47.67668, + "lon": -122.12829 + } + } + ] + }, + { + "type": "POI", + "id": "US/POI/p1/168511", + "score": 2.666, + "dist": 3987.80992387863, + "info": "search:ta:840531000006669-US", + "poi": { + "name": "Starbucks", + "phone": "+(1)-(425)-8818265", + "brands": [ + { + "name": "Starbucks" + } + ], + "categorySet": [ + { + "id": 9376006 + } + ], + "url": "www.starbucks.com/site-selector", + "classifications": [ + { + "code": "CAFE_PUB", + "names": [ + { + "nameLocale": "en-US", + "name": "coffee shop" + }, + { + "nameLocale": "en-US", + "name": "café/pub" + } + ] + } + ] + }, + "address": { + "streetNumber": "6617", + "streetName": "132Nd Ave Ne Bridle Trails Shopping Center", + "municipalitySubdivision": "Kirkland, Bridle Trails", + "municipality": "Kirkland", + "countrySecondarySubdivision": "King", + "countryTertiarySubdivision": "Seattle East", + "countrySubdivision": "WA", + "postalCode": "98033", + "extendedPostalCode": "980338234", + "countryCode": "US", + "country": "United States", + "countryCodeISO3": "USA", + "freeformAddress": "6617 132Nd Ave Ne Bridle Trails Shopping Center, Kirkland, WA 98033", + "localName": "Kirkland", + "countrySubdivisionName": "Washington" + }, + "position": { + "lat": 47.66514, + "lon": -122.16599 + }, + "viewport": { + "topLeftPoint": { + "lat": 47.66604, + "lon": -122.16733 + }, + "btmRightPoint": { + "lat": 47.66424, + "lon": -122.16465 + } + }, + "entryPoints": [ + { + "type": "main", + "position": { + "lat": 47.666, + "lon": -122.16669 + } + }, + { + "type": "minor", + "position": { + "lat": 47.66553, + "lon": -122.16405 + } + } + ] + } + ] + } + } + ], + "summary": { + "successfulRequests": 3, + "totalRequests": 3 + } + } + }, + "202": { + "description": "Batch request was accepted but is still being processed. Please try again in some time." + } + } +} diff --git a/specification/maps/data-plane/Microsoft.Maps/Search/preview/1.0/examples/GetSearchNearby.json b/specification/maps/data-plane/Microsoft.Maps/Search/preview/1.0/examples/GetSearchNearby.json index ceae81b5d908..c8954152fcc2 100644 --- a/specification/maps/data-plane/Microsoft.Maps/Search/preview/1.0/examples/GetSearchNearby.json +++ b/specification/maps/data-plane/Microsoft.Maps/Search/preview/1.0/examples/GetSearchNearby.json @@ -1,12 +1,12 @@ { "parameters": { + "geography": "us", "format": "json", "api-version": "1.0", "lat": 40.706270, "lon": -74.011454, "radius": 8046, - "limit": 10, - "subscription-key": "[subscription-key]" + "limit": 10 }, "responses": { "200": { @@ -713,51 +713,6 @@ } ] } - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive." - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found: the requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "An error occurred while processing the request. Please try again later." - } - } } } } diff --git a/specification/maps/data-plane/Microsoft.Maps/Search/preview/1.0/examples/GetSearchPOI.json b/specification/maps/data-plane/Microsoft.Maps/Search/preview/1.0/examples/GetSearchPOI.json index 308853a33a68..155e4b217e23 100644 --- a/specification/maps/data-plane/Microsoft.Maps/Search/preview/1.0/examples/GetSearchPOI.json +++ b/specification/maps/data-plane/Microsoft.Maps/Search/preview/1.0/examples/GetSearchPOI.json @@ -1,9 +1,9 @@ { "parameters": { + "geography": "us", "format": "json", "api-version": "1.0", "query": "juice bars", - "subscription-key": "[subscription-key]", "limit": 5, "lat": 47.606038, "lon": -122.333345, @@ -407,51 +407,6 @@ } ] } - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive." - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found: the requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "An error occurred while processing the request. Please try again later." - } - } } } } diff --git a/specification/maps/data-plane/Microsoft.Maps/Search/preview/1.0/examples/GetSearchPOICategory.json b/specification/maps/data-plane/Microsoft.Maps/Search/preview/1.0/examples/GetSearchPOICategory.json index a54650c2539c..bde6d68ce490 100644 --- a/specification/maps/data-plane/Microsoft.Maps/Search/preview/1.0/examples/GetSearchPOICategory.json +++ b/specification/maps/data-plane/Microsoft.Maps/Search/preview/1.0/examples/GetSearchPOICategory.json @@ -1,9 +1,9 @@ { "parameters": { + "geography": "us", "format": "json", "api-version": "1.0", "query": "atm", - "subscription-key": "[subscription-key]", "limit": 3, "lat": 40.758953, "lon": -73.985263, @@ -225,51 +225,6 @@ } ] } - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive." - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found: the requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "An error occurred while processing the request. Please try again later." - } - } } } } diff --git a/specification/maps/data-plane/Microsoft.Maps/Search/preview/1.0/examples/GetPOICategoryTree.json b/specification/maps/data-plane/Microsoft.Maps/Search/preview/1.0/examples/GetSearchPOICategoryTree.json similarity index 78% rename from specification/maps/data-plane/Microsoft.Maps/Search/preview/1.0/examples/GetPOICategoryTree.json rename to specification/maps/data-plane/Microsoft.Maps/Search/preview/1.0/examples/GetSearchPOICategoryTree.json index 1a1114c83bc7..df132151b25d 100644 --- a/specification/maps/data-plane/Microsoft.Maps/Search/preview/1.0/examples/GetPOICategoryTree.json +++ b/specification/maps/data-plane/Microsoft.Maps/Search/preview/1.0/examples/GetSearchPOICategoryTree.json @@ -1,8 +1,8 @@ { "parameters": { + "geography": "us", "format": "json", - "api-version": "1.0", - "subscription-key": "[subscription-key]" + "api-version": "1.0" }, "responses": { "200": { @@ -202,51 +202,6 @@ } ] } - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive." - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found: the requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "An error occurred while processing the request. Please try again later." - } - } } } } diff --git a/specification/maps/data-plane/Microsoft.Maps/Search/preview/1.0/examples/GetSearchPolygon.json b/specification/maps/data-plane/Microsoft.Maps/Search/preview/1.0/examples/GetSearchPolygon.json index 46186f7c933a..53f4bb118953 100644 --- a/specification/maps/data-plane/Microsoft.Maps/Search/preview/1.0/examples/GetSearchPolygon.json +++ b/specification/maps/data-plane/Microsoft.Maps/Search/preview/1.0/examples/GetSearchPolygon.json @@ -1,9 +1,9 @@ { "parameters": { + "geography": "us", "format": "json", "api-version": "1.0", - "geometries": "[geometry-ids]", - "subscription-key": "[subscription-key]" + "geometries": "[geometry-ids]" }, "responses": { "200": { @@ -75,51 +75,6 @@ } ] } - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive." - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found: the requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "An error occurred while processing the request. Please try again later." - } - } } } } diff --git a/specification/maps/data-plane/Microsoft.Maps/Search/preview/1.0/examples/PostSearchAddressBatch.json b/specification/maps/data-plane/Microsoft.Maps/Search/preview/1.0/examples/PostSearchAddressBatch.json index 6db886460bff..b1d135830c82 100644 --- a/specification/maps/data-plane/Microsoft.Maps/Search/preview/1.0/examples/PostSearchAddressBatch.json +++ b/specification/maps/data-plane/Microsoft.Maps/Search/preview/1.0/examples/PostSearchAddressBatch.json @@ -1,8 +1,8 @@ { "parameters": { + "geography": "us", "format": "json", "api-version": "1.0", - "subscription-key": "[subscription-key]", "searchAddressBatchRequestBody": { "batchItems": [ { @@ -18,334 +18,10 @@ } }, "responses": { - "200": { - "headers": {}, - "body": { - "summary": { - "successfulRequests": 3, - "totalRequests": 3 - }, - "batchItems": [ - { - "statusCode": 200, - "response": { - "summary": { - "query": "400 broad st seattle wa 98109", - "queryType": "NON_NEAR", - "queryTime": 127, - "numResults": 3, - "offset": 0, - "totalResults": 9, - "fuzzyLevel": 1 - }, - "results": [ - { - "type": "Point Address", - "id": "US/PAD/p0/20843845", - "score": 11.966, - "address": { - "streetNumber": "400", - "streetName": "Broad Street", - "municipalitySubdivision": "Seattle, South Lake Union, Lower Queen Anne", - "municipality": "Seattle", - "countrySecondarySubdivision": "King", - "countryTertiarySubdivision": "Seattle", - "countrySubdivision": "WA", - "postalCode": "98109", - "countryCode": "US", - "country": "United States Of America", - "countryCodeISO3": "USA", - "freeformAddress": "400 Broad Street, Seattle, WA 98109", - "countrySubdivisionName": "Washington" - }, - "position": { - "lat": 47.62039, - "lon": -122.34928 - }, - "viewport": { - "topLeftPoint": { - "lat": 47.62129, - "lon": -122.35061 - }, - "btmRightPoint": { - "lat": 47.61949, - "lon": -122.34795 - } - }, - "entryPoints": [ - { - "type": "main", - "position": { - "lat": 47.61982, - "lon": -122.34886 - } - } - ] - }, - { - "type": "Street", - "id": "US/STR/p0/388442", - "score": 10.225, - "address": { - "streetName": "Broad Street", - "municipalitySubdivision": "Seattle, South Lake Union", - "municipality": "Seattle", - "countrySecondarySubdivision": "King", - "countryTertiarySubdivision": "Seattle", - "countrySubdivision": "WA", - "postalCode": "98109", - "extendedPostalCode": "981094612", - "countryCode": "US", - "country": "United States Of America", - "countryCodeISO3": "USA", - "freeformAddress": "Broad Street, Seattle, WA 98109", - "countrySubdivisionName": "Washington" - }, - "position": { - "lat": 47.62001, - "lon": -122.34843 - }, - "viewport": { - "topLeftPoint": { - "lat": 47.61965, - "lon": -122.34761 - }, - "btmRightPoint": { - "lat": 47.62066, - "lon": -122.349 - } - } - }, - { - "type": "Street", - "id": "US/STR/p0/388680", - "score": 10.225, - "address": { - "streetName": "Broad Street", - "municipalitySubdivision": "Seattle, Belltown", - "municipality": "Seattle", - "countrySecondarySubdivision": "King", - "countryTertiarySubdivision": "Seattle", - "countrySubdivision": "WA", - "postalCode": "98109,98121", - "extendedPostalCode": "981094991,981211117,981211237,981213206", - "countryCode": "US", - "country": "United States Of America", - "countryCodeISO3": "USA", - "freeformAddress": "Broad Street, Seattle, WA", - "countrySubdivisionName": "Washington" - }, - "position": { - "lat": 47.61691, - "lon": -122.35251 - }, - "viewport": { - "topLeftPoint": { - "lat": 47.61502, - "lon": -122.35041 - }, - "btmRightPoint": { - "lat": 47.61857, - "lon": -122.35484 - } - } - } - ] - } - }, - { - "statusCode": 200, - "response": { - "summary": { - "query": "one microsoft way redmond wa 98052", - "queryType": "NON_NEAR", - "queryTime": 169, - "numResults": 2, - "offset": 0, - "totalResults": 3292, - "fuzzyLevel": 2 - }, - "results": [ - { - "type": "Street", - "id": "US/STR/p0/1692663", - "score": 10.225, - "address": { - "streetName": "Microsoft Way", - "municipality": "Redmond", - "countrySecondarySubdivision": "King", - "countryTertiarySubdivision": "Seattle East", - "countrySubdivision": "WA", - "postalCode": "98052", - "extendedPostalCode": "980526399,980528300", - "countryCode": "US", - "country": "United States Of America", - "countryCodeISO3": "USA", - "freeformAddress": "Microsoft Way, Redmond, WA 98052", - "countrySubdivisionName": "Washington" - }, - "position": { - "lat": 47.63989, - "lon": -122.12509 - }, - "viewport": { - "topLeftPoint": { - "lat": 47.63748, - "lon": -122.12309 - }, - "btmRightPoint": { - "lat": 47.64223, - "lon": -122.13061 - } - } - }, - { - "type": "Cross Street", - "id": "US/XSTR/p1/4779971", - "score": 8.506, - "address": { - "streetName": "Microsoft Way & 157th Avenue Northeast, Microsoft Way", - "municipality": "Redmond", - "countrySecondarySubdivision": "King", - "countryTertiarySubdivision": "Seattle East", - "countrySubdivision": "WA", - "postalCode": "98052", - "countryCode": "US", - "country": "United States Of America", - "countryCodeISO3": "USA", - "freeformAddress": "Microsoft Way & 157th Avenue Northeast, Redmond, WA 98052", - "countrySubdivisionName": "Washington" - }, - "position": { - "lat": 47.63962, - "lon": -122.13061 - }, - "viewport": { - "topLeftPoint": { - "lat": 47.64052, - "lon": -122.13194 - }, - "btmRightPoint": { - "lat": 47.63872, - "lon": -122.12928 - } - } - } - ] - } - }, - { - "statusCode": 200, - "response": { - "summary": { - "query": "350 5th ave new york ny 10118", - "queryType": "NON_NEAR", - "queryTime": 233, - "numResults": 1, - "offset": 0, - "totalResults": 8032, - "fuzzyLevel": 1 - }, - "results": [ - { - "type": "Point Address", - "id": "US/PAD/p0/48052000", - "score": 14.334, - "address": { - "streetNumber": "350", - "streetName": "5th Avenue", - "municipalitySubdivision": "New York, Midtown South", - "municipality": "New York, Manhattan", - "countrySecondarySubdivision": "New York", - "countryTertiarySubdivision": "Manhattan", - "countrySubdivision": "NY", - "postalCode": "10118", - "extendedPostalCode": "1011800", - "countryCode": "US", - "country": "United States Of America", - "countryCodeISO3": "USA", - "freeformAddress": "350 5th Avenue, NYC, NY 10118", - "countrySubdivisionName": "New York" - }, - "position": { - "lat": 40.74817, - "lon": -73.985 - }, - "viewport": { - "topLeftPoint": { - "lat": 40.74907, - "lon": -73.98619 - }, - "btmRightPoint": { - "lat": 40.74727, - "lon": -73.98381 - } - }, - "entryPoints": [ - { - "type": "main", - "position": { - "lat": 40.74808, - "lon": -73.98482 - } - } - ] - } - ] - } - } - ] - } - }, "202": { "headers": { "Location": "URL to download the results of the long-running batch request." } - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive." - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found: the requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "An error occurred while processing the request. Please try again later." - } - } } } } diff --git a/specification/maps/data-plane/Microsoft.Maps/Search/preview/1.0/examples/PostSearchAddressBatchSync.json b/specification/maps/data-plane/Microsoft.Maps/Search/preview/1.0/examples/PostSearchAddressBatchSync.json new file mode 100644 index 000000000000..267ac482af32 --- /dev/null +++ b/specification/maps/data-plane/Microsoft.Maps/Search/preview/1.0/examples/PostSearchAddressBatchSync.json @@ -0,0 +1,310 @@ +{ + "parameters": { + "geography": "us", + "format": "json", + "api-version": "1.0", + "searchAddressBatchRequestBody": { + "batchItems": [ + { + "query": "?query=400 Broad St, Seattle, WA 98109&limit=3" + }, + { + "query": "?query=One, Microsoft Way, Redmond, WA 98052&limit=3" + }, + { + "query": "?query=350 5th Ave, New York, NY 10118&limit=1" + } + ] + } + }, + "responses": { + "200": { + "headers": {}, + "body": { + "summary": { + "successfulRequests": 3, + "totalRequests": 3 + }, + "batchItems": [ + { + "statusCode": 200, + "response": { + "summary": { + "query": "400 broad st seattle wa 98109", + "queryType": "NON_NEAR", + "queryTime": 127, + "numResults": 3, + "offset": 0, + "totalResults": 9, + "fuzzyLevel": 1 + }, + "results": [ + { + "type": "Point Address", + "id": "US/PAD/p0/20843845", + "score": 11.966, + "address": { + "streetNumber": "400", + "streetName": "Broad Street", + "municipalitySubdivision": "Seattle, South Lake Union, Lower Queen Anne", + "municipality": "Seattle", + "countrySecondarySubdivision": "King", + "countryTertiarySubdivision": "Seattle", + "countrySubdivision": "WA", + "postalCode": "98109", + "countryCode": "US", + "country": "United States Of America", + "countryCodeISO3": "USA", + "freeformAddress": "400 Broad Street, Seattle, WA 98109", + "countrySubdivisionName": "Washington" + }, + "position": { + "lat": 47.62039, + "lon": -122.34928 + }, + "viewport": { + "topLeftPoint": { + "lat": 47.62129, + "lon": -122.35061 + }, + "btmRightPoint": { + "lat": 47.61949, + "lon": -122.34795 + } + }, + "entryPoints": [ + { + "type": "main", + "position": { + "lat": 47.61982, + "lon": -122.34886 + } + } + ] + }, + { + "type": "Street", + "id": "US/STR/p0/388442", + "score": 10.225, + "address": { + "streetName": "Broad Street", + "municipalitySubdivision": "Seattle, South Lake Union", + "municipality": "Seattle", + "countrySecondarySubdivision": "King", + "countryTertiarySubdivision": "Seattle", + "countrySubdivision": "WA", + "postalCode": "98109", + "extendedPostalCode": "981094612", + "countryCode": "US", + "country": "United States Of America", + "countryCodeISO3": "USA", + "freeformAddress": "Broad Street, Seattle, WA 98109", + "countrySubdivisionName": "Washington" + }, + "position": { + "lat": 47.62001, + "lon": -122.34843 + }, + "viewport": { + "topLeftPoint": { + "lat": 47.61965, + "lon": -122.34761 + }, + "btmRightPoint": { + "lat": 47.62066, + "lon": -122.349 + } + } + }, + { + "type": "Street", + "id": "US/STR/p0/388680", + "score": 10.225, + "address": { + "streetName": "Broad Street", + "municipalitySubdivision": "Seattle, Belltown", + "municipality": "Seattle", + "countrySecondarySubdivision": "King", + "countryTertiarySubdivision": "Seattle", + "countrySubdivision": "WA", + "postalCode": "98109,98121", + "extendedPostalCode": "981094991,981211117,981211237,981213206", + "countryCode": "US", + "country": "United States Of America", + "countryCodeISO3": "USA", + "freeformAddress": "Broad Street, Seattle, WA", + "countrySubdivisionName": "Washington" + }, + "position": { + "lat": 47.61691, + "lon": -122.35251 + }, + "viewport": { + "topLeftPoint": { + "lat": 47.61502, + "lon": -122.35041 + }, + "btmRightPoint": { + "lat": 47.61857, + "lon": -122.35484 + } + } + } + ] + } + }, + { + "statusCode": 200, + "response": { + "summary": { + "query": "one microsoft way redmond wa 98052", + "queryType": "NON_NEAR", + "queryTime": 169, + "numResults": 2, + "offset": 0, + "totalResults": 3292, + "fuzzyLevel": 2 + }, + "results": [ + { + "type": "Street", + "id": "US/STR/p0/1692663", + "score": 10.225, + "address": { + "streetName": "Microsoft Way", + "municipality": "Redmond", + "countrySecondarySubdivision": "King", + "countryTertiarySubdivision": "Seattle East", + "countrySubdivision": "WA", + "postalCode": "98052", + "extendedPostalCode": "980526399,980528300", + "countryCode": "US", + "country": "United States Of America", + "countryCodeISO3": "USA", + "freeformAddress": "Microsoft Way, Redmond, WA 98052", + "countrySubdivisionName": "Washington" + }, + "position": { + "lat": 47.63989, + "lon": -122.12509 + }, + "viewport": { + "topLeftPoint": { + "lat": 47.63748, + "lon": -122.12309 + }, + "btmRightPoint": { + "lat": 47.64223, + "lon": -122.13061 + } + } + }, + { + "type": "Cross Street", + "id": "US/XSTR/p1/4779971", + "score": 8.506, + "address": { + "streetName": "Microsoft Way & 157th Avenue Northeast, Microsoft Way", + "municipality": "Redmond", + "countrySecondarySubdivision": "King", + "countryTertiarySubdivision": "Seattle East", + "countrySubdivision": "WA", + "postalCode": "98052", + "countryCode": "US", + "country": "United States Of America", + "countryCodeISO3": "USA", + "freeformAddress": "Microsoft Way & 157th Avenue Northeast, Redmond, WA 98052", + "countrySubdivisionName": "Washington" + }, + "position": { + "lat": 47.63962, + "lon": -122.13061 + }, + "viewport": { + "topLeftPoint": { + "lat": 47.64052, + "lon": -122.13194 + }, + "btmRightPoint": { + "lat": 47.63872, + "lon": -122.12928 + } + } + } + ] + } + }, + { + "statusCode": 200, + "response": { + "summary": { + "query": "350 5th ave new york ny 10118", + "queryType": "NON_NEAR", + "queryTime": 233, + "numResults": 1, + "offset": 0, + "totalResults": 8032, + "fuzzyLevel": 1 + }, + "results": [ + { + "type": "Point Address", + "id": "US/PAD/p0/48052000", + "score": 14.334, + "address": { + "streetNumber": "350", + "streetName": "5th Avenue", + "municipalitySubdivision": "New York, Midtown South", + "municipality": "New York, Manhattan", + "countrySecondarySubdivision": "New York", + "countryTertiarySubdivision": "Manhattan", + "countrySubdivision": "NY", + "postalCode": "10118", + "extendedPostalCode": "1011800", + "countryCode": "US", + "country": "United States Of America", + "countryCodeISO3": "USA", + "freeformAddress": "350 5th Avenue, NYC, NY 10118", + "countrySubdivisionName": "New York" + }, + "position": { + "lat": 40.74817, + "lon": -73.985 + }, + "viewport": { + "topLeftPoint": { + "lat": 40.74907, + "lon": -73.98619 + }, + "btmRightPoint": { + "lat": 40.74727, + "lon": -73.98381 + } + }, + "entryPoints": [ + { + "type": "main", + "position": { + "lat": 40.74808, + "lon": -73.98482 + } + } + ] + } + ] + } + } + ] + } + }, + "408": { + "headers": {}, + "body": { + "error": { + "code": "408 Timeout", + "message": "Timeout: The request took longer to finish than the maximum amount of time defined in the api." + } + } + } + } +} diff --git a/specification/maps/data-plane/Microsoft.Maps/Search/preview/1.0/examples/PostSearchAddressReverseBatch.json b/specification/maps/data-plane/Microsoft.Maps/Search/preview/1.0/examples/PostSearchAddressReverseBatch.json index 91a8a6bcd46b..e220742d1e19 100644 --- a/specification/maps/data-plane/Microsoft.Maps/Search/preview/1.0/examples/PostSearchAddressReverseBatch.json +++ b/specification/maps/data-plane/Microsoft.Maps/Search/preview/1.0/examples/PostSearchAddressReverseBatch.json @@ -1,8 +1,8 @@ { "parameters": { + "geography": "us", "format": "json", "api-version": "1.0", - "subscription-key": "[subscription-key]", "searchAddressReverseBatchRequestBody": { "batchItems": [ { @@ -18,173 +18,10 @@ } }, "responses": { - "200": { - "headers": {}, - "body": { - "summary": { - "successfulRequests": 3, - "totalRequests": 3 - }, - "batchItems": [ - { - "statusCode": 200, - "response": { - "summary": { - "queryTime": 8, - "numResults": 1 - }, - "addresses": [ - { - "address": { - "buildingNumber": "7", - "streetNumber": "7", - "routeNumbers": [], - "street": "Avenue Anatole France", - "streetName": "Avenue Anatole France", - "streetNameAndNumber": "7 Avenue Anatole France", - "countryCode": "FR", - "countrySubdivision": "Île-de-France", - "countrySecondarySubdivision": "Paris", - "municipality": "Paris", - "postalCode": "75007", - "municipalitySubdivision": "7ème Arrondissement", - "country": "France", - "countryCodeISO3": "FRA", - "freeformAddress": "7 Avenue Anatole France, Paris, 75007", - "boundingBox": { - "northEast": "48.858321,2.295167", - "southWest": "48.858136,2.295027", - "entity": "position" - } - }, - "position": "48.858231,2.295089" - } - ] - } - }, - { - "statusCode": 200, - "response": { - "summary": { - "queryTime": 8, - "numResults": 1 - }, - "addresses": [ - { - "address": { - "routeNumbers": [], - "countryCode": "US", - "countrySubdivision": "WA", - "countrySecondarySubdivision": "King", - "countryTertiarySubdivision": "Seattle East", - "municipality": "Redmond", - "postalCode": "98052", - "country": "United States", - "countryCodeISO3": "USA", - "freeformAddress": "Redmond, WA 98052", - "boundingBox": { - "northEast": "47.639765,-122.128661", - "southWest": "47.639502,-122.129456", - "entity": "position" - }, - "countrySubdivisionName": "Washington" - }, - "position": "47.639687,-122.128677" - } - ] - } - }, - { - "statusCode": 200, - "response": { - "summary": { - "queryTime": 19, - "numResults": 1 - }, - "addresses": [ - { - "address": { - "buildingNumber": "410", - "streetNumber": "410", - "routeNumbers": [], - "street": "Thomas Street", - "streetName": "Thomas Street", - "streetNameAndNumber": "410 Thomas Street", - "countryCode": "US", - "countrySubdivision": "WA", - "countrySecondarySubdivision": "King", - "countryTertiarySubdivision": "Seattle", - "municipality": "Seattle", - "postalCode": "98109", - "municipalitySubdivision": "Seattle, Lower Queen Anne", - "country": "United States", - "countryCodeISO3": "USA", - "freeformAddress": "410 Thomas Street, Seattle, WA 98109", - "boundingBox": { - "northEast": "47.620954,-122.347601", - "southWest": "47.620944,-122.348498", - "entity": "position" - }, - "extendedPostalCode": "981094621", - "countrySubdivisionName": "Washington" - }, - "position": "47.620945,-122.348175" - } - ] - } - } - ] - } - }, "202": { "headers": { "Location": "URL to download the results of the long-running batch request." } - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive." - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found: the requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "An error occurred while processing the request. Please try again later." - } - } } } } diff --git a/specification/maps/data-plane/Microsoft.Maps/Search/preview/1.0/examples/PostSearchAddressReverseBatchSync.json b/specification/maps/data-plane/Microsoft.Maps/Search/preview/1.0/examples/PostSearchAddressReverseBatchSync.json new file mode 100644 index 000000000000..b4836b3c7afd --- /dev/null +++ b/specification/maps/data-plane/Microsoft.Maps/Search/preview/1.0/examples/PostSearchAddressReverseBatchSync.json @@ -0,0 +1,149 @@ +{ + "parameters": { + "geography": "us", + "format": "json", + "api-version": "1.0", + "searchAddressReverseBatchRequestBody": { + "batchItems": [ + { + "query": "?query=48.858561,2.294911" + }, + { + "query": "?query=47.639765,-122.127896&radius=5000&limit=2" + }, + { + "query": "?query=47.621028,-122.348170" + } + ] + } + }, + "responses": { + "200": { + "headers": {}, + "body": { + "summary": { + "successfulRequests": 3, + "totalRequests": 3 + }, + "batchItems": [ + { + "statusCode": 200, + "response": { + "summary": { + "queryTime": 8, + "numResults": 1 + }, + "addresses": [ + { + "address": { + "buildingNumber": "7", + "streetNumber": "7", + "routeNumbers": [], + "street": "Avenue Anatole France", + "streetName": "Avenue Anatole France", + "streetNameAndNumber": "7 Avenue Anatole France", + "countryCode": "FR", + "countrySubdivision": "Île-de-France", + "countrySecondarySubdivision": "Paris", + "municipality": "Paris", + "postalCode": "75007", + "municipalitySubdivision": "7ème Arrondissement", + "country": "France", + "countryCodeISO3": "FRA", + "freeformAddress": "7 Avenue Anatole France, Paris, 75007", + "boundingBox": { + "northEast": "48.858321,2.295167", + "southWest": "48.858136,2.295027", + "entity": "position" + } + }, + "position": "48.858231,2.295089" + } + ] + } + }, + { + "statusCode": 200, + "response": { + "summary": { + "queryTime": 8, + "numResults": 1 + }, + "addresses": [ + { + "address": { + "routeNumbers": [], + "countryCode": "US", + "countrySubdivision": "WA", + "countrySecondarySubdivision": "King", + "countryTertiarySubdivision": "Seattle East", + "municipality": "Redmond", + "postalCode": "98052", + "country": "United States", + "countryCodeISO3": "USA", + "freeformAddress": "Redmond, WA 98052", + "boundingBox": { + "northEast": "47.639765,-122.128661", + "southWest": "47.639502,-122.129456", + "entity": "position" + }, + "countrySubdivisionName": "Washington" + }, + "position": "47.639687,-122.128677" + } + ] + } + }, + { + "statusCode": 200, + "response": { + "summary": { + "queryTime": 19, + "numResults": 1 + }, + "addresses": [ + { + "address": { + "buildingNumber": "410", + "streetNumber": "410", + "routeNumbers": [], + "street": "Thomas Street", + "streetName": "Thomas Street", + "streetNameAndNumber": "410 Thomas Street", + "countryCode": "US", + "countrySubdivision": "WA", + "countrySecondarySubdivision": "King", + "countryTertiarySubdivision": "Seattle", + "municipality": "Seattle", + "postalCode": "98109", + "municipalitySubdivision": "Seattle, Lower Queen Anne", + "country": "United States", + "countryCodeISO3": "USA", + "freeformAddress": "410 Thomas Street, Seattle, WA 98109", + "boundingBox": { + "northEast": "47.620954,-122.347601", + "southWest": "47.620944,-122.348498", + "entity": "position" + }, + "extendedPostalCode": "981094621", + "countrySubdivisionName": "Washington" + }, + "position": "47.620945,-122.348175" + } + ] + } + } + ] + } + }, + "408": { + "headers": {}, + "body": { + "error": { + "code": "408 Timeout", + "message": "Timeout: The request took longer to finish than the maximum amount of time defined in the api." + } + } + } + } +} diff --git a/specification/maps/data-plane/Microsoft.Maps/Search/preview/1.0/examples/PostSearchAlongRoute.json b/specification/maps/data-plane/Microsoft.Maps/Search/preview/1.0/examples/PostSearchAlongRoute.json index dd9fdb3a7301..2c14d8ad0e95 100644 --- a/specification/maps/data-plane/Microsoft.Maps/Search/preview/1.0/examples/PostSearchAlongRoute.json +++ b/specification/maps/data-plane/Microsoft.Maps/Search/preview/1.0/examples/PostSearchAlongRoute.json @@ -1,11 +1,11 @@ { "parameters": { + "geography": "us", "format": "json", "api-version": "1.0", "query": "burger", "maxDetourTime": 1000, "limit": 2, - "subscription-key": "[subscription-key]", "searchAlongRouteRequestBody": { "route": { "type": "LineString", @@ -199,51 +199,6 @@ } ] } - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive." - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found: the requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "An error occurred while processing the request. Please try again later." - } - } } } } diff --git a/specification/maps/data-plane/Microsoft.Maps/Search/preview/1.0/examples/PostSearchFuzzyBatch.json b/specification/maps/data-plane/Microsoft.Maps/Search/preview/1.0/examples/PostSearchFuzzyBatch.json index c9aa1bd64ebe..b2363370562a 100644 --- a/specification/maps/data-plane/Microsoft.Maps/Search/preview/1.0/examples/PostSearchFuzzyBatch.json +++ b/specification/maps/data-plane/Microsoft.Maps/Search/preview/1.0/examples/PostSearchFuzzyBatch.json @@ -1,5 +1,6 @@ { "parameters": { + "geography": "us", "format": "json", "api-version": "1.0", "subscription-key": "[subscription-key]", @@ -18,1437 +19,10 @@ } }, "responses": { - "200": { - "headers": {}, - "body": { - "batchItems": [ - { - "statusCode": 200, - "response": { - "summary": { - "query": "atm", - "queryType": "NON_NEAR", - "queryTime": 5, - "numResults": 5, - "offset": 0, - "totalResults": 262, - "fuzzyLevel": 1, - "geoBias": { - "lat": 47.639769, - "lon": -122.128362 - } - }, - "results": [ - { - "type": "POI", - "id": "US/POI/p0/3656546", - "score": 2.671, - "dist": 1336.1815386162032, - "info": "search:ta:840539002005905-US", - "poi": { - "name": "US Bank ATM-MONEYPASS", - "brands": [ - { - "name": "US Bank ATM" - } - ], - "categorySet": [ - { - "id": 7397 - } - ], - "classifications": [ - { - "code": "CASH_DISPENSER", - "names": [ - { - "nameLocale": "en-US", - "name": "cash dispenser" - } - ] - } - ] - }, - "address": { - "streetNumber": "14808", - "streetName": "NE 24th St", - "municipalitySubdivision": "Redmond", - "municipality": "Redmond", - "countrySecondarySubdivision": "King", - "countryTertiarySubdivision": "Seattle East", - "countrySubdivision": "WA", - "postalCode": "98052", - "countryCode": "US", - "country": "United States", - "countryCodeISO3": "USA", - "freeformAddress": "14808 NE 24th St, Redmond, WA 98052", - "localName": "Redmond", - "countrySubdivisionName": "Washington" - }, - "position": { - "lat": 47.63229, - "lon": -122.14232 - }, - "viewport": { - "topLeftPoint": { - "lat": 47.63319, - "lon": -122.14365 - }, - "btmRightPoint": { - "lat": 47.63139, - "lon": -122.14099 - } - }, - "entryPoints": [ - { - "type": "main", - "position": { - "lat": 47.63154, - "lon": -122.1423 - } - } - ] - }, - { - "type": "POI", - "id": "US/POI/p0/8673325", - "score": 2.671, - "dist": 1206.8488178244172, - "info": "search:ta:840539002022072-US", - "poi": { - "name": "US Bank ATM NATIONAL ASSOCIATION", - "brands": [ - { - "name": "US Bank ATM" - } - ], - "categorySet": [ - { - "id": 7397 - } - ], - "classifications": [ - { - "code": "CASH_DISPENSER", - "names": [ - { - "nameLocale": "en-US", - "name": "cash dispenser" - } - ] - } - ] - }, - "address": { - "streetNumber": "15000", - "streetName": "Northeast 24Th Street", - "municipalitySubdivision": "Redmond", - "municipality": "Redmond", - "countrySecondarySubdivision": "King", - "countryTertiarySubdivision": "Seattle East", - "countrySubdivision": "WA", - "postalCode": "98052", - "extendedPostalCode": "980525522", - "countryCode": "US", - "country": "United States", - "countryCodeISO3": "USA", - "freeformAddress": "15000 Northeast 24Th Street, Redmond, WA 98052", - "localName": "Redmond", - "countrySubdivisionName": "Washington" - }, - "position": { - "lat": 47.63265, - "lon": -122.14052 - }, - "viewport": { - "topLeftPoint": { - "lat": 47.63355, - "lon": -122.14185 - }, - "btmRightPoint": { - "lat": 47.63175, - "lon": -122.13919 - } - }, - "entryPoints": [ - { - "type": "minor", - "position": { - "lat": 47.63156, - "lon": -122.14056 - } - }, - { - "type": "minor", - "position": { - "lat": 47.63156, - "lon": -122.14058 - } - }, - { - "type": "main", - "position": { - "lat": 47.63156, - "lon": -122.14048 - } - }, - { - "type": "main", - "position": { - "lat": 47.6324, - "lon": -122.13938 - } - } - ] - }, - { - "type": "POI", - "id": "US/POI/p1/2736315", - "score": 2.671, - "dist": 864.75917765198585, - "info": "search:ta:840539002187855-US", - "poi": { - "name": "US Bank ATM-MONEYPASS", - "brands": [ - { - "name": "US Bank ATM" - } - ], - "categorySet": [ - { - "id": 7397 - } - ], - "classifications": [ - { - "code": "CASH_DISPENSER", - "names": [ - { - "nameLocale": "en-US", - "name": "cash dispenser" - } - ] - } - ] - }, - "address": { - "streetNumber": "15521", - "streetName": "Bel Red Rd", - "municipalitySubdivision": "Redmond, Northeast Bellevue, Bellevue", - "municipality": "Redmond, Bellevue", - "countrySecondarySubdivision": "King", - "countryTertiarySubdivision": "Seattle East", - "countrySubdivision": "WA", - "postalCode": "98052", - "extendedPostalCode": "980525501", - "countryCode": "US", - "country": "United States", - "countryCodeISO3": "USA", - "freeformAddress": "15521 Bel Red Rd, Redmond, WA 98052", - "localName": "Redmond", - "countrySubdivisionName": "Washington" - }, - "position": { - "lat": 47.63259, - "lon": -122.1328 - }, - "viewport": { - "topLeftPoint": { - "lat": 47.63349, - "lon": -122.13413 - }, - "btmRightPoint": { - "lat": 47.63169, - "lon": -122.13147 - } - }, - "entryPoints": [ - { - "type": "main", - "position": { - "lat": 47.63255, - "lon": -122.13275 - } - } - ] - }, - { - "type": "POI", - "id": "US/POI/p0/3656412", - "score": 2.67, - "dist": 2140.1985385809412, - "info": "search:ta:840539001998867-US", - "poi": { - "name": "US Bank ATM NATIONAL ASSOCIATION", - "brands": [ - { - "name": "US Bank ATM" - } - ], - "categorySet": [ - { - "id": 7397 - } - ], - "classifications": [ - { - "code": "CASH_DISPENSER", - "names": [ - { - "nameLocale": "en-US", - "name": "cash dispenser" - } - ] - } - ] - }, - "address": { - "streetNumber": "1128", - "streetName": "156th Ave NE", - "municipalitySubdivision": "Crossroads, Bellevue", - "municipality": "Bellevue", - "countrySecondarySubdivision": "King", - "countryTertiarySubdivision": "Seattle East", - "countrySubdivision": "WA", - "postalCode": "98007", - "countryCode": "US", - "country": "United States", - "countryCodeISO3": "USA", - "freeformAddress": "1128 156th Ave NE, Bellevue, WA 98007", - "localName": "Bellevue", - "countrySubdivisionName": "Washington" - }, - "position": { - "lat": 47.62069, - "lon": -122.13213 - }, - "viewport": { - "topLeftPoint": { - "lat": 47.62159, - "lon": -122.13346 - }, - "btmRightPoint": { - "lat": 47.61979, - "lon": -122.1308 - } - }, - "entryPoints": [ - { - "type": "main", - "position": { - "lat": 47.62069, - "lon": -122.13236 - } - } - ] - }, - { - "type": "POI", - "id": "US/POI/p1/2736876", - "score": 2.67, - "dist": 2140.1985385809412, - "info": "search:ta:840539001396789-US", - "poi": { - "name": "US Bank ATM", - "phone": "+(1)-(800)-8722657", - "brands": [ - { - "name": "US Bank ATM" - } - ], - "categorySet": [ - { - "id": 7397 - } - ], - "url": "www.usbank.com", - "classifications": [ - { - "code": "CASH_DISPENSER", - "names": [ - { - "nameLocale": "en-US", - "name": "cash dispenser" - } - ] - } - ] - }, - "address": { - "streetNumber": "1128", - "streetName": "156th Ave NE", - "municipalitySubdivision": "Crossroads, Bellevue", - "municipality": "Bellevue", - "countrySecondarySubdivision": "King", - "countryTertiarySubdivision": "Seattle East", - "countrySubdivision": "WA", - "postalCode": "98007", - "countryCode": "US", - "country": "United States", - "countryCodeISO3": "USA", - "freeformAddress": "1128 156th Ave NE, Bellevue, WA 98007", - "localName": "Bellevue", - "countrySubdivisionName": "Washington" - }, - "position": { - "lat": 47.62069, - "lon": -122.13213 - }, - "viewport": { - "topLeftPoint": { - "lat": 47.62159, - "lon": -122.13346 - }, - "btmRightPoint": { - "lat": 47.61979, - "lon": -122.1308 - } - }, - "entryPoints": [ - { - "type": "main", - "position": { - "lat": 47.62069, - "lon": -122.13236 - } - } - ] - } - ] - } - }, - { - "statusCode": 200, - "response": { - "summary": { - "query": "statue of liberty", - "queryType": "NON_NEAR", - "queryTime": 37, - "numResults": 2, - "offset": 0, - "totalResults": 18, - "fuzzyLevel": 1 - }, - "results": [ - { - "type": "POI", - "id": "US/POI/p0/9189660", - "score": 6.942, - "info": "search:ta:840369001174316-US", - "poi": { - "name": "Statue of Liberty", - "categorySet": [ - { - "id": 7376003 - } - ], - "classifications": [ - { - "code": "IMPORTANT_TOURIST_ATTRACTION", - "names": [ - { - "nameLocale": "en-US", - "name": "monument" - }, - { - "nameLocale": "en-US", - "name": "important tourist attraction" - } - ] - } - ] - }, - "address": { - "municipalitySubdivision": "New York", - "municipality": "New York", - "countrySecondarySubdivision": "New York", - "countryTertiarySubdivision": "Manhattan", - "countrySubdivision": "NY", - "postalCode": "10004", - "countryCode": "US", - "country": "United States", - "countryCodeISO3": "USA", - "freeformAddress": "New York, NY 10004", - "localName": "New York", - "countrySubdivisionName": "New York" - }, - "position": { - "lat": 40.68955, - "lon": -74.04483 - }, - "viewport": { - "topLeftPoint": { - "lat": 40.69045, - "lon": -74.04602 - }, - "btmRightPoint": { - "lat": 40.68865, - "lon": -74.04364 - } - }, - "entryPoints": [ - { - "type": "main", - "position": { - "lat": 40.69001, - "lon": -74.04683 - } - } - ] - }, - { - "type": "POI", - "id": "US/POI/p1/3264566", - "score": 6.942, - "info": "search:ta:840019000670588-US", - "poi": { - "name": "Statue of Liberty", - "phone": "+(1)-(205)-9700251", - "categorySet": [ - { - "id": 7376003 - } - ], - "url": "www.1bsa.org", - "classifications": [ - { - "code": "IMPORTANT_TOURIST_ATTRACTION", - "names": [ - { - "nameLocale": "en-US", - "name": "important tourist attraction" - } - ] - } - ] - }, - "address": { - "streetNumber": "516", - "streetName": "Liberty Pkwy", - "municipalitySubdivision": "Vestavia Hills", - "municipality": "Vestavia Hills, Birmingham", - "countrySecondarySubdivision": "Jefferson", - "countryTertiarySubdivision": "Leeds", - "countrySubdivision": "AL", - "postalCode": "35242", - "countryCode": "US", - "country": "United States", - "countryCodeISO3": "USA", - "freeformAddress": "516 Liberty Pkwy, Vestavia Hills, AL 35242", - "localName": "Vestavia Hills", - "countrySubdivisionName": "Alabama" - }, - "position": { - "lat": 33.48234, - "lon": -86.70719 - }, - "viewport": { - "topLeftPoint": { - "lat": 33.48324, - "lon": -86.70827 - }, - "btmRightPoint": { - "lat": 33.48144, - "lon": -86.70611 - } - }, - "entryPoints": [ - { - "type": "main", - "position": { - "lat": 33.48129, - "lon": -86.7065 - } - } - ] - } - ] - } - }, - { - "statusCode": 200, - "response": { - "summary": { - "query": "starbucks", - "queryType": "NON_NEAR", - "queryTime": 35, - "numResults": 10, - "offset": 0, - "totalResults": 17, - "fuzzyLevel": 1, - "geoBias": { - "lat": 47.639769, - "lon": -122.128362 - } - }, - "results": [ - { - "type": "POI", - "id": "US/POI/p0/153678", - "score": 2.671, - "dist": 1206.8488178244172, - "info": "search:ta:840531000006554-US", - "poi": { - "name": "Starbucks", - "phone": "+(1)-(425)-8695816", - "brands": [ - { - "name": "Starbucks" - } - ], - "categorySet": [ - { - "id": 9376006 - } - ], - "url": "www.starbucks.com/site-selector", - "classifications": [ - { - "code": "CAFE_PUB", - "names": [ - { - "nameLocale": "en-US", - "name": "coffee shop" - }, - { - "nameLocale": "en-US", - "name": "café/pub" - } - ] - } - ] - }, - "address": { - "streetNumber": "15000", - "streetName": "NE 24th St", - "municipalitySubdivision": "Redmond", - "municipality": "Redmond", - "countrySecondarySubdivision": "King", - "countryTertiarySubdivision": "Seattle East", - "countrySubdivision": "WA", - "postalCode": "98052", - "extendedPostalCode": "980525522", - "countryCode": "US", - "country": "United States", - "countryCodeISO3": "USA", - "freeformAddress": "15000 NE 24th St, Redmond, WA 98052", - "localName": "Redmond", - "countrySubdivisionName": "Washington" - }, - "position": { - "lat": 47.63265, - "lon": -122.14052 - }, - "viewport": { - "topLeftPoint": { - "lat": 47.63355, - "lon": -122.14185 - }, - "btmRightPoint": { - "lat": 47.63175, - "lon": -122.13919 - } - }, - "entryPoints": [ - { - "type": "minor", - "position": { - "lat": 47.63156, - "lon": -122.14056 - } - }, - { - "type": "minor", - "position": { - "lat": 47.63156, - "lon": -122.14058 - } - }, - { - "type": "main", - "position": { - "lat": 47.63156, - "lon": -122.14048 - } - }, - { - "type": "main", - "position": { - "lat": 47.6324, - "lon": -122.13938 - } - } - ] - }, - { - "type": "POI", - "id": "US/POI/p0/152316", - "score": 2.67, - "dist": 2315.294397491255, - "info": "search:ta:840539000484552-US", - "poi": { - "name": "Starbucks", - "phone": "+(1)-(425)-6436471", - "brands": [ - { - "name": "Starbucks" - } - ], - "categorySet": [ - { - "id": 9376006 - } - ], - "url": "www.starbucks.com/store/15097", - "classifications": [ - { - "code": "CAFE_PUB", - "names": [ - { - "nameLocale": "en-US", - "name": "coffee shop" - }, - { - "nameLocale": "en-US", - "name": "café/pub" - } - ] - } - ] - }, - "address": { - "streetNumber": "15600", - "streetName": "NE 8th St", - "municipalitySubdivision": "Crossroads, Bellevue", - "municipality": "Bellevue", - "countrySecondarySubdivision": "King", - "countryTertiarySubdivision": "Seattle East", - "countrySubdivision": "WA", - "postalCode": "98008", - "countryCode": "US", - "country": "United States", - "countryCodeISO3": "USA", - "freeformAddress": "15600 NE 8th St, Bellevue, WA 98008", - "localName": "Bellevue", - "countrySubdivisionName": "Washington" - }, - "position": { - "lat": 47.61896, - "lon": -122.12945 - }, - "viewport": { - "topLeftPoint": { - "lat": 47.61986, - "lon": -122.13078 - }, - "btmRightPoint": { - "lat": 47.61806, - "lon": -122.12812 - } - }, - "entryPoints": [ - { - "type": "main", - "position": { - "lat": 47.619, - "lon": -122.12945 - } - } - ] - }, - { - "type": "POI", - "id": "US/POI/p1/167545", - "score": 2.67, - "dist": 1979.2222952267998, - "info": "search:ta:840539001950429-US", - "poi": { - "name": "Starbucks", - "phone": "+(1)-(425)-7470690", - "brands": [ - { - "name": "Starbucks" - } - ], - "categorySet": [ - { - "id": 9376006 - } - ], - "url": "www.starbucks.com/site-selector", - "classifications": [ - { - "code": "CAFE_PUB", - "names": [ - { - "nameLocale": "en-US", - "name": "coffee shop" - }, - { - "nameLocale": "en-US", - "name": "café/pub" - } - ] - } - ] - }, - "address": { - "streetNumber": "1350", - "streetName": "156th Ave NE", - "municipalitySubdivision": "Crossroads, Bellevue", - "municipality": "Bellevue", - "countrySecondarySubdivision": "King", - "countryTertiarySubdivision": "Seattle East", - "countrySubdivision": "WA", - "postalCode": "98007", - "countryCode": "US", - "country": "United States", - "countryCodeISO3": "USA", - "freeformAddress": "1350 156th Ave NE, Bellevue, WA 98007", - "localName": "Bellevue", - "countrySubdivisionName": "Washington" - }, - "position": { - "lat": 47.62212, - "lon": -122.13179 - }, - "viewport": { - "topLeftPoint": { - "lat": 47.62302, - "lon": -122.13312 - }, - "btmRightPoint": { - "lat": 47.62122, - "lon": -122.13046 - } - }, - "entryPoints": [ - { - "type": "main", - "position": { - "lat": 47.62213, - "lon": -122.13236 - } - } - ] - }, - { - "type": "POI", - "id": "US/POI/p1/168519", - "score": 2.67, - "dist": 2490.3337046455963, - "info": "search:ta:840539001015090-US", - "poi": { - "name": "Starbucks", - "phone": "+(1)-(425)-4556500", - "brands": [ - { - "name": "Starbucks" - } - ], - "categorySet": [ - { - "id": 9376006 - } - ], - "url": "https://www.starbucks.com/store-locator/store/15901", - "classifications": [ - { - "code": "CAFE_PUB", - "names": [ - { - "nameLocale": "en-US", - "name": "coffee shop" - }, - { - "nameLocale": "en-US", - "name": "café/pub" - } - ] - } - ] - }, - "address": { - "streetNumber": "1645", - "streetName": "140th Ave NE", - "municipalitySubdivision": "Crossroads, Bellevue", - "municipality": "Bellevue", - "countrySecondarySubdivision": "King", - "countryTertiarySubdivision": "Seattle East", - "countrySubdivision": "WA", - "postalCode": "98005", - "countryCode": "US", - "country": "United States", - "countryCodeISO3": "USA", - "freeformAddress": "1645 140th Ave NE, Bellevue, WA 98005", - "localName": "Bellevue", - "countrySubdivisionName": "Washington" - }, - "position": { - "lat": 47.62626, - "lon": -122.15487 - }, - "viewport": { - "topLeftPoint": { - "lat": 47.62716, - "lon": -122.1562 - }, - "btmRightPoint": { - "lat": 47.62536, - "lon": -122.15354 - } - }, - "entryPoints": [ - { - "type": "main", - "position": { - "lat": 47.62645, - "lon": -122.15446 - } - }, - { - "type": "minor", - "position": { - "lat": 47.62579, - "lon": -122.15377 - } - } - ] - }, - { - "type": "POI", - "id": "US/POI/p0/152428", - "score": 2.668, - "dist": 3529.7080738812224, - "info": "search:ta:840539001033722-US", - "poi": { - "name": "Starbucks", - "phone": "+(1)-(425)-3789496", - "brands": [ - { - "name": "Starbucks" - } - ], - "categorySet": [ - { - "id": 9376006 - } - ], - "url": "www.starbucks.com/site-selector", - "classifications": [ - { - "code": "CAFE_PUB", - "names": [ - { - "nameLocale": "en-US", - "name": "coffee shop" - }, - { - "nameLocale": "en-US", - "name": "café/pub" - } - ] - } - ] - }, - "address": { - "streetNumber": "180", - "streetName": "148th Ave SE", - "municipalitySubdivision": "West Lake Hills, Bellevue", - "municipality": "Bellevue", - "countrySecondarySubdivision": "King", - "countryTertiarySubdivision": "Seattle East", - "countrySubdivision": "WA", - "postalCode": "98007", - "countryCode": "US", - "country": "United States", - "countryCodeISO3": "USA", - "freeformAddress": "180 148th Ave SE, Bellevue, WA 98007", - "localName": "Bellevue", - "countrySubdivisionName": "Washington" - }, - "position": { - "lat": 47.60901, - "lon": -122.14 - }, - "viewport": { - "topLeftPoint": { - "lat": 47.60991, - "lon": -122.14133 - }, - "btmRightPoint": { - "lat": 47.60811, - "lon": -122.13867 - } - }, - "entryPoints": [ - { - "type": "main", - "position": { - "lat": 47.60901, - "lon": -122.14008 - } - } - ] - }, - { - "type": "POI", - "id": "US/POI/p1/167147", - "score": 2.668, - "dist": 3479.393294615887, - "info": "search:ta:840539000326896-US", - "poi": { - "name": "Starbucks", - "phone": "+(1)-(425)-8619198", - "brands": [ - { - "name": "Starbucks" - } - ], - "categorySet": [ - { - "id": 9376006 - } - ], - "url": "www.starbucks.com/site-selector", - "classifications": [ - { - "code": "CAFE_PUB", - "names": [ - { - "nameLocale": "en-US", - "name": "coffee shop" - }, - { - "nameLocale": "en-US", - "name": "café/pub" - } - ] - } - ] - }, - "address": { - "streetNumber": "7425", - "streetName": "166th Ave NE", - "municipalitySubdivision": "Redmond", - "municipality": "Redmond", - "countrySecondarySubdivision": "King", - "countryTertiarySubdivision": "Seattle East", - "countrySubdivision": "WA", - "postalCode": "98052", - "extendedPostalCode": "980526288", - "countryCode": "US", - "country": "United States", - "countryCodeISO3": "USA", - "freeformAddress": "7425 166th Ave NE, Redmond, WA 98052", - "localName": "Redmond", - "countrySubdivisionName": "Washington" - }, - "position": { - "lat": 47.67055, - "lon": -122.12001 - }, - "viewport": { - "topLeftPoint": { - "lat": 47.67145, - "lon": -122.12135 - }, - "btmRightPoint": { - "lat": 47.66965, - "lon": -122.11867 - } - }, - "entryPoints": [ - { - "type": "main", - "position": { - "lat": 47.67069, - "lon": -122.11889 - } - } - ] - }, - { - "type": "POI", - "id": "US/POI/p0/153695", - "score": 2.667, - "dist": 3622.4410746187291, - "info": "search:ta:840531000006551-US", - "poi": { - "name": "Starbucks", - "phone": "+(1)-(425)-8822881", - "brands": [ - { - "name": "Starbucks" - } - ], - "categorySet": [ - { - "id": 9376006 - } - ], - "url": "www.starbucks.com/store/15022", - "classifications": [ - { - "code": "CAFE_PUB", - "names": [ - { - "nameLocale": "en-US", - "name": "coffee shop" - }, - { - "nameLocale": "en-US", - "name": "café/pub" - } - ] - } - ] - }, - "address": { - "streetNumber": "7625", - "streetName": "170th Ave NE", - "municipalitySubdivision": "Redmond", - "municipality": "Redmond", - "countrySecondarySubdivision": "King", - "countryTertiarySubdivision": "Seattle East", - "countrySubdivision": "WA", - "postalCode": "98052", - "extendedPostalCode": "980520910", - "countryCode": "US", - "country": "United States", - "countryCodeISO3": "USA", - "freeformAddress": "7625 170th Ave NE, Redmond, WA 98052", - "localName": "Redmond", - "countrySubdivisionName": "Washington" - }, - "position": { - "lat": 47.67086, - "lon": -122.11392 - }, - "viewport": { - "topLeftPoint": { - "lat": 47.67176, - "lon": -122.11526 - }, - "btmRightPoint": { - "lat": 47.66996, - "lon": -122.11258 - } - }, - "entryPoints": [ - { - "type": "main", - "position": { - "lat": 47.67073, - "lon": -122.1135 - } - } - ] - }, - { - "type": "POI", - "id": "US/POI/p1/167420", - "score": 2.667, - "dist": 3818.293513029088, - "info": "search:ta:840539000640782-US", - "poi": { - "name": "Starbucks", - "phone": "+(1)-(425)-8853323", - "brands": [ - { - "name": "Starbucks" - } - ], - "categorySet": [ - { - "id": 9376006 - } - ], - "url": "www.starbucks.com/site-selector", - "classifications": [ - { - "code": "CAFE_PUB", - "names": [ - { - "nameLocale": "en-US", - "name": "coffee shop" - }, - { - "nameLocale": "en-US", - "name": "café/pub" - } - ] - } - ] - }, - "address": { - "streetNumber": "17246", - "streetName": "Redmond Way", - "municipalitySubdivision": "Redmond", - "municipality": "Redmond", - "countrySecondarySubdivision": "King", - "countryTertiarySubdivision": "Seattle East", - "countrySubdivision": "WA", - "postalCode": "98052", - "extendedPostalCode": "980524403", - "countryCode": "US", - "country": "United States", - "countryCodeISO3": "USA", - "freeformAddress": "17246 Redmond Way, Redmond, WA 98052", - "localName": "Redmond", - "countrySubdivisionName": "Washington" - }, - "position": { - "lat": 47.67174, - "lon": -122.10976 - }, - "viewport": { - "topLeftPoint": { - "lat": 47.67264, - "lon": -122.1111 - }, - "btmRightPoint": { - "lat": 47.67084, - "lon": -122.10842 - } - }, - "entryPoints": [ - { - "type": "main", - "position": { - "lat": 47.6706, - "lon": -122.11026 - } - } - ] - }, - { - "type": "POI", - "id": "US/POI/p0/153686", - "score": 2.666, - "dist": 4009.9222051470738, - "info": "search:ta:840531000006548-US", - "poi": { - "name": "Starbucks", - "phone": "+(1)-(425)-8859590", - "brands": [ - { - "name": "Starbucks" - } - ], - "categorySet": [ - { - "id": 9376006 - } - ], - "url": "www.starbucks.com/site-selector", - "classifications": [ - { - "code": "CAFE_PUB", - "names": [ - { - "nameLocale": "en-US", - "name": "coffee shop" - }, - { - "nameLocale": "en-US", - "name": "café/pub" - } - ] - } - ] - }, - "address": { - "streetNumber": "15738", - "streetName": "Redmond Way Pad 3 Redmond Center", - "municipalitySubdivision": "Redmond", - "municipality": "Redmond", - "countrySecondarySubdivision": "King", - "countryTertiarySubdivision": "Seattle East", - "countrySubdivision": "WA", - "postalCode": "98052", - "extendedPostalCode": "980523873", - "countryCode": "US", - "country": "United States", - "countryCodeISO3": "USA", - "freeformAddress": "15738 Redmond Way Pad 3 Redmond Center, Redmond, WA 98052", - "localName": "Redmond", - "countrySubdivisionName": "Washington" - }, - "position": { - "lat": 47.67583, - "lon": -122.12877 - }, - "viewport": { - "topLeftPoint": { - "lat": 47.67673, - "lon": -122.13011 - }, - "btmRightPoint": { - "lat": 47.67493, - "lon": -122.12743 - } - }, - "entryPoints": [ - { - "type": "minor", - "position": { - "lat": 47.67456, - "lon": -122.12887 - } - }, - { - "type": "main", - "position": { - "lat": 47.67668, - "lon": -122.12829 - } - } - ] - }, - { - "type": "POI", - "id": "US/POI/p1/168511", - "score": 2.666, - "dist": 3987.80992387863, - "info": "search:ta:840531000006669-US", - "poi": { - "name": "Starbucks", - "phone": "+(1)-(425)-8818265", - "brands": [ - { - "name": "Starbucks" - } - ], - "categorySet": [ - { - "id": 9376006 - } - ], - "url": "www.starbucks.com/site-selector", - "classifications": [ - { - "code": "CAFE_PUB", - "names": [ - { - "nameLocale": "en-US", - "name": "coffee shop" - }, - { - "nameLocale": "en-US", - "name": "café/pub" - } - ] - } - ] - }, - "address": { - "streetNumber": "6617", - "streetName": "132Nd Ave Ne Bridle Trails Shopping Center", - "municipalitySubdivision": "Kirkland, Bridle Trails", - "municipality": "Kirkland", - "countrySecondarySubdivision": "King", - "countryTertiarySubdivision": "Seattle East", - "countrySubdivision": "WA", - "postalCode": "98033", - "extendedPostalCode": "980338234", - "countryCode": "US", - "country": "United States", - "countryCodeISO3": "USA", - "freeformAddress": "6617 132Nd Ave Ne Bridle Trails Shopping Center, Kirkland, WA 98033", - "localName": "Kirkland", - "countrySubdivisionName": "Washington" - }, - "position": { - "lat": 47.66514, - "lon": -122.16599 - }, - "viewport": { - "topLeftPoint": { - "lat": 47.66604, - "lon": -122.16733 - }, - "btmRightPoint": { - "lat": 47.66424, - "lon": -122.16465 - } - }, - "entryPoints": [ - { - "type": "main", - "position": { - "lat": 47.666, - "lon": -122.16669 - } - }, - { - "type": "minor", - "position": { - "lat": 47.66553, - "lon": -122.16405 - } - } - ] - } - ] - } - } - ], - "summary": { - "successfulRequests": 3, - "totalRequests": 3 - } - } - }, "202": { "headers": { "Location": "URL to download the results of the long-running batch request." } - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive." - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found: the requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "An error occurred while processing the request. Please try again later." - } - } } } } diff --git a/specification/maps/data-plane/Microsoft.Maps/Search/preview/1.0/examples/PostSearchFuzzyBatchSync.json b/specification/maps/data-plane/Microsoft.Maps/Search/preview/1.0/examples/PostSearchFuzzyBatchSync.json new file mode 100644 index 000000000000..0cbd7b3bdcb3 --- /dev/null +++ b/specification/maps/data-plane/Microsoft.Maps/Search/preview/1.0/examples/PostSearchFuzzyBatchSync.json @@ -0,0 +1,1414 @@ +{ + "parameters": { + "geography": "us", + "format": "json", + "api-version": "1.0", + "subscription-key": "[subscription-key]", + "searchFuzzyBatchRequestBody": { + "batchItems": [ + { + "query": "?query=atm&lat=47.639769&lon=-122.128362&radius=5000&limit=5" + }, + { + "query": "?query=Statue Of Liberty&limit=2" + }, + { + "query": "?query=Starbucks&lat=47.639769&lon=-122.128362&radius=5000" + } + ] + } + }, + "responses": { + "200": { + "headers": {}, + "body": { + "batchItems": [ + { + "statusCode": 200, + "response": { + "summary": { + "query": "atm", + "queryType": "NON_NEAR", + "queryTime": 5, + "numResults": 5, + "offset": 0, + "totalResults": 262, + "fuzzyLevel": 1, + "geoBias": { + "lat": 47.639769, + "lon": -122.128362 + } + }, + "results": [ + { + "type": "POI", + "id": "US/POI/p0/3656546", + "score": 2.671, + "dist": 1336.1815386162032, + "info": "search:ta:840539002005905-US", + "poi": { + "name": "US Bank ATM-MONEYPASS", + "brands": [ + { + "name": "US Bank ATM" + } + ], + "categorySet": [ + { + "id": 7397 + } + ], + "classifications": [ + { + "code": "CASH_DISPENSER", + "names": [ + { + "nameLocale": "en-US", + "name": "cash dispenser" + } + ] + } + ] + }, + "address": { + "streetNumber": "14808", + "streetName": "NE 24th St", + "municipalitySubdivision": "Redmond", + "municipality": "Redmond", + "countrySecondarySubdivision": "King", + "countryTertiarySubdivision": "Seattle East", + "countrySubdivision": "WA", + "postalCode": "98052", + "countryCode": "US", + "country": "United States", + "countryCodeISO3": "USA", + "freeformAddress": "14808 NE 24th St, Redmond, WA 98052", + "localName": "Redmond", + "countrySubdivisionName": "Washington" + }, + "position": { + "lat": 47.63229, + "lon": -122.14232 + }, + "viewport": { + "topLeftPoint": { + "lat": 47.63319, + "lon": -122.14365 + }, + "btmRightPoint": { + "lat": 47.63139, + "lon": -122.14099 + } + }, + "entryPoints": [ + { + "type": "main", + "position": { + "lat": 47.63154, + "lon": -122.1423 + } + } + ] + }, + { + "type": "POI", + "id": "US/POI/p0/8673325", + "score": 2.671, + "dist": 1206.8488178244172, + "info": "search:ta:840539002022072-US", + "poi": { + "name": "US Bank ATM NATIONAL ASSOCIATION", + "brands": [ + { + "name": "US Bank ATM" + } + ], + "categorySet": [ + { + "id": 7397 + } + ], + "classifications": [ + { + "code": "CASH_DISPENSER", + "names": [ + { + "nameLocale": "en-US", + "name": "cash dispenser" + } + ] + } + ] + }, + "address": { + "streetNumber": "15000", + "streetName": "Northeast 24Th Street", + "municipalitySubdivision": "Redmond", + "municipality": "Redmond", + "countrySecondarySubdivision": "King", + "countryTertiarySubdivision": "Seattle East", + "countrySubdivision": "WA", + "postalCode": "98052", + "extendedPostalCode": "980525522", + "countryCode": "US", + "country": "United States", + "countryCodeISO3": "USA", + "freeformAddress": "15000 Northeast 24Th Street, Redmond, WA 98052", + "localName": "Redmond", + "countrySubdivisionName": "Washington" + }, + "position": { + "lat": 47.63265, + "lon": -122.14052 + }, + "viewport": { + "topLeftPoint": { + "lat": 47.63355, + "lon": -122.14185 + }, + "btmRightPoint": { + "lat": 47.63175, + "lon": -122.13919 + } + }, + "entryPoints": [ + { + "type": "minor", + "position": { + "lat": 47.63156, + "lon": -122.14056 + } + }, + { + "type": "minor", + "position": { + "lat": 47.63156, + "lon": -122.14058 + } + }, + { + "type": "main", + "position": { + "lat": 47.63156, + "lon": -122.14048 + } + }, + { + "type": "main", + "position": { + "lat": 47.6324, + "lon": -122.13938 + } + } + ] + }, + { + "type": "POI", + "id": "US/POI/p1/2736315", + "score": 2.671, + "dist": 864.75917765198585, + "info": "search:ta:840539002187855-US", + "poi": { + "name": "US Bank ATM-MONEYPASS", + "brands": [ + { + "name": "US Bank ATM" + } + ], + "categorySet": [ + { + "id": 7397 + } + ], + "classifications": [ + { + "code": "CASH_DISPENSER", + "names": [ + { + "nameLocale": "en-US", + "name": "cash dispenser" + } + ] + } + ] + }, + "address": { + "streetNumber": "15521", + "streetName": "Bel Red Rd", + "municipalitySubdivision": "Redmond, Northeast Bellevue, Bellevue", + "municipality": "Redmond, Bellevue", + "countrySecondarySubdivision": "King", + "countryTertiarySubdivision": "Seattle East", + "countrySubdivision": "WA", + "postalCode": "98052", + "extendedPostalCode": "980525501", + "countryCode": "US", + "country": "United States", + "countryCodeISO3": "USA", + "freeformAddress": "15521 Bel Red Rd, Redmond, WA 98052", + "localName": "Redmond", + "countrySubdivisionName": "Washington" + }, + "position": { + "lat": 47.63259, + "lon": -122.1328 + }, + "viewport": { + "topLeftPoint": { + "lat": 47.63349, + "lon": -122.13413 + }, + "btmRightPoint": { + "lat": 47.63169, + "lon": -122.13147 + } + }, + "entryPoints": [ + { + "type": "main", + "position": { + "lat": 47.63255, + "lon": -122.13275 + } + } + ] + }, + { + "type": "POI", + "id": "US/POI/p0/3656412", + "score": 2.67, + "dist": 2140.1985385809412, + "info": "search:ta:840539001998867-US", + "poi": { + "name": "US Bank ATM NATIONAL ASSOCIATION", + "brands": [ + { + "name": "US Bank ATM" + } + ], + "categorySet": [ + { + "id": 7397 + } + ], + "classifications": [ + { + "code": "CASH_DISPENSER", + "names": [ + { + "nameLocale": "en-US", + "name": "cash dispenser" + } + ] + } + ] + }, + "address": { + "streetNumber": "1128", + "streetName": "156th Ave NE", + "municipalitySubdivision": "Crossroads, Bellevue", + "municipality": "Bellevue", + "countrySecondarySubdivision": "King", + "countryTertiarySubdivision": "Seattle East", + "countrySubdivision": "WA", + "postalCode": "98007", + "countryCode": "US", + "country": "United States", + "countryCodeISO3": "USA", + "freeformAddress": "1128 156th Ave NE, Bellevue, WA 98007", + "localName": "Bellevue", + "countrySubdivisionName": "Washington" + }, + "position": { + "lat": 47.62069, + "lon": -122.13213 + }, + "viewport": { + "topLeftPoint": { + "lat": 47.62159, + "lon": -122.13346 + }, + "btmRightPoint": { + "lat": 47.61979, + "lon": -122.1308 + } + }, + "entryPoints": [ + { + "type": "main", + "position": { + "lat": 47.62069, + "lon": -122.13236 + } + } + ] + }, + { + "type": "POI", + "id": "US/POI/p1/2736876", + "score": 2.67, + "dist": 2140.1985385809412, + "info": "search:ta:840539001396789-US", + "poi": { + "name": "US Bank ATM", + "phone": "+(1)-(800)-8722657", + "brands": [ + { + "name": "US Bank ATM" + } + ], + "categorySet": [ + { + "id": 7397 + } + ], + "url": "www.usbank.com", + "classifications": [ + { + "code": "CASH_DISPENSER", + "names": [ + { + "nameLocale": "en-US", + "name": "cash dispenser" + } + ] + } + ] + }, + "address": { + "streetNumber": "1128", + "streetName": "156th Ave NE", + "municipalitySubdivision": "Crossroads, Bellevue", + "municipality": "Bellevue", + "countrySecondarySubdivision": "King", + "countryTertiarySubdivision": "Seattle East", + "countrySubdivision": "WA", + "postalCode": "98007", + "countryCode": "US", + "country": "United States", + "countryCodeISO3": "USA", + "freeformAddress": "1128 156th Ave NE, Bellevue, WA 98007", + "localName": "Bellevue", + "countrySubdivisionName": "Washington" + }, + "position": { + "lat": 47.62069, + "lon": -122.13213 + }, + "viewport": { + "topLeftPoint": { + "lat": 47.62159, + "lon": -122.13346 + }, + "btmRightPoint": { + "lat": 47.61979, + "lon": -122.1308 + } + }, + "entryPoints": [ + { + "type": "main", + "position": { + "lat": 47.62069, + "lon": -122.13236 + } + } + ] + } + ] + } + }, + { + "statusCode": 200, + "response": { + "summary": { + "query": "statue of liberty", + "queryType": "NON_NEAR", + "queryTime": 37, + "numResults": 2, + "offset": 0, + "totalResults": 18, + "fuzzyLevel": 1 + }, + "results": [ + { + "type": "POI", + "id": "US/POI/p0/9189660", + "score": 6.942, + "info": "search:ta:840369001174316-US", + "poi": { + "name": "Statue of Liberty", + "categorySet": [ + { + "id": 7376003 + } + ], + "classifications": [ + { + "code": "IMPORTANT_TOURIST_ATTRACTION", + "names": [ + { + "nameLocale": "en-US", + "name": "monument" + }, + { + "nameLocale": "en-US", + "name": "important tourist attraction" + } + ] + } + ] + }, + "address": { + "municipalitySubdivision": "New York", + "municipality": "New York", + "countrySecondarySubdivision": "New York", + "countryTertiarySubdivision": "Manhattan", + "countrySubdivision": "NY", + "postalCode": "10004", + "countryCode": "US", + "country": "United States", + "countryCodeISO3": "USA", + "freeformAddress": "New York, NY 10004", + "localName": "New York", + "countrySubdivisionName": "New York" + }, + "position": { + "lat": 40.68955, + "lon": -74.04483 + }, + "viewport": { + "topLeftPoint": { + "lat": 40.69045, + "lon": -74.04602 + }, + "btmRightPoint": { + "lat": 40.68865, + "lon": -74.04364 + } + }, + "entryPoints": [ + { + "type": "main", + "position": { + "lat": 40.69001, + "lon": -74.04683 + } + } + ] + }, + { + "type": "POI", + "id": "US/POI/p1/3264566", + "score": 6.942, + "info": "search:ta:840019000670588-US", + "poi": { + "name": "Statue of Liberty", + "phone": "+(1)-(205)-9700251", + "categorySet": [ + { + "id": 7376003 + } + ], + "url": "www.1bsa.org", + "classifications": [ + { + "code": "IMPORTANT_TOURIST_ATTRACTION", + "names": [ + { + "nameLocale": "en-US", + "name": "important tourist attraction" + } + ] + } + ] + }, + "address": { + "streetNumber": "516", + "streetName": "Liberty Pkwy", + "municipalitySubdivision": "Vestavia Hills", + "municipality": "Vestavia Hills, Birmingham", + "countrySecondarySubdivision": "Jefferson", + "countryTertiarySubdivision": "Leeds", + "countrySubdivision": "AL", + "postalCode": "35242", + "countryCode": "US", + "country": "United States", + "countryCodeISO3": "USA", + "freeformAddress": "516 Liberty Pkwy, Vestavia Hills, AL 35242", + "localName": "Vestavia Hills", + "countrySubdivisionName": "Alabama" + }, + "position": { + "lat": 33.48234, + "lon": -86.70719 + }, + "viewport": { + "topLeftPoint": { + "lat": 33.48324, + "lon": -86.70827 + }, + "btmRightPoint": { + "lat": 33.48144, + "lon": -86.70611 + } + }, + "entryPoints": [ + { + "type": "main", + "position": { + "lat": 33.48129, + "lon": -86.7065 + } + } + ] + } + ] + } + }, + { + "statusCode": 200, + "response": { + "summary": { + "query": "starbucks", + "queryType": "NON_NEAR", + "queryTime": 35, + "numResults": 10, + "offset": 0, + "totalResults": 17, + "fuzzyLevel": 1, + "geoBias": { + "lat": 47.639769, + "lon": -122.128362 + } + }, + "results": [ + { + "type": "POI", + "id": "US/POI/p0/153678", + "score": 2.671, + "dist": 1206.8488178244172, + "info": "search:ta:840531000006554-US", + "poi": { + "name": "Starbucks", + "phone": "+(1)-(425)-8695816", + "brands": [ + { + "name": "Starbucks" + } + ], + "categorySet": [ + { + "id": 9376006 + } + ], + "url": "www.starbucks.com/site-selector", + "classifications": [ + { + "code": "CAFE_PUB", + "names": [ + { + "nameLocale": "en-US", + "name": "coffee shop" + }, + { + "nameLocale": "en-US", + "name": "café/pub" + } + ] + } + ] + }, + "address": { + "streetNumber": "15000", + "streetName": "NE 24th St", + "municipalitySubdivision": "Redmond", + "municipality": "Redmond", + "countrySecondarySubdivision": "King", + "countryTertiarySubdivision": "Seattle East", + "countrySubdivision": "WA", + "postalCode": "98052", + "extendedPostalCode": "980525522", + "countryCode": "US", + "country": "United States", + "countryCodeISO3": "USA", + "freeformAddress": "15000 NE 24th St, Redmond, WA 98052", + "localName": "Redmond", + "countrySubdivisionName": "Washington" + }, + "position": { + "lat": 47.63265, + "lon": -122.14052 + }, + "viewport": { + "topLeftPoint": { + "lat": 47.63355, + "lon": -122.14185 + }, + "btmRightPoint": { + "lat": 47.63175, + "lon": -122.13919 + } + }, + "entryPoints": [ + { + "type": "minor", + "position": { + "lat": 47.63156, + "lon": -122.14056 + } + }, + { + "type": "minor", + "position": { + "lat": 47.63156, + "lon": -122.14058 + } + }, + { + "type": "main", + "position": { + "lat": 47.63156, + "lon": -122.14048 + } + }, + { + "type": "main", + "position": { + "lat": 47.6324, + "lon": -122.13938 + } + } + ] + }, + { + "type": "POI", + "id": "US/POI/p0/152316", + "score": 2.67, + "dist": 2315.294397491255, + "info": "search:ta:840539000484552-US", + "poi": { + "name": "Starbucks", + "phone": "+(1)-(425)-6436471", + "brands": [ + { + "name": "Starbucks" + } + ], + "categorySet": [ + { + "id": 9376006 + } + ], + "url": "www.starbucks.com/store/15097", + "classifications": [ + { + "code": "CAFE_PUB", + "names": [ + { + "nameLocale": "en-US", + "name": "coffee shop" + }, + { + "nameLocale": "en-US", + "name": "café/pub" + } + ] + } + ] + }, + "address": { + "streetNumber": "15600", + "streetName": "NE 8th St", + "municipalitySubdivision": "Crossroads, Bellevue", + "municipality": "Bellevue", + "countrySecondarySubdivision": "King", + "countryTertiarySubdivision": "Seattle East", + "countrySubdivision": "WA", + "postalCode": "98008", + "countryCode": "US", + "country": "United States", + "countryCodeISO3": "USA", + "freeformAddress": "15600 NE 8th St, Bellevue, WA 98008", + "localName": "Bellevue", + "countrySubdivisionName": "Washington" + }, + "position": { + "lat": 47.61896, + "lon": -122.12945 + }, + "viewport": { + "topLeftPoint": { + "lat": 47.61986, + "lon": -122.13078 + }, + "btmRightPoint": { + "lat": 47.61806, + "lon": -122.12812 + } + }, + "entryPoints": [ + { + "type": "main", + "position": { + "lat": 47.619, + "lon": -122.12945 + } + } + ] + }, + { + "type": "POI", + "id": "US/POI/p1/167545", + "score": 2.67, + "dist": 1979.2222952267998, + "info": "search:ta:840539001950429-US", + "poi": { + "name": "Starbucks", + "phone": "+(1)-(425)-7470690", + "brands": [ + { + "name": "Starbucks" + } + ], + "categorySet": [ + { + "id": 9376006 + } + ], + "url": "www.starbucks.com/site-selector", + "classifications": [ + { + "code": "CAFE_PUB", + "names": [ + { + "nameLocale": "en-US", + "name": "coffee shop" + }, + { + "nameLocale": "en-US", + "name": "café/pub" + } + ] + } + ] + }, + "address": { + "streetNumber": "1350", + "streetName": "156th Ave NE", + "municipalitySubdivision": "Crossroads, Bellevue", + "municipality": "Bellevue", + "countrySecondarySubdivision": "King", + "countryTertiarySubdivision": "Seattle East", + "countrySubdivision": "WA", + "postalCode": "98007", + "countryCode": "US", + "country": "United States", + "countryCodeISO3": "USA", + "freeformAddress": "1350 156th Ave NE, Bellevue, WA 98007", + "localName": "Bellevue", + "countrySubdivisionName": "Washington" + }, + "position": { + "lat": 47.62212, + "lon": -122.13179 + }, + "viewport": { + "topLeftPoint": { + "lat": 47.62302, + "lon": -122.13312 + }, + "btmRightPoint": { + "lat": 47.62122, + "lon": -122.13046 + } + }, + "entryPoints": [ + { + "type": "main", + "position": { + "lat": 47.62213, + "lon": -122.13236 + } + } + ] + }, + { + "type": "POI", + "id": "US/POI/p1/168519", + "score": 2.67, + "dist": 2490.3337046455963, + "info": "search:ta:840539001015090-US", + "poi": { + "name": "Starbucks", + "phone": "+(1)-(425)-4556500", + "brands": [ + { + "name": "Starbucks" + } + ], + "categorySet": [ + { + "id": 9376006 + } + ], + "url": "https://www.starbucks.com/store-locator/store/15901", + "classifications": [ + { + "code": "CAFE_PUB", + "names": [ + { + "nameLocale": "en-US", + "name": "coffee shop" + }, + { + "nameLocale": "en-US", + "name": "café/pub" + } + ] + } + ] + }, + "address": { + "streetNumber": "1645", + "streetName": "140th Ave NE", + "municipalitySubdivision": "Crossroads, Bellevue", + "municipality": "Bellevue", + "countrySecondarySubdivision": "King", + "countryTertiarySubdivision": "Seattle East", + "countrySubdivision": "WA", + "postalCode": "98005", + "countryCode": "US", + "country": "United States", + "countryCodeISO3": "USA", + "freeformAddress": "1645 140th Ave NE, Bellevue, WA 98005", + "localName": "Bellevue", + "countrySubdivisionName": "Washington" + }, + "position": { + "lat": 47.62626, + "lon": -122.15487 + }, + "viewport": { + "topLeftPoint": { + "lat": 47.62716, + "lon": -122.1562 + }, + "btmRightPoint": { + "lat": 47.62536, + "lon": -122.15354 + } + }, + "entryPoints": [ + { + "type": "main", + "position": { + "lat": 47.62645, + "lon": -122.15446 + } + }, + { + "type": "minor", + "position": { + "lat": 47.62579, + "lon": -122.15377 + } + } + ] + }, + { + "type": "POI", + "id": "US/POI/p0/152428", + "score": 2.668, + "dist": 3529.7080738812224, + "info": "search:ta:840539001033722-US", + "poi": { + "name": "Starbucks", + "phone": "+(1)-(425)-3789496", + "brands": [ + { + "name": "Starbucks" + } + ], + "categorySet": [ + { + "id": 9376006 + } + ], + "url": "www.starbucks.com/site-selector", + "classifications": [ + { + "code": "CAFE_PUB", + "names": [ + { + "nameLocale": "en-US", + "name": "coffee shop" + }, + { + "nameLocale": "en-US", + "name": "café/pub" + } + ] + } + ] + }, + "address": { + "streetNumber": "180", + "streetName": "148th Ave SE", + "municipalitySubdivision": "West Lake Hills, Bellevue", + "municipality": "Bellevue", + "countrySecondarySubdivision": "King", + "countryTertiarySubdivision": "Seattle East", + "countrySubdivision": "WA", + "postalCode": "98007", + "countryCode": "US", + "country": "United States", + "countryCodeISO3": "USA", + "freeformAddress": "180 148th Ave SE, Bellevue, WA 98007", + "localName": "Bellevue", + "countrySubdivisionName": "Washington" + }, + "position": { + "lat": 47.60901, + "lon": -122.14 + }, + "viewport": { + "topLeftPoint": { + "lat": 47.60991, + "lon": -122.14133 + }, + "btmRightPoint": { + "lat": 47.60811, + "lon": -122.13867 + } + }, + "entryPoints": [ + { + "type": "main", + "position": { + "lat": 47.60901, + "lon": -122.14008 + } + } + ] + }, + { + "type": "POI", + "id": "US/POI/p1/167147", + "score": 2.668, + "dist": 3479.393294615887, + "info": "search:ta:840539000326896-US", + "poi": { + "name": "Starbucks", + "phone": "+(1)-(425)-8619198", + "brands": [ + { + "name": "Starbucks" + } + ], + "categorySet": [ + { + "id": 9376006 + } + ], + "url": "www.starbucks.com/site-selector", + "classifications": [ + { + "code": "CAFE_PUB", + "names": [ + { + "nameLocale": "en-US", + "name": "coffee shop" + }, + { + "nameLocale": "en-US", + "name": "café/pub" + } + ] + } + ] + }, + "address": { + "streetNumber": "7425", + "streetName": "166th Ave NE", + "municipalitySubdivision": "Redmond", + "municipality": "Redmond", + "countrySecondarySubdivision": "King", + "countryTertiarySubdivision": "Seattle East", + "countrySubdivision": "WA", + "postalCode": "98052", + "extendedPostalCode": "980526288", + "countryCode": "US", + "country": "United States", + "countryCodeISO3": "USA", + "freeformAddress": "7425 166th Ave NE, Redmond, WA 98052", + "localName": "Redmond", + "countrySubdivisionName": "Washington" + }, + "position": { + "lat": 47.67055, + "lon": -122.12001 + }, + "viewport": { + "topLeftPoint": { + "lat": 47.67145, + "lon": -122.12135 + }, + "btmRightPoint": { + "lat": 47.66965, + "lon": -122.11867 + } + }, + "entryPoints": [ + { + "type": "main", + "position": { + "lat": 47.67069, + "lon": -122.11889 + } + } + ] + }, + { + "type": "POI", + "id": "US/POI/p0/153695", + "score": 2.667, + "dist": 3622.4410746187291, + "info": "search:ta:840531000006551-US", + "poi": { + "name": "Starbucks", + "phone": "+(1)-(425)-8822881", + "brands": [ + { + "name": "Starbucks" + } + ], + "categorySet": [ + { + "id": 9376006 + } + ], + "url": "www.starbucks.com/store/15022", + "classifications": [ + { + "code": "CAFE_PUB", + "names": [ + { + "nameLocale": "en-US", + "name": "coffee shop" + }, + { + "nameLocale": "en-US", + "name": "café/pub" + } + ] + } + ] + }, + "address": { + "streetNumber": "7625", + "streetName": "170th Ave NE", + "municipalitySubdivision": "Redmond", + "municipality": "Redmond", + "countrySecondarySubdivision": "King", + "countryTertiarySubdivision": "Seattle East", + "countrySubdivision": "WA", + "postalCode": "98052", + "extendedPostalCode": "980520910", + "countryCode": "US", + "country": "United States", + "countryCodeISO3": "USA", + "freeformAddress": "7625 170th Ave NE, Redmond, WA 98052", + "localName": "Redmond", + "countrySubdivisionName": "Washington" + }, + "position": { + "lat": 47.67086, + "lon": -122.11392 + }, + "viewport": { + "topLeftPoint": { + "lat": 47.67176, + "lon": -122.11526 + }, + "btmRightPoint": { + "lat": 47.66996, + "lon": -122.11258 + } + }, + "entryPoints": [ + { + "type": "main", + "position": { + "lat": 47.67073, + "lon": -122.1135 + } + } + ] + }, + { + "type": "POI", + "id": "US/POI/p1/167420", + "score": 2.667, + "dist": 3818.293513029088, + "info": "search:ta:840539000640782-US", + "poi": { + "name": "Starbucks", + "phone": "+(1)-(425)-8853323", + "brands": [ + { + "name": "Starbucks" + } + ], + "categorySet": [ + { + "id": 9376006 + } + ], + "url": "www.starbucks.com/site-selector", + "classifications": [ + { + "code": "CAFE_PUB", + "names": [ + { + "nameLocale": "en-US", + "name": "coffee shop" + }, + { + "nameLocale": "en-US", + "name": "café/pub" + } + ] + } + ] + }, + "address": { + "streetNumber": "17246", + "streetName": "Redmond Way", + "municipalitySubdivision": "Redmond", + "municipality": "Redmond", + "countrySecondarySubdivision": "King", + "countryTertiarySubdivision": "Seattle East", + "countrySubdivision": "WA", + "postalCode": "98052", + "extendedPostalCode": "980524403", + "countryCode": "US", + "country": "United States", + "countryCodeISO3": "USA", + "freeformAddress": "17246 Redmond Way, Redmond, WA 98052", + "localName": "Redmond", + "countrySubdivisionName": "Washington" + }, + "position": { + "lat": 47.67174, + "lon": -122.10976 + }, + "viewport": { + "topLeftPoint": { + "lat": 47.67264, + "lon": -122.1111 + }, + "btmRightPoint": { + "lat": 47.67084, + "lon": -122.10842 + } + }, + "entryPoints": [ + { + "type": "main", + "position": { + "lat": 47.6706, + "lon": -122.11026 + } + } + ] + }, + { + "type": "POI", + "id": "US/POI/p0/153686", + "score": 2.666, + "dist": 4009.9222051470738, + "info": "search:ta:840531000006548-US", + "poi": { + "name": "Starbucks", + "phone": "+(1)-(425)-8859590", + "brands": [ + { + "name": "Starbucks" + } + ], + "categorySet": [ + { + "id": 9376006 + } + ], + "url": "www.starbucks.com/site-selector", + "classifications": [ + { + "code": "CAFE_PUB", + "names": [ + { + "nameLocale": "en-US", + "name": "coffee shop" + }, + { + "nameLocale": "en-US", + "name": "café/pub" + } + ] + } + ] + }, + "address": { + "streetNumber": "15738", + "streetName": "Redmond Way Pad 3 Redmond Center", + "municipalitySubdivision": "Redmond", + "municipality": "Redmond", + "countrySecondarySubdivision": "King", + "countryTertiarySubdivision": "Seattle East", + "countrySubdivision": "WA", + "postalCode": "98052", + "extendedPostalCode": "980523873", + "countryCode": "US", + "country": "United States", + "countryCodeISO3": "USA", + "freeformAddress": "15738 Redmond Way Pad 3 Redmond Center, Redmond, WA 98052", + "localName": "Redmond", + "countrySubdivisionName": "Washington" + }, + "position": { + "lat": 47.67583, + "lon": -122.12877 + }, + "viewport": { + "topLeftPoint": { + "lat": 47.67673, + "lon": -122.13011 + }, + "btmRightPoint": { + "lat": 47.67493, + "lon": -122.12743 + } + }, + "entryPoints": [ + { + "type": "minor", + "position": { + "lat": 47.67456, + "lon": -122.12887 + } + }, + { + "type": "main", + "position": { + "lat": 47.67668, + "lon": -122.12829 + } + } + ] + }, + { + "type": "POI", + "id": "US/POI/p1/168511", + "score": 2.666, + "dist": 3987.80992387863, + "info": "search:ta:840531000006669-US", + "poi": { + "name": "Starbucks", + "phone": "+(1)-(425)-8818265", + "brands": [ + { + "name": "Starbucks" + } + ], + "categorySet": [ + { + "id": 9376006 + } + ], + "url": "www.starbucks.com/site-selector", + "classifications": [ + { + "code": "CAFE_PUB", + "names": [ + { + "nameLocale": "en-US", + "name": "coffee shop" + }, + { + "nameLocale": "en-US", + "name": "café/pub" + } + ] + } + ] + }, + "address": { + "streetNumber": "6617", + "streetName": "132Nd Ave Ne Bridle Trails Shopping Center", + "municipalitySubdivision": "Kirkland, Bridle Trails", + "municipality": "Kirkland", + "countrySecondarySubdivision": "King", + "countryTertiarySubdivision": "Seattle East", + "countrySubdivision": "WA", + "postalCode": "98033", + "extendedPostalCode": "980338234", + "countryCode": "US", + "country": "United States", + "countryCodeISO3": "USA", + "freeformAddress": "6617 132Nd Ave Ne Bridle Trails Shopping Center, Kirkland, WA 98033", + "localName": "Kirkland", + "countrySubdivisionName": "Washington" + }, + "position": { + "lat": 47.66514, + "lon": -122.16599 + }, + "viewport": { + "topLeftPoint": { + "lat": 47.66604, + "lon": -122.16733 + }, + "btmRightPoint": { + "lat": 47.66424, + "lon": -122.16465 + } + }, + "entryPoints": [ + { + "type": "main", + "position": { + "lat": 47.666, + "lon": -122.16669 + } + }, + { + "type": "minor", + "position": { + "lat": 47.66553, + "lon": -122.16405 + } + } + ] + } + ] + } + } + ], + "summary": { + "successfulRequests": 3, + "totalRequests": 3 + } + } + }, + "408": { + "headers": {}, + "body": { + "error": { + "code": "408 Timeout", + "message": "Timeout: The request took longer to finish than the maximum amount of time defined in the api." + } + } + } + } +} diff --git a/specification/maps/data-plane/Microsoft.Maps/Search/preview/1.0/examples/PostSearchInsideFeatureCollection.json b/specification/maps/data-plane/Microsoft.Maps/Search/preview/1.0/examples/PostSearchInsideFeatureCollection.json index 16beafcf6e8b..0f083c1ece65 100644 --- a/specification/maps/data-plane/Microsoft.Maps/Search/preview/1.0/examples/PostSearchInsideFeatureCollection.json +++ b/specification/maps/data-plane/Microsoft.Maps/Search/preview/1.0/examples/PostSearchInsideFeatureCollection.json @@ -1,10 +1,10 @@ { "parameters": { + "geography": "us", "format": "json", "api-version": "1.0", "query": "pizza", "limit": 2, - "subscription-key": "[subscription-key]", "searchInsideGeometryRequestBody": { "geometry": { "type": "FeatureCollection", @@ -211,51 +211,6 @@ } ] } - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive." - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found: the requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "An error occurred while processing the request. Please try again later." - } - } } } } diff --git a/specification/maps/data-plane/Microsoft.Maps/Search/preview/1.0/examples/PostSearchInsideGeometry.json b/specification/maps/data-plane/Microsoft.Maps/Search/preview/1.0/examples/PostSearchInsideGeometry.json index 91505d07f5db..ea801e775cfa 100644 --- a/specification/maps/data-plane/Microsoft.Maps/Search/preview/1.0/examples/PostSearchInsideGeometry.json +++ b/specification/maps/data-plane/Microsoft.Maps/Search/preview/1.0/examples/PostSearchInsideGeometry.json @@ -1,10 +1,10 @@ { "parameters": { + "geography": "us", "format": "json", "api-version": "1.0", "query": "burger", "limit": 2, - "subscription-key": "[subscription-key]", "searchInsideGeometryRequestBody": { "geometry": { "type": "Polygon", @@ -197,51 +197,6 @@ } ] } - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive." - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found: the requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "An error occurred while processing the request. Please try again later." - } - } } } } diff --git a/specification/maps/data-plane/Microsoft.Maps/Search/preview/1.0/examples/PostSearchInsideGeometryCollection.json b/specification/maps/data-plane/Microsoft.Maps/Search/preview/1.0/examples/PostSearchInsideGeometryCollection.json index d7b8f93a7da9..9ad0a2b0cdc3 100644 --- a/specification/maps/data-plane/Microsoft.Maps/Search/preview/1.0/examples/PostSearchInsideGeometryCollection.json +++ b/specification/maps/data-plane/Microsoft.Maps/Search/preview/1.0/examples/PostSearchInsideGeometryCollection.json @@ -1,10 +1,10 @@ { "parameters": { + "geography": "us", "format": "json", "api-version": "1.0", "query": "pizza", "limit": 2, - "subscription-key": "[subscription-key]", "searchInsideGeometryRequestBody": { "geometry": { "type": "GeometryCollection", @@ -225,51 +225,6 @@ } ] } - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive." - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found: the requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "An error occurred while processing the request. Please try again later." - } - } } } } diff --git a/specification/maps/data-plane/Microsoft.Maps/Search/preview/1.0/search.json b/specification/maps/data-plane/Microsoft.Maps/Search/preview/1.0/search.json index 55803cc5462c..61df742491a7 100644 --- a/specification/maps/data-plane/Microsoft.Maps/Search/preview/1.0/search.json +++ b/specification/maps/data-plane/Microsoft.Maps/Search/preview/1.0/search.json @@ -5,14 +5,33 @@ "version": "1.0", "description": "Azure Maps Search REST APIs" }, - "host": "atlas.microsoft.com", + "x-ms-parameterized-host": { + "hostTemplate": "{geography}.atlas.microsoft.com", + "parameters": [ + { + "$ref": "../../../Common/preview/1.0/common.json#/parameters/GeographicResourceLocation" + } + ] + }, "schemes": [ "https" ], "consumes": [], "produces": [ - "application/json", - "application/xml" + "application/json" + ], + "security": [ + { + "azure_auth": [ + "user_impersonation" + ] + }, + { + "SubscriptionKeyInHeader": [] + }, + { + "SubscriptionKeyInQuery": [] + } ], "securityDefinitions": { "azure_auth": { @@ -21,160 +40,44 @@ "flow": "implicit", "description": "These are the [Azure Active Directory OAuth2](https://docs.microsoft.com/en-us/azure/active-directory/develop/v1-overview) Flows. When paired with [Azure Role Based Access](https://docs.microsoft.com/en-us/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#### Note\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* The `Authorization URL` is specific to the Azure public cloud instance. Sovereign clouds have unique Authorization URLs and Azure Active directory configurations. \n* 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.\n* Usage of the [Azure Maps Web SDK](https://aka.ms/amaadmc) allows for configuration based setup of an application for multiple use cases.\n* Currently Azure Active Directory [v1.0](https://docs.microsoft.com/en-us/azure/active-directory/develop/azure-ad-endpoint-comparison) tokens are supported.", "scopes": { - "user_impersonation": "Impersonates a user's Azure Active Directory account." + "user_impersonation": "impersonate your user account" } }, - "apiKeyQuery": { + "SubscriptionKeyInHeader": { "type": "apiKey", - "description": "This is a shared key which 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 which 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": "query" - } - }, - "security": [ - { - "azure_auth": [] - }, - { - "apiKeyQuery": [] - } - ], - "responses": { - "202": { - "description": "Request Accepted: The request has been accepted for processing. Please use the URL in the Location Header to retry or access the results.", - "headers": { - "Location": { - "type": "string", - "description": "New URL to check for the results of the long running process." - } - } - }, - "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 Azure Active Directory 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 AAD bearer token.", - "schema": { - "$ref": "#/definitions/ODataErrorResponse" - }, - "headers": { - "WWW-Authenticate": { - "type": "string", - "description": "Bearer realm=\"https://atlas.microsoft.com/\", error=\"invalid_token\", error_description=\"The access token expired\"" - } - } - }, - "403": { - "description": "Permission, capacity, or authentication issues.", - "schema": { - "$ref": "#/definitions/ODataErrorResponse" - } + "in": "header" }, - "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" - } - }, - "202Async": { - "description": "**Supported only for async request.**\nRequest Accepted: The request has been accepted for processing. Please use the URL in the Location Header to retry or access the results.", - "headers": { - "Location": { - "type": "string", - "description": "New URL to check for the results of the long running process." - } - } + "SubscriptionKeyInQuery": { + "type": "apiKey", + "name": "subscription-key", + "in": "query" } }, + "responses": {}, "parameters": { - "ClientId": { - "name": "x-ms-client-id", - "description": "Specifies which account is intended for usage in conjunction with the Azure AD security model. It represents a unique ID for the Azure Maps account and can be retrieved from Azure Maps management plane Account API. To use Azure AD 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": { + "SearchApiVersion": { "name": "api-version", - "description": "Version number of Azure Maps API. Current version is 1.0", + "description": "Version number of Azure Maps API.", "type": "string", "in": "query", "required": true, "default": "1.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" - }, - "TextFormat": { + "BatchId": { "name": "format", - "description": "Desired format of the response. Value can be either _json_ or _xml_.", + "description": "Batch id for querying the operation.", "type": "string", "in": "path", "required": true, - "enum": [ - "json", - "xml" - ], - "x-ms-enum": { - "name": "TextFormat", - "modelAsString": true, - "values": [ - { - "value": "json", - "description": "[The JavaScript Object Notation Data Interchange Format](https://tools.ietf.org/html/rfc8259)" - }, - { - "value": "xml", - "description": "[The Extensible Markup Language](https://www.w3.org/TR/xml/)" - } - ] - }, "x-ms-parameter-location": "method" }, "LimitSearch": { "name": "limit", "in": "query", "description": "Maximum number of responses that will be returned. Default: 10, minimum: 1 and maximum: 100", - "required": false, "type": "integer", - "default": 10, "minimum": 1, "maximum": 100, "x-ms-parameter-location": "method" @@ -183,9 +86,7 @@ "name": "ofs", "in": "query", "description": "Starting offset of the returned results within the full result set. Default: 0, minimum: 0 and maximum: 1900", - "required": false, "type": "integer", - "default": 0, "minimum": 0, "maximum": 1900, "x-ms-parameter-location": "method" @@ -194,7 +95,6 @@ "name": "lat", "in": "query", "description": "Latitude where results should be biased. E.g. 37.337", - "required": false, "type": "number", "x-ms-parameter-location": "method" }, @@ -202,7 +102,6 @@ "name": "lon", "in": "query", "description": "Longitude where results should be biased. E.g. -121.89", - "required": false, "type": "number", "x-ms-parameter-location": "method" }, @@ -211,7 +110,6 @@ "name": "topLeft", "in": "query", "description": "Top left position of the bounding box. E.g. 37.553,-122.453", - "required": false, "type": "string", "x-ms-parameter-location": "method" }, @@ -220,7 +118,6 @@ "name": "btmRight", "in": "query", "description": "Bottom right position of the bounding box. E.g. 37.553,-122.453", - "required": false, "type": "string", "x-ms-parameter-location": "method" }, @@ -244,7 +141,6 @@ "name": "language", "in": "query", "description": "Language in which search results should be returned. Should be one of supported IETF language tags, case insensitive. When data in specified language is not available for a specific field, default language is used.\n\nPlease refer to [Supported Languages](https://docs.microsoft.com/en-us/azure/azure-maps/supported-languages) for details.", - "required": false, "type": "string", "x-ms-parameter-location": "method" }, @@ -268,7 +164,6 @@ "name": "view", "in": "query", "description": "The View parameter specifies which set of geopolitically disputed content is returned via Azure Maps services, including borders and labels displayed on the map. The View parameter (also referred to as “user region parameter”) will show the correct maps for that country/region. By default, the View parameter is set to “Unified” even if you haven’t defined it in the request. It is your responsibility to determine the location of your users, and then set the View parameter correctly for that location. Alternatively, you have the option to set ‘View=Auto’, which will return the map data based on the IP address of the request. The View parameter in Azure Maps must be used in compliance with applicable laws, including those regarding mapping, of the country where maps, images and other data and third party content that you are authorized to access via Azure Maps is made available. Example: view=IN.\n\nPlease refer to [Supported Views](https://aka.ms/AzureMapsLocalizationViews) for details and to see the available Views.", - "required": false, "type": "string", "x-ms-parameter-location": "method" }, @@ -276,7 +171,6 @@ "name": "idxSet", "in": "query", "description": "A comma separated list of indexes which should be utilized for the search. Item order does not matter. Available indexes are: Addr = Address range interpolation, Geo = Geographies, PAD = Point Addresses, POI = Points of interest, Str = Streets, Xstr = Cross Streets (intersections)", - "required": false, "type": "array", "items": { "type": "string", @@ -326,7 +220,6 @@ "name": "extendedPostalCodesFor", "in": "query", "description": "Indexes for which extended postal codes should be included in the results.\n\nAvailable indexes are: \n\n **Addr** = Address ranges \n\n **Geo** = Geographies \n\n **PAD** = Point Addresses \n\n **POI** = Points of Interest \n\n **Str** = Streets \n\n **XStr** = Cross Streets (intersections)\n\nValue should be a comma separated list of index types (in any order) or **None** for no indexes.\n\nBy default extended postal codes are included for all indexes except Geo. Extended postal code lists for geographies can be quite long so they have to be explicitly requested when needed.\n\nUsage examples:\n\n extendedPostalCodesFor=POI \n\n extendedPostalCodesFor=PAD,Addr,POI \n\n extendedPostalCodesFor=None\n\nExtended postal code is returned as an **extendedPostalCode** property of an address. Availability is region-dependent.", - "required": false, "type": "string", "x-ms-parameter-location": "method" }, @@ -334,7 +227,6 @@ "name": "extendedPostalCodesFor", "in": "query", "description": "Indexes for which extended postal codes should be included in the results.\n\nAvailable indexes are: \n\n **POI** = Points of Interest \n\nValue should be **POI** or **None** to disable extended postal codes.\n\nBy default extended postal codes are included.\n\nUsage examples:\n\n extendedPostalCodesFor=POI \n\n extendedPostalCodesFor=None\n\nExtended postal code is returned as an **extendedPostalCode** property of an address. Availability is region-dependent.", - "required": false, "type": "string", "x-ms-parameter-location": "method" }, @@ -342,16 +234,13 @@ "name": "typeahead", "in": "query", "description": "Boolean. If the typeahead flag is set, the query will be interpreted as a partial input and the search will enter predictive mode", - "required": false, "type": "boolean", - "default": false, "x-ms-parameter-location": "method" }, "CategorySet": { "name": "categorySet", "in": "query", "description": "A comma-separated list of category set IDs which could be used to restrict the result to specific Points of Interest categories. ID order does not matter. When multiple category identifiers are provided, only POIs that belong to (at least) one of the categories from the provided list will be returned. The list of supported categories can be discovered using  [POI Categories API](https://aka.ms/AzureMapsPOICategoryTree). Usage examples: \n\n* **categorySet=7315** (Search Points of Interest from category Restaurant)\n\n* **categorySet=7315025,7315017** (Search Points of Interest of category either Italian or French Restaurant) ", - "required": false, "type": "array", "items": { "type": "integer" @@ -363,7 +252,6 @@ "name": "countrySet", "in": "query", "description": "Comma separated string of country codes, e.g. FR,ES. This will limit the search to the specified countries", - "required": false, "type": "array", "items": { "type": "string" @@ -375,7 +263,6 @@ "name": "radius", "in": "query", "description": "The radius in meters to for the results to be constrained to the defined area", - "required": false, "type": "number", "x-ms-parameter-location": "method" }, @@ -391,7 +278,6 @@ "name": "brandSet", "in": "query", "description": "A comma-separated list of brand names which could be used to restrict the result to specific brands. Item order does not matter. When multiple brands are provided, only results that belong to (at least) one of the provided list will be returned. Brands that contain a \",\" in their name should be put into quotes.\n\nUsage examples:\n\n brandSet=Foo\n\n brandSet=Foo,Bar\n\n brandSet=\"A,B,C Comma\",Bar", - "required": false, "type": "array", "items": { "type": "string" @@ -403,7 +289,6 @@ "name": "connectorSet", "in": "query", "description": "A comma-separated list of connector types which could be used to restrict the result to Electric Vehicle Station supporting specific connector types. Item order does not matter. When multiple connector types are provided, only results that belong to (at least) one of the provided list will be returned.\n\nAvailable connector types are:\n * `StandardHouseholdCountrySpecific` - These are the standard household connectors for a certain region. They are all AC single phase and the standard Voltage and standard Amperage. See also: [Plug & socket types - World Standards](https://www.worldstandards.eu/electricity/plugs-and-sockets).\n * `IEC62196Type1` - Type 1 connector as defined in the IEC 62196-2 standard. Also called Yazaki after the original manufacturer or SAE J1772 after the standard that first published it. Mostly used in combination with 120V single phase or up to 240V single phase infrastructure.\n * `IEC62196Type1CCS` - Type 1 based combo connector as defined in the IEC 62196-3 standard. The connector is based on the Type 1 connector – as defined in the IEC 62196-2 standard – with two additional direct current (DC) contacts to allow DC fast charging.\n * `IEC62196Type2CableAttached` - Type 2 connector as defined in the IEC 62196-2 standard. Provided as a cable and plug attached to the charging point.\n * `IEC62196Type2Outlet` - Type 2 connector as defined in the IEC 62196-2 standard. Provided as a socket set into the charging point.\n * `IEC62196Type2CCS` - Type 2 based combo connector as defined in the IEC 62196-3 standard. The connector is based on the Type 2 connector – as defined in the IEC 62196-2 standard – with two additional direct current (DC) contacts to allow DC fast charging.\n * `IEC62196Type3` - Type 3 connector as defined in the IEC 62196-2 standard. Also called Scame after the original manufacturer. Mostly used in combination with up to 240V single phase or up to 420V three phase infrastructure.\n * `Chademo` - CHAdeMO connector named after an association formed by the Tokyo Electric Power Company and industrial partners. Because of this is is also known as the TEPCO's connector. It supports fast DC charging.\n * `IEC60309AC1PhaseBlue` - Industrial Blue connector is a connector defined in the IEC 60309 standard. It is sometime referred to as by some combination of the standard, the color and the fact that is a single phase connector. The connector usually has the \"P+N+E, 6h\" configuration.\n * `IEC60309DCWhite` - Industrial White connector is a DC connector defined in the IEC 60309 standard.\n * `Tesla` - The Tesla connector is the regionally specific Tesla Supercharger connector. I.e. it refers to either Tesla's proprietary connector, sometimes referred to as Tesla Port mostly limited to North America or the modified Type 2 (DC over Type 2) in Europe.\n\nUsage examples:\n\n connectorSet=IEC62196Type2CableAttached\n connectorSet=IEC62196Type2Outlet,IEC62196Type2CableAttached", - "required": false, "type": "array", "items": { "type": "string", @@ -479,7 +364,6 @@ "description": "Hours of operation for a POI (Points of Interest). The availability of hours of operation will vary based on the data available.\nSupported value: nextSevenDays", "type": "string", "in": "query", - "required": false, "enum": [ "nextSevenDays" ], @@ -499,7 +383,6 @@ "paths": { "/search/polygon/{format}": { "get": { - "x-publish": true, "description": "**Get Polygon**\n\n\n**Applies to**: S1 pricing tier.\n\n\nThe Get Polygon service allows you to request the geometry data such as a city or country outline for a set of entities, previously retrieved from an Online Search request in GeoJSON format. The geometry ID is returned in the dataSources object under \"geometry\" and \"id\" in either a Search Address or Search Fuzzy call.\n\nPlease note that any geometry ID retrieved from an Online Search endpoint has a limited lifetime. The client should not store geometry IDs in persistent storage for later referral, as the stability of these identifiers is not guaranteed for a long period of time. It is expected that a request to the Polygon method is made within a few minutes of the request to the Online Search method that provided the ID. The service allows for batch requests up to 20 identifiers.", "operationId": "Search_GetSearchPolygon", "x-ms-examples": { @@ -509,24 +392,23 @@ }, "parameters": [ { - "$ref": "#/parameters/ClientId" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ClientId" }, { - "$ref": "#/parameters/SubscriptionKey" + "$ref": "#/parameters/SearchApiVersion" }, { - "$ref": "#/parameters/ApiVersion" - }, - { - "$ref": "#/parameters/JsonFormat" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ResponseFormat" }, { "name": "geometries", "in": "query", "description": "Comma separated list of geometry UUIDs, previously retrieved from an Online Search request.", "required": true, - "type": "string", - "x-ms-parameter-location": "method" + "type": "array", + "items": { + "type": "string" + } } ], "responses": { @@ -536,20 +418,8 @@ "$ref": "#/definitions/SearchPolygonResponse" } }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" + "default": { + "$ref": "../../../Common/preview/1.0/common.json#/responses/default" } }, "produces": [ @@ -559,7 +429,6 @@ }, "/search/fuzzy/{format}": { "get": { - "x-publish": true, "description": "\n**Free Form Search**\n\n**Applies to**: S0 and S1 pricing tiers.\n\n\nThe basic default API is Free Form Search which handles the most fuzzy of inputs handling any combination of address or POI tokens. This search API is the canonical 'single line search'. The Free Form Search API is a seamless combination of POI search and geocoding. The API can also be weighted with a contextual position (lat./lon. pair), or fully constrained by a coordinate and radius, or it can be executed more generally without any geo biasing anchor point.

We strongly advise you to use the 'countrySet' parameter to specify only the countries for which your application needs coverage, as the default behavior will be to search the entire world, potentially returning unnecessary results.

E.g.: `countrySet`=US,FR

Please see [Search Coverage](https://docs.microsoft.com/azure/location-based-services/geocoding-coverage) for a complete list of all the supported countries.

Most Search queries default to `maxFuzzyLevel`=2 to gain performance and also reduce unusual results. This new default can be overridden as needed per request by passing in the query param `maxFuzzyLevel`=3 or 4.", "operationId": "Search_GetSearchFuzzy", "x-ms-examples": { @@ -569,24 +438,20 @@ }, "parameters": [ { - "$ref": "#/parameters/ClientId" - }, - { - "$ref": "#/parameters/SubscriptionKey" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ClientId" }, { - "$ref": "#/parameters/ApiVersion" + "$ref": "#/parameters/SearchApiVersion" }, { - "$ref": "#/parameters/TextFormat" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/TextFormat" }, { "name": "query", "in": "query", "description": "The applicable query string (e.g., \"seattle\", \"pizza\"). Can _also_ be specified as a comma separated string composed by latitude followed by longitude (e.g., \"47.641268, -122.125679\"). Must be properly URL encoded.", "required": true, - "type": "string", - "x-ms-parameter-location": "method" + "type": "string" }, { "$ref": "#/parameters/Typeahead" @@ -628,9 +493,7 @@ "name": "minFuzzyLevel", "in": "query", "description": "Minimum fuzziness level to be used. Default: 1, minimum: 1 and maximum: 4\n\n* Level 1 has no spell checking.\n\n* Level 2 uses normal n-gram spell checking. For example, query \"restrant\" can be matched to \"restaurant.\"\n\n* Level 3 uses sound-like spell checking, and shingle spell checking. Sound-like spell checking is for \"rstrnt\" to \"restaurant\" matching. Shingle spell checking is for \"mountainview\" to \"mountain view\" matching.\n\n* Level 4 doesn’t add any more spell checking functions.\n\n\n\nThe search engine will start looking for a match on the level defined by minFuzzyLevel, and will stop searching at the level specified by maxFuzzyLevel.", - "required": false, "type": "integer", - "default": 1, "minimum": 1, "maximum": 4 }, @@ -638,9 +501,7 @@ "name": "maxFuzzyLevel", "in": "query", "description": "Maximum fuzziness level to be used. Default: 2, minimum: 1 and maximum: 4\n\n* Level 1 has no spell checking.\n\n* Level 2 uses normal n-gram spell checking. For example, query \"restrant\" can be matched to \"restaurant.\"\n\n* Level 3 uses sound-like spell checking, and shingle spell checking. Sound-like spell checking is for \"rstrnt\" to \"restaurant\" matching. Shingle spell checking is for \"mountainview\" to \"mountain view\" matching.\n\n* Level 4 doesn’t add any more spell checking functions.\n\n\n\nThe search engine will start looking for a match on the level defined by minFuzzyLevel, and will stop searching at the level specified by maxFuzzyLevel.", - "required": false, "type": "integer", - "default": 2, "minimum": 1, "maximum": 4 }, @@ -664,30 +525,17 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/SearchFuzzyResponse" + "$ref": "#/definitions/SearchCommonResponse" } }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" + "default": { + "$ref": "../../../Common/preview/1.0/common.json#/responses/default" } } } }, "/search/poi/{format}": { "get": { - "x-publish": true, "description": "**Get POI by Name**\n\n**Applies to**: S0 and S1 pricing tiers.\n\n\nPoints of Interest (POI) Search allows you to request POI results by name. Search supports additional query parameters such as language and filtering results by area of interest driven by country or bounding box. Endpoint will return only POI results matching the query string. Response includes POI details such as address, coordinate location and category.", "operationId": "Search_GetSearchPOI", "x-ms-examples": { @@ -697,24 +545,20 @@ }, "parameters": [ { - "$ref": "#/parameters/ClientId" - }, - { - "$ref": "#/parameters/SubscriptionKey" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ClientId" }, { - "$ref": "#/parameters/ApiVersion" + "$ref": "#/parameters/SearchApiVersion" }, { - "$ref": "#/parameters/TextFormat" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/TextFormat" }, { "name": "query", "in": "query", "description": "The POI name to search for (e.g., \"statue of liberty\", \"starbucks\"), must be properly URL encoded.", "required": true, - "type": "string", - "x-ms-parameter-location": "method" + "type": "string" }, { "$ref": "#/parameters/Typeahead" @@ -769,30 +613,17 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/SearchPoiResponse" + "$ref": "#/definitions/SearchCommonResponse" } }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" + "default": { + "$ref": "../../../Common/preview/1.0/common.json#/responses/default" } } } }, "/search/nearby/{format}": { "get": { - "x-publish": true, "description": "**Nearby Search**\n\n**Applies to**: S0 and S1 pricing tiers.\n\n\nIf you have a use case for only retrieving POI results around a specific location, the nearby search method may be the right choice. This endpoint will only return POI results, and does not take in a search query parameter.", "operationId": "Search_GetSearchNearby", "x-ms-examples": { @@ -802,16 +633,13 @@ }, "parameters": [ { - "$ref": "#/parameters/ClientId" - }, - { - "$ref": "#/parameters/SubscriptionKey" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ClientId" }, { - "$ref": "#/parameters/ApiVersion" + "$ref": "#/parameters/SearchApiVersion" }, { - "$ref": "#/parameters/TextFormat" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/TextFormat" }, { "$ref": "#/parameters/RequiredBiasLat" @@ -835,7 +663,6 @@ "name": "radius", "in": "query", "description": "The radius in meters to for the results to be constrained to the defined area, Min value is 1, Max Value is 50000.", - "required": false, "type": "number" }, { @@ -858,30 +685,17 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/SearchNearbyResponse" + "$ref": "#/definitions/SearchCommonResponse" } }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" + "default": { + "$ref": "../../../Common/preview/1.0/common.json#/responses/default" } } } }, "/search/poi/category/{format}": { "get": { - "x-publish": true, "description": "**Get POI by Category**\n\n**Applies to**: S0 and S1 pricing tiers.\n\n\nPoints of Interest (POI) Category Search allows you to request POI results from given category. Search allows to query POIs from one category at a time. Endpoint will only return POI results which are categorized as specified. Response includes POI details such as address, coordinate location and classification.", "operationId": "Search_GetSearchPOICategory", "x-ms-examples": { @@ -891,24 +705,20 @@ }, "parameters": [ { - "$ref": "#/parameters/ClientId" - }, - { - "$ref": "#/parameters/SubscriptionKey" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ClientId" }, { - "$ref": "#/parameters/ApiVersion" + "$ref": "#/parameters/SearchApiVersion" }, { - "$ref": "#/parameters/TextFormat" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/TextFormat" }, { "name": "query", "in": "query", "description": "The POI category to search for (e.g., \"AIRPORT\", \"RESTAURANT\"), must be properly URL encoded. Supported main categories can be requested by calling [Get Search POI Category Tree API](https://aka.ms/AzureMapsPOICategoryTree). List of available categories can also be found [here](https://docs.microsoft.com/azure/azure-maps/supported-search-categories). We recommend to use POI Search Category Tree API to request the supported categories.", "required": true, - "type": "string", - "x-ms-parameter-location": "method" + "type": "string" }, { "$ref": "#/parameters/Typeahead" @@ -963,87 +773,56 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/SearchPoiCategoryResponse" + "$ref": "#/definitions/SearchCommonResponse" } }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" + "default": { + "$ref": "../../../Common/preview/1.0/common.json#/responses/default" } } } }, "/search/poi/category/tree/{format}": { "get": { - "x-publish": true, "description": "**Get POI Category Tree**\n\n**Applies to**: S0 and S1 pricing tiers.\n\n\nPOI Category API provides a full list of supported Points of Interest (POI) categories and subcategories together with their translations and synonyms. The returned content can be used to provide more meaningful results through other Search Service APIs, like [Get Search POI](https://docs.microsoft.com/rest/api/maps/search/getsearchpoi).", "operationId": "Search_GetSearchPOICategoryTreePreview", "x-ms-examples": { "Get the POI Category Tree (only partial response shown below)": { - "$ref": "./examples/GetPOICategoryTree.json" + "$ref": "./examples/GetSearchPOICategoryTree.json" } }, "parameters": [ { - "$ref": "#/parameters/ClientId" - }, - { - "$ref": "#/parameters/SubscriptionKey" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ClientId" }, { - "$ref": "#/parameters/ApiVersion" + "$ref": "#/parameters/SearchApiVersion" }, { - "$ref": "#/parameters/JsonFormat" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ResponseFormat" }, { "name": "language", "in": "query", "description": "Language in which search results should be returned. Should be one of supported IETF language tags, except NGT and NGT-Latn. Language tag is case insensitive. When data in specified language is not available for a specific field, default language is used (English).\n\nPlease refer to [Supported Languages](https://docs.microsoft.com/azure/azure-maps/supported-languages) for details.", - "required": false, - "type": "string", - "x-ms-parameter-location": "method" + "type": "string" } ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/PoiCategoryResponse" + "$ref": "#/definitions/SearchPoiCategoryTreeResponse" } }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" + "default": { + "$ref": "../../../Common/preview/1.0/common.json#/responses/default" } } } }, "/search/address/{format}": { "get": { - "x-publish": true, "description": "**Address Geocoding**\n\n**Applies to**: S0 and S1 pricing tiers.\n\n\nIn many cases, the complete search service might be too much, for instance if you are only interested in traditional geocoding. Search can also be accessed for address look up exclusively. The geocoding is performed by hitting the geocode endpoint with just the address or partial address in question. The geocoding search index will be queried for everything above the street level data. No POIs will be returned. Note that the geocoder is very tolerant of typos and incomplete addresses. It will also handle everything from exact street addresses or street or intersections as well as higher level geographies such as city centers, counties, states etc.", "operationId": "Search_GetSearchAddress", "x-ms-examples": { @@ -1053,24 +832,20 @@ }, "parameters": [ { - "$ref": "#/parameters/ClientId" - }, - { - "$ref": "#/parameters/SubscriptionKey" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ClientId" }, { - "$ref": "#/parameters/ApiVersion" + "$ref": "#/parameters/SearchApiVersion" }, { - "$ref": "#/parameters/TextFormat" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/TextFormat" }, { "name": "query", "in": "query", "description": "The address to search for (e.g., \"1 Microsoft way, Redmond, WA\"), must be properly URL encoded.", "required": true, - "type": "string", - "x-ms-parameter-location": "method" + "type": "string" }, { "$ref": "#/parameters/Typeahead" @@ -1113,30 +888,17 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/SearchAddressResponse" + "$ref": "#/definitions/SearchCommonResponse" } }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" + "default": { + "$ref": "../../../Common/preview/1.0/common.json#/responses/default" } } } }, "/search/address/reverse/{format}": { "get": { - "x-publish": true, "description": "**Reverse Geocode to an Address**\n\n**Applies to**: S0 and S1 pricing tiers.\n\n\nThere may be times when you need to translate a coordinate (example: 37.786505, -122.3862) into a human understandable street address. Most often this is needed in tracking applications where you receive a GPS feed from the device or asset and wish to know what address where the coordinate is located. This endpoint will return address information for a given coordinate.", "operationId": "Search_GetSearchAddressReverse", "x-ms-examples": { @@ -1146,16 +908,13 @@ }, "parameters": [ { - "$ref": "#/parameters/ClientId" - }, - { - "$ref": "#/parameters/SubscriptionKey" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ClientId" }, { - "$ref": "#/parameters/ApiVersion" + "$ref": "#/parameters/SearchApiVersion" }, { - "$ref": "#/parameters/TextFormat" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/TextFormat" }, { "$ref": "#/parameters/Position" @@ -1167,15 +926,12 @@ "name": "returnSpeedLimit", "in": "query", "description": "Boolean. To enable return of the posted speed limit", - "required": false, - "type": "boolean", - "default": false + "type": "boolean" }, { "name": "heading", "in": "query", "description": "The directional heading of the vehicle in degrees, for travel along a segment of roadway. 0 is North, 90 is East and so on, values range from -360 to 360. The precision can include upto one decimal place", - "required": false, "type": "number", "minimum": -360, "maximum": 360 @@ -1187,43 +943,36 @@ "name": "number", "in": "query", "description": "If a number is sent in along with the request, the response may include the side of the street (Left/Right) and also an offset position for that number", - "required": false, "type": "string" }, { "name": "returnRoadUse", "in": "query", "description": "Boolean. To enable return of the road use array for reverse geocodes at street level", - "required": false, - "type": "boolean", - "default": false + "type": "boolean" }, { "name": "roadUse", "in": "query", "description": "To restrict reverse geocodes to a certain type of road use. The road use array for reverse geocodes can be one or more of LimitedAccess, Arterial, Terminal, Ramp, Rotary, LocalStreet", - "required": false, "type": "string" }, { "name": "allowFreeformNewline", "in": "query", "description": "Format of newlines in the formatted address.\n\nIf true, the address will contain newlines.\nIf false, newlines will be converted to commas.", - "required": false, "type": "boolean" }, { "name": "returnMatchType", "in": "query", "description": "Include information on the type of match the geocoder achieved in the response.", - "required": false, "type": "boolean" }, { "name": "entityType", "in": "query", "description": "Specifies the level of filtering performed on geographies. Narrows the search for specified geography entity types, e.g. return only municipality. The resulting response will contain the geography ID as well as the entity type matched. If you provide more than one entity as a comma separated list, endpoint will return the 'smallest entity available'. Returned Geometry ID can be used to get the geometry of that geography via [Get Search Polygon](https://docs.microsoft.com/rest/api/maps/search/getsearchpolygon) API. The following parameters are ignored when entityType is set:\n\n* heading\n* number\n* returnRoadUse\n* returnSpeedLimit\n* roadUse\n* returnMatchType", - "required": false, "type": "string", "enum": [ "Country", @@ -1272,8 +1021,7 @@ "description": "Postal Code / Zip Code" } ] - }, - "x-ms-parameter-location": "method" + } }, { "$ref": "#/parameters/View" @@ -1286,27 +1034,14 @@ "$ref": "#/definitions/SearchAddressReverseResponse" } }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" + "default": { + "$ref": "../../../Common/preview/1.0/common.json#/responses/default" } } } }, "/search/address/reverse/crossStreet/{format}": { "get": { - "x-publish": true, "description": "**Reverse Geocode to a Cross Street**\n\n**Applies to**: S0 and S1 pricing tiers.\n\n\nThere may be times when you need to translate a coordinate (example: 37.786505, -122.3862) into a human understandable cross street. Most often this is needed in tracking applications where you receive a GPS feed from the device or asset and wish to know what address where the coordinate is located.\nThis endpoint will return cross street information for a given coordinate.", "operationId": "Search_GetSearchAddressReverseCrossStreet", "x-ms-examples": { @@ -1316,16 +1051,13 @@ }, "parameters": [ { - "$ref": "#/parameters/ClientId" - }, - { - "$ref": "#/parameters/SubscriptionKey" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ClientId" }, { - "$ref": "#/parameters/ApiVersion" + "$ref": "#/parameters/SearchApiVersion" }, { - "$ref": "#/parameters/TextFormat" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/TextFormat" }, { "$ref": "#/parameters/Position" @@ -1337,7 +1069,6 @@ "name": "heading", "in": "query", "description": "The directional heading of the vehicle in degrees, for travel along a segment of roadway. 0 is North, 90 is East and so on, values range from -360 to 360. The precision can include upto one decimal place", - "required": false, "type": "number", "minimum": -360, "maximum": 360 @@ -1359,27 +1090,14 @@ "$ref": "#/definitions/SearchAddressReverseCrossStreetResponse" } }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" + "default": { + "$ref": "../../../Common/preview/1.0/common.json#/responses/default" } } } }, "/search/address/structured/{format}": { "get": { - "x-publish": true, "description": "**Structured Address Geocoding**\n\n**Applies to**: S0 and S1 pricing tiers.\n\n\nAzure Address Geocoding can also be accessed for structured address look up exclusively. The geocoding search index will be queried for everything above the street level data. No POIs will be returned. Note that the geocoder is very tolerant of typos and incomplete addresses. It will also handle everything from exact street addresses or street or intersections as well as higher level geographies such as city centers, counties, states etc.", "operationId": "Search_GetSearchAddressStructured", "x-ms-examples": { @@ -1389,16 +1107,13 @@ }, "parameters": [ { - "$ref": "#/parameters/ClientId" - }, - { - "$ref": "#/parameters/SubscriptionKey" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ClientId" }, { - "$ref": "#/parameters/ApiVersion" + "$ref": "#/parameters/SearchApiVersion" }, { - "$ref": "#/parameters/TextFormat" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/TextFormat" }, { "$ref": "#/parameters/Language" @@ -1407,7 +1122,6 @@ "name": "countryCode", "in": "query", "description": "The 2 or 3 letter [ISO3166-1](https://www.iso.org/iso-3166-country-codes.html) country code portion of an address. E.g. US.", - "required": true, "default": "US", "type": "string" }, @@ -1421,63 +1135,54 @@ "name": "streetNumber", "in": "query", "description": "The street number portion of an address", - "required": false, "type": "string" }, { "name": "streetName", "in": "query", "description": "The street name portion of an address", - "required": false, "type": "string" }, { "name": "crossStreet", "in": "query", "description": "The cross street name for the structured address", - "required": false, "type": "string" }, { "name": "municipality", "in": "query", "description": "The municipality portion of an address", - "required": false, "type": "string" }, { "name": "municipalitySubdivision", "in": "query", "description": "The municipality subdivision (sub/super city) for the structured address", - "required": false, "type": "string" }, { "name": "countryTertiarySubdivision", "in": "query", "description": "The named area for the structured address", - "required": false, "type": "string" }, { "name": "countrySecondarySubdivision", "in": "query", "description": "The county for the structured address", - "required": false, "type": "string" }, { "name": "countrySubdivision", "in": "query", "description": "The country subdivision portion of an address", - "required": false, "type": "string" }, { "name": "postalCode", "in": "query", "description": "The postal code portion of an address", - "required": false, "type": "string" }, { @@ -1491,30 +1196,17 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/SearchAddressStructuredResponse" + "$ref": "#/definitions/SearchCommonResponse" } }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" + "default": { + "$ref": "../../../Common/preview/1.0/common.json#/responses/default" } } } }, "/search/geometry/{format}": { "post": { - "x-publish": true, "description": "**Applies to**: S0 and S1 pricing tiers.\n\nThe Search Geometry endpoint allows you to perform a free form search inside a single geometry or many of them. The search results that fall inside the geometry/geometries will be returned.

To send the geometry you will use a `POST` request where the request body will contain the `geometry` object represented as a `GeoJSON` type and the `Content-Type` header will be set to `application/json`. The geographical features to be searched can be modeled as Polygon and/or Circle geometries represented using any one of the following `GeoJSON` types:.

", "operationId": "Search_PostSearchInsideGeometry", "x-ms-examples": { @@ -1530,20 +1222,17 @@ }, "parameters": [ { - "$ref": "#/parameters/ClientId" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ClientId" }, { - "$ref": "#/parameters/SubscriptionKey" + "$ref": "#/parameters/SearchApiVersion" }, { - "$ref": "#/parameters/ApiVersion" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/TextFormat" }, { "$ref": "#/parameters/PoiQuery" }, - { - "$ref": "#/parameters/TextFormat" - }, { "$ref": "#/parameters/LimitSearch" }, @@ -1579,30 +1268,17 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/SearchGeometryResponse" + "$ref": "#/definitions/SearchCommonResponse" } }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" + "default": { + "$ref": "../../../Common/preview/1.0/common.json#/responses/default" } } } }, "/search/alongRoute/{format}": { "post": { - "x-publish": true, "description": "**Applies to**: S0 and S1 pricing tiers.\n\n\nThe Search Along Route endpoint allows you to perform a fuzzy search for POIs along a specified route. This search is constrained by specifying the `maxDetourTime` limiting measure.

To send the route-points you will use a `POST` request where the request body will contain the `route` object represented as a `GeoJSON LineString` type and the `Content-Type` header will be set to `application/json`. Each route-point in `route` is represented as a `GeoJSON Position` type i.e. an array where the _longitude_ value is followed by the _latitude_ value and the _altitude_ value is ignored. The `route` should contain at least 2 route-points.

It is possible that original route will be altered, some of it's points may be skipped. If the route that passes through the found point is faster than the original one, the `detourTime` value in the response is negative.", "operationId": "Search_PostSearchAlongRoute", "x-ms-examples": { @@ -1612,22 +1288,19 @@ }, "parameters": [ { - "$ref": "#/parameters/ClientId" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ClientId" }, { - "$ref": "#/parameters/SubscriptionKey" + "$ref": "#/parameters/SearchApiVersion" }, { - "$ref": "#/parameters/ApiVersion" - }, - { - "$ref": "#/parameters/CategorySet" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/TextFormat" }, { "$ref": "#/parameters/PoiQuery" }, { - "$ref": "#/parameters/TextFormat" + "$ref": "#/parameters/CategorySet" }, { "name": "maxDetourTime", @@ -1640,10 +1313,8 @@ { "name": "limit", "description": "Maximum number of responses that will be returned. Default value is 10. Max value is 20", - "required": false, "type": "integer", "in": "query", - "default": 10, "maximum": 20 }, { @@ -1672,53 +1343,33 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/SearchAlongRouteResponse" + "$ref": "#/definitions/SearchCommonResponse" } }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" + "default": { + "$ref": "../../../Common/preview/1.0/common.json#/responses/default" } } } }, - "/search/fuzzy/batch/{format}": { + "/search/fuzzy/batch/sync/{format}": { "post": { - "x-publish": true, - "description": "**Search Fuzzy Batch API**\n\n\n**Applies to**: S1 pricing tier.\n\n\n\nThe Search Address Batch API sends batches of queries to [Search Fuzzy API](https://docs.microsoft.com/en-us/rest/api/maps/search/getsearchfuzzy) using just a single API call. You can call Search Address Fuzzy Batch API to run either asynchronously (async) or synchronously (sync). The async API allows caller to batch up to **10,000** queries and sync API up to **100** queries.\n### Submit Synchronous Batch Request\nThe Synchronous API is recommended for lightweight batch requests. When the service receives a request, it will respond as soon as the batch items are calculated and there will be no possibility to retrieve the results later. The Synchronous API will return a timeout error (a 408 response) if the request takes longer than 60 seconds. The number of batch items is limited to **100** for this API.\n```\nPOST https://atlas.microsoft.com/search/fuzzy/batch/sync/json?api-version=1.0&subscription-key={subscription-key}\n```\n### Submit Asynchronous Batch Request\nThe Asynchronous API is appropriate for processing big volumes of relatively complex search requests\n- It allows the retrieval of results in a separate call (multiple downloads are possible).\n- The asynchronous API is optimized for reliability and is not expected to run into a timeout.\n- The number of batch items is limited to **10,000** for this API.\n\nWhen you make a request by using async request, by default the service returns a 202 response code along a redirect URL in the Location field of the response header. This URL should be checked periodically until the response data or error information is available.\nThe asynchronous responses are stored for **14** days. The redirect URL returns a 404 response if used after the expiration period.\n\nPlease note that asynchronous batch request is a long-running request. Here's a typical sequence of operations:\n1. Client sends a Search Address Batch `POST` request to Azure Maps\n2. The server will respond with one of the following:\n\n > HTTP `202 Accepted` - Batch request has been accepted.\n\n > HTTP `Error` - There was an error processing your Batch request. This could either be a `400 Bad Request` or any other `Error` status code.\n\n3. If the batch request was accepted successfully, the `Location` header in the response contains the URL to download the results of the batch request.\n This status URI looks like following:\n\n```\n GET https://atlas.microsoft.com/batch/{batch-id}?api-version=1.0&subscription-key={subscription-key}\n```\n4. Client issues a `GET` request on the _download URL_ obtained in Step 3 to download the batch results.\n\n### POST Body for Batch Request\nTo send the _search fuzzy_ queries you will use a `POST` request where the request body will contain the `batchItems` array in `json` format and the `Content-Type` header will be set to `application/json`. Here's a sample request body containing 5 _search fuzzy_ queries:\n\n\n```json\n{\n \"batchItems\": [\n {\"query\": \"?query=atm&lat=47.639769&lon=-122.128362&radius=5000&limit=5\"},\n {\"query\": \"?query=Statue Of Liberty&limit=2\"},\n {\"query\": \"?query=Starbucks&lat=47.639769&lon=-122.128362&radius=5000\"},\n {\"query\": \"?query=Space Needle\"},\n {\"query\": \"?query=pizza&limit=10\"}\n ]\n}\n```\n\nA _search fuzzy_ query in a batch is just a partial URL _without_ the protocol, base URL, path, api-version and subscription-key. It can accept any of the supported _search fuzzy_ [URI parameters](https://docs.microsoft.com/en-us/rest/api/maps/search/getsearchfuzzy#uri-parameters). The string values in the _search fuzzy_ query must be properly escaped (e.g. \" character should be escaped with \\\\ ) and it should also be properly URL-encoded.\n\n\nThe async API allows caller to batch up to **10,000** queries and sync API up to **100** queries, and the batch should contain at least **1** query.\n\n\n### Download Asynchronous Batch Results\nTo download the async batch results you will issue a `GET` request to the batch download endpoint. This _download URL_ can be obtained from the `Location` header of a successful `POST` batch request and looks like the following:\n\n```\nhttps://atlas.microsoft.com/batch/{batch-id}?api-version=1.0&subscription-key={subscription-key}\n```\nHere's the typical sequence of operations for downloading the batch results:\n1. Client sends a `GET` request using the _download URL_.\n2. The server will respond with one of the following:\n\n > HTTP `202 Accepted` - Batch request was accepted but is still being processed. Please try again in some time.\n\n > HTTP `200 OK` - Batch request successfully processed. The response body contains all the batch results.\n\n\n\n### Batch Response Model\nThe returned data content is similar for async and sync requests. When downloading the results of an async batch request, if the batch has finished processing, the response body contains the batch response. This batch response contains a `summary` component that indicates the `totalRequests` that were part of the original batch request and `successfulRequests`i.e. queries which were executed successfully. The batch response also includes a `batchItems` array which contains a response for each and every query in the batch request. The `batchItems` will contain the results in the exact same order the original queries were sent in the batch request. Each item in `batchItems` contains `statusCode` and `response` fields. Each `response` in `batchItems` is of one of the following types:\n\n - [`SearchFuzzyResponse`](https://docs.microsoft.com/en-us/rest/api/maps/search/getsearchfuzzy#searchfuzzyresponse) - If the query completed successfully.\n\n - `Error` - If the query failed. The response will contain a `code` and a `message` in this case.\n\n\nHere's a sample Batch Response with 2 _successful_ and 1 _failed_ result:\n\n\n```json\n{\n \"summary\": {\n \"successfulRequests\": 2,\n \"totalRequests\": 3\n },\n \"batchItems\": [\n {\n \"statusCode\": 200,\n \"response\":\n {\n \"summary\": {\n \"query\": \"atm\"\n },\n \"results\": [\n {\n \"type\": \"POI\",\n \"poi\": {\n \"name\": \"ATM at Wells Fargo\"\n },\n \"address\": {\n \"country\": \"United States Of America\",\n \"freeformAddress\": \"3240 157th Ave NE, Redmond, WA 98052\"\n }\n }\n ]\n }\n },\n {\n \"statusCode\": 200,\n \"response\":\n {\n \"summary\": {\n \"query\": \"statue of liberty\"\n },\n \"results\": [\n {\n \"type\": \"POI\",\n \"poi\": {\n \"name\": \"Statue of Liberty\"\n },\n \"address\": {\n \"country\": \"United States Of America\",\n \"freeformAddress\": \"New York, NY 10004\"\n }\n }\n ]\n }\n },\n {\n \"statusCode\": 400,\n \"response\":\n {\n \"error\":\n {\n \"code\": \"400 BadRequest\",\n \"message\": \"Bad request: one or more parameters were incorrectly specified or are mutually exclusive.\"\n }\n }\n }\n ]\n}\n```", - "operationId": "Search_PostSearchFuzzyBatch", - "x-ms-long-running-operation": true, - "x-ms-long-running-operation-options": { - "final-state-via": "location" - }, + "description": "**Search Fuzzy Batch API**\n\n\n**Applies to**: S1 pricing tier.\n\n\n\nThe Search Address Batch API sends batches of queries to [Search Fuzzy API](https://docs.microsoft.com/en-us/rest/api/maps/search/getsearchfuzzy) using just a single API call. You can call Search Address Fuzzy Batch API to run either asynchronously (async) or synchronously (sync). The async API allows caller to batch up to **10,000** queries and sync API up to **100** queries.\n### Submit Synchronous Batch Request\nThe Synchronous API is recommended for lightweight batch requests. When the service receives a request, it will respond as soon as the batch items are calculated and there will be no possibility to retrieve the results later. The Synchronous API will return a timeout error (a 408 response) if the request takes longer than 60 seconds. The number of batch items is limited to **100** for this API.\n```\nPOST https://atlas.microsoft.com/search/fuzzy/batch/sync/json?api-version=1.0&subscription-key={subscription-key}\n```\n### Submit Asynchronous Batch Request\nThe Asynchronous API is appropriate for processing big volumes of relatively complex search requests\n- It allows the retrieval of results in a separate call (multiple downloads are possible).\n- The asynchronous API is optimized for reliability and is not expected to run into a timeout.\n- The number of batch items is limited to **10,000** for this API.\n\nWhen you make a request by using async request, by default the service returns a 202 response code along a redirect URL in the Location field of the response header. This URL should be checked periodically until the response data or error information is available.\nThe asynchronous responses are stored for **14** days. The redirect URL returns a 404 response if used after the expiration period.\n\nPlease note that asynchronous batch request is a long-running request. Here's a typical sequence of operations:\n1. Client sends a Search Address Batch `POST` request to Azure Maps\n2. The server will respond with one of the following:\n\n > HTTP `202 Accepted` - Batch request has been accepted.\n\n > HTTP `Error` - There was an error processing your Batch request. This could either be a `400 Bad Request` or any other `Error` status code.\n\n3. If the batch request was accepted successfully, the `Location` header in the response contains the URL to download the results of the batch request.\n This status URI looks like following:\n\n```\n GET https://atlas.microsoft.com/batch/{batch-id}?api-version=1.0&subscription-key={subscription-key}\n```\n4. Client issues a `GET` request on the _download URL_ obtained in Step 3 to download the batch results.\n\n### POST Body for Batch Request\nTo send the _search fuzzy_ queries you will use a `POST` request where the request body will contain the `batchItems` array in `json` format and the `Content-Type` header will be set to `application/json`. Here's a sample request body containing 5 _search fuzzy_ queries:\n\n\n```json\n{\n \"batchItems\": [\n {\"query\": \"?query=atm&lat=47.639769&lon=-122.128362&radius=5000&limit=5\"},\n {\"query\": \"?query=Statue Of Liberty&limit=2\"},\n {\"query\": \"?query=Starbucks&lat=47.639769&lon=-122.128362&radius=5000\"},\n {\"query\": \"?query=Space Needle\"},\n {\"query\": \"?query=pizza&limit=10\"}\n ]\n}\n```\n\nA _search fuzzy_ query in a batch is just a partial URL _without_ the protocol, base URL, path, api-version and subscription-key. It can accept any of the supported _search fuzzy_ [URI parameters](https://docs.microsoft.com/en-us/rest/api/maps/search/getsearchfuzzy#uri-parameters). The string values in the _search fuzzy_ query must be properly escaped (e.g. \" character should be escaped with \\\\ ) and it should also be properly URL-encoded.\n\n\nThe async API allows caller to batch up to **10,000** queries and sync API up to **100** queries, and the batch should contain at least **1** query.\n\n\n### Download Asynchronous Batch Results\nTo download the async batch results you will issue a `GET` request to the batch download endpoint. This _download URL_ can be obtained from the `Location` header of a successful `POST` batch request and looks like the following:\n\n```\nhttps://atlas.microsoft.com/batch/{batch-id}?api-version=1.0&subscription-key={subscription-key}\n```\nHere's the typical sequence of operations for downloading the batch results:\n1. Client sends a `GET` request using the _download URL_.\n2. The server will respond with one of the following:\n\n > HTTP `202 Accepted` - Batch request was accepted but is still being processed. Please try again in some time.\n\n > HTTP `200 OK` - Batch request successfully processed. The response body contains all the batch results.\n\n\n\n### Batch Response Model\nThe returned data content is similar for async and sync requests. When downloading the results of an async batch request, if the batch has finished processing, the response body contains the batch response. This batch response contains a `summary` component that indicates the `totalRequests` that were part of the original batch request and `successfulRequests`i.e. queries which were executed successfully. The batch response also includes a `batchItems` array which contains a response for each and every query in the batch request. The `batchItems` will contain the results in the exact same order the original queries were sent in the batch request. Each item in `batchItems` contains `statusCode` and `response` fields. Each `response` in `batchItems` is of one of the following types:\n\n - [`SearchCommonResponse`](https://docs.microsoft.com/en-us/rest/api/maps/search/getsearchfuzzy#searchcommonresponse) - If the query completed successfully.\n\n - `Error` - If the query failed. The response will contain a `code` and a `message` in this case.\n\n\nHere's a sample Batch Response with 2 _successful_ and 1 _failed_ result:\n\n\n```json\n{\n \"summary\": {\n \"successfulRequests\": 2,\n \"totalRequests\": 3\n },\n \"batchItems\": [\n {\n \"statusCode\": 200,\n \"response\":\n {\n \"summary\": {\n \"query\": \"atm\"\n },\n \"results\": [\n {\n \"type\": \"POI\",\n \"poi\": {\n \"name\": \"ATM at Wells Fargo\"\n },\n \"address\": {\n \"country\": \"United States Of America\",\n \"freeformAddress\": \"3240 157th Ave NE, Redmond, WA 98052\"\n }\n }\n ]\n }\n },\n {\n \"statusCode\": 200,\n \"response\":\n {\n \"summary\": {\n \"query\": \"statue of liberty\"\n },\n \"results\": [\n {\n \"type\": \"POI\",\n \"poi\": {\n \"name\": \"Statue of Liberty\"\n },\n \"address\": {\n \"country\": \"United States Of America\",\n \"freeformAddress\": \"New York, NY 10004\"\n }\n }\n ]\n }\n },\n {\n \"statusCode\": 400,\n \"response\":\n {\n \"error\":\n {\n \"code\": \"400 BadRequest\",\n \"message\": \"Bad request: one or more parameters were incorrectly specified or are mutually exclusive.\"\n }\n }\n }\n ]\n}\n```", + "operationId": "Search_PostSearchFuzzyBatchSync", "x-ms-examples": { - "A Search Fuzzy Batch API call containing 5 Search Fuzzy API queries": { - "$ref": "./examples/PostSearchFuzzyBatch.json" + "A Sync Search Fuzzy Batch API call containing 5 Search Fuzzy API queries": { + "$ref": "./examples/PostSearchFuzzyBatchSync.json" } }, "parameters": [ { - "$ref": "#/parameters/ClientId" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ClientId" }, { - "$ref": "#/parameters/SubscriptionKey" + "$ref": "#/parameters/SearchApiVersion" }, { - "$ref": "#/parameters/ApiVersion" - }, - { - "$ref": "#/parameters/JsonFormat" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ResponseFormat" }, { "name": "searchFuzzyBatchRequestBody", @@ -1726,7 +1377,7 @@ "description": "The list of search fuzzy queries/requests to process. The list can contain a max of 10,000 queries and must contain at least 1 query.", "required": true, "schema": { - "$ref": "#/definitions/BatchRequestBody" + "$ref": "../../../Common/preview/1.0/common.json#/definitions/BatchRequestBody" } } ], @@ -1734,26 +1385,14 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/BatchResponse" + "$ref": "#/definitions/SearchFuzzyBatchResponse" } }, - "202": { - "$ref": "#/responses/202Async" - }, - "400": { - "$ref": "#/responses/400" + "408": { + "$ref": "../../../Common/preview/1.0/common.json#/responses/408" }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" + "default": { + "$ref": "../../../Common/preview/1.0/common.json#/responses/default" } }, "produces": [ @@ -1761,67 +1400,86 @@ ] } }, - "/search/address/batch/{format}": { + "/search/fuzzy/batch/{format}": { "post": { - "x-publish": true, - "description": "**Search Address Batch API**\n\n\n**Applies to**: S1 pricing tier.\n\n\n\nThe Search Address Batch API sends batches of queries to [Search Address API](https://docs.microsoft.com/en-us/rest/api/maps/search/getsearchaddress) using just a single API call. You can call Search Address Batch API to run either asynchronously (async) or synchronously (sync). The async API allows caller to batch up to **10,000** queries and sync API up to **100** queries.\n### Submit Synchronous Batch Request\nThe Synchronous API is recommended for lightweight batch requests. When the service receives a request, it will respond as soon as the batch items are calculated and there will be no possibility to retrieve the results later. The Synchronous API will return a timeout error (a 408 response) if the request takes longer than 60 seconds. The number of batch items is limited to **100** for this API.\n```\nPOST https://atlas.microsoft.com/search/address/batch/sync/json?api-version=1.0&subscription-key={subscription-key}\n```\n### Submit Asynchronous Batch Request\nThe Asynchronous API is appropriate for processing big volumes of relatively complex search requests\n- It allows the retrieval of results in a separate call (multiple downloads are possible).\n- The asynchronous API is optimized for reliability and is not expected to run into a timeout.\n- The number of batch items is limited to **10,000** for this API.\n\nWhen you make a request by using async request, by default the service returns a 202 response code along a redirect URL in the Location field of the response header. This URL should be checked periodically until the response data or error information is available.\nThe asynchronous responses are stored for **14** days. The redirect URL returns a 404 response if used after the expiration period.\n\nPlease note that asynchronous batch request is a long-running request. Here's a typical sequence of operations:\n1. Client sends a Search Address Batch `POST` request to Azure Maps\n2. The server will respond with one of the following:\n\n > HTTP `202 Accepted` - Batch request has been accepted.\n\n > HTTP `Error` - There was an error processing your Batch request. This could either be a `400 Bad Request` or any other `Error` status code.\n\n3. If the batch request was accepted successfully, the `Location` header in the response contains the URL to download the results of the batch request.\n This status URI looks like following:\n\n```\n GET https://atlas.microsoft.com/batch/{batch-id}?api-version=1.0&subscription-key={subscription-key}\n```\n4. Client issues a `GET` request on the _download URL_ obtained in Step 3 to download the batch results.\n\n### POST Body for Batch Request\nTo send the _search address_ queries you will use a `POST` request where the request body will contain the `batchItems` array in `json` format and the `Content-Type` header will be set to `application/json`. Here's a sample request body containing 5 _search address_ queries:\n\n\n```json\n{\n \"batchItems\": [\n {\"query\": \"?query=400 Broad St, Seattle, WA 98109&limit=3\"},\n {\"query\": \"?query=One, Microsoft Way, Redmond, WA 98052&limit=3\"},\n {\"query\": \"?query=350 5th Ave, New York, NY 10118&limit=1\"},\n {\"query\": \"?query=Pike Pl, Seattle, WA 98101&lat=47.610970&lon=-122.342469&radius=1000\"},\n {\"query\": \"?query=Champ de Mars, 5 Avenue Anatole France, 75007 Paris, France&limit=1\"}\n ]\n}\n```\n\nA _search address_ query in a batch is just a partial URL _without_ the protocol, base URL, path, api-version and subscription-key. It can accept any of the supported _search address_ [URI parameters](https://docs.microsoft.com/en-us/rest/api/maps/search/getsearchaddress#uri-parameters). The string values in the _search address_ query must be properly escaped (e.g. \" character should be escaped with \\\\ ) and it should also be properly URL-encoded.\n\n\nThe async API allows caller to batch up to **10,000** queries and sync API up to **100** queries, and the batch should contain at least **1** query.\n\n\n### Download Asynchronous Batch Results\nTo download the async batch results you will issue a `GET` request to the batch download endpoint. This _download URL_ can be obtained from the `Location` header of a successful `POST` batch request and looks like the following:\n\n```\nhttps://atlas.microsoft.com/batch/{batch-id}?api-version=1.0&subscription-key={subscription-key}\n```\nHere's the typical sequence of operations for downloading the batch results:\n1. Client sends a `GET` request using the _download URL_.\n2. The server will respond with one of the following:\n\n > HTTP `202 Accepted` - Batch request was accepted but is still being processed. Please try again in some time.\n\n > HTTP `200 OK` - Batch request successfully processed. The response body contains all the batch results.\n\n\n\n### Batch Response Model\nThe returned data content is similar for async and sync requests. When downloading the results of an async batch request, if the batch has finished processing, the response body contains the batch response. This batch response contains a `summary` component that indicates the `totalRequests` that were part of the original batch request and `successfulRequests`i.e. queries which were executed successfully. The batch response also includes a `batchItems` array which contains a response for each and every query in the batch request. The `batchItems` will contain the results in the exact same order the original queries were sent in the batch request. Each item in `batchItems` contains `statusCode` and `response` fields. Each `response` in `batchItems` is of one of the following types:\n\n - [`SearchAddressResponse`](https://docs.microsoft.com/en-us/rest/api/maps/search/getsearchaddress#searchaddressresponse) - If the query completed successfully.\n\n - `Error` - If the query failed. The response will contain a `code` and a `message` in this case.\n\n\nHere's a sample Batch Response with 2 _successful_ and 1 _failed_ result:\n\n\n```json\n{\n \"summary\": {\n \"successfulRequests\": 2,\n \"totalRequests\": 3\n },\n \"batchItems\": [\n {\n \"statusCode\": 200,\n \"response\":\n {\n \"summary\": {\n \"query\": \"one microsoft way redmond wa 98052\"\n },\n \"results\": [\n {\n \"position\": {\n \"lat\": 47.63989,\n \"lon\": -122.12509\n }\n }\n ]\n }\n },\n {\n \"statusCode\": 200,\n \"response\":\n {\n \"summary\": {\n \"query\": \"pike pl seattle wa 98101\"\n },\n \"results\": [\n {\n \"position\": {\n \"lat\": 47.60963,\n \"lon\": -122.34215\n }\n }\n ]\n }\n },\n {\n \"statusCode\": 400,\n \"response\":\n {\n \"error\":\n {\n \"code\": \"400 BadRequest\",\n \"message\": \"Bad request: one or more parameters were incorrectly specified or are mutually exclusive.\"\n }\n }\n }\n ]\n}\n```", - "operationId": "Search_PostSearchAddressBatch", + "description": "**Search Fuzzy Batch API**\n\n\n**Applies to**: S1 pricing tier.\n\n\n\nThe Search Address Batch API sends batches of queries to [Search Fuzzy API](https://docs.microsoft.com/en-us/rest/api/maps/search/getsearchfuzzy) using just a single API call. You can call Search Address Fuzzy Batch API to run either asynchronously (async) or synchronously (sync). The async API allows caller to batch up to **10,000** queries and sync API up to **100** queries.\n### Submit Synchronous Batch Request\nThe Synchronous API is recommended for lightweight batch requests. When the service receives a request, it will respond as soon as the batch items are calculated and there will be no possibility to retrieve the results later. The Synchronous API will return a timeout error (a 408 response) if the request takes longer than 60 seconds. The number of batch items is limited to **100** for this API.\n```\nPOST https://atlas.microsoft.com/search/fuzzy/batch/sync/json?api-version=1.0&subscription-key={subscription-key}\n```\n### Submit Asynchronous Batch Request\nThe Asynchronous API is appropriate for processing big volumes of relatively complex search requests\n- It allows the retrieval of results in a separate call (multiple downloads are possible).\n- The asynchronous API is optimized for reliability and is not expected to run into a timeout.\n- The number of batch items is limited to **10,000** for this API.\n\nWhen you make a request by using async request, by default the service returns a 202 response code along a redirect URL in the Location field of the response header. This URL should be checked periodically until the response data or error information is available.\nThe asynchronous responses are stored for **14** days. The redirect URL returns a 404 response if used after the expiration period.\n\nPlease note that asynchronous batch request is a long-running request. Here's a typical sequence of operations:\n1. Client sends a Search Address Batch `POST` request to Azure Maps\n2. The server will respond with one of the following:\n\n > HTTP `202 Accepted` - Batch request has been accepted.\n\n > HTTP `Error` - There was an error processing your Batch request. This could either be a `400 Bad Request` or any other `Error` status code.\n\n3. If the batch request was accepted successfully, the `Location` header in the response contains the URL to download the results of the batch request.\n This status URI looks like following:\n\n```\n GET https://atlas.microsoft.com/batch/{batch-id}?api-version=1.0&subscription-key={subscription-key}\n```\n4. Client issues a `GET` request on the _download URL_ obtained in Step 3 to download the batch results.\n\n### POST Body for Batch Request\nTo send the _search fuzzy_ queries you will use a `POST` request where the request body will contain the `batchItems` array in `json` format and the `Content-Type` header will be set to `application/json`. Here's a sample request body containing 5 _search fuzzy_ queries:\n\n\n```json\n{\n \"batchItems\": [\n {\"query\": \"?query=atm&lat=47.639769&lon=-122.128362&radius=5000&limit=5\"},\n {\"query\": \"?query=Statue Of Liberty&limit=2\"},\n {\"query\": \"?query=Starbucks&lat=47.639769&lon=-122.128362&radius=5000\"},\n {\"query\": \"?query=Space Needle\"},\n {\"query\": \"?query=pizza&limit=10\"}\n ]\n}\n```\n\nA _search fuzzy_ query in a batch is just a partial URL _without_ the protocol, base URL, path, api-version and subscription-key. It can accept any of the supported _search fuzzy_ [URI parameters](https://docs.microsoft.com/en-us/rest/api/maps/search/getsearchfuzzy#uri-parameters). The string values in the _search fuzzy_ query must be properly escaped (e.g. \" character should be escaped with \\\\ ) and it should also be properly URL-encoded.\n\n\nThe async API allows caller to batch up to **10,000** queries and sync API up to **100** queries, and the batch should contain at least **1** query.\n\n\n### Download Asynchronous Batch Results\nTo download the async batch results you will issue a `GET` request to the batch download endpoint. This _download URL_ can be obtained from the `Location` header of a successful `POST` batch request and looks like the following:\n\n```\nhttps://atlas.microsoft.com/batch/{batch-id}?api-version=1.0&subscription-key={subscription-key}\n```\nHere's the typical sequence of operations for downloading the batch results:\n1. Client sends a `GET` request using the _download URL_.\n2. The server will respond with one of the following:\n\n > HTTP `202 Accepted` - Batch request was accepted but is still being processed. Please try again in some time.\n\n > HTTP `200 OK` - Batch request successfully processed. The response body contains all the batch results.\n\n\n\n### Batch Response Model\nThe returned data content is similar for async and sync requests. When downloading the results of an async batch request, if the batch has finished processing, the response body contains the batch response. This batch response contains a `summary` component that indicates the `totalRequests` that were part of the original batch request and `successfulRequests`i.e. queries which were executed successfully. The batch response also includes a `batchItems` array which contains a response for each and every query in the batch request. The `batchItems` will contain the results in the exact same order the original queries were sent in the batch request. Each item in `batchItems` contains `statusCode` and `response` fields. Each `response` in `batchItems` is of one of the following types:\n\n - [`SearchCommonResponse`](https://docs.microsoft.com/en-us/rest/api/maps/search/getsearchfuzzy#searchcommonresponse) - If the query completed successfully.\n\n - `Error` - If the query failed. The response will contain a `code` and a `message` in this case.\n\n\nHere's a sample Batch Response with 2 _successful_ and 1 _failed_ result:\n\n\n```json\n{\n \"summary\": {\n \"successfulRequests\": 2,\n \"totalRequests\": 3\n },\n \"batchItems\": [\n {\n \"statusCode\": 200,\n \"response\":\n {\n \"summary\": {\n \"query\": \"atm\"\n },\n \"results\": [\n {\n \"type\": \"POI\",\n \"poi\": {\n \"name\": \"ATM at Wells Fargo\"\n },\n \"address\": {\n \"country\": \"United States Of America\",\n \"freeformAddress\": \"3240 157th Ave NE, Redmond, WA 98052\"\n }\n }\n ]\n }\n },\n {\n \"statusCode\": 200,\n \"response\":\n {\n \"summary\": {\n \"query\": \"statue of liberty\"\n },\n \"results\": [\n {\n \"type\": \"POI\",\n \"poi\": {\n \"name\": \"Statue of Liberty\"\n },\n \"address\": {\n \"country\": \"United States Of America\",\n \"freeformAddress\": \"New York, NY 10004\"\n }\n }\n ]\n }\n },\n {\n \"statusCode\": 400,\n \"response\":\n {\n \"error\":\n {\n \"code\": \"400 BadRequest\",\n \"message\": \"Bad request: one or more parameters were incorrectly specified or are mutually exclusive.\"\n }\n }\n }\n ]\n}\n```", + "operationId": "Search_PostSearchFuzzyBatch", "x-ms-long-running-operation": true, "x-ms-long-running-operation-options": { "final-state-via": "location" }, "x-ms-examples": { - "An Address Geocoding Batch API call containing 5 Address Geocoding API queries": { - "$ref": "./examples/PostSearchAddressBatch.json" + "A Search Fuzzy Batch API call containing 5 Search Fuzzy API queries": { + "$ref": "./examples/PostSearchFuzzyBatch.json" } }, "parameters": [ { - "$ref": "#/parameters/ClientId" - }, - { - "$ref": "#/parameters/SubscriptionKey" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ClientId" }, { - "$ref": "#/parameters/ApiVersion" + "$ref": "#/parameters/SearchApiVersion" }, { - "$ref": "#/parameters/JsonFormat" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ResponseFormat" }, { - "name": "searchAddressBatchRequestBody", + "name": "searchFuzzyBatchRequestBody", "in": "body", - "description": "The list of address geocoding queries/requests to process. The list can contain a max of 10,000 queries and must contain at least 1 query.", + "description": "The list of search fuzzy queries/requests to process. The list can contain a max of 10,000 queries and must contain at least 1 query.", "required": true, "schema": { - "$ref": "#/definitions/BatchRequestBody" + "$ref": "../../../Common/preview/1.0/common.json#/definitions/BatchRequestBody" } } ], + "responses": { + "202": { + "$ref": "../../../Common/preview/1.0/common.json#/responses/202Async" + }, + "default": { + "$ref": "../../../Common/preview/1.0/common.json#/responses/default" + } + }, + "produces": [ + "application/json" + ] + }, + "get": { + "description": "**Search Fuzzy Batch API**\n\n\n**Applies to**: S1 pricing tier.\n\n\n\nThe Search Address Batch API sends batches of queries to [Search Fuzzy API](https://docs.microsoft.com/en-us/rest/api/maps/search/getsearchfuzzy) using just a single API call. You can call Search Address Fuzzy Batch API to run either asynchronously (async) or synchronously (sync). The async API allows caller to batch up to **10,000** queries and sync API up to **100** queries.\n### Submit Synchronous Batch Request\nThe Synchronous API is recommended for lightweight batch requests. When the service receives a request, it will respond as soon as the batch items are calculated and there will be no possibility to retrieve the results later. The Synchronous API will return a timeout error (a 408 response) if the request takes longer than 60 seconds. The number of batch items is limited to **100** for this API.\n```\nPOST https://atlas.microsoft.com/search/fuzzy/batch/sync/json?api-version=1.0&subscription-key={subscription-key}\n```\n### Submit Asynchronous Batch Request\nThe Asynchronous API is appropriate for processing big volumes of relatively complex search requests\n- It allows the retrieval of results in a separate call (multiple downloads are possible).\n- The asynchronous API is optimized for reliability and is not expected to run into a timeout.\n- The number of batch items is limited to **10,000** for this API.\n\nWhen you make a request by using async request, by default the service returns a 202 response code along a redirect URL in the Location field of the response header. This URL should be checked periodically until the response data or error information is available.\nThe asynchronous responses are stored for **14** days. The redirect URL returns a 404 response if used after the expiration period.\n\nPlease note that asynchronous batch request is a long-running request. Here's a typical sequence of operations:\n1. Client sends a Search Address Batch `POST` request to Azure Maps\n2. The server will respond with one of the following:\n\n > HTTP `202 Accepted` - Batch request has been accepted.\n\n > HTTP `Error` - There was an error processing your Batch request. This could either be a `400 Bad Request` or any other `Error` status code.\n\n3. If the batch request was accepted successfully, the `Location` header in the response contains the URL to download the results of the batch request.\n This status URI looks like following:\n\n```\n GET https://atlas.microsoft.com/batch/{batch-id}?api-version=1.0&subscription-key={subscription-key}\n```\n4. Client issues a `GET` request on the _download URL_ obtained in Step 3 to download the batch results.\n\n### POST Body for Batch Request\nTo send the _search fuzzy_ queries you will use a `POST` request where the request body will contain the `batchItems` array in `json` format and the `Content-Type` header will be set to `application/json`. Here's a sample request body containing 5 _search fuzzy_ queries:\n\n\n```json\n{\n \"batchItems\": [\n {\"query\": \"?query=atm&lat=47.639769&lon=-122.128362&radius=5000&limit=5\"},\n {\"query\": \"?query=Statue Of Liberty&limit=2\"},\n {\"query\": \"?query=Starbucks&lat=47.639769&lon=-122.128362&radius=5000\"},\n {\"query\": \"?query=Space Needle\"},\n {\"query\": \"?query=pizza&limit=10\"}\n ]\n}\n```\n\nA _search fuzzy_ query in a batch is just a partial URL _without_ the protocol, base URL, path, api-version and subscription-key. It can accept any of the supported _search fuzzy_ [URI parameters](https://docs.microsoft.com/en-us/rest/api/maps/search/getsearchfuzzy#uri-parameters). The string values in the _search fuzzy_ query must be properly escaped (e.g. \" character should be escaped with \\\\ ) and it should also be properly URL-encoded.\n\n\nThe async API allows caller to batch up to **10,000** queries and sync API up to **100** queries, and the batch should contain at least **1** query.\n\n\n### Download Asynchronous Batch Results\nTo download the async batch results you will issue a `GET` request to the batch download endpoint. This _download URL_ can be obtained from the `Location` header of a successful `POST` batch request and looks like the following:\n\n```\nhttps://atlas.microsoft.com/batch/{batch-id}?api-version=1.0&subscription-key={subscription-key}\n```\nHere's the typical sequence of operations for downloading the batch results:\n1. Client sends a `GET` request using the _download URL_.\n2. The server will respond with one of the following:\n\n > HTTP `202 Accepted` - Batch request was accepted but is still being processed. Please try again in some time.\n\n > HTTP `200 OK` - Batch request successfully processed. The response body contains all the batch results.\n\n\n\n### Batch Response Model\nThe returned data content is similar for async and sync requests. When downloading the results of an async batch request, if the batch has finished processing, the response body contains the batch response. This batch response contains a `summary` component that indicates the `totalRequests` that were part of the original batch request and `successfulRequests`i.e. queries which were executed successfully. The batch response also includes a `batchItems` array which contains a response for each and every query in the batch request. The `batchItems` will contain the results in the exact same order the original queries were sent in the batch request. Each item in `batchItems` contains `statusCode` and `response` fields. Each `response` in `batchItems` is of one of the following types:\n\n - [`SearchCommonResponse`](https://docs.microsoft.com/en-us/rest/api/maps/search/getsearchfuzzy#searchcommonresponse) - If the query completed successfully.\n\n - `Error` - If the query failed. The response will contain a `code` and a `message` in this case.\n\n\nHere's a sample Batch Response with 2 _successful_ and 1 _failed_ result:\n\n\n```json\n{\n \"summary\": {\n \"successfulRequests\": 2,\n \"totalRequests\": 3\n },\n \"batchItems\": [\n {\n \"statusCode\": 200,\n \"response\":\n {\n \"summary\": {\n \"query\": \"atm\"\n },\n \"results\": [\n {\n \"type\": \"POI\",\n \"poi\": {\n \"name\": \"ATM at Wells Fargo\"\n },\n \"address\": {\n \"country\": \"United States Of America\",\n \"freeformAddress\": \"3240 157th Ave NE, Redmond, WA 98052\"\n }\n }\n ]\n }\n },\n {\n \"statusCode\": 200,\n \"response\":\n {\n \"summary\": {\n \"query\": \"statue of liberty\"\n },\n \"results\": [\n {\n \"type\": \"POI\",\n \"poi\": {\n \"name\": \"Statue of Liberty\"\n },\n \"address\": {\n \"country\": \"United States Of America\",\n \"freeformAddress\": \"New York, NY 10004\"\n }\n }\n ]\n }\n },\n {\n \"statusCode\": 400,\n \"response\":\n {\n \"error\":\n {\n \"code\": \"400 BadRequest\",\n \"message\": \"Bad request: one or more parameters were incorrectly specified or are mutually exclusive.\"\n }\n }\n }\n ]\n}\n```", + "operationId": "Search_GetSearchFuzzyBatch", + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "original-uri" + }, + "x-ms-examples": { + "A Search Fuzzy Batch API GET call containing 5 Search Fuzzy API queries": { + "$ref": "./examples/GetSearchFuzzyBatch.json" + } + }, + "parameters": [ + { + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ClientId" + }, + { + "$ref": "#/parameters/SearchApiVersion" + }, + { + "$ref": "#/parameters/BatchId" + } + ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/BatchResponse" + "$ref": "#/definitions/SearchFuzzyBatchResponse" } }, "202": { - "$ref": "#/responses/202Async" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" + "$ref": "../../../Common/preview/1.0/common.json#/responses/202Batch" }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" + "default": { + "$ref": "../../../Common/preview/1.0/common.json#/responses/default" } }, "produces": [ @@ -1829,1216 +1487,334 @@ ] } }, - "/search/address/reverse/batch/{format}": { + "/search/address/batch/{format}": { "post": { - "x-publish": true, - "description": "**Search Address Reverse Batch API**\n\n\n**Applies to**: S1 pricing tier.\n\n\n\nThe Search Address Batch API sends batches of queries to [Search Address Reverse API](https://docs.microsoft.com/en-us/rest/api/maps/search/getsearchaddressreverse) using just a single API call. You can call Search Address Reverse Batch API to run either asynchronously (async) or synchronously (sync). The async API allows caller to batch up to **10,000** queries and sync API up to **100** queries.\n### Submit Synchronous Batch Request\nThe Synchronous API is recommended for lightweight batch requests. When the service receives a request, it will respond as soon as the batch items are calculated and there will be no possibility to retrieve the results later. The Synchronous API will return a timeout error (a 408 response) if the request takes longer than 60 seconds. The number of batch items is limited to **100** for this API.\n```\nPOST https://atlas.microsoft.com/search/address/reverse/batch/sync/json?api-version=1.0&subscription-key={subscription-key}\n```\n### Submit Asynchronous Batch Request\nThe Asynchronous API is appropriate for processing big volumes of relatively complex search requests\n- It allows the retrieval of results in a separate call (multiple downloads are possible).\n- The asynchronous API is optimized for reliability and is not expected to run into a timeout.\n- The number of batch items is limited to **10,000** for this API.\n\nWhen you make a request by using async request, by default the service returns a 202 response code along a redirect URL in the Location field of the response header. This URL should be checked periodically until the response data or error information is available.\nThe asynchronous responses are stored for **14** days. The redirect URL returns a 404 response if used after the expiration period.\n\nPlease note that asynchronous batch request is a long-running request. Here's a typical sequence of operations:\n1. Client sends a Search Address Batch `POST` request to Azure Maps\n2. The server will respond with one of the following:\n\n > HTTP `202 Accepted` - Batch request has been accepted.\n\n > HTTP `Error` - There was an error processing your Batch request. This could either be a `400 Bad Request` or any other `Error` status code.\n\n3. If the batch request was accepted successfully, the `Location` header in the response contains the URL to download the results of the batch request.\n This status URI looks like following:\n\n```\n GET https://atlas.microsoft.com/batch/{batch-id}?api-version=1.0&subscription-key={subscription-key}\n```\n4. Client issues a `GET` request on the _download URL_ obtained in Step 3 to download the batch results.\n\n### POST Body for Batch Request\nTo send the _search address reverse_ queries you will use a `POST` request where the request body will contain the `batchItems` array in `json` format and the `Content-Type` header will be set to `application/json`. Here's a sample request body containing 5 _search address reverse_ queries:\n\n\n```json\n{\n \"batchItems\": [\n {\"query\": \"?query=48.858561,2.294911\"},\n {\"query\": \"?query=47.639765,-122.127896&radius=5000&limit=2\"},\n {\"query\": \"?query=47.621028,-122.348170\"},\n {\"query\": \"?query=43.722990,10.396695\"},\n {\"query\": \"?query=40.750958,-73.982336\"}\n ]\n}\n```\n\nA _search address reverse_ query in a batch is just a partial URL _without_ the protocol, base URL, path, api-version and subscription-key. It can accept any of the supported _search address reverse_ [URI parameters](https://docs.microsoft.com/en-us/rest/api/maps/search/getsearchaddressreverse#uri-parameters). The string values in the _search address reverse_ query must be properly escaped (e.g. \" character should be escaped with \\\\ ) and it should also be properly URL-encoded.\n\n\nThe async API allows caller to batch up to **10,000** queries and sync API up to **100** queries, and the batch should contain at least **1** query.\n\n\n### Download Asynchronous Batch Results\nTo download the async batch results you will issue a `GET` request to the batch download endpoint. This _download URL_ can be obtained from the `Location` header of a successful `POST` batch request and looks like the following:\n\n```\nhttps://atlas.microsoft.com/batch/{batch-id}?api-version=1.0&subscription-key={subscription-key}\n```\nHere's the typical sequence of operations for downloading the batch results:\n1. Client sends a `GET` request using the _download URL_.\n2. The server will respond with one of the following:\n\n > HTTP `202 Accepted` - Batch request was accepted but is still being processed. Please try again in some time.\n\n > HTTP `200 OK` - Batch request successfully processed. The response body contains all the batch results.\n\n\n\n### Batch Response Model\nThe returned data content is similar for async and sync requests. When downloading the results of an async batch request, if the batch has finished processing, the response body contains the batch response. This batch response contains a `summary` component that indicates the `totalRequests` that were part of the original batch request and `successfulRequests`i.e. queries which were executed successfully. The batch response also includes a `batchItems` array which contains a response for each and every query in the batch request. The `batchItems` will contain the results in the exact same order the original queries were sent in the batch request. Each item in `batchItems` contains `statusCode` and `response` fields. Each `response` in `batchItems` is of one of the following types:\n\n - [`SearchAddressReverseResponse`](https://docs.microsoft.com/en-us/rest/api/maps/search/getsearchaddressreverse#searchaddressreverseresponse) - If the query completed successfully.\n\n - `Error` - If the query failed. The response will contain a `code` and a `message` in this case.\n\n\nHere's a sample Batch Response with 2 _successful_ and 1 _failed_ result:\n\n\n```json\n{\n \"summary\": {\n \"successfulRequests\": 2,\n \"totalRequests\": 3\n },\n \"batchItems\": [\n {\n \"statusCode\": 200,\n \"response\":\n {\n \"summary\": {\n \"queryTime\": 11\n },\n \"addresses\": [\n {\n \"address\": {\n \"country\": \"France\",\n \"freeformAddress\": \"Avenue Anatole France, 75007 Paris\"\n },\n \"position\": \"48.858490,2.294820\"\n }\n ]\n }\n },\n {\n \"statusCode\": 200,\n \"response\":\n {\n \"summary\": {\n \"queryTime\": 1\n },\n \"addresses\": [\n {\n \"address\": {\n \"country\": \"United States of America\",\n \"freeformAddress\": \"157th Pl NE, Redmond WA 98052\"\n },\n \"position\": \"47.640470,-122.129430\"\n }\n ]\n }\n },\n {\n \"statusCode\": 400,\n \"response\":\n {\n \"error\":\n {\n \"code\": \"400 BadRequest\",\n \"message\": \"Bad request: one or more parameters were incorrectly specified or are mutually exclusive.\"\n }\n }\n }\n ]\n}\n```", - "operationId": "Search_PostSearchAddressReverseBatch", + "description": "**Search Address Batch API**\n\n\n**Applies to**: S1 pricing tier.\n\n\n\nThe Search Address Batch API sends batches of queries to [Search Address API](https://docs.microsoft.com/en-us/rest/api/maps/search/getsearchaddress) using just a single API call. You can call Search Address Batch API to run either asynchronously (async) or synchronously (sync). The async API allows caller to batch up to **10,000** queries and sync API up to **100** queries.\n### Submit Synchronous Batch Request\nThe Synchronous API is recommended for lightweight batch requests. When the service receives a request, it will respond as soon as the batch items are calculated and there will be no possibility to retrieve the results later. The Synchronous API will return a timeout error (a 408 response) if the request takes longer than 60 seconds. The number of batch items is limited to **100** for this API.\n```\nPOST https://atlas.microsoft.com/search/address/batch/sync/json?api-version=1.0&subscription-key={subscription-key}\n```\n### Submit Asynchronous Batch Request\nThe Asynchronous API is appropriate for processing big volumes of relatively complex search requests\n- It allows the retrieval of results in a separate call (multiple downloads are possible).\n- The asynchronous API is optimized for reliability and is not expected to run into a timeout.\n- The number of batch items is limited to **10,000** for this API.\n\nWhen you make a request by using async request, by default the service returns a 202 response code along a redirect URL in the Location field of the response header. This URL should be checked periodically until the response data or error information is available.\nThe asynchronous responses are stored for **14** days. The redirect URL returns a 404 response if used after the expiration period.\n\nPlease note that asynchronous batch request is a long-running request. Here's a typical sequence of operations:\n1. Client sends a Search Address Batch `POST` request to Azure Maps\n2. The server will respond with one of the following:\n\n > HTTP `202 Accepted` - Batch request has been accepted.\n\n > HTTP `Error` - There was an error processing your Batch request. This could either be a `400 Bad Request` or any other `Error` status code.\n\n3. If the batch request was accepted successfully, the `Location` header in the response contains the URL to download the results of the batch request.\n This status URI looks like following:\n\n```\n GET https://atlas.microsoft.com/batch/{batch-id}?api-version=1.0&subscription-key={subscription-key}\n```\n4. Client issues a `GET` request on the _download URL_ obtained in Step 3 to download the batch results.\n\n### POST Body for Batch Request\nTo send the _search address_ queries you will use a `POST` request where the request body will contain the `batchItems` array in `json` format and the `Content-Type` header will be set to `application/json`. Here's a sample request body containing 5 _search address_ queries:\n\n\n```json\n{\n \"batchItems\": [\n {\"query\": \"?query=400 Broad St, Seattle, WA 98109&limit=3\"},\n {\"query\": \"?query=One, Microsoft Way, Redmond, WA 98052&limit=3\"},\n {\"query\": \"?query=350 5th Ave, New York, NY 10118&limit=1\"},\n {\"query\": \"?query=Pike Pl, Seattle, WA 98101&lat=47.610970&lon=-122.342469&radius=1000\"},\n {\"query\": \"?query=Champ de Mars, 5 Avenue Anatole France, 75007 Paris, France&limit=1\"}\n ]\n}\n```\n\nA _search address_ query in a batch is just a partial URL _without_ the protocol, base URL, path, api-version and subscription-key. It can accept any of the supported _search address_ [URI parameters](https://docs.microsoft.com/en-us/rest/api/maps/search/getsearchaddress#uri-parameters). The string values in the _search address_ query must be properly escaped (e.g. \" character should be escaped with \\\\ ) and it should also be properly URL-encoded.\n\n\nThe async API allows caller to batch up to **10,000** queries and sync API up to **100** queries, and the batch should contain at least **1** query.\n\n\n### Download Asynchronous Batch Results\nTo download the async batch results you will issue a `GET` request to the batch download endpoint. This _download URL_ can be obtained from the `Location` header of a successful `POST` batch request and looks like the following:\n\n```\nhttps://atlas.microsoft.com/batch/{batch-id}?api-version=1.0&subscription-key={subscription-key}\n```\nHere's the typical sequence of operations for downloading the batch results:\n1. Client sends a `GET` request using the _download URL_.\n2. The server will respond with one of the following:\n\n > HTTP `202 Accepted` - Batch request was accepted but is still being processed. Please try again in some time.\n\n > HTTP `200 OK` - Batch request successfully processed. The response body contains all the batch results.\n\n\n\n### Batch Response Model\nThe returned data content is similar for async and sync requests. When downloading the results of an async batch request, if the batch has finished processing, the response body contains the batch response. This batch response contains a `summary` component that indicates the `totalRequests` that were part of the original batch request and `successfulRequests`i.e. queries which were executed successfully. The batch response also includes a `batchItems` array which contains a response for each and every query in the batch request. The `batchItems` will contain the results in the exact same order the original queries were sent in the batch request. Each item in `batchItems` contains `statusCode` and `response` fields. Each `response` in `batchItems` is of one of the following types:\n\n - [`SearchCommonResponse`](https://docs.microsoft.com/en-us/rest/api/maps/search/getsearchaddress#SearchCommonResponse) - If the query completed successfully.\n\n - `Error` - If the query failed. The response will contain a `code` and a `message` in this case.\n\n\nHere's a sample Batch Response with 2 _successful_ and 1 _failed_ result:\n\n\n```json\n{\n \"summary\": {\n \"successfulRequests\": 2,\n \"totalRequests\": 3\n },\n \"batchItems\": [\n {\n \"statusCode\": 200,\n \"response\":\n {\n \"summary\": {\n \"query\": \"one microsoft way redmond wa 98052\"\n },\n \"results\": [\n {\n \"position\": {\n \"lat\": 47.63989,\n \"lon\": -122.12509\n }\n }\n ]\n }\n },\n {\n \"statusCode\": 200,\n \"response\":\n {\n \"summary\": {\n \"query\": \"pike pl seattle wa 98101\"\n },\n \"results\": [\n {\n \"position\": {\n \"lat\": 47.60963,\n \"lon\": -122.34215\n }\n }\n ]\n }\n },\n {\n \"statusCode\": 400,\n \"response\":\n {\n \"error\":\n {\n \"code\": \"400 BadRequest\",\n \"message\": \"Bad request: one or more parameters were incorrectly specified or are mutually exclusive.\"\n }\n }\n }\n ]\n}\n```", + "operationId": "Search_PostSearchAddressBatch", "x-ms-long-running-operation": true, "x-ms-long-running-operation-options": { "final-state-via": "location" }, "x-ms-examples": { - "A Reverse Geocoding Batch API call containing 5 Reverse Geocoding API queries": { - "$ref": "./examples/PostSearchAddressReverseBatch.json" + "An Address Geocoding Batch API call containing 5 Address Geocoding API queries": { + "$ref": "./examples/PostSearchAddressBatch.json" } }, "parameters": [ { - "$ref": "#/parameters/ClientId" - }, - { - "$ref": "#/parameters/SubscriptionKey" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ClientId" }, { - "$ref": "#/parameters/ApiVersion" + "$ref": "#/parameters/SearchApiVersion" }, { - "$ref": "#/parameters/JsonFormat" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ResponseFormat" }, { - "name": "searchAddressReverseBatchRequestBody", + "name": "searchAddressBatchRequestBody", "in": "body", - "description": "The list of reverse geocoding queries/requests to process. The list can contain a max of 10,000 queries and must contain at least 1 query.", + "description": "The list of address geocoding queries/requests to process. The list can contain a max of 10,000 queries and must contain at least 1 query.", "required": true, "schema": { - "$ref": "#/definitions/BatchRequestBody" + "$ref": "../../../Common/preview/1.0/common.json#/definitions/BatchRequestBody" } } ], "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/BatchResponse" - } - }, "202": { - "$ref": "#/responses/202Async" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" + "$ref": "../../../Common/preview/1.0/common.json#/responses/202Async" }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" + "default": { + "$ref": "../../../Common/preview/1.0/common.json#/responses/default" } }, "produces": [ "application/json" ] - } - } - }, - "definitions": { - "ODataErrorResponse": { - "type": "object", - "description": "This response object is returned when an error occurs in the Maps API.", - "properties": { - "error": { - "$ref": "#/definitions/ODataError" - } - } - }, - "ODataError": { - "type": "object", - "description": "This object is returned when an error occurs in the Maps API.", - "properties": { - "code": { - "type": "string", - "readOnly": true, - "description": "The ODataError code." + }, + "get": { + "description": "**Search Address Batch API**\n\n\n**Applies to**: S1 pricing tier.\n\n\n\nThe Search Address Batch API sends batches of queries to [Search Address API](https://docs.microsoft.com/en-us/rest/api/maps/search/getsearchaddress) using just a single API call. You can call Search Address Batch API to run either asynchronously (async) or synchronously (sync). The async API allows caller to batch up to **10,000** queries and sync API up to **100** queries.\n### Submit Synchronous Batch Request\nThe Synchronous API is recommended for lightweight batch requests. When the service receives a request, it will respond as soon as the batch items are calculated and there will be no possibility to retrieve the results later. The Synchronous API will return a timeout error (a 408 response) if the request takes longer than 60 seconds. The number of batch items is limited to **100** for this API.\n```\nPOST https://atlas.microsoft.com/search/address/batch/sync/json?api-version=1.0&subscription-key={subscription-key}\n```\n### Submit Asynchronous Batch Request\nThe Asynchronous API is appropriate for processing big volumes of relatively complex search requests\n- It allows the retrieval of results in a separate call (multiple downloads are possible).\n- The asynchronous API is optimized for reliability and is not expected to run into a timeout.\n- The number of batch items is limited to **10,000** for this API.\n\nWhen you make a request by using async request, by default the service returns a 202 response code along a redirect URL in the Location field of the response header. This URL should be checked periodically until the response data or error information is available.\nThe asynchronous responses are stored for **14** days. The redirect URL returns a 404 response if used after the expiration period.\n\nPlease note that asynchronous batch request is a long-running request. Here's a typical sequence of operations:\n1. Client sends a Search Address Batch `POST` request to Azure Maps\n2. The server will respond with one of the following:\n\n > HTTP `202 Accepted` - Batch request has been accepted.\n\n > HTTP `Error` - There was an error processing your Batch request. This could either be a `400 Bad Request` or any other `Error` status code.\n\n3. If the batch request was accepted successfully, the `Location` header in the response contains the URL to download the results of the batch request.\n This status URI looks like following:\n\n```\n GET https://atlas.microsoft.com/batch/{batch-id}?api-version=1.0&subscription-key={subscription-key}\n```\n4. Client issues a `GET` request on the _download URL_ obtained in Step 3 to download the batch results.\n\n### POST Body for Batch Request\nTo send the _search address_ queries you will use a `POST` request where the request body will contain the `batchItems` array in `json` format and the `Content-Type` header will be set to `application/json`. Here's a sample request body containing 5 _search address_ queries:\n\n\n```json\n{\n \"batchItems\": [\n {\"query\": \"?query=400 Broad St, Seattle, WA 98109&limit=3\"},\n {\"query\": \"?query=One, Microsoft Way, Redmond, WA 98052&limit=3\"},\n {\"query\": \"?query=350 5th Ave, New York, NY 10118&limit=1\"},\n {\"query\": \"?query=Pike Pl, Seattle, WA 98101&lat=47.610970&lon=-122.342469&radius=1000\"},\n {\"query\": \"?query=Champ de Mars, 5 Avenue Anatole France, 75007 Paris, France&limit=1\"}\n ]\n}\n```\n\nA _search address_ query in a batch is just a partial URL _without_ the protocol, base URL, path, api-version and subscription-key. It can accept any of the supported _search address_ [URI parameters](https://docs.microsoft.com/en-us/rest/api/maps/search/getsearchaddress#uri-parameters). The string values in the _search address_ query must be properly escaped (e.g. \" character should be escaped with \\\\ ) and it should also be properly URL-encoded.\n\n\nThe async API allows caller to batch up to **10,000** queries and sync API up to **100** queries, and the batch should contain at least **1** query.\n\n\n### Download Asynchronous Batch Results\nTo download the async batch results you will issue a `GET` request to the batch download endpoint. This _download URL_ can be obtained from the `Location` header of a successful `POST` batch request and looks like the following:\n\n```\nhttps://atlas.microsoft.com/batch/{batch-id}?api-version=1.0&subscription-key={subscription-key}\n```\nHere's the typical sequence of operations for downloading the batch results:\n1. Client sends a `GET` request using the _download URL_.\n2. The server will respond with one of the following:\n\n > HTTP `202 Accepted` - Batch request was accepted but is still being processed. Please try again in some time.\n\n > HTTP `200 OK` - Batch request successfully processed. The response body contains all the batch results.\n\n\n\n### Batch Response Model\nThe returned data content is similar for async and sync requests. When downloading the results of an async batch request, if the batch has finished processing, the response body contains the batch response. This batch response contains a `summary` component that indicates the `totalRequests` that were part of the original batch request and `successfulRequests`i.e. queries which were executed successfully. The batch response also includes a `batchItems` array which contains a response for each and every query in the batch request. The `batchItems` will contain the results in the exact same order the original queries were sent in the batch request. Each item in `batchItems` contains `statusCode` and `response` fields. Each `response` in `batchItems` is of one of the following types:\n\n - [`SearchCommonResponse`](https://docs.microsoft.com/en-us/rest/api/maps/search/getsearchaddress#SearchCommonResponse) - If the query completed successfully.\n\n - `Error` - If the query failed. The response will contain a `code` and a `message` in this case.\n\n\nHere's a sample Batch Response with 2 _successful_ and 1 _failed_ result:\n\n\n```json\n{\n \"summary\": {\n \"successfulRequests\": 2,\n \"totalRequests\": 3\n },\n \"batchItems\": [\n {\n \"statusCode\": 200,\n \"response\":\n {\n \"summary\": {\n \"query\": \"one microsoft way redmond wa 98052\"\n },\n \"results\": [\n {\n \"position\": {\n \"lat\": 47.63989,\n \"lon\": -122.12509\n }\n }\n ]\n }\n },\n {\n \"statusCode\": 200,\n \"response\":\n {\n \"summary\": {\n \"query\": \"pike pl seattle wa 98101\"\n },\n \"results\": [\n {\n \"position\": {\n \"lat\": 47.60963,\n \"lon\": -122.34215\n }\n }\n ]\n }\n },\n {\n \"statusCode\": 400,\n \"response\":\n {\n \"error\":\n {\n \"code\": \"400 BadRequest\",\n \"message\": \"Bad request: one or more parameters were incorrectly specified or are mutually exclusive.\"\n }\n }\n }\n ]\n}\n```", + "operationId": "Search_GetSearchAddressBatch", + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "original-uri" }, - "message": { - "type": "string", - "readOnly": true, - "description": "If available, a human readable description of the error." + "x-ms-examples": { + "An Address Geocoding Batch API GET call containing 5 Address Geocoding API queries": { + "$ref": "./examples/GetSearchAddressBatch.json" + } }, - "details": { - "type": "array", - "items": { - "$ref": "#/definitions/ODataError" + "parameters": [ + { + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ClientId" + }, + { + "$ref": "#/parameters/SearchApiVersion" + }, + { + "$ref": "#/parameters/BatchId" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/SearchAddressBatchResponse" + } + }, + "202": { + "$ref": "../../../Common/preview/1.0/common.json#/responses/202Async" + }, + "default": { + "$ref": "../../../Common/preview/1.0/common.json#/responses/default" } }, - "target": { - "type": "string", - "readOnly": true, - "description": "If available, the target causing the error." - } + "produces": [ + "application/json" + ] } }, - "BatchResponse": { - "description": "This object is returned from a successful Batch service call", - "type": "object", - "properties": { - "summary": { - "description": "Summary for the batch request", - "type": "object", - "readOnly": true, - "properties": { - "successfulRequests": { - "description": "Number of successful requests in the batch", - "type": "integer", - "readOnly": true - }, - "totalRequests": { - "description": "Total number of requests in the batch", - "type": "integer", - "readOnly": true - } + "/search/address/batch/sync/{format}": { + "post": { + "description": "**Search Address Batch API**\n\n\n**Applies to**: S1 pricing tier.\n\n\n\nThe Search Address Batch API sends batches of queries to [Search Address API](https://docs.microsoft.com/en-us/rest/api/maps/search/getsearchaddress) using just a single API call. You can call Search Address Batch API to run either asynchronously (async) or synchronously (sync). The async API allows caller to batch up to **10,000** queries and sync API up to **100** queries.\n### Submit Synchronous Batch Request\nThe Synchronous API is recommended for lightweight batch requests. When the service receives a request, it will respond as soon as the batch items are calculated and there will be no possibility to retrieve the results later. The Synchronous API will return a timeout error (a 408 response) if the request takes longer than 60 seconds. The number of batch items is limited to **100** for this API.\n```\nPOST https://atlas.microsoft.com/search/address/batch/sync/json?api-version=1.0&subscription-key={subscription-key}\n```\n### Submit Asynchronous Batch Request\nThe Asynchronous API is appropriate for processing big volumes of relatively complex search requests\n- It allows the retrieval of results in a separate call (multiple downloads are possible).\n- The asynchronous API is optimized for reliability and is not expected to run into a timeout.\n- The number of batch items is limited to **10,000** for this API.\n\nWhen you make a request by using async request, by default the service returns a 202 response code along a redirect URL in the Location field of the response header. This URL should be checked periodically until the response data or error information is available.\nThe asynchronous responses are stored for **14** days. The redirect URL returns a 404 response if used after the expiration period.\n\nPlease note that asynchronous batch request is a long-running request. Here's a typical sequence of operations:\n1. Client sends a Search Address Batch `POST` request to Azure Maps\n2. The server will respond with one of the following:\n\n > HTTP `202 Accepted` - Batch request has been accepted.\n\n > HTTP `Error` - There was an error processing your Batch request. This could either be a `400 Bad Request` or any other `Error` status code.\n\n3. If the batch request was accepted successfully, the `Location` header in the response contains the URL to download the results of the batch request.\n This status URI looks like following:\n\n```\n GET https://atlas.microsoft.com/batch/{batch-id}?api-version=1.0&subscription-key={subscription-key}\n```\n4. Client issues a `GET` request on the _download URL_ obtained in Step 3 to download the batch results.\n\n### POST Body for Batch Request\nTo send the _search address_ queries you will use a `POST` request where the request body will contain the `batchItems` array in `json` format and the `Content-Type` header will be set to `application/json`. Here's a sample request body containing 5 _search address_ queries:\n\n\n```json\n{\n \"batchItems\": [\n {\"query\": \"?query=400 Broad St, Seattle, WA 98109&limit=3\"},\n {\"query\": \"?query=One, Microsoft Way, Redmond, WA 98052&limit=3\"},\n {\"query\": \"?query=350 5th Ave, New York, NY 10118&limit=1\"},\n {\"query\": \"?query=Pike Pl, Seattle, WA 98101&lat=47.610970&lon=-122.342469&radius=1000\"},\n {\"query\": \"?query=Champ de Mars, 5 Avenue Anatole France, 75007 Paris, France&limit=1\"}\n ]\n}\n```\n\nA _search address_ query in a batch is just a partial URL _without_ the protocol, base URL, path, api-version and subscription-key. It can accept any of the supported _search address_ [URI parameters](https://docs.microsoft.com/en-us/rest/api/maps/search/getsearchaddress#uri-parameters). The string values in the _search address_ query must be properly escaped (e.g. \" character should be escaped with \\\\ ) and it should also be properly URL-encoded.\n\n\nThe async API allows caller to batch up to **10,000** queries and sync API up to **100** queries, and the batch should contain at least **1** query.\n\n\n### Download Asynchronous Batch Results\nTo download the async batch results you will issue a `GET` request to the batch download endpoint. This _download URL_ can be obtained from the `Location` header of a successful `POST` batch request and looks like the following:\n\n```\nhttps://atlas.microsoft.com/batch/{batch-id}?api-version=1.0&subscription-key={subscription-key}\n```\nHere's the typical sequence of operations for downloading the batch results:\n1. Client sends a `GET` request using the _download URL_.\n2. The server will respond with one of the following:\n\n > HTTP `202 Accepted` - Batch request was accepted but is still being processed. Please try again in some time.\n\n > HTTP `200 OK` - Batch request successfully processed. The response body contains all the batch results.\n\n\n\n### Batch Response Model\nThe returned data content is similar for async and sync requests. When downloading the results of an async batch request, if the batch has finished processing, the response body contains the batch response. This batch response contains a `summary` component that indicates the `totalRequests` that were part of the original batch request and `successfulRequests`i.e. queries which were executed successfully. The batch response also includes a `batchItems` array which contains a response for each and every query in the batch request. The `batchItems` will contain the results in the exact same order the original queries were sent in the batch request. Each item in `batchItems` contains `statusCode` and `response` fields. Each `response` in `batchItems` is of one of the following types:\n\n - [`SearchCommonResponse`](https://docs.microsoft.com/en-us/rest/api/maps/search/getsearchaddress#SearchCommonResponse) - If the query completed successfully.\n\n - `Error` - If the query failed. The response will contain a `code` and a `message` in this case.\n\n\nHere's a sample Batch Response with 2 _successful_ and 1 _failed_ result:\n\n\n```json\n{\n \"summary\": {\n \"successfulRequests\": 2,\n \"totalRequests\": 3\n },\n \"batchItems\": [\n {\n \"statusCode\": 200,\n \"response\":\n {\n \"summary\": {\n \"query\": \"one microsoft way redmond wa 98052\"\n },\n \"results\": [\n {\n \"position\": {\n \"lat\": 47.63989,\n \"lon\": -122.12509\n }\n }\n ]\n }\n },\n {\n \"statusCode\": 200,\n \"response\":\n {\n \"summary\": {\n \"query\": \"pike pl seattle wa 98101\"\n },\n \"results\": [\n {\n \"position\": {\n \"lat\": 47.60963,\n \"lon\": -122.34215\n }\n }\n ]\n }\n },\n {\n \"statusCode\": 400,\n \"response\":\n {\n \"error\":\n {\n \"code\": \"400 BadRequest\",\n \"message\": \"Bad request: one or more parameters were incorrectly specified or are mutually exclusive.\"\n }\n }\n }\n ]\n}\n```", + "operationId": "Search_PostSearchAddressBatchSync", + "x-ms-examples": { + "An Address Geocoding Batch API Sync call containing 5 Address Geocoding API queries": { + "$ref": "./examples/PostSearchAddressBatchSync.json" } }, - "batchItems": { - "description": "Array containing the batch results", - "type": "array", - "readOnly": true, - "items": { - "type": "object" + "parameters": [ + { + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ClientId" + }, + { + "$ref": "#/parameters/SearchApiVersion" + }, + { + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ResponseFormat" + }, + { + "name": "searchAddressBatchRequestBody", + "in": "body", + "description": "The list of address geocoding queries/requests to process. The list can contain a max of 10,000 queries and must contain at least 1 query.", + "required": true, + "schema": { + "$ref": "../../../Common/preview/1.0/common.json#/definitions/BatchRequestBody" + } } - } - } - }, - "Geometry": { - "description": "This represents the geometry for one or more geographical features (parks, state boundary etc.) and should be a `GeoJSON` compliant type. Please refer to [RFC 7946](https://tools.ietf.org/html/rfc7946) for details.", - "type": "object" - }, - "BatchRequestBody": { - "description": "This type represents the request body for the Batch service.", - "type": "object", - "properties": { - "batchItems": { - "description": "The list of queries/requests to process", - "type": "array", - "items": { - "description": "Batch Query object", - "type": "object", - "properties": { - "query": { - "description": "Partial query string", - "type": "string" - } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/SearchAddressBatchResponse" } + }, + "408": { + "$ref": "../../../Common/preview/1.0/common.json#/responses/408" + }, + "default": { + "$ref": "../../../Common/preview/1.0/common.json#/responses/default" } - } - } - }, - "CoordinateAbbreviated": { - "description": "A location represented as a latitude and longitude.", - "type": "object", - "properties": { - "lat": { - "description": "Latitude property", - "type": "number", - "format": "double", - "readOnly": true }, - "lon": { - "description": "Longitude property", - "type": "number", - "format": "double", - "readOnly": true - } + "produces": [ + "application/json" + ] } }, - "GeoJSONGeometry": { - "description": "A valid `GeoJSON` geometry object. Please refer to [RFC 7946](https://tools.ietf.org/html/rfc7946#section-3.1) for details.", - "type": "object", - "discriminator": "type", - "required": [ - "type" - ], - "properties": { - "type": { - "description": "Specifies the `GeoJSON` geometry type. Must be one of the seven valid GeoJSON geometry types - Point, MultiPoint, LineString, MultiLineString, Polygon, MultiPolygon and GeometryCollection.", - "type": "string", - "enum": [ - "Point", - "MultiPoint", - "LineString", - "MultiLineString", - "Polygon", - "MultiPolygon", - "GeometryCollection" - ], - "x-ms-enum": { - "name": "GeoJSONGeometryType", - "modelAsString": true, - "values": [ - { - "value": "Point", - "description": "`GeoJSON Point` geometry." - }, - { - "value": "MultiPoint", - "description": "`GeoJSON MultiPoint` geometry." - }, - { - "value": "LineString", - "description": "`GeoJSON LineString` geometry." - }, - { - "value": "MultiLineString", - "description": "`GeoJSON MultiLineString` geometry." - }, - { - "value": "Polygon", - "description": "`GeoJSON Polygon` geometry." - }, - { - "value": "MultiPolygon", - "description": "`GeoJSON MultiPolygon` geometry." - }, - { - "value": "GeometryCollection", - "description": "`GeoJSON GeometryCollection` geometry." - } - ] + "/search/address/reverse/batch/{format}": { + "post": { + "description": "**Search Address Reverse Batch API**\n\n\n**Applies to**: S1 pricing tier.\n\n\n\nThe Search Address Batch API sends batches of queries to [Search Address Reverse API](https://docs.microsoft.com/en-us/rest/api/maps/search/getsearchaddressreverse) using just a single API call. You can call Search Address Reverse Batch API to run either asynchronously (async) or synchronously (sync). The async API allows caller to batch up to **10,000** queries and sync API up to **100** queries.\n### Submit Synchronous Batch Request\nThe Synchronous API is recommended for lightweight batch requests. When the service receives a request, it will respond as soon as the batch items are calculated and there will be no possibility to retrieve the results later. The Synchronous API will return a timeout error (a 408 response) if the request takes longer than 60 seconds. The number of batch items is limited to **100** for this API.\n```\nPOST https://atlas.microsoft.com/search/address/reverse/batch/sync/json?api-version=1.0&subscription-key={subscription-key}\n```\n### Submit Asynchronous Batch Request\nThe Asynchronous API is appropriate for processing big volumes of relatively complex search requests\n- It allows the retrieval of results in a separate call (multiple downloads are possible).\n- The asynchronous API is optimized for reliability and is not expected to run into a timeout.\n- The number of batch items is limited to **10,000** for this API.\n\nWhen you make a request by using async request, by default the service returns a 202 response code along a redirect URL in the Location field of the response header. This URL should be checked periodically until the response data or error information is available.\nThe asynchronous responses are stored for **14** days. The redirect URL returns a 404 response if used after the expiration period.\n\nPlease note that asynchronous batch request is a long-running request. Here's a typical sequence of operations:\n1. Client sends a Search Address Batch `POST` request to Azure Maps\n2. The server will respond with one of the following:\n\n > HTTP `202 Accepted` - Batch request has been accepted.\n\n > HTTP `Error` - There was an error processing your Batch request. This could either be a `400 Bad Request` or any other `Error` status code.\n\n3. If the batch request was accepted successfully, the `Location` header in the response contains the URL to download the results of the batch request.\n This status URI looks like following:\n\n```\n GET https://atlas.microsoft.com/batch/{batch-id}?api-version=1.0&subscription-key={subscription-key}\n```\n4. Client issues a `GET` request on the _download URL_ obtained in Step 3 to download the batch results.\n\n### POST Body for Batch Request\nTo send the _search address reverse_ queries you will use a `POST` request where the request body will contain the `batchItems` array in `json` format and the `Content-Type` header will be set to `application/json`. Here's a sample request body containing 5 _search address reverse_ queries:\n\n\n```json\n{\n \"batchItems\": [\n {\"query\": \"?query=48.858561,2.294911\"},\n {\"query\": \"?query=47.639765,-122.127896&radius=5000&limit=2\"},\n {\"query\": \"?query=47.621028,-122.348170\"},\n {\"query\": \"?query=43.722990,10.396695\"},\n {\"query\": \"?query=40.750958,-73.982336\"}\n ]\n}\n```\n\nA _search address reverse_ query in a batch is just a partial URL _without_ the protocol, base URL, path, api-version and subscription-key. It can accept any of the supported _search address reverse_ [URI parameters](https://docs.microsoft.com/en-us/rest/api/maps/search/getsearchaddressreverse#uri-parameters). The string values in the _search address reverse_ query must be properly escaped (e.g. \" character should be escaped with \\\\ ) and it should also be properly URL-encoded.\n\n\nThe async API allows caller to batch up to **10,000** queries and sync API up to **100** queries, and the batch should contain at least **1** query.\n\n\n### Download Asynchronous Batch Results\nTo download the async batch results you will issue a `GET` request to the batch download endpoint. This _download URL_ can be obtained from the `Location` header of a successful `POST` batch request and looks like the following:\n\n```\nhttps://atlas.microsoft.com/batch/{batch-id}?api-version=1.0&subscription-key={subscription-key}\n```\nHere's the typical sequence of operations for downloading the batch results:\n1. Client sends a `GET` request using the _download URL_.\n2. The server will respond with one of the following:\n\n > HTTP `202 Accepted` - Batch request was accepted but is still being processed. Please try again in some time.\n\n > HTTP `200 OK` - Batch request successfully processed. The response body contains all the batch results.\n\n\n\n### Batch Response Model\nThe returned data content is similar for async and sync requests. When downloading the results of an async batch request, if the batch has finished processing, the response body contains the batch response. This batch response contains a `summary` component that indicates the `totalRequests` that were part of the original batch request and `successfulRequests`i.e. queries which were executed successfully. The batch response also includes a `batchItems` array which contains a response for each and every query in the batch request. The `batchItems` will contain the results in the exact same order the original queries were sent in the batch request. Each item in `batchItems` contains `statusCode` and `response` fields. Each `response` in `batchItems` is of one of the following types:\n\n - [`SearchAddressReverseResponse`](https://docs.microsoft.com/en-us/rest/api/maps/search/getsearchaddressreverse#searchaddressreverseresponse) - If the query completed successfully.\n\n - `Error` - If the query failed. The response will contain a `code` and a `message` in this case.\n\n\nHere's a sample Batch Response with 2 _successful_ and 1 _failed_ result:\n\n\n```json\n{\n \"summary\": {\n \"successfulRequests\": 2,\n \"totalRequests\": 3\n },\n \"batchItems\": [\n {\n \"statusCode\": 200,\n \"response\":\n {\n \"summary\": {\n \"queryTime\": 11\n },\n \"addresses\": [\n {\n \"address\": {\n \"country\": \"France\",\n \"freeformAddress\": \"Avenue Anatole France, 75007 Paris\"\n },\n \"position\": \"48.858490,2.294820\"\n }\n ]\n }\n },\n {\n \"statusCode\": 200,\n \"response\":\n {\n \"summary\": {\n \"queryTime\": 1\n },\n \"addresses\": [\n {\n \"address\": {\n \"country\": \"United States of America\",\n \"freeformAddress\": \"157th Pl NE, Redmond WA 98052\"\n },\n \"position\": \"47.640470,-122.129430\"\n }\n ]\n }\n },\n {\n \"statusCode\": 400,\n \"response\":\n {\n \"error\":\n {\n \"code\": \"400 BadRequest\",\n \"message\": \"Bad request: one or more parameters were incorrectly specified or are mutually exclusive.\"\n }\n }\n }\n ]\n}\n```", + "operationId": "Search_PostSearchAddressReverseBatch", + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "x-ms-examples": { + "A Reverse Geocoding Batch API call containing 5 Reverse Geocoding API queries": { + "$ref": "./examples/PostSearchAddressReverseBatch.json" } - } + }, + "parameters": [ + { + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ClientId" + }, + { + "$ref": "#/parameters/SearchApiVersion" + }, + { + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ResponseFormat" + }, + { + "name": "searchAddressReverseBatchRequestBody", + "in": "body", + "description": "The list of reverse geocoding queries/requests to process. The list can contain a max of 10,000 queries and must contain at least 1 query.", + "required": true, + "schema": { + "$ref": "../../../Common/preview/1.0/common.json#/definitions/BatchRequestBody" + } + } + ], + "responses": { + "202": { + "$ref": "../../../Common/preview/1.0/common.json#/responses/202Async" + }, + "default": { + "$ref": "../../../Common/preview/1.0/common.json#/responses/default" + } + }, + "produces": [ + "application/json" + ] + }, + "get": { + "description": "**Search Address Reverse Batch API**\n\n\n**Applies to**: S1 pricing tier.\n\n\n\nThe Search Address Batch API sends batches of queries to [Search Address Reverse API](https://docs.microsoft.com/en-us/rest/api/maps/search/getsearchaddressreverse) using just a single API call. You can call Search Address Reverse Batch API to run either asynchronously (async) or synchronously (sync). The async API allows caller to batch up to **10,000** queries and sync API up to **100** queries.\n### Submit Synchronous Batch Request\nThe Synchronous API is recommended for lightweight batch requests. When the service receives a request, it will respond as soon as the batch items are calculated and there will be no possibility to retrieve the results later. The Synchronous API will return a timeout error (a 408 response) if the request takes longer than 60 seconds. The number of batch items is limited to **100** for this API.\n```\nPOST https://atlas.microsoft.com/search/address/reverse/batch/sync/json?api-version=1.0&subscription-key={subscription-key}\n```\n### Submit Asynchronous Batch Request\nThe Asynchronous API is appropriate for processing big volumes of relatively complex search requests\n- It allows the retrieval of results in a separate call (multiple downloads are possible).\n- The asynchronous API is optimized for reliability and is not expected to run into a timeout.\n- The number of batch items is limited to **10,000** for this API.\n\nWhen you make a request by using async request, by default the service returns a 202 response code along a redirect URL in the Location field of the response header. This URL should be checked periodically until the response data or error information is available.\nThe asynchronous responses are stored for **14** days. The redirect URL returns a 404 response if used after the expiration period.\n\nPlease note that asynchronous batch request is a long-running request. Here's a typical sequence of operations:\n1. Client sends a Search Address Batch `POST` request to Azure Maps\n2. The server will respond with one of the following:\n\n > HTTP `202 Accepted` - Batch request has been accepted.\n\n > HTTP `Error` - There was an error processing your Batch request. This could either be a `400 Bad Request` or any other `Error` status code.\n\n3. If the batch request was accepted successfully, the `Location` header in the response contains the URL to download the results of the batch request.\n This status URI looks like following:\n\n```\n GET https://atlas.microsoft.com/batch/{batch-id}?api-version=1.0&subscription-key={subscription-key}\n```\n4. Client issues a `GET` request on the _download URL_ obtained in Step 3 to download the batch results.\n\n### POST Body for Batch Request\nTo send the _search address reverse_ queries you will use a `POST` request where the request body will contain the `batchItems` array in `json` format and the `Content-Type` header will be set to `application/json`. Here's a sample request body containing 5 _search address reverse_ queries:\n\n\n```json\n{\n \"batchItems\": [\n {\"query\": \"?query=48.858561,2.294911\"},\n {\"query\": \"?query=47.639765,-122.127896&radius=5000&limit=2\"},\n {\"query\": \"?query=47.621028,-122.348170\"},\n {\"query\": \"?query=43.722990,10.396695\"},\n {\"query\": \"?query=40.750958,-73.982336\"}\n ]\n}\n```\n\nA _search address reverse_ query in a batch is just a partial URL _without_ the protocol, base URL, path, api-version and subscription-key. It can accept any of the supported _search address reverse_ [URI parameters](https://docs.microsoft.com/en-us/rest/api/maps/search/getsearchaddressreverse#uri-parameters). The string values in the _search address reverse_ query must be properly escaped (e.g. \" character should be escaped with \\\\ ) and it should also be properly URL-encoded.\n\n\nThe async API allows caller to batch up to **10,000** queries and sync API up to **100** queries, and the batch should contain at least **1** query.\n\n\n### Download Asynchronous Batch Results\nTo download the async batch results you will issue a `GET` request to the batch download endpoint. This _download URL_ can be obtained from the `Location` header of a successful `POST` batch request and looks like the following:\n\n```\nhttps://atlas.microsoft.com/batch/{batch-id}?api-version=1.0&subscription-key={subscription-key}\n```\nHere's the typical sequence of operations for downloading the batch results:\n1. Client sends a `GET` request using the _download URL_.\n2. The server will respond with one of the following:\n\n > HTTP `202 Accepted` - Batch request was accepted but is still being processed. Please try again in some time.\n\n > HTTP `200 OK` - Batch request successfully processed. The response body contains all the batch results.\n\n\n\n### Batch Response Model\nThe returned data content is similar for async and sync requests. When downloading the results of an async batch request, if the batch has finished processing, the response body contains the batch response. This batch response contains a `summary` component that indicates the `totalRequests` that were part of the original batch request and `successfulRequests`i.e. queries which were executed successfully. The batch response also includes a `batchItems` array which contains a response for each and every query in the batch request. The `batchItems` will contain the results in the exact same order the original queries were sent in the batch request. Each item in `batchItems` contains `statusCode` and `response` fields. Each `response` in `batchItems` is of one of the following types:\n\n - [`SearchAddressReverseResponse`](https://docs.microsoft.com/en-us/rest/api/maps/search/getsearchaddressreverse#searchaddressreverseresponse) - If the query completed successfully.\n\n - `Error` - If the query failed. The response will contain a `code` and a `message` in this case.\n\n\nHere's a sample Batch Response with 2 _successful_ and 1 _failed_ result:\n\n\n```json\n{\n \"summary\": {\n \"successfulRequests\": 2,\n \"totalRequests\": 3\n },\n \"batchItems\": [\n {\n \"statusCode\": 200,\n \"response\":\n {\n \"summary\": {\n \"queryTime\": 11\n },\n \"addresses\": [\n {\n \"address\": {\n \"country\": \"France\",\n \"freeformAddress\": \"Avenue Anatole France, 75007 Paris\"\n },\n \"position\": \"48.858490,2.294820\"\n }\n ]\n }\n },\n {\n \"statusCode\": 200,\n \"response\":\n {\n \"summary\": {\n \"queryTime\": 1\n },\n \"addresses\": [\n {\n \"address\": {\n \"country\": \"United States of America\",\n \"freeformAddress\": \"157th Pl NE, Redmond WA 98052\"\n },\n \"position\": \"47.640470,-122.129430\"\n }\n ]\n }\n },\n {\n \"statusCode\": 400,\n \"response\":\n {\n \"error\":\n {\n \"code\": \"400 BadRequest\",\n \"message\": \"Bad request: one or more parameters were incorrectly specified or are mutually exclusive.\"\n }\n }\n }\n ]\n}\n```", + "operationId": "Search_GetSearchAddressReverseBatch", + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "original-uri" + }, + "x-ms-examples": { + "A Reverse Geocoding Batch API GET call containing 5 Reverse Geocoding API queries": { + "$ref": "./examples/GetSearchAddressReverseBatch.json" + } + }, + "parameters": [ + { + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ClientId" + }, + { + "$ref": "#/parameters/SearchApiVersion" + }, + { + "$ref": "#/parameters/BatchId" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/SearchAddressReverseBatchResponse" + } + }, + "202": { + "$ref": "../../../Common/preview/1.0/common.json#/responses/202Async" + }, + "default": { + "$ref": "../../../Common/preview/1.0/common.json#/responses/default" + } + }, + "produces": [ + "application/json" + ] } }, - "LineString": { - "description": "A valid `GeoJSON LineString` geometry type. Please refer to [RFC 7946](https://tools.ietf.org/html/rfc7946#section-3.1.4) for details.", - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/GeoJSONGeometry" + "/search/address/reverse/batch/sync/{format}": { + "post": { + "description": "**Search Address Reverse Batch API**\n\n\n**Applies to**: S1 pricing tier.\n\n\n\nThe Search Address Batch API sends batches of queries to [Search Address Reverse API](https://docs.microsoft.com/en-us/rest/api/maps/search/getsearchaddressreverse) using just a single API call. You can call Search Address Reverse Batch API to run either asynchronously (async) or synchronously (sync). The async API allows caller to batch up to **10,000** queries and sync API up to **100** queries.\n### Submit Synchronous Batch Request\nThe Synchronous API is recommended for lightweight batch requests. When the service receives a request, it will respond as soon as the batch items are calculated and there will be no possibility to retrieve the results later. The Synchronous API will return a timeout error (a 408 response) if the request takes longer than 60 seconds. The number of batch items is limited to **100** for this API.\n```\nPOST https://atlas.microsoft.com/search/address/reverse/batch/sync/json?api-version=1.0&subscription-key={subscription-key}\n```\n### Submit Asynchronous Batch Request\nThe Asynchronous API is appropriate for processing big volumes of relatively complex search requests\n- It allows the retrieval of results in a separate call (multiple downloads are possible).\n- The asynchronous API is optimized for reliability and is not expected to run into a timeout.\n- The number of batch items is limited to **10,000** for this API.\n\nWhen you make a request by using async request, by default the service returns a 202 response code along a redirect URL in the Location field of the response header. This URL should be checked periodically until the response data or error information is available.\nThe asynchronous responses are stored for **14** days. The redirect URL returns a 404 response if used after the expiration period.\n\nPlease note that asynchronous batch request is a long-running request. Here's a typical sequence of operations:\n1. Client sends a Search Address Batch `POST` request to Azure Maps\n2. The server will respond with one of the following:\n\n > HTTP `202 Accepted` - Batch request has been accepted.\n\n > HTTP `Error` - There was an error processing your Batch request. This could either be a `400 Bad Request` or any other `Error` status code.\n\n3. If the batch request was accepted successfully, the `Location` header in the response contains the URL to download the results of the batch request.\n This status URI looks like following:\n\n```\n GET https://atlas.microsoft.com/batch/{batch-id}?api-version=1.0&subscription-key={subscription-key}\n```\n4. Client issues a `GET` request on the _download URL_ obtained in Step 3 to download the batch results.\n\n### POST Body for Batch Request\nTo send the _search address reverse_ queries you will use a `POST` request where the request body will contain the `batchItems` array in `json` format and the `Content-Type` header will be set to `application/json`. Here's a sample request body containing 5 _search address reverse_ queries:\n\n\n```json\n{\n \"batchItems\": [\n {\"query\": \"?query=48.858561,2.294911\"},\n {\"query\": \"?query=47.639765,-122.127896&radius=5000&limit=2\"},\n {\"query\": \"?query=47.621028,-122.348170\"},\n {\"query\": \"?query=43.722990,10.396695\"},\n {\"query\": \"?query=40.750958,-73.982336\"}\n ]\n}\n```\n\nA _search address reverse_ query in a batch is just a partial URL _without_ the protocol, base URL, path, api-version and subscription-key. It can accept any of the supported _search address reverse_ [URI parameters](https://docs.microsoft.com/en-us/rest/api/maps/search/getsearchaddressreverse#uri-parameters). The string values in the _search address reverse_ query must be properly escaped (e.g. \" character should be escaped with \\\\ ) and it should also be properly URL-encoded.\n\n\nThe async API allows caller to batch up to **10,000** queries and sync API up to **100** queries, and the batch should contain at least **1** query.\n\n\n### Download Asynchronous Batch Results\nTo download the async batch results you will issue a `GET` request to the batch download endpoint. This _download URL_ can be obtained from the `Location` header of a successful `POST` batch request and looks like the following:\n\n```\nhttps://atlas.microsoft.com/batch/{batch-id}?api-version=1.0&subscription-key={subscription-key}\n```\nHere's the typical sequence of operations for downloading the batch results:\n1. Client sends a `GET` request using the _download URL_.\n2. The server will respond with one of the following:\n\n > HTTP `202 Accepted` - Batch request was accepted but is still being processed. Please try again in some time.\n\n > HTTP `200 OK` - Batch request successfully processed. The response body contains all the batch results.\n\n\n\n### Batch Response Model\nThe returned data content is similar for async and sync requests. When downloading the results of an async batch request, if the batch has finished processing, the response body contains the batch response. This batch response contains a `summary` component that indicates the `totalRequests` that were part of the original batch request and `successfulRequests`i.e. queries which were executed successfully. The batch response also includes a `batchItems` array which contains a response for each and every query in the batch request. The `batchItems` will contain the results in the exact same order the original queries were sent in the batch request. Each item in `batchItems` contains `statusCode` and `response` fields. Each `response` in `batchItems` is of one of the following types:\n\n - [`SearchAddressReverseResponse`](https://docs.microsoft.com/en-us/rest/api/maps/search/getsearchaddressreverse#searchaddressreverseresponse) - If the query completed successfully.\n\n - `Error` - If the query failed. The response will contain a `code` and a `message` in this case.\n\n\nHere's a sample Batch Response with 2 _successful_ and 1 _failed_ result:\n\n\n```json\n{\n \"summary\": {\n \"successfulRequests\": 2,\n \"totalRequests\": 3\n },\n \"batchItems\": [\n {\n \"statusCode\": 200,\n \"response\":\n {\n \"summary\": {\n \"queryTime\": 11\n },\n \"addresses\": [\n {\n \"address\": {\n \"country\": \"France\",\n \"freeformAddress\": \"Avenue Anatole France, 75007 Paris\"\n },\n \"position\": \"48.858490,2.294820\"\n }\n ]\n }\n },\n {\n \"statusCode\": 200,\n \"response\":\n {\n \"summary\": {\n \"queryTime\": 1\n },\n \"addresses\": [\n {\n \"address\": {\n \"country\": \"United States of America\",\n \"freeformAddress\": \"157th Pl NE, Redmond WA 98052\"\n },\n \"position\": \"47.640470,-122.129430\"\n }\n ]\n }\n },\n {\n \"statusCode\": 400,\n \"response\":\n {\n \"error\":\n {\n \"code\": \"400 BadRequest\",\n \"message\": \"Bad request: one or more parameters were incorrectly specified or are mutually exclusive.\"\n }\n }\n }\n ]\n}\n```", + "operationId": "Search_PostSearchAddressReverseBatchSync", + "x-ms-examples": { + "A Reverse Geocoding Batch API Sync call containing 5 Reverse Geocoding API queries": { + "$ref": "./examples/PostSearchAddressReverseBatchSync.json" + } }, - { - "properties": { - "type": { - "description": "Specifies the `type` for the geometry. Value should always be equal to \"LineString\".", - "type": "string" - }, - "coordinates": { - "description": "Coordinates for the `LineString` geometry.", - "type": "array", - "items": { - "$ref": "#/definitions/GeoJSONPosition" - } + "parameters": [ + { + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ClientId" + }, + { + "$ref": "#/parameters/SearchApiVersion" + }, + { + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ResponseFormat" + }, + { + "name": "searchAddressReverseBatchRequestBody", + "in": "body", + "description": "The list of reverse geocoding queries/requests to process. The list can contain a max of 10,000 queries and must contain at least 1 query.", + "required": true, + "schema": { + "$ref": "../../../Common/preview/1.0/common.json#/definitions/BatchRequestBody" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/SearchAddressReverseBatchResponse" } }, - "required": [ - "coordinates" - ] - } - ] - }, - "GeoJSONPosition": { - "description": "A valid `GeoJSON Position` geometry type. A `Position` is an array of numbers with two or more elements. The first two elements are _longitude_ and _latitude_, precisely in that order. _Altitude/Elevation_ is an optional third element. Please refer to [RFC 7946](https://tools.ietf.org/html/rfc7946#section-3.1.1) for details.", - "type": "array", - "items": { - "type": "number", - "format": "double" + "408": { + "$ref": "../../../Common/preview/1.0/common.json#/responses/408" + }, + "default": { + "$ref": "../../../Common/preview/1.0/common.json#/responses/default" + } + }, + "produces": [ + "application/json" + ] } - }, - "PoiCategoryResponse": { - "description": "This object is returned from a successful POI Category Tree call", + } + }, + "definitions": { + "SearchPolygonResponse": { + "description": "This object is returned from a successful Search Polygon call", "type": "object", "properties": { - "poiCategories": { - "description": "Categories array", + "additionalData": { + "description": "Results array", "type": "array", "readOnly": true, "items": { - "$ref": "#/definitions/PoiCategoryResult" + "$ref": "#/definitions/SearchPolygonResult" } } } }, - "PoiCategoryResult": { - "description": "POI category result", + "SearchPolygonResult": { "type": "object", "properties": { - "id": { - "description": "Unique ID for the category. ID can be used to restrict search results to specific categories through other Search Service APIs, like [Get Search POI](https://docs.microsoft.com/rest/api/maps/search/getsearchpoi).", - "type": "integer", - "readOnly": true - }, - "name": { - "description": "Name of the category", + "providerID": { + "description": "ID of the returned entity", "type": "string", "readOnly": true }, - "childCategoryIds": { - "description": "Array of child category ids", - "type": "array", - "items": { - "type": "integer", - "readOnly": true - }, + "error": { + "description": "Reason for the failure to obtain data for this provider.", + "type": "string", "readOnly": true }, - "synonyms": { - "description": "Array of alternative names of the category", - "type": "array", - "items": { - "type": "string", - "readOnly": true - }, - "readOnly": true - } - } - }, - "SearchPolygonResponse": { - "description": "This object is returned from a successful Search Polygon call", - "type": "object", - "properties": { - "additionalData": { - "description": "Results array", - "type": "array", - "readOnly": true, - "items": { - "$ref": "#/definitions/SearchPolygonResult" - } - } - } - }, - "SearchPolygonResult": { - "type": "object", - "properties": { - "providerID": { - "description": "ID of the returned entity", - "type": "string", - "readOnly": true - }, - "error": { - "description": "Reason for the failure to obtain data for this provider.", - "type": "string", - "readOnly": true - }, - "geometryData": { - "description": "Geometry data in GeoJSON format. Please refer to [RFC 7946](https://tools.ietf.org/html/rfc7946) for details. Present only if \"error\" is not present.", - "$ref": "#/definitions/Geometry" - } - } - }, - "SearchFuzzyResponse": { - "description": "This object is returned from a successful Search Fuzzy call", - "type": "object", - "properties": { - "summary": { - "$ref": "#/definitions/SearchFuzzySummary" - }, - "results": { - "description": "Results array", - "type": "array", - "readOnly": true, - "items": { - "$ref": "#/definitions/SearchFuzzyResult" - } - } - } - }, - "SearchFuzzySummary": { - "description": "Summary object for a Search Fuzzy response", - "type": "object", - "readOnly": true, - "properties": { - "query": { - "description": "Query property", - "type": "string", - "readOnly": true - }, - "queryType": { - "description": "QueryType property", - "type": "string", - "readOnly": true - }, - "queryTime": { - "description": "QueryTime property", - "type": "integer", - "readOnly": true - }, - "numResults": { - "description": "NumResults property", - "type": "integer", - "readOnly": true - }, - "offset": { - "description": "Offset property", - "type": "integer", - "readOnly": true - }, - "totalResults": { - "description": "TotalResults property", - "type": "integer", - "readOnly": true - }, - "fuzzyLevel": { - "description": "FuzzyLevel property", - "type": "integer", - "readOnly": true - } - } - }, - "SearchFuzzyResult": { - "type": "object", - "properties": { - "type": { - "description": "One of:\n* POI\n* Street\n* Geography\n* Point Address\n* Address Range\n* Cross Street", - "type": "string", - "readOnly": true - }, - "id": { - "description": "Id property", - "type": "string", - "readOnly": true - }, - "score": { - "$ref": "#/definitions/SearchResultScore" - }, - "info": { - "description": "Info property", - "type": "string", - "readOnly": true - }, - "entityType": { - "$ref": "#/definitions/EntityType" - }, - "poi": { - "$ref": "#/definitions/SearchResultPoi" - }, - "address": { - "$ref": "#/definitions/SearchResultAddress" - }, - "position": { - "$ref": "#/definitions/CoordinateAbbreviated" - }, - "viewport": { - "$ref": "#/definitions/SearchResultViewport" - }, - "entryPoints": { - "description": "Entry Points array", - "type": "array", - "items": { - "$ref": "#/definitions/SearchResultEntryPoint" - } - }, - "addressRanges": { - "$ref": "#/definitions/SearchResultAddressRanges" - }, - "dataSources": { - "$ref": "#/definitions/DataSources" - } - } - }, - "SearchPoiResponse": { - "description": "This object is returned from a successful Search POI call", - "type": "object", - "properties": { - "summary": { - "$ref": "#/definitions/SearchPoiSummary" - }, - "results": { - "description": "Results array", - "type": "array", - "readOnly": true, - "items": { - "$ref": "#/definitions/SearchPoiResult" - } - } - } - }, - "SearchPoiSummary": { - "description": "Summary object for a Search POI response", - "type": "object", - "readOnly": true, - "properties": { - "query": { - "description": "Query property", - "type": "string", - "readOnly": true - }, - "queryType": { - "description": "QueryType property", - "type": "string", - "readOnly": true - }, - "queryTime": { - "description": "QueryTime property", - "type": "integer", - "readOnly": true - }, - "numResults": { - "description": "NumResults property", - "type": "integer", - "readOnly": true - }, - "offset": { - "description": "Offset property", - "type": "integer", - "readOnly": true - }, - "totalResults": { - "description": "TotalResults property", - "type": "integer", - "readOnly": true - }, - "fuzzyLevel": { - "description": "FuzzyLevel property", - "type": "integer", - "readOnly": true - }, - "geoBias": { - "$ref": "#/definitions/SearchSummaryGeoBias" - } - } - }, - "SearchPoiResult": { - "type": "object", - "properties": { - "type": { - "description": "Type property", - "type": "string", - "readOnly": true - }, - "id": { - "description": "Id property", - "type": "string", - "readOnly": true - }, - "score": { - "$ref": "#/definitions/SearchResultScore" - }, - "dist": { - "$ref": "#/definitions/SearchResultDistance" - }, - "info": { - "description": "Info property", - "type": "string", - "readOnly": true - }, - "entityType": { - "$ref": "#/definitions/EntityType" - }, - "poi": { - "$ref": "#/definitions/SearchResultPoi" - }, - "address": { - "$ref": "#/definitions/SearchResultAddress" - }, - "position": { - "$ref": "#/definitions/CoordinateAbbreviated" - }, - "viewport": { - "$ref": "#/definitions/SearchResultViewport" - }, - "entryPoints": { - "description": "Entry Points array", - "type": "array", - "items": { - "$ref": "#/definitions/SearchResultEntryPoint" - } - } - } - }, - "SearchNearbyResponse": { - "description": "This object is returned from a successful Search Nearby call", - "type": "object", - "properties": { - "summary": { - "$ref": "#/definitions/SearchNearbySummary" - }, - "results": { - "description": "Results array", - "type": "array", - "readOnly": true, - "items": { - "$ref": "#/definitions/SearchNearbyResult" - } - } - } - }, - "SearchNearbySummary": { - "description": "Summary object for a Search Nearby response", - "type": "object", - "readOnly": true, - "properties": { - "queryType": { - "description": "QueryType property", - "type": "string", - "readOnly": true - }, - "queryTime": { - "description": "QueryTime property", - "type": "integer", - "readOnly": true - }, - "numResults": { - "description": "NumResults property", - "type": "integer", - "readOnly": true - }, - "offset": { - "description": "Offset property", - "type": "integer", - "readOnly": true - }, - "totalResults": { - "description": "TotalResults property", - "type": "integer", - "readOnly": true - }, - "fuzzyLevel": { - "description": "FuzzyLevel property", - "type": "integer", - "readOnly": true - }, - "geoBias": { - "$ref": "#/definitions/SearchSummaryGeoBias" - } - } - }, - "SearchNearbyResult": { - "type": "object", - "properties": { - "type": { - "description": "Type property", - "type": "string", - "readOnly": true - }, - "id": { - "description": "Id property", - "type": "string", - "readOnly": true - }, - "score": { - "$ref": "#/definitions/SearchResultScore" - }, - "dist": { - "$ref": "#/definitions/SearchResultDistance" - }, - "info": { - "description": "Info property", - "type": "string", - "readOnly": true - }, - "poi": { - "$ref": "#/definitions/SearchResultPoi" - }, - "address": { - "$ref": "#/definitions/SearchResultAddress" - }, - "position": { - "$ref": "#/definitions/CoordinateAbbreviated" - }, - "viewport": { - "$ref": "#/definitions/SearchResultViewport" - }, - "entryPoints": { - "description": "Entry Points array", - "type": "array", - "items": { - "$ref": "#/definitions/SearchResultEntryPoint" - } - } - } - }, - "SearchPoiCategoryResponse": { - "description": "This object is returned from a successful Search POI Category call", - "type": "object", - "properties": { - "summary": { - "$ref": "#/definitions/SearchPoiCategorySummary" - }, - "results": { - "description": "Results array", - "type": "array", - "readOnly": true, - "items": { - "$ref": "#/definitions/SearchPoiCategoryResult" - } - } - } - }, - "SearchPoiCategorySummary": { - "description": "Summary object for a Search POI Category response", - "type": "object", - "readOnly": true, - "properties": { - "query": { - "description": "Query property", - "type": "string", - "readOnly": true - }, - "queryType": { - "description": "QueryType property", - "type": "string", - "readOnly": true - }, - "queryTime": { - "description": "QueryTime property", - "type": "integer", - "readOnly": true - }, - "numResults": { - "description": "NumResults property", - "type": "integer", - "readOnly": true - }, - "offset": { - "description": "Offset property", - "type": "integer", - "readOnly": true - }, - "totalResults": { - "description": "TotalResults property", - "type": "integer", - "readOnly": true - }, - "fuzzyLevel": { - "description": "FuzzyLevel property", - "type": "integer", - "readOnly": true - }, - "geoBias": { - "$ref": "#/definitions/SearchSummaryGeoBias" - } - } - }, - "SearchPoiCategoryResult": { - "type": "object", - "properties": { - "type": { - "description": "Type property", - "type": "string", - "readOnly": true - }, - "id": { - "description": "Id property", - "type": "string", - "readOnly": true - }, - "score": { - "$ref": "#/definitions/SearchResultScore" - }, - "dist": { - "$ref": "#/definitions/SearchResultDistance" - }, - "info": { - "description": "Info property", - "type": "string", - "readOnly": true - }, - "entityType": { - "$ref": "#/definitions/EntityType" - }, - "poi": { - "$ref": "#/definitions/SearchResultPoi" - }, - "address": { - "$ref": "#/definitions/SearchResultAddress" - }, - "position": { - "$ref": "#/definitions/CoordinateAbbreviated" - }, - "viewport": { - "$ref": "#/definitions/SearchResultViewport" - }, - "entryPoints": { - "description": "Entry Points array", - "type": "array", - "items": { - "$ref": "#/definitions/SearchResultEntryPoint" - } - } - } - }, - "SearchAddressResponse": { - "description": "This object is returned from a successful Search Address call", - "type": "object", - "properties": { - "summary": { - "$ref": "#/definitions/SearchAddressSummary" - }, - "results": { - "description": "Results array", - "type": "array", - "readOnly": true, - "items": { - "$ref": "#/definitions/SearchAddressResult" - } - } - } - }, - "SearchAddressSummary": { - "description": "Summary object for a Search Address response", - "type": "object", - "readOnly": true, - "properties": { - "query": { - "description": "Query property", - "type": "string", - "readOnly": true - }, - "queryType": { - "description": "QueryType property", - "type": "string", - "readOnly": true - }, - "queryTime": { - "description": "QueryTime property", - "type": "integer", - "readOnly": true - }, - "numResults": { - "description": "NumResults property", - "type": "integer", - "readOnly": true - }, - "offset": { - "description": "Offset property", - "type": "integer", - "readOnly": true - }, - "totalResults": { - "description": "TotalResults property", - "type": "integer", - "readOnly": true - }, - "fuzzyLevel": { - "description": "FuzzyLevel property", - "type": "integer", - "readOnly": true - } - } - }, - "SearchAddressResult": { - "type": "object", - "properties": { - "type": { - "description": "One of:\n* POI\n* Street\n* Geography\n* Point Address\n* Address Range\n* Cross Street", - "type": "string", - "readOnly": true - }, - "id": { - "description": "Id property", - "type": "string", - "readOnly": true - }, - "score": { - "$ref": "#/definitions/SearchResultScore" - }, - "address": { - "$ref": "#/definitions/SearchResultAddress" - }, - "position": { - "$ref": "#/definitions/CoordinateAbbreviated" - }, - "viewport": { - "$ref": "#/definitions/SearchResultViewport" - }, - "entryPoints": { - "description": "Entry Points array", - "type": "array", - "items": { - "$ref": "#/definitions/SearchResultEntryPoint" - } - }, - "dataSources": { - "$ref": "#/definitions/DataSources" - } - } - }, - "SearchAddressReverseResponse": { - "description": "This object is returned from a successful Search Address Reverse call", - "type": "object", - "properties": { - "summary": { - "$ref": "#/definitions/SearchAddressReverseSummary" - }, - "addresses": { - "description": "Addresses array", - "type": "array", - "readOnly": true, - "items": { - "$ref": "#/definitions/SearchAddressReverseResult" - } - } - } - }, - "SearchAddressReverseSummary": { - "description": "Summary object for a Search Address Reverse response", - "type": "object", - "readOnly": true, - "properties": { - "queryTime": { - "description": "QueryTime property", - "type": "integer", - "readOnly": true - }, - "numResults": { - "description": "NumResults property", - "type": "integer", - "readOnly": true - } - } - }, - "SearchAddressReverseResult": { - "type": "object", - "properties": { - "address": { - "$ref": "#/definitions/SearchResultAddress" - }, - "position": { - "type": "string", - "readOnly": true, - "description": "Position property in the form of \"{latitude},{longitude}\"" - }, - "matchType": { - "type": "string", - "readOnly": true, - "description": "Information on the type of match.\n\nOne of:\n * AddressPoint\n * HouseNumberRange\n * Street" - } - } - }, - "SearchAddressReverseCrossStreetResponse": { - "description": "This object is returned from a successful Search Address Reverse CrossStreet call", - "type": "object", - "properties": { - "summary": { - "$ref": "#/definitions/SearchAddressReverseCrossStreetSummary" - }, - "addresses": { - "description": "Addresses array", - "type": "array", - "readOnly": true, - "items": { - "$ref": "#/definitions/SearchAddressReverseCrossStreetResult" - } - } - } - }, - "SearchAddressReverseCrossStreetSummary": { - "description": "Summary object for a Search Address Reverse Cross Street response", - "type": "object", - "readOnly": true, - "properties": { - "queryTime": { - "description": "QueryTime property", - "type": "integer", - "readOnly": true - }, - "numResults": { - "description": "NumResults property", - "type": "integer", - "readOnly": true - } - } - }, - "SearchAddressReverseCrossStreetResult": { - "type": "object", - "properties": { - "address": { - "$ref": "#/definitions/SearchResultAddress" - }, - "position": { - "type": "string", - "readOnly": true, - "description": "Position property in the form of \"{latitude},{longitude}\"" - } - } - }, - "SearchAddressStructuredResponse": { - "description": "This object is returned from a successful Search Address Structured call", - "type": "object", - "properties": { - "summary": { - "$ref": "#/definitions/SearchAddressStructuredSummary" - }, - "results": { - "description": "Results array", - "type": "array", - "readOnly": true, - "items": { - "$ref": "#/definitions/SearchAddressStructuredResult" - } - } - } - }, - "SearchAddressStructuredSummary": { - "description": "Summary object for a Search Address Structured response", - "type": "object", - "readOnly": true, - "properties": { - "query": { - "description": "Query property", - "type": "string", - "readOnly": true - }, - "queryType": { - "description": "QueryType property", - "type": "string", - "readOnly": true - }, - "queryTime": { - "description": "QueryTime property", - "type": "integer", - "readOnly": true - }, - "numResults": { - "description": "NumResults property", - "type": "integer", - "readOnly": true - }, - "limit": { - "description": "Maximum number of responses that will be returned", - "readOnly": true, - "type": "integer" - }, - "offset": { - "description": "Offset property", - "type": "integer", - "readOnly": true - }, - "totalResults": { - "description": "TotalResults property", - "type": "integer", - "readOnly": true - }, - "fuzzyLevel": { - "description": "FuzzyLevel property", - "type": "integer", - "readOnly": true - }, - "geoBias": { - "$ref": "#/definitions/SearchSummaryGeoBias" - } - } - }, - "SearchAddressStructuredResult": { - "type": "object", - "properties": { - "type": { - "description": "Type property", - "type": "string", - "readOnly": true - }, - "id": { - "description": "Id property", - "type": "string", - "readOnly": true - }, - "score": { - "$ref": "#/definitions/SearchResultScore" - }, - "dist": { - "$ref": "#/definitions/SearchResultDistance" - }, - "address": { - "$ref": "#/definitions/SearchResultAddress" - }, - "position": { - "$ref": "#/definitions/CoordinateAbbreviated" - }, - "viewport": { - "$ref": "#/definitions/SearchResultViewport" - }, - "entryPoints": { - "description": "Entry Points array", - "type": "array", - "items": { - "$ref": "#/definitions/SearchResultEntryPoint" - } - }, - "addressRanges": { - "$ref": "#/definitions/SearchResultAddressRanges" - } - } - }, - "SearchGeometryResponse": { - "description": "This object is returned from a successful Search By Geometry call", - "type": "object", - "properties": { - "summary": { - "$ref": "#/definitions/SearchGeometrySummary" - }, - "results": { - "description": "A list of Search Inside Geometry results.", - "type": "array", - "readOnly": true, - "items": { - "$ref": "#/definitions/SearchGeometryResult" - } - } - } - }, - "SearchGeometrySummary": { - "description": "Summary object for a Search Geometry response", - "type": "object", - "readOnly": true, - "properties": { - "query": { - "description": "Query property", - "type": "string", - "readOnly": true - }, - "queryType": { - "description": "QueryType property", - "type": "string", - "readOnly": true - }, - "queryTime": { - "description": "QueryTime property", - "type": "integer", - "readOnly": true - }, - "numResults": { - "description": "NumResults property", - "type": "integer", - "readOnly": true - }, - "offset": { - "description": "Offset property", - "type": "integer", - "readOnly": true - }, - "totalResults": { - "description": "TotalResults property", - "type": "integer", - "readOnly": true - }, - "fuzzyLevel": { - "description": "FuzzyLevel property", - "type": "integer", - "readOnly": true - } - } - }, - "SearchGeometryResult": { - "description": "This type represents the Search Inside Geometry result object.", - "type": "object", - "properties": { - "type": { - "description": "Type property", - "type": "string", - "readOnly": true - }, - "id": { - "description": "Id property", - "type": "string", - "readOnly": true - }, - "score": { - "$ref": "#/definitions/SearchResultScore" - }, - "info": { - "description": "Info property", - "type": "string", - "readOnly": true - }, - "entityType": { - "$ref": "#/definitions/EntityType" - }, - "poi": { - "$ref": "#/definitions/SearchResultPoi" - }, - "address": { - "$ref": "#/definitions/SearchResultAddress" - }, - "position": { - "$ref": "#/definitions/CoordinateAbbreviated" - }, - "viewport": { - "$ref": "#/definitions/SearchResultViewport" - }, - "entryPoints": { - "description": "Entry Points array", - "type": "array", - "items": { - "$ref": "#/definitions/SearchResultEntryPoint" - } + "geometryData": { + "description": "Geometry data in GeoJSON format. Please refer to [RFC 7946](https://tools.ietf.org/html/rfc7946) for details. Present only if \"error\" is not present.", + "$ref": "../../../Common/preview/1.0/common.json#/definitions/GeoJsonObject" } } }, - "SearchAlongRouteResponse": { - "description": "This object is returned from a successful Search Along Route call.", + "SearchCommonResponse": { + "description": "This object is returned from a successful Search calls.", "type": "object", "properties": { "summary": { - "$ref": "#/definitions/SearchAlongRouteSummary" + "description": "Summary object for a Search API response", + "readOnly": true, + "$ref": "#/definitions/SearchCommonSummary" }, "results": { - "description": "A list of Search Along Route results.", + "description": "A list of Search API results.", "type": "array", "readOnly": true, "items": { - "$ref": "#/definitions/SearchAlongRouteResult" + "description": "This type represents the Search API result object.", + "readOnly": true, + "$ref": "#/definitions/SearchCommonResult" } } } }, - "SearchAlongRouteSummary": { - "description": "Summary object for a Search Along Route response", + "SearchCommonSummary": { + "description": "Summary object for a Search API response.", "type": "object", "readOnly": true, "properties": { @@ -3062,6 +1838,11 @@ "type": "integer", "readOnly": true }, + "limit": { + "description": "Maximum number of responses that will be returned", + "readOnly": true, + "type": "integer" + }, "offset": { "description": "Offset property", "type": "integer", @@ -3076,15 +1857,26 @@ "description": "FuzzyLevel property", "type": "integer", "readOnly": true + }, + "geoBias": { + "description": "Indication when the internal search engine has applied a geospatial bias to improve the ranking of results. In some methods, this can be affected by setting the lat and lon parameters where available. In other cases it is purely internal.", + "type": "object", + "readOnly": true, + "allOf": [ + { + "$ref": "../../../Common/preview/1.0/common.json#/definitions/CoordinatesPairAbbreviated" + } + ] } } }, - "SearchAlongRouteResult": { - "description": "This type represents the Search Along Route result object.", + "SearchCommonResult": { + "description": "Result object for a Search API response.", "type": "object", + "readOnly": true, "properties": { "type": { - "description": "Type property", + "description": "One of:\n* POI\n* Street\n* Geography\n* Point Address\n* Address Range\n* Cross Street", "type": "string", "readOnly": true }, @@ -3096,6 +1888,9 @@ "score": { "$ref": "#/definitions/SearchResultScore" }, + "dist": { + "$ref": "#/definitions/SearchResultDistance" + }, "info": { "description": "Info property", "type": "string", @@ -3111,7 +1906,7 @@ "$ref": "#/definitions/SearchResultAddress" }, "position": { - "$ref": "#/definitions/CoordinateAbbreviated" + "$ref": "../../../Common/preview/1.0/common.json#/definitions/CoordinatesPairAbbreviated" }, "viewport": { "$ref": "#/definitions/SearchResultViewport" @@ -3119,12 +1914,21 @@ "entryPoints": { "description": "Entry Points array", "type": "array", + "readOnly": true, "items": { "$ref": "#/definitions/SearchResultEntryPoint" } }, - "dist": { - "$ref": "#/definitions/SearchResultDistance" + "addressRanges": { + "$ref": "#/definitions/SearchResultAddressRanges" + }, + "dataSources": { + "$ref": "#/definitions/DataSources" + }, + "matchType": { + "type": "string", + "readOnly": true, + "description": "Information on the type of match.\n\nOne of:\n * AddressPoint\n * HouseNumberRange\n * Street" }, "detourTime": { "description": "Detour time in seconds", @@ -3133,12 +1937,131 @@ } } }, + "SearchPoiCategoryTreeResponse": { + "description": "This object is returned from a successful POI Category Tree call", + "type": "object", + "properties": { + "poiCategories": { + "description": "Categories array", + "type": "array", + "readOnly": true, + "items": { + "$ref": "#/definitions/PoiCategoryResult" + } + } + } + }, + "PoiCategoryResult": { + "description": "POI category result", + "type": "object", + "properties": { + "id": { + "description": "Unique ID for the category. ID can be used to restrict search results to specific categories through other Search Service APIs, like [Get Search POI](https://docs.microsoft.com/rest/api/maps/search/getsearchpoi).", + "type": "integer", + "readOnly": true + }, + "name": { + "description": "Name of the category", + "type": "string", + "readOnly": true + }, + "childCategoryIds": { + "description": "Array of child category ids", + "type": "array", + "items": { + "type": "integer", + "readOnly": true + }, + "readOnly": true + }, + "synonyms": { + "description": "Array of alternative names of the category", + "type": "array", + "items": { + "type": "string", + "readOnly": true + }, + "readOnly": true + } + } + }, + "SearchAddressReverseResponse": { + "description": "This object is returned from a successful Search Address Reverse call", + "type": "object", + "properties": { + "summary": { + "description": "Summary object for a Search Address Reverse response", + "readOnly": true, + "$ref": "#/definitions/SearchCommonSummary" + }, + "addresses": { + "description": "Addresses array", + "type": "array", + "readOnly": true, + "items": { + "$ref": "#/definitions/SearchAddressReverseResult" + } + } + } + }, + "SearchAddressReverseResult": { + "description": "Result object for a Search Address Reverse response", + "type": "object", + "properties": { + "address": { + "$ref": "#/definitions/SearchResultAddress" + }, + "position": { + "type": "string", + "readOnly": true, + "description": "Position property in the form of \"{latitude},{longitude}\"" + }, + "matchType": { + "type": "string", + "readOnly": true, + "description": "Information on the type of match.\n\nOne of:\n * AddressPoint\n * HouseNumberRange\n * Street" + } + } + }, + "SearchAddressReverseCrossStreetResponse": { + "description": "This object is returned from a successful Search Address Reverse CrossStreet call", + "type": "object", + "properties": { + "summary": { + "description": "Summary object for a Search Address Reverse Cross Street response", + "readOnly": true, + "$ref": "#/definitions/SearchCommonSummary" + }, + "addresses": { + "description": "Addresses array", + "type": "array", + "readOnly": true, + "items": { + "$ref": "#/definitions/SearchAddressReverseCrossStreetResult" + } + } + } + }, + "SearchAddressReverseCrossStreetResult": { + "description": "Result object for a Search Address Reverse Cross Street response", + "type": "object", + "properties": { + "address": { + "$ref": "#/definitions/SearchResultAddress" + }, + "position": { + "type": "string", + "readOnly": true, + "description": "Position property in the form of \"{latitude},{longitude}\"" + } + } + }, "SearchInsideGeometryRequestBody": { "description": "This type represents the request body for the Search Inside Geometry service.", "type": "object", "properties": { "geometry": { - "$ref": "#/definitions/Geometry" + "$ref": "../../../Common/preview/1.0/common.json#/definitions/GeoJsonObject" } } }, @@ -3147,13 +2070,14 @@ "type": "object", "properties": { "route": { - "$ref": "#/definitions/LineString" + "$ref": "../../../Common/preview/1.0/common.json#/definitions/GeoJsonLineString" } } }, "SearchResultPoi": { "description": "Details of the returned POI including information such as the name, phone, url address, and classifications.", "type": "object", + "readOnly": true, "properties": { "name": { "description": "Name of the POI property", @@ -3322,6 +2246,7 @@ "SearchResultAddress": { "description": "The address of the result", "type": "object", + "readOnly": true, "properties": { "buildingNumber": { "description": "Building Number property", @@ -3426,24 +2351,31 @@ "description": "An address component which represents the name of a geographic area or locality that groups a number of addressable objects for addressing purposes, without being an administrative unit. This field is used to build the `freeformAddress` property.", "type": "string", "readOnly": true + }, + "boundingBox": { + "description": "Bounding box coordinates.", + "type": "object", + "readOnly": true } } }, "SearchResultViewport": { "description": "The viewport that covers the result represented by the top-left and bottom-right coordinates of the viewport.", "type": "object", + "readOnly": true, "properties": { "topLeftPoint": { - "$ref": "#/definitions/CoordinateAbbreviated" + "$ref": "../../../Common/preview/1.0/common.json#/definitions/CoordinatesPairAbbreviated" }, "btmRightPoint": { - "$ref": "#/definitions/CoordinateAbbreviated" + "$ref": "../../../Common/preview/1.0/common.json#/definitions/CoordinatesPairAbbreviated" } } }, "SearchResultEntryPoint": { "description": "The entry point for the POI being returned.", "type": "object", + "readOnly": true, "properties": { "type": { "description": "The type of entry point. Value can be either _main_ or _minor_.", @@ -3452,28 +2384,35 @@ "enum": [ "main", "minor" - ] + ], + "x-ms-enum": { + "name": "EntryPointType", + "modelAsString": true + } }, "position": { - "$ref": "#/definitions/CoordinateAbbreviated" + "$ref": "../../../Common/preview/1.0/common.json#/definitions/CoordinatesPairAbbreviated" } } }, "SearchResultAddressRanges": { "description": "Describes the address range on both sides of the street for a search result. Coordinates for the start and end locations of the address range are included.", "type": "object", + "readOnly": true, "properties": { "rangeLeft": { + "description": "Address range on the left side of the street.", "type": "string" }, "rangeRight": { + "description": "Address range on the right side of the street.", "type": "string" }, "from": { - "$ref": "#/definitions/CoordinateAbbreviated" + "$ref": "../../../Common/preview/1.0/common.json#/definitions/CoordinatesPairAbbreviated" }, "to": { - "$ref": "#/definitions/CoordinateAbbreviated" + "$ref": "../../../Common/preview/1.0/common.json#/definitions/CoordinatesPairAbbreviated" } } }, @@ -3507,6 +2446,7 @@ "DataSources": { "description": "Optional section. Reference ids for use with the [Get Search Polygon](https://docs.microsoft.com/rest/api/maps/search/getsearchpolygon) API.", "type": "object", + "readOnly": true, "properties": { "geometry": { "$ref": "#/definitions/DataSourcesGeometry" @@ -3527,6 +2467,7 @@ "EntityType": { "description": "Geography entity type. Present only when entityType was requested and is available.", "type": "string", + "readOnly": true, "enum": [ "Country", "CountrySubdivision", @@ -3575,6 +2516,135 @@ } ] } + }, + "SearchFuzzyBatchResponse": { + "description": "This object is returned from a successful Search Fuzzy Batch service call.", + "type": "object", + "allOf": [ + { + "$ref": "../../../Common/preview/1.0/common.json#/definitions/BatchResponse" + } + ], + "properties": { + "batchItems": { + "description": "Array containing the batch results.", + "type": "array", + "readOnly": true, + "items": { + "$ref": "#/definitions/SearchFuzzyBatchItem" + } + } + } + }, + "SearchFuzzyBatchItem": { + "description": "An item returned from Search Fuzzy Batch service call.", + "type": "object", + "allOf": [ + { + "$ref": "../../../Common/preview/1.0/common.json#/definitions/BatchItem" + } + ], + "properties": { + "response": { + "description": "The result of the query. SearchCommonResponse if the query completed successfully, ErrorResponse otherwise.", + "type": "object", + "readOnly": true, + "allOf": [ + { + "$ref": "#/definitions/SearchCommonResponse" + }, + { + "$ref": "../../../../../../common-types/data-plane/v1/types.json#/definitions/ErrorResponse" + } + ] + } + } + }, + "SearchAddressBatchResponse": { + "description": "This object is returned from a successful Search Address Batch service call.", + "type": "object", + "allOf": [ + { + "$ref": "../../../Common/preview/1.0/common.json#/definitions/BatchResponse" + } + ], + "properties": { + "batchItems": { + "description": "Array containing the batch results.", + "type": "array", + "readOnly": true, + "items": { + "$ref": "#/definitions/SearchAddressBatchItem" + } + } + } + }, + "SearchAddressBatchItem": { + "description": "An item returned from Search Address Batch service call.", + "type": "object", + "allOf": [ + { + "$ref": "../../../Common/preview/1.0/common.json#/definitions/BatchItem" + } + ], + "properties": { + "response": { + "description": "The result of the query. SearchCommonResponse if the query completed successfully, ErrorResponse otherwise.", + "type": "object", + "readOnly": true, + "allOf": [ + { + "$ref": "#/definitions/SearchCommonResponse" + }, + { + "$ref": "../../../../../../common-types/data-plane/v1/types.json#/definitions/ErrorResponse" + } + ] + } + } + }, + "SearchAddressReverseBatchResponse": { + "description": "This object is returned from a successful Search Address Reverse Batch service call.", + "type": "object", + "allOf": [ + { + "$ref": "../../../Common/preview/1.0/common.json#/definitions/BatchResponse" + } + ], + "properties": { + "batchItems": { + "description": "Array containing the batch results.", + "type": "array", + "readOnly": true, + "items": { + "$ref": "#/definitions/SearchAddressReverseBatchItem" + } + } + } + }, + "SearchAddressReverseBatchItem": { + "description": "An item returned from Search Address Reverse Batch service call.", + "type": "object", + "allOf": [ + { + "$ref": "../../../Common/preview/1.0/common.json#/definitions/BatchItem" + } + ], + "properties": { + "response": { + "description": "The result of the query. SearchAddressReverseResponse if the query completed successfully, ErrorResponse otherwise.", + "type": "object", + "readOnly": true, + "allOf": [ + { + "$ref": "#/definitions/SearchAddressReverseResponse" + }, + { + "$ref": "../../../../../../common-types/data-plane/v1/types.json#/definitions/ErrorResponse" + } + ] + } + } } } } diff --git a/specification/maps/data-plane/Microsoft.Maps/Spatial/preview/1.0/examples/GetBuffer.json b/specification/maps/data-plane/Microsoft.Maps/Spatial/preview/1.0/examples/GetBuffer.json index 43e7e0727837..f0cdf649b353 100644 --- a/specification/maps/data-plane/Microsoft.Maps/Spatial/preview/1.0/examples/GetBuffer.json +++ b/specification/maps/data-plane/Microsoft.Maps/Spatial/preview/1.0/examples/GetBuffer.json @@ -1,8 +1,8 @@ { "parameters": { + "geography": "us", "format": "json", "api-version": "1.0", - "subscription-key": "[subscription-key]", "udid": "[udid]", "distances": "176.3" }, @@ -165,55 +165,6 @@ ] } } - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "ClientParams", - "message": "One or more parameters are missing.", - "innererror": { - "code": "MissingQueryParameter", - "message": "Input parameter udid is missing." - } - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found: the requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "An error occurred while processing the request. Please try again later." - } - } } } } diff --git a/specification/maps/data-plane/Microsoft.Maps/Spatial/preview/1.0/examples/GetClosestPoint.json b/specification/maps/data-plane/Microsoft.Maps/Spatial/preview/1.0/examples/GetClosestPoint.json index 556e7a33ae6e..426ebeaf3725 100644 --- a/specification/maps/data-plane/Microsoft.Maps/Spatial/preview/1.0/examples/GetClosestPoint.json +++ b/specification/maps/data-plane/Microsoft.Maps/Spatial/preview/1.0/examples/GetClosestPoint.json @@ -1,8 +1,8 @@ { "parameters": { + "geography": "us", "format": "json", "api-version": "1.0", - "subscription-key": "[subscription-key]", "udid": "[udid]", "lat": 47.622942, "lon": -122.316456 @@ -29,55 +29,6 @@ } ] } - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "ClientParams", - "message": "One or more parameters are missing.", - "innererror": { - "code": "MissingQueryParameter", - "message": "Input parameter lon is missing." - } - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found: the requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "An error occurred while processing the request. Please try again later." - } - } } } } diff --git a/specification/maps/data-plane/Microsoft.Maps/Spatial/preview/1.0/examples/GetGeofence.json b/specification/maps/data-plane/Microsoft.Maps/Spatial/preview/1.0/examples/GetGeofence.json index 6d01b0c8a0ca..774de28742a6 100644 --- a/specification/maps/data-plane/Microsoft.Maps/Spatial/preview/1.0/examples/GetGeofence.json +++ b/specification/maps/data-plane/Microsoft.Maps/Spatial/preview/1.0/examples/GetGeofence.json @@ -1,16 +1,16 @@ { "parameters": { + "geography": "us", "format": "json", "api-version": "1.0", "deviceId": "unique_device_name_under_account", - "udId": "[udId]", + "udid": "[udId]", "lat": 48.36, "lon": -124.63, "searchBuffer": 50, - "userTime": "2018-09-10T10:00:00", + "userTime": "2017-07-21T17:32:28Z", "isAsync": true, - "mode": "EnterAndExit", - "subscription-key": "[subscription-key]" + "mode": "EnterAndExit" }, "responses": { "200": { @@ -42,54 +42,6 @@ ], "isEventPublished": true } - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "BadRequest", - "message": "Can't find user geofencing data with provided udid.", - "innererror": { - "code": "NoUserDataWithUdid" - } - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found: the requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "An error occurred while processing the request. Please try again later." - } - } } } } diff --git a/specification/maps/data-plane/Microsoft.Maps/Spatial/preview/1.0/examples/GetGreatCircleDistance.json b/specification/maps/data-plane/Microsoft.Maps/Spatial/preview/1.0/examples/GetGreatCircleDistance.json index e309dad87a26..0565252283f3 100644 --- a/specification/maps/data-plane/Microsoft.Maps/Spatial/preview/1.0/examples/GetGreatCircleDistance.json +++ b/specification/maps/data-plane/Microsoft.Maps/Spatial/preview/1.0/examples/GetGreatCircleDistance.json @@ -1,8 +1,8 @@ { "parameters": { + "geography": "us", "format": "json", "api-version": "1.0", - "subscription-key": "[subscription-key]", "query": "47.622942,-122.316456:47.610378,-122.200676" }, "responses": { @@ -22,55 +22,6 @@ "distanceInMeters": 8797.62 } } - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "ClientParams", - "message": "Lat and/or lon parameters are invalid.", - "innererror": { - "code": "InvalidLatLon", - "message": "The provided coordinates '-122.316456,47.622942:47.610378,-122.200676' in query paramter are invalid, out of range, or not in the expected format" - } - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found: the requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "An error occurred while processing the request. Please try again later." - } - } } } } diff --git a/specification/maps/data-plane/Microsoft.Maps/Spatial/preview/1.0/examples/GetPointInPolygon.json b/specification/maps/data-plane/Microsoft.Maps/Spatial/preview/1.0/examples/GetPointInPolygon.json index 88c4357c221c..5d94dd13c8c0 100644 --- a/specification/maps/data-plane/Microsoft.Maps/Spatial/preview/1.0/examples/GetPointInPolygon.json +++ b/specification/maps/data-plane/Microsoft.Maps/Spatial/preview/1.0/examples/GetPointInPolygon.json @@ -1,8 +1,8 @@ { "parameters": { + "geography": "us", "format": "json", "api-version": "1.0", - "subscription-key": "[subscription-key]", "udid": "[udid]", "lat": 47.622942, "lon": -122.316456 @@ -26,54 +26,6 @@ ] } } - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "ClientParams", - "message": "Udid should be acquired from user data ingestion API.", - "innererror": { - "code": "UdidWrongFormat" - } - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found: the requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "An error occurred while processing the request. Please try again later." - } - } } } } diff --git a/specification/maps/data-plane/Microsoft.Maps/Spatial/preview/1.0/examples/PostBuffer.json b/specification/maps/data-plane/Microsoft.Maps/Spatial/preview/1.0/examples/PostBuffer.json index 00d7798d1c99..201618ac2347 100644 --- a/specification/maps/data-plane/Microsoft.Maps/Spatial/preview/1.0/examples/PostBuffer.json +++ b/specification/maps/data-plane/Microsoft.Maps/Spatial/preview/1.0/examples/PostBuffer.json @@ -1,8 +1,8 @@ { "parameters": { + "geography": "us", "format": "json", "api-version": "1.0", - "subscription-key": "[subscription-key]", "bufferRequestBody": { "geometries": { "type": "FeatureCollection", @@ -186,55 +186,6 @@ ] } } - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "ClientParams", - "message": "Request body is not a valid json.", - "innererror": { - "code": "InvalidJson", - "message": "Only 2 Json Objects accepted; Received: 1 JSON Objects" - } - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found: the requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "An error occurred while processing the request. Please try again later." - } - } } } } diff --git a/specification/maps/data-plane/Microsoft.Maps/Spatial/preview/1.0/examples/PostClosestPoint.json b/specification/maps/data-plane/Microsoft.Maps/Spatial/preview/1.0/examples/PostClosestPoint.json index 2d9b965497f2..c47be26bac17 100644 --- a/specification/maps/data-plane/Microsoft.Maps/Spatial/preview/1.0/examples/PostClosestPoint.json +++ b/specification/maps/data-plane/Microsoft.Maps/Spatial/preview/1.0/examples/PostClosestPoint.json @@ -1,8 +1,8 @@ { "parameters": { + "geography": "us", "format": "json", "api-version": "1.0", - "subscription-key": "[subscription-key]", "lat": 47.622942, "lon": -122.316456, "closestPointRequestBody": { @@ -72,55 +72,6 @@ } ] } - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "ClientParams", - "message": "One or more parameters are missing.", - "innererror": { - "code": "MissingQueryParameter", - "message": "Input parameter lon is missing." - } - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found: the requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "An error occurred while processing the request. Please try again later." - } - } } } } diff --git a/specification/maps/data-plane/Microsoft.Maps/Spatial/preview/1.0/examples/PostGeofence.json b/specification/maps/data-plane/Microsoft.Maps/Spatial/preview/1.0/examples/PostGeofence.json index d638ff7b7c6f..11c4fe5176c7 100644 --- a/specification/maps/data-plane/Microsoft.Maps/Spatial/preview/1.0/examples/PostGeofence.json +++ b/specification/maps/data-plane/Microsoft.Maps/Spatial/preview/1.0/examples/PostGeofence.json @@ -1,15 +1,15 @@ { "parameters": { + "geography": "us", "format": "json", "api-version": "1.0", "deviceId": "unique_device_name_under_account", "lat": 48.36, "lon": -124.63, "searchBuffer": 50, - "usertime": "2018-09-10T10:00:00", + "usertime": "2017-07-21T17:32:28Z", "isAsync": true, "mode": "EnterAndExit", - "subscription-key": "[subscription-key]", "searchGeofenceRequestBody": { "type": "FeatureCollection", "features": [ @@ -128,56 +128,6 @@ "invalidPeriodGeofenceGeometryId": [], "isEventPublished": true } - }, - "400": { - "headers": { - "X-Correlation-ID": "80575fa1-2c1e-4738-834a-fcf45b58dd7c" - }, - "body": { - "error": { - "code": "BadRequest", - "message": "Lat and/or lon parameters are invalid.", - "innererror": { - "code": "InvalidLatLon" - } - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found: the requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "An error occurred while processing the request. Please try again later." - } - } } } } diff --git a/specification/maps/data-plane/Microsoft.Maps/Spatial/preview/1.0/examples/PostPointInPolygon.json b/specification/maps/data-plane/Microsoft.Maps/Spatial/preview/1.0/examples/PostPointInPolygon.json index 5677897e923c..fc0ce0e8d71e 100644 --- a/specification/maps/data-plane/Microsoft.Maps/Spatial/preview/1.0/examples/PostPointInPolygon.json +++ b/specification/maps/data-plane/Microsoft.Maps/Spatial/preview/1.0/examples/PostPointInPolygon.json @@ -1,8 +1,8 @@ { "parameters": { + "geography": "us", "format": "json", "api-version": "1.0", - "subscription-key": "[subscription-key]", "lat": 33.5362475, "lon": -111.9267386, "pointInPolygonRequestBody": { @@ -58,55 +58,6 @@ ] } } - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "ClientParams", - "message": "Lat and/or lon parameters are invalid.", - "innererror": { - "code": "InvalidLatLon", - "message": "lon parameter value should between -180 and 180 inclusive" - } - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found: the requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "An error occurred while processing the request. Please try again later." - } - } } } } diff --git a/specification/maps/data-plane/Microsoft.Maps/Spatial/preview/1.0/spatial.json b/specification/maps/data-plane/Microsoft.Maps/Spatial/preview/1.0/spatial.json index 6b3c8366926e..08edffd68c99 100644 --- a/specification/maps/data-plane/Microsoft.Maps/Spatial/preview/1.0/spatial.json +++ b/specification/maps/data-plane/Microsoft.Maps/Spatial/preview/1.0/spatial.json @@ -5,14 +5,33 @@ "version": "1.0", "description": "Azure Maps Spatial REST APIs" }, - "host": "atlas.microsoft.com", + "x-ms-parameterized-host": { + "hostTemplate": "{geography}.atlas.microsoft.com", + "parameters": [ + { + "$ref": "../../../Common/preview/1.0/common.json#/parameters/GeographicResourceLocation" + } + ] + }, "schemes": [ "https" ], "consumes": [], "produces": [ - "application/json", - "application/xml" + "application/json" + ], + "security": [ + { + "azure_auth": [ + "user_impersonation" + ] + }, + { + "SubscriptionKeyInHeader": [] + }, + { + "SubscriptionKeyInQuery": [] + } ], "securityDefinitions": { "azure_auth": { @@ -21,149 +40,35 @@ "flow": "implicit", "description": "These are the [Azure Active Directory OAuth2](https://docs.microsoft.com/en-us/azure/active-directory/develop/v1-overview) Flows. When paired with [Azure Role Based Access](https://docs.microsoft.com/en-us/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#### Note\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* The `Authorization URL` is specific to the Azure public cloud instance. Sovereign clouds have unique Authorization URLs and Azure Active directory configurations. \n* 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.\n* Usage of the [Azure Maps Web SDK](https://aka.ms/amaadmc) allows for configuration based setup of an application for multiple use cases.\n* Currently Azure Active Directory [v1.0](https://docs.microsoft.com/en-us/azure/active-directory/develop/azure-ad-endpoint-comparison) tokens are supported.", "scopes": { - "user_impersonation": "Impersonates a user's Azure Active Directory account." + "user_impersonation": "impersonate your user account" } }, - "apiKeyQuery": { + "SubscriptionKeyInHeader": { "type": "apiKey", - "description": "This is a shared key which 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 which 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": "query" - } - }, - "security": [ - { - "azure_auth": [] - }, - { - "apiKeyQuery": [] - } - ], - "responses": { - "202": { - "description": "Request Accepted: The request has been accepted for processing. Please use the URL in the Location Header to retry or access the results.", - "headers": { - "Location": { - "type": "string", - "description": "New URL to check for the results of the long running process." - } - } - }, - "400": { - "description": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive.", - "schema": { - "$ref": "#/definitions/ODataErrorResponse" - } + "in": "header" }, - "401": { - "description": "Access denied due to invalid subscription key or invalid Azure Active Directory 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 AAD bearer token.", - "schema": { - "$ref": "#/definitions/ODataErrorResponse" - }, - "headers": { - "WWW-Authenticate": { - "type": "string", - "description": "Bearer realm=\"https://atlas.microsoft.com/\", error=\"invalid_token\", error_description=\"The access token expired\"" - } - } - }, - "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" - } + "SubscriptionKeyInQuery": { + "type": "apiKey", + "name": "subscription-key", + "in": "query" } }, + "responses": {}, "parameters": { - "ClientId": { - "name": "x-ms-client-id", - "description": "Specifies which account is intended for usage in conjunction with the Azure AD security model. It represents a unique ID for the Azure Maps account and can be retrieved from Azure Maps management plane Account API. To use Azure AD 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": { + "SpatialApiVersion": { "name": "api-version", - "description": "Version number of Azure Maps API. Current version is 1.0", + "description": "Version number of Azure Maps API.", "type": "string", "in": "query", "required": true, "default": "1.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" - }, - "TextFormat": { - "name": "format", - "description": "Desired format of the response. Value can be either _json_ or _xml_.", - "type": "string", - "in": "path", - "required": true, - "enum": [ - "json", - "xml" - ], - "x-ms-enum": { - "name": "TextFormat", - "modelAsString": true, - "values": [ - { - "value": "json", - "description": "[The JavaScript Object Notation Data Interchange Format](https://tools.ietf.org/html/rfc8259)" - }, - { - "value": "xml", - "description": "[The Extensible Markup Language](https://www.w3.org/TR/xml/)" - } - ] - }, - "x-ms-parameter-location": "method" - }, - "Mode": { + "GeofenceMode": { "name": "mode", "in": "query", "description": "Mode of the geofencing async event mechanism.", - "required": false, "type": "string", "enum": [ "All", @@ -185,7 +90,7 @@ }, "x-ms-parameter-location": "method" }, - "UdidSpatial": { + "SpatialUploadUdid": { "name": "udid", "in": "query", "description": "The unique id returned from [Data Upload API](https://docs.microsoft.com/en-us/rest/api/maps/data/uploadPreview) after uploading a valid GeoJSON FeatureCollection object. Please refer to [RFC 7946](https://tools.ietf.org/html/rfc7946#section-3.3) for details. All the feature's properties should contain `geometryId`, which is used for identifying the geometry and is case-sensitive.", @@ -193,7 +98,7 @@ "type": "string", "x-ms-parameter-location": "method" }, - "SpatialDataUploadFormat": { + "SpatialUploadDataFormat": { "name": "dataFormat", "description": "Data format of the content being uploaded. Currently, only `geojson` format is supported.", "type": "string", @@ -203,7 +108,7 @@ "geojson" ], "x-ms-enum": { - "name": "SpatialDataUploadFormat", + "name": "SpatialUploadDataFormat", "modelAsString": true, "values": [ { @@ -213,31 +118,72 @@ ] }, "x-ms-parameter-location": "method" + }, + "SpatialLatitude": { + "name": "lat", + "x-ms-client-name": "Latitude", + "description": "The latitude of the location being passed. Example: 48.36.", + "type": "number", + "in": "query", + "required": true, + "x-ms-parameter-location": "method" + }, + "SpatialLongitude": { + "name": "lon", + "x-ms-client-name": "Longitude", + "description": "The longitude of the location being passed. Example: -124.63.", + "type": "number", + "in": "query", + "required": true, + "x-ms-parameter-location": "method" + }, + "SearchGeofenceRequestBody": { + "name": "searchGeofenceRequestBody", + "in": "body", + "description": "The geofencing GeoJSON data.", + "required": true, + "schema": { + "$ref": "../../../Common/preview/1.0/common.json#/definitions/GeoJsonFeatureCollection" + } + }, + "ClosestPointRequestBody": { + "name": "closestPointRequestBody", + "in": "body", + "description": "The FeatureCollection of Point geometries from which closest point to source point should be determined. All the feature's properties should contain `geometryId`, which is used for identifying the geometry and is case-sensitive.", + "required": true, + "schema": { + "$ref": "../../../Common/preview/1.0/common.json#/definitions/GeoJsonFeatureCollection" + } + }, + "PointInPolygonRequestBody": { + "name": "pointInPolygonRequestBody", + "in": "body", + "description": "A FeatureCollection with a set of Polygon/MultiPolygon geometries. The maximum number of vertices accepted to form a Polygon is 10,000. All the feature's properties should contain `geometryId`, which is used for identifying the geometry and is case-sensitive.", + "required": true, + "schema": { + "$ref": "../../../Common/preview/1.0/common.json#/definitions/GeoJsonFeatureCollection" + } } }, "paths": { "/spatial/geofence/{format}": { "get": { - "x-publish": true, - "description": "**Search Geofence Get API**\n\n**Applies to:** S1 Pricing tier.\n\nThe Geofence Get API allows you to retrieve the proximity of a coordinate to a \ngeofence that has been uploaded to the Data service. You can use the \n[Data Upload API](https://docs.microsoft.com/en-us/rest/api/maps/data/uploadPreview) to upload \na geofence or set of fences. See [Geofencing GeoJSON data](https://docs.microsoft.com/en-us/azure/azure-maps/geofence-geojson) \nfor more details on the geofence data format. To query the proximity of a coordinate, you supply the location of the object you are tracking as well\nas the ID for the fence or set of fences, and the response will contain information about\nthe distance from the outer edge of the geofence. A negative value signifies that the \ncoordinate is inside of the fence while a positive value means that it is outside of the\nfence.

This API can be used for a variety of scenarios that include things like asset \ntracking, fleet management, or setting up alerts for moving objects.\n\nThe API supports [integration with Event Grid](https://docs.microsoft.com/azure/azure-maps/azure-maps-event-grid-integration). The isAsync parameter is used to enable integration with Event Grid (disabled by default).\nTo test this API, you can upload the sample data from Post Geofence API examples(Request Body) via Data Upload API and replace the [udid] from the sample request below with the udid returned by Data Upload API.\n\n\n### Geofencing InnerError code\n\nIn geofencing response error contract, `innererror` is an object containing service specific information about the error. `code` is a property in `innererror` which can map to a specific geofencing error type. The table belows shows the code mapping between all the known client error type to the corresponding geofencing error `message`.\n\ninnererror.code | error.message\n---------------------------- | -------------------------------------- \nNullDeviceId | Device Id should not be null.\nNullUdid\t | Udid should not be null.\nUdidWrongFormat| Udid should be acquired from user data ingestion API.\nInvalidUserTime| Usertime is invalid.\nInvalidSearchBuffer| Searchbuffer is invalid.\nInvalidSearchRange| The value range of searchbuffer should be from 0 to 500 meters.\nInvalidLatLon| Lat and/or lon parameters are invalid.\nInvalidIsAsyncValue| The IsAsync parameter is invalid.\nInvalidModeValue| The mode parameter invalid.\nInvalidJson| Geofencing data is not a valid json file.\nNotSupportedGeoJson| Geofencing data can't be read as a Feature or FeatureCollections.\nInvalidGeoJson| Geofencing data is invalid.\nNoUserDataWithAccountOrSubscription| Can't find user geofencing data with provided account-id and/or subscription-id.\nNoUserDataWithUdid|\tCan't find user geofencing data with provided udId.", + "description": "**Search Geofence Get API**\n\n**Applies to:** S1 Pricing tier.\n\nThe Geofence Get API allows you to retrieve the proximity of a coordinate to a \ngeofence that has been uploaded to the Data service. You can use the \n[Data Upload API](https://docs.microsoft.com/en-us/rest/api/maps/data/uploadPreview) to upload \na geofence or set of fences. See [Geofencing GeoJSON data](https://docs.microsoft.com/en-us/azure/azure-maps/geofence-geojson) \nfor more details on the geofence data format. To query the proximity of a coordinate, you supply the location of the object you are tracking as well\nas the ID for the fence or set of fences, and the response will contain information about\nthe distance from the outer edge of the geofence. A negative value signifies that the \ncoordinate is inside of the fence while a positive value means that it is outside of the\nfence.

This API can be used for a variety of scenarios that include things like asset \ntracking, fleet management, or setting up alerts for moving objects.\n\nThe API supports [integration with Event Grid](https://docs.microsoft.com/azure/azure-maps/azure-maps-event-grid-integration). The isAsync parameter is used to enable integration with Event Grid (disabled by default).\nTo test this API, you can upload the sample data from Post Geofence API examples(Request Body) via Data Upload API and replace the [udid] from the sample request below with the udid returned by Data Upload API.\n\n\n### Geofencing InnerError code\n\nIn geofencing response error contract, `innererror` is an object containing service specific information about the error. `code` is a property in `innererror` which can map to a specific geofencing error type. The table belows shows the code mapping between all the known client error type to the corresponding geofencing error `message`.\n\ninnererror.code | error.message\n---------------------------- | -------------------------------------- \nNullDeviceId | Device Id should not be null.\nNullUdid\t | Udid should not be null.\nUdidWrongFormat| Udid should be acquired from user data ingestion API.\nInvalidUserTime| Usertime is invalid.\nInvalidSearchBuffer| Searchbuffer is invalid.\nInvalidSearchRange| The value range of searchbuffer should be from 0 to 500 meters.\nInvalidLatLon| Lat and/or lon parameters are invalid.\nInvalidIsAsyncValue| The IsAsync parameter is invalid.\nInvalidModeValue| The mode parameter invalid.\nInvalidJson| Geofencing data is not a valid json file.\nNotSupportedGeoJson| Geofencing data can't be read as a Feature or FeatureCollections.\nInvalidGeoJson| Geofencing data is invalid.\nNoUserDataWithAccountOrSubscription| Can't find user geofencing data with provided account-id and/or subscription-id.\nNoUserDataWithUdid|\tCan't find user geofencing data with provided udid.", "operationId": "Spatial_GetGeofence", "x-ms-examples": { - "Geofence": { + "GetGeofence": { "$ref": "./examples/GetGeofence.json" } }, "parameters": [ { - "$ref": "#/parameters/ClientId" - }, - { - "$ref": "#/parameters/SubscriptionKey" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ClientId" }, { - "$ref": "#/parameters/ApiVersion" + "$ref": "#/parameters/SpatialApiVersion" }, { - "$ref": "#/parameters/JsonFormat" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ResponseFormat" }, { "name": "deviceId", @@ -247,65 +193,49 @@ "type": "string" }, { - "name": "udId", + "name": "udid", "in": "query", "description": "The unique id returned from [Data Upload API](https://docs.microsoft.com/en-us/rest/api/maps/data/uploadPreview) after uploading a valid GeoJSON FeatureCollection object. Please refer to [RFC 7946](https://tools.ietf.org/html/rfc7946#section-3.3) for details. All the feature's properties should contain `geometryId`, which is used for identifying the geometry and is case-sensitive.", "required": true, "type": "string" }, { - "name": "lat", - "in": "query", - "description": "The latitude of the location being passed. Example: 48.36.", - "required": true, - "type": "number" + "$ref": "#/parameters/SpatialLatitude" }, { - "name": "lon", - "in": "query", - "description": "The longitude of the location being passed. Example: -124.63.", - "required": true, - "type": "number" + "$ref": "#/parameters/SpatialLongitude" }, { "name": "z", "in": "query", "description": "The sea level in meter of the location being passed. If this parameter is presented, 2D extrusion is used. Example: 200.", - "required": false, "type": "number" }, { "name": "userTime", "in": "query", + "format": "date-time", "description": "The user request time. If not presented in the request, the default value is DateTime.Now.", - "required": false, "type": "string" }, { "name": "searchBuffer", "in": "query", "description": "The radius of the buffer around the geofence in meters that defines how far to search inside and outside the border of the fence against the coordinate that was provided when calculating the result. The minimum value is 0, and the maximum is 500. The default value is 50.", - "required": false, "type": "number", "minimum": 0, - "maximum": 500, - "default": 50 + "maximum": 500 }, { "name": "isAsync", "in": "query", "description": "If true, the request will use async event mechanism; if false, the request will be synchronized and do not trigger any event. The default value is false.", - "required": false, - "type": "boolean", - "default": false + "type": "boolean" }, { - "$ref": "#/parameters/Mode" + "$ref": "#/parameters/GeofenceMode" } ], - "produces": [ - "application/json" - ], "responses": { "200": { "description": "OK The X-Correlation-id header value is present in an async call's response and the Event Grid event data. It helps correlate the async call’s response with the corresponding Event Grid event.", @@ -319,44 +249,28 @@ "$ref": "#/definitions/GeofenceResponse" } }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" + "default": { + "$ref": "../../../Common/preview/1.0/common.json#/responses/default" } } }, "post": { - "x-publish": true, "description": "**Search Geofence Post API**\n**Applies to:** S1 Pricing tier.\nThe Geofence Post API allows you to retrieve the proximity of a coordinate to a provided geofence or set of fences. With POST call, you do not have to upload the fence data in advance, instead you supply the location of the object you are tracking in query parameters as well as the fence or set of fences data in post request body. See [Geofencing GeoJSON data](https://docs.microsoft.com/en-us/azure/azure-maps/geofence-geojson) for more details on the geofence data format. The response will contain information about the distance from the outer edge of the geofence. A negative value signifies that the coordinate is inside of the fence while a positive value means that it is outside of the fence.

This API can be used for a variety of scenarios that include things like asset tracking, fleet management, or setting up alerts for moving objects.\n\nThe API supports [integration with Event Grid](https://docs.microsoft.com/azure/azure-maps/azure-maps-event-grid-integration). The isAsync parameter is used to enable integration with Event Grid (disabled by default).", "operationId": "Spatial_PostGeofence", "x-ms-examples": { - "Geofence": { + "PostGeofence": { "$ref": "./examples/PostGeofence.json" } }, "parameters": [ { - "$ref": "#/parameters/ClientId" - }, - { - "$ref": "#/parameters/SubscriptionKey" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ClientId" }, { - "$ref": "#/parameters/ApiVersion" + "$ref": "#/parameters/SpatialApiVersion" }, { - "$ref": "#/parameters/JsonFormat" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ResponseFormat" }, { "name": "deviceId", @@ -366,67 +280,45 @@ "type": "string" }, { - "name": "lat", - "in": "query", - "description": "The latitude of the location being passed. Example: 48.36.", - "required": true, - "type": "number" + "$ref": "#/parameters/SpatialLatitude" }, { - "name": "lon", - "in": "query", - "description": "The longitude of the location being passed. Example: -124.63.", - "required": true, - "type": "number" + "$ref": "#/parameters/SpatialLongitude" }, { "name": "z", "in": "query", "description": "The sea level in meter of the location being passed. If this parameter is presented, 2D extrusion geofencing is applied. Example: 200.", - "required": false, "type": "number" }, { "name": "userTime", "in": "query", + "format": "date-time", "description": "The user request time. If not presented in the request, the default value is DateTime.UtcNow.", - "required": false, "type": "string" }, { "name": "searchBuffer", "in": "query", "description": "The radius of the buffer around the geofence in meters that defines how far to search inside and outside the border of the fence against the coordinate that was provided when calculating the result. The minimum value is 0, and the maximum is 500. The default value is 50.", - "required": false, "type": "number", "minimum": 0, - "maximum": 500, - "default": 50 + "maximum": 500 }, { "name": "isAsync", "in": "query", "description": "If true, the request will use async event mechanism; if false, the request will be synchronized and do not trigger any event. The default value is false.", - "required": false, - "type": "boolean", - "default": false + "type": "boolean" }, { - "$ref": "#/parameters/Mode" + "$ref": "#/parameters/GeofenceMode" }, { - "name": "searchGeofenceRequestBody", - "in": "body", - "description": "The geofencing GeoJSON data.", - "required": true, - "schema": { - "$ref": "#/definitions/GeoJSONFeatureCollection" - } + "$ref": "#/parameters/SearchGeofenceRequestBody" } ], - "produces": [ - "application/json" - ], "responses": { "200": { "description": "OK The X-Correlation-id header value is present in an async call's response and the Event Grid event data. It helps correlate the async call’s response with the corresponding Event Grid event.", @@ -440,27 +332,14 @@ "$ref": "#/definitions/GeofenceResponse" } }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" + "default": { + "$ref": "../../../Common/preview/1.0/common.json#/responses/default" } } } }, "/spatial/buffer/{format}": { "post": { - "x-publish": true, "description": "**Applies to**: S1 pricing tier.\n\nThis API returns a FeatureCollection where each Feature is a buffer around the corresponding indexed Feature of the input. The buffer could be either on the outside or the inside of the provided Feature, depending on the distance provided in the input. There must be either one distance provided per Feature in the FeatureCollection input, or if only one distance is provided, then that distance is applied to every Feature in the collection. The positive (or negative) buffer of a geometry is defined as the Minkowski sum (or difference) of the geometry with a circle of radius equal to the absolute value of the buffer distance. The buffer API always returns a polygonal result. The negative or zero-distance buffer of lines and points is always an empty polygon. The input may contain a collection of Point, MultiPoint, Polygon, MultiPolygon, LineString and MultiLineString. GeometryCollection will be ignored if provided.", "operationId": "Spatial_PostBuffer", "x-ms-examples": { @@ -470,16 +349,13 @@ }, "parameters": [ { - "$ref": "#/parameters/ClientId" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ClientId" }, { - "$ref": "#/parameters/SubscriptionKey" + "$ref": "#/parameters/SpatialApiVersion" }, { - "$ref": "#/parameters/ApiVersion" - }, - { - "$ref": "#/parameters/JsonFormat" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ResponseFormat" }, { "name": "bufferRequestBody", @@ -491,9 +367,6 @@ } } ], - "produces": [ - "application/json" - ], "responses": { "200": { "description": "OK", @@ -501,25 +374,12 @@ "$ref": "#/definitions/BufferResponse" } }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" + "default": { + "$ref": "../../../Common/preview/1.0/common.json#/responses/default" } } }, "get": { - "x-publish": true, "description": "**Applies to**: S1 pricing tier.\n\nThis API returns a FeatureCollection where each Feature is a buffer around the corresponding indexed Feature of the input. The buffer could be either on the outside or the inside of the provided Feature, depending on the distance provided in the input. There must be either one distance provided per Feature in the FeatureCollection input, or if only one distance is provided, then that distance is applied to every Feature in the collection. The positive (or negative) buffer of a geometry is defined as the Minkowski sum (or difference) of the geometry with a circle of radius equal to the absolute value of the buffer distance. The buffer API always returns a polygonal result. The negative or zero-distance buffer of lines and points is always an empty polygon. The input features are provided by a GeoJSON file which is uploaded via [Data Upload API](https://docs.microsoft.com/en-us/rest/api/maps/data/uploadPreview) and referenced by a unique udid. The GeoJSON file may contain a collection of Point, MultiPoint, Polygon, MultiPolygon, LineString and MultiLineString. GeometryCollection will be ignored if provided. \n\nTo test this API, you can upload the sample data from [Post Buffer API](https://docs.microsoft.com/en-us/rest/api/maps/spatial/postbuffer#examples) examples(Request Body without distances array) via [Data Upload API](https://docs.microsoft.com/en-us/rest/api/maps/data/uploadPreview) and replace the [udid] from the [sample request below](https://docs.microsoft.com/en-us/rest/api/maps/spatial/getbuffer#examples) with the udid returned by Data Upload API.", "operationId": "Spatial_GetBuffer", "x-ms-examples": { @@ -529,19 +389,16 @@ }, "parameters": [ { - "$ref": "#/parameters/ClientId" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ClientId" }, { - "$ref": "#/parameters/SubscriptionKey" + "$ref": "#/parameters/SpatialApiVersion" }, { - "$ref": "#/parameters/ApiVersion" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ResponseFormat" }, { - "$ref": "#/parameters/JsonFormat" - }, - { - "$ref": "#/parameters/UdidSpatial" + "$ref": "#/parameters/SpatialUploadUdid" }, { "name": "distances", @@ -551,9 +408,6 @@ "type": "string" } ], - "produces": [ - "application/json" - ], "responses": { "200": { "description": "OK", @@ -561,27 +415,14 @@ "$ref": "#/definitions/BufferResponse" } }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" + "default": { + "$ref": "../../../Common/preview/1.0/common.json#/responses/default" } } } }, "/spatial/closestPoint/{format}": { "post": { - "x-publish": true, "description": "**Applies to**: S1 pricing tier.\n\nThis API returns the closest point between a base point and a given set of target points. The set of target points is provided by user data in post request body. The user data may only contain a collection of Point geometry. MultiPoint or other geometries will be ignored if provided. The algorithm does not take into account routing or traffic. The maximum number of points accepted is 100,000. Information returned includes closest point latitude, longitude, and distance in meters from the closest point.", "operationId": "Spatial_PostClosestPoint", "x-ms-examples": { @@ -591,77 +432,43 @@ }, "parameters": [ { - "$ref": "#/parameters/ClientId" - }, - { - "$ref": "#/parameters/SubscriptionKey" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ClientId" }, { - "$ref": "#/parameters/ApiVersion" + "$ref": "#/parameters/SpatialApiVersion" }, { - "$ref": "#/parameters/JsonFormat" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ResponseFormat" }, { - "name": "lat", - "in": "query", - "description": "The base point latitude of the location being passed. Example: 47.622942.", - "required": true, - "type": "number" + "$ref": "#/parameters/SpatialLatitude" }, { - "name": "lon", - "in": "query", - "description": "The base point longitude of the location being passed. Example: -122.316456.", - "required": true, - "type": "number" + "$ref": "#/parameters/SpatialLongitude" }, { "name": "numberOfClosestPoints", "in": "query", "description": "The number of closest points expected from response. Default: 1, minimum: 1 and maximum: 50", - "required": false, "type": "integer" }, { - "name": "closestPointRequestBody", - "in": "body", - "description": "The FeatureCollection of Point geometries from which closest point to source point should be determined. All the feature's properties should contain `geometryId`, which is used for identifying the geometry and is case-sensitive.", - "required": true, - "schema": { - "$ref": "#/definitions/GeoJSONFeatureCollection" - } + "$ref": "#/parameters/ClosestPointRequestBody" } ], - "produces": [ - "application/json" - ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/PostClosestPointResponse" + "$ref": "#/definitions/ClosestPointResponse" } }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" + "default": { + "$ref": "../../../Common/preview/1.0/common.json#/responses/default" } } }, "get": { - "x-publish": true, "description": "**Applies to**: S1 pricing tier.\n\nThis API returns the closest point between a base point and a given set of points in the user uploaded data set identified by udid. The set of target points is provided by a GeoJSON file which is uploaded via [Data Upload API](https://docs.microsoft.com/en-us/rest/api/maps/data/uploadPreview) and referenced by a unique udid. The GeoJSON file may only contain a collection of Point geometry. MultiPoint or other geometries will be ignored if provided. The maximum number of points accepted is 100,000. The algorithm does not take into account routing or traffic. Information returned includes closest point latitude, longitude, and distance in meters from the closest point.\n\nTo test this API, you can upload the sample data from [Post Closest Point API](https://docs.microsoft.com/en-us/rest/api/maps/spatial/postclosestpoint#examples) examples(Request Body) via [Data Upload API](https://docs.microsoft.com/en-us/rest/api/maps/data/uploadPreview) and replace the [udid] from the [sample request below](https://docs.microsoft.com/en-us/rest/api/maps/spatial/getclosestpoint#examples) with the udid returned by Data Upload API.", "operationId": "Spatial_GetClosestPoint", "x-ms-examples": { @@ -671,73 +478,45 @@ }, "parameters": [ { - "$ref": "#/parameters/ClientId" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ClientId" }, { - "$ref": "#/parameters/SubscriptionKey" + "$ref": "#/parameters/SpatialApiVersion" }, { - "$ref": "#/parameters/ApiVersion" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ResponseFormat" }, { - "$ref": "#/parameters/JsonFormat" + "$ref": "#/parameters/SpatialUploadUdid" }, { - "$ref": "#/parameters/UdidSpatial" + "$ref": "#/parameters/SpatialLatitude" }, { - "name": "lat", - "in": "query", - "description": "The base point latitude of the location being passed. Example: 47.622942.", - "required": true, - "type": "number" - }, - { - "name": "lon", - "in": "query", - "description": "The base point longitude of the location being passed. Example: -122.316456.", - "required": true, - "type": "number" + "$ref": "#/parameters/SpatialLongitude" }, { "name": "numberOfClosestPoints", "in": "query", "description": "The number of closest points expected from response. Default: 1, minimum: 1 and maximum: 50", - "required": false, "type": "integer" } ], - "produces": [ - "application/json" - ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/GetClosestPointResponse" + "$ref": "#/definitions/ClosestPointResponse" } }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" + "default": { + "$ref": "../../../Common/preview/1.0/common.json#/responses/default" } } } }, "/spatial/pointInPolygon/{format}": { "post": { - "x-publish": true, "description": "**Applies to**: S1 pricing tier.\n\nThis API returns a boolean value indicating whether a point is inside a set of polygons. The user data may contain Polygon and MultiPolygon geometries, other geometries will be ignored if provided. If the point is inside or on the boundary of one of these polygons, the value returned is true. In all other cases, the value returned is false. When the point is inside multiple polygons, the result will give intersecting geometries section to show all valid geometries (referenced by geometryId) in user data. The maximum number of vertices accepted to form a Polygon is 10,000.", "operationId": "Spatial_PostPointInPolygon", "x-ms-examples": { @@ -747,70 +526,37 @@ }, "parameters": [ { - "$ref": "#/parameters/ClientId" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ClientId" }, { - "$ref": "#/parameters/SubscriptionKey" + "$ref": "#/parameters/SpatialApiVersion" }, { - "$ref": "#/parameters/ApiVersion" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ResponseFormat" }, { - "$ref": "#/parameters/JsonFormat" - }, - { - "name": "lat", - "in": "query", - "description": "The base point latitude of the location being passed. Example: 47.622942.", - "required": true, - "type": "number" + "$ref": "#/parameters/SpatialLatitude" }, { - "name": "lon", - "in": "query", - "description": "The base point longitude of the location being passed. Example: -122.316456.", - "required": true, - "type": "number" + "$ref": "#/parameters/SpatialLongitude" }, { - "name": "pointInPolygonRequestBody", - "in": "body", - "description": "A FeatureCollection with a set of Polygon/MultiPolygon geometries. The maximum number of vertices accepted to form a Polygon is 10,000. All the feature's properties should contain `geometryId`, which is used for identifying the geometry and is case-sensitive.", - "required": true, - "schema": { - "$ref": "#/definitions/GeoJSONFeatureCollection" - } + "$ref": "#/parameters/PointInPolygonRequestBody" } ], - "produces": [ - "application/json" - ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/PostPointInPolygonResponse" + "$ref": "#/definitions/PointInPolygonResponse" } }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" + "default": { + "$ref": "../../../Common/preview/1.0/common.json#/responses/default" } } }, "get": { - "x-publish": true, "description": "**Applies to**: S1 pricing tier.\n\nThis API returns a boolean value indicating whether a point is inside a set of polygons. The set of polygons is provided by a GeoJSON file which is uploaded via [Data Upload API](https://docs.microsoft.com/en-us/rest/api/maps/data/uploadPreview) and referenced by a unique udid. The GeoJSON file may contain Polygon and MultiPolygon geometries, other geometries will be ignored if provided. If the point is inside or on the boundary of one of these polygons, the value returned is true. In all other cases, the value returned is false. When the point is inside multiple polygons, the result will give intersecting geometries section to show all valid geometries(referenced by geometryId) in user data. The maximum number of vertices accepted to form a Polygon is 10,000.\n\n \nTo test this API, you can upload the sample data from [Post Point In Polygon API](https://docs.microsoft.com/en-us/rest/api/maps/spatial/postpointinpolygon#examples) examples(Request Body) via [Data Upload API](https://docs.microsoft.com/en-us/rest/api/maps/data/uploadPreview) and replace the [udid] from the [sample request below](https://docs.microsoft.com/en-us/rest/api/maps/spatial/getpointinpolygon#examples) with the udid returned by Data Upload API.", "operationId": "Spatial_GetPointInPolygon", "x-ms-examples": { @@ -820,66 +566,39 @@ }, "parameters": [ { - "$ref": "#/parameters/ClientId" - }, - { - "$ref": "#/parameters/SubscriptionKey" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ClientId" }, { - "$ref": "#/parameters/ApiVersion" + "$ref": "#/parameters/SpatialApiVersion" }, { - "$ref": "#/parameters/JsonFormat" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ResponseFormat" }, { - "$ref": "#/parameters/UdidSpatial" + "$ref": "#/parameters/SpatialUploadUdid" }, { - "name": "lat", - "in": "query", - "description": "The base point latitude of the location being passed. Example: 47.622942.", - "required": true, - "type": "number" + "$ref": "#/parameters/SpatialLatitude" }, { - "name": "lon", - "in": "query", - "description": "The base point longitude of the location being passed. Example: -122.316456.", - "required": true, - "type": "number" + "$ref": "#/parameters/SpatialLongitude" } ], - "produces": [ - "application/json" - ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/GetPointInPolygonResponse" + "$ref": "#/definitions/PointInPolygonResponse" } }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" + "default": { + "$ref": "../../../Common/preview/1.0/common.json#/responses/default" } } } }, "/spatial/greatCircleDistance/{format}": { "get": { - "x-publish": true, "description": "**Applies to**: S1 pricing tier.\n\nThis API will return the great-circle or shortest distance between two points on the surface of a sphere, measured along the surface of the sphere. This differs from calculating a straight line through the sphere's interior. This method is helpful for estimating travel distances for airplanes by calculating the shortest distance between airports.", "operationId": "Spatial_GetGreatCircleDistance", "x-ms-examples": { @@ -889,16 +608,13 @@ }, "parameters": [ { - "$ref": "#/parameters/ClientId" - }, - { - "$ref": "#/parameters/SubscriptionKey" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ClientId" }, { - "$ref": "#/parameters/ApiVersion" + "$ref": "#/parameters/SpatialApiVersion" }, { - "$ref": "#/parameters/JsonFormat" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ResponseFormat" }, { "name": "query", @@ -908,9 +624,6 @@ "type": "string" } ], - "produces": [ - "application/json" - ], "responses": { "200": { "description": "OK", @@ -918,62 +631,14 @@ "$ref": "#/definitions/GreatCircleDistanceResponse" } }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" + "default": { + "$ref": "../../../Common/preview/1.0/common.json#/responses/default" } } } } }, "definitions": { - "ODataErrorResponse": { - "type": "object", - "description": "This response object is returned when an error occurs in the Maps API.", - "properties": { - "error": { - "$ref": "#/definitions/ODataError" - } - } - }, - "ODataError": { - "type": "object", - "description": "This object is returned when an error occurs in the 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." - } - } - }, "SpatialCoordinate": { "description": "A location represented as a latitude and longitude", "type": "object", @@ -992,223 +657,6 @@ } } }, - "GeoJSONFeatureCollection": { - "description": "A valid `GeoJSON FeatureCollection` object type. Please refer to [RFC 7946](https://tools.ietf.org/html/rfc7946#section-3.3) for details.", - "type": "object", - "properties": { - "type": { - "description": "Specifies the `type` for the object. Value should always be equal to \"FeatureCollection\".", - "type": "string" - }, - "features": { - "description": "Contains a list of valid `GeoJSON Feature` objects.", - "type": "array", - "items": { - "description": "A valid `GeoJSON Feature` object type. Please refer to [RFC 7946](https://tools.ietf.org/html/rfc7946#section-3.2) for details.", - "type": "object", - "properties": { - "type": { - "description": "Specifies the `type` for the object. Value should always be equal to \"Feature\".", - "type": "string" - }, - "geometry": { - "$ref": "#/definitions/GeoJSONGeometry" - }, - "properties": { - "description": "Properties can contain any additional metadata about the `Feature`. Value can be any JSON object or a JSON null value", - "type": "object" - } - } - } - } - }, - "required": [ - "features", - "type" - ] - }, - "GeoJSONGeometry": { - "description": "A valid `GeoJSON` geometry object. Please refer to [RFC 7946](https://tools.ietf.org/html/rfc7946#section-3.1) for details.", - "type": "object", - "discriminator": "type", - "required": [ - "type" - ], - "properties": { - "type": { - "description": "Specifies the `GeoJSON` geometry type. Must be one of the seven valid GeoJSON geometry types - Point, MultiPoint, LineString, MultiLineString, Polygon, MultiPolygon and GeometryCollection.", - "type": "string", - "enum": [ - "Point", - "MultiPoint", - "LineString", - "MultiLineString", - "Polygon", - "MultiPolygon", - "GeometryCollection" - ], - "x-ms-enum": { - "name": "GeoJSONGeometryType", - "modelAsString": true, - "values": [ - { - "value": "Point", - "description": "`GeoJSON Point` geometry." - }, - { - "value": "MultiPoint", - "description": "`GeoJSON MultiPoint` geometry." - }, - { - "value": "LineString", - "description": "`GeoJSON LineString` geometry." - }, - { - "value": "MultiLineString", - "description": "`GeoJSON MultiLineString` geometry." - }, - { - "value": "Polygon", - "description": "`GeoJSON Polygon` geometry." - }, - { - "value": "MultiPolygon", - "description": "`GeoJSON MultiPolygon` geometry." - }, - { - "value": "GeometryCollection", - "description": "`GeoJSON GeometryCollection` geometry." - } - ] - } - } - } - }, - "Point": { - "description": "A valid `GeoJSON Point` geometry type. Please refer to [RFC 7946](https://tools.ietf.org/html/rfc7946#section-3.1.2) for details.", - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/GeoJSONGeometry" - }, - { - "properties": { - "type": { - "description": "Specifies the `type` for the geometry. Value should always be equal to \"Point\".", - "type": "string" - }, - "coordinates": { - "$ref": "#/definitions/GeoJSONPosition" - } - }, - "required": [ - "coordinates" - ] - } - ] - }, - "MultiLineString": { - "description": "A valid `GeoJSON MultiLineString` geometry type. Please refer to [RFC 7946](https://tools.ietf.org/html/rfc7946#section-3.1.5) for details.", - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/GeoJSONGeometry" - }, - { - "properties": { - "type": { - "description": "Specifies the `type` for the geometry. Value should always be equal to \"MultiLineString\".", - "type": "string" - }, - "coordinates": { - "description": "Coordinates for the `MultiLineString` geometry.", - "type": "array", - "items": { - "type": "array", - "items": { - "$ref": "#/definitions/GeoJSONPosition" - } - } - } - }, - "required": [ - "coordinates" - ] - } - ] - }, - "Polygon": { - "description": "A valid `GeoJSON Polygon` geometry type. Please refer to [RFC 7946](https://tools.ietf.org/html/rfc7946#section-3.1.6) for details.", - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/GeoJSONGeometry" - }, - { - "properties": { - "type": { - "description": "Specifies the `type` for the object. Value should always be equal to \"Polygon\".", - "type": "string" - }, - "coordinates": { - "description": "Coordinates for the `Polygon` geometry type.", - "type": "array", - "items": { - "$ref": "#/definitions/GeoJSONLinearRing" - } - } - }, - "required": [ - "coordinates" - ] - } - ] - }, - "MultiPolygon": { - "description": "A valid `GeoJSON MultiPolygon` object type. Please refer to [RFC 7946](https://tools.ietf.org/html/rfc7946#section-3.1.7) for details.", - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/GeoJSONGeometry" - }, - { - "properties": { - "type": { - "description": "Specifies the `type` for the object. Value should always be equal to \"MultiPolygon\".", - "type": "string" - }, - "coordinates": { - "description": "Contains a list of valid `GeoJSON` Polygon objects. **Note** that coordinates in GeoJSON are in x, y order (longitude, latitude).", - "type": "array", - "items": { - "type": "array", - "items": { - "$ref": "#/definitions/GeoJSONLinearRing" - } - } - } - }, - "required": [ - "coordinates" - ] - } - ] - }, - "GeoJSONLinearRing": { - "description": "Though a linear ring is not explicitly represented as a GeoJSON geometry type, it helps in defining the polygon as an array of linear rings. Please refer to [RFC 7946](https://tools.ietf.org/html/rfc7946#section-3.1.6) for details.", - "type": "array", - "items": { - "$ref": "#/definitions/GeoJSONPosition" - } - }, - "GeoJSONPosition": { - "description": "A valid `GeoJSON Position` geometry type. A `Position` is an array of numbers with two or more elements. The first two elements are _longitude_ and _latitude_, precisely in that order. _Altitude/Elevation_ is an optional third element. Please refer to [RFC 7946](https://tools.ietf.org/html/rfc7946#section-3.1.1) for details.", - "type": "array", - "items": { - "type": "number", - "format": "double" - } - }, "GeofenceGeometry": { "description": "The geofencing geometry.", "type": "object", @@ -1291,7 +739,7 @@ "type": "object", "properties": { "geometries": { - "$ref": "#/definitions/GeoJSONFeatureCollection" + "$ref": "../../../Common/preview/1.0/common.json#/definitions/GeoJsonFeatureCollection" }, "distances": { "description": "List of the distances to compute the buffer for, one-to-one per Feature in the collection, or one for all Features in the collection.", @@ -1325,71 +773,24 @@ }, "result": { "description": "The FeatureCollection of buffers for the input.", - "$ref": "#/definitions/GeoJSONFeatureCollection" + "$ref": "../../../Common/preview/1.0/common.json#/definitions/GeoJsonFeatureCollection" } } }, - "BoundingBoxResponse": { - "description": "This object is returned from a successful Spatial BoundingBox call.", + "ClosestPointResponse": { + "description": "This object is returned from a successful Spatial Closest Point call", "type": "object", "properties": { "summary": { - "description": "Summary of the call.", - "type": "object", - "readOnly": true, - "properties": { - "udid": { - "description": "The udid for the user data if one exists", - "type": "string", - "readOnly": true - }, - "information": { - "description": "The information about what happened during the call.", - "type": "string", - "readOnly": true - } - } - }, - "result": { - "description": "The bounding box of the input feature collection.", - "type": "object", - "readOnly": true, - "properties": { - "feature": { - "description": "The resulting feature with bounding box geometry", - "type": "object", - "readOnly": true - } - } - } - } - }, - "GetClosestPointResponse": { - "description": "This object is returned from a successful Get Spatial Closest Point call", - "type": "object", - "properties": { - "summary": { - "$ref": "#/definitions/GetClosestPointSummary" + "$ref": "#/definitions/ClosestPointSummary" }, "result": { "$ref": "#/definitions/ClosestPointResult" } } }, - "PostClosestPointResponse": { - "description": "This object is returned from a successful Post Spatial Closest Point call", - "type": "object", - "properties": { - "summary": { - "$ref": "#/definitions/PostClosestPointSummary" - }, - "result": { - "$ref": "#/definitions/ClosestPointResult" - } - } - }, - "GetClosestPointSummary": { - "description": "Get Closest Point Summary object", + "ClosestPointSummary": { + "description": "Closest Point Summary object", "type": "object", "readOnly": true, "properties": { @@ -1408,26 +809,6 @@ } } }, - "PostClosestPointSummary": { - "description": "Post Closest Point Summary object", - "type": "object", - "readOnly": true, - "properties": { - "sourcePoint": { - "$ref": "#/definitions/SpatialCoordinate" - }, - "udid": { - "description": "A unique data id (udid) for the uploaded content. Udid is not applicable for POST spatial operations(set to null)", - "type": "string", - "readOnly": true - }, - "information": { - "description": "Processing information", - "type": "string", - "readOnly": true - } - } - }, "ClosestPointResult": { "description": "Closest Point Result Array", "type": "array", @@ -1455,51 +836,19 @@ } } }, - "GetPointInPolygonResponse": { + "PointInPolygonResponse": { "description": "Returns true if point is within the polygon, false otherwise", "type": "object", "properties": { "summary": { - "$ref": "#/definitions/GetPointInPolygonSummary" + "$ref": "#/definitions/PointInPolygonSummary" }, "result": { "$ref": "#/definitions/PointInPolygonResult" } } }, - "PostPointInPolygonResponse": { - "description": "Returns true if point is within the polygon, false otherwise", - "type": "object", - "properties": { - "summary": { - "$ref": "#/definitions/PostPointInPolygonSummary" - }, - "result": { - "$ref": "#/definitions/PointInPolygonResult" - } - } - }, - "GetPointInPolygonSummary": { - "description": "Point In Polygon Summary object", - "type": "object", - "readOnly": true, - "properties": { - "sourcePoint": { - "$ref": "#/definitions/SpatialCoordinate" - }, - "udid": { - "description": "A unique data id (udid) for the uploaded content", - "type": "string", - "readOnly": true - }, - "information": { - "description": "Processing information", - "type": "string", - "readOnly": true - } - } - }, - "PostPointInPolygonSummary": { + "PointInPolygonSummary": { "description": "Point In Polygon Summary object", "type": "object", "readOnly": true, @@ -1573,32 +922,6 @@ } } } - }, - "UploadDataRequestBody": { - "description": "This type represents the request body for Spatial Data Upload.", - "type": "object" - }, - "UploadDataResponse": { - "description": "The response model for the spatial data upload API. Returns a unique data id (udid) for the uploaded content.", - "type": "object", - "properties": { - "udid": { - "description": "A unique data id (udid) for the uploaded content.", - "type": "string", - "readOnly": true - } - } - }, - "UploadDataAcceptedResponse": { - "description": "The response model for the spatial data upload API. Returns the current status and a status URI.", - "type": "object", - "properties": { - "status": { - "description": "Current status of the long running upload operation.", - "type": "string", - "readOnly": true - } - } } } } diff --git a/specification/maps/data-plane/Microsoft.Maps/Tileset/preview/1.0/examples/Create.json b/specification/maps/data-plane/Microsoft.Maps/Tileset/preview/1.0/examples/Create.json deleted file mode 100644 index d95ef6727f62..000000000000 --- a/specification/maps/data-plane/Microsoft.Maps/Tileset/preview/1.0/examples/Create.json +++ /dev/null @@ -1,73 +0,0 @@ -{ - "parameters": { - "geography": "us", - "api-version": "1.0", - "subscription-key": "[subscription-key]", - "datasetId": "[dataset-Id]" - }, - "responses": { - "201": { - "headers": { - "Location": "https://us.atlas.microsoft.com/tileset/{tilesetId}?api-version=1.0", - "Access-Control-Expose-Headers": "Location" - }, - "body": { - "operationId": "{operationId}", - "status": "Succeeded", - "created": "2020-01-02 1:02:03 AM +00:00", - "resourceLocation": "https://us.atlas.microsoft.com/tileset/{tilesetId}?api-version=1.0" - } - }, - "202": { - "headers": { - "Location": "https://us.atlas.microsoft.com/tileset/operations/{operationId}?api-version=1.0", - "Access-Control-Expose-Headers": "Location" - } - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive." - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found: the requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "An error occurred while processing the request. Please try again later." - } - } - } - } -} diff --git a/specification/maps/data-plane/Microsoft.Maps/Tileset/preview/1.0/examples/Delete.json b/specification/maps/data-plane/Microsoft.Maps/Tileset/preview/1.0/examples/Delete.json deleted file mode 100644 index 645e0fcb102b..000000000000 --- a/specification/maps/data-plane/Microsoft.Maps/Tileset/preview/1.0/examples/Delete.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "parameters": { - "geography": "us", - "api-version": "1.0", - "subscription-key": "[subscription-key]", - "tilesetId": "25084fb7-307a-4720-8f91-7952a0b91012" - }, - "responses": { - "204": { - "body": {} - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive." - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found: the requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "An error occurred while processing the request. Please try again later." - } - } - } - } -} diff --git a/specification/maps/data-plane/Microsoft.Maps/Tileset/preview/1.0/examples/List.json b/specification/maps/data-plane/Microsoft.Maps/Tileset/preview/1.0/examples/List.json deleted file mode 100644 index ec95c2ccc02e..000000000000 --- a/specification/maps/data-plane/Microsoft.Maps/Tileset/preview/1.0/examples/List.json +++ /dev/null @@ -1,86 +0,0 @@ -{ - "parameters": { - "geography": "us", - "api-version": "1.0", - "subscription-key": "[subscription-key]" - }, - "responses": { - "200": { - "body": { - "tilesets": [ - { - "tilesetId": "d8fa86de-bb0f-4a02-a6ff-62ae7545dd84", - "datasetId": "63b18a6b-ac35-4b23-a1d9-ffa1003ad50b", - "description": "My first tileset", - "minZoom": 16, - "maxZoom": 18, - "bbox": [ - -122.13595, - 47.636524, - -122.1329, - 47.637525 - ] - }, - { - "tilesetId": "b8dca8b3-8aad-4afe-abd6-0efe37b5a2e3", - "datasetId": "c0a01139-662e-4d5a-bf5f-92ea4a292aad", - "description": "My second tileset", - "minZoom": 19, - "maxZoom": 19, - "bbox": [ - -122.13595, - 47.636524, - -122.1329, - 47.637525 - ] - } - ] - } - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive." - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found: the requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "An error occurred while processing the request. Please try again later." - } - } - } - } -} diff --git a/specification/maps/data-plane/Microsoft.Maps/Tileset/preview/1.0/tileset.json b/specification/maps/data-plane/Microsoft.Maps/Tileset/preview/1.0/tileset.json deleted file mode 100644 index 804c435ff954..000000000000 --- a/specification/maps/data-plane/Microsoft.Maps/Tileset/preview/1.0/tileset.json +++ /dev/null @@ -1,513 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "Azure Maps Tileset Service", - "version": "1.0", - "description": "APIs for managing Tilesets." - }, - "x-ms-parameterized-host": { - "hostTemplate": "{geography}.atlas.microsoft.com", - "parameters": [ - { - "$ref": "#/parameters/GeographicResourceLocation" - } - ] - }, - "schemes": [ - "https" - ], - "consumes": [], - "produces": [ - "application/json" - ], - "securityDefinitions": { - "azure_auth": { - "type": "oauth2", - "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", - "flow": "implicit", - "description": "These are the [Azure Active Directory OAuth2](https://docs.microsoft.com/en-us/azure/active-directory/develop/v1-overview) Flows. When paired with [Azure Role Based Access](https://docs.microsoft.com/en-us/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#### Note\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* The `Authorization URL` is specific to the Azure public cloud instance. Sovereign clouds have unique Authorization URLs and Azure Active directory configurations. \n* 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.\n* Usage of the [Azure Maps Web SDK](https://aka.ms/amaadmc) allows for configuration based setup of an application for multiple use cases.\n* Currently Azure Active Directory [v1.0](https://docs.microsoft.com/en-us/azure/active-directory/develop/azure-ad-endpoint-comparison) tokens are supported.", - "scopes": { - "user_impersonation": "Impersonates a user's Azure Active Directory account." - } - }, - "apiKeyQuery": { - "type": "apiKey", - "description": "This is a shared key which 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 which 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": "query" - } - }, - "security": [ - { - "azure_auth": [] - }, - { - "apiKeyQuery": [] - } - ], - "responses": { - "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 Azure Active Directory 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 AAD bearer token.", - "schema": { - "$ref": "#/definitions/ODataErrorResponse" - }, - "headers": { - "WWW-Authenticate": { - "type": "string", - "description": "Bearer realm=\"https://atlas.microsoft.com/\", error=\"invalid_token\", error_description=\"The access token expired\"" - } - } - }, - "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" - } - }, - "201Async": { - "description": "The resource has been created successfully.", - "schema": { - "$ref": "#/definitions/LongRunningOperationResult" - }, - "headers": { - "Location": { - "type": "string", - "description": "A URI where details on the newly created resource can be found." - } - } - }, - "202Async": { - "description": "**Supported only for async request.**\nRequest Accepted: The request has been accepted for processing. Please use the URL in the Location Header to retry or access the results.", - "headers": { - "Location": { - "type": "string", - "description": "New URL to check for the results of the long running process." - } - } - } - }, - "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 Azure AD security model. It represents a unique ID for the Azure Maps account and can be retrieved from Azure Maps management plane Account API. To use Azure AD 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 1.0", - "type": "string", - "in": "query", - "required": true, - "default": "1.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" - }, - "DatasetIdQuery": { - "name": "datasetId", - "description": "The unique `datasetId` that the tileset create API uses to retrieve features to generate tiles. The `datasetId` must have been obtained from a successful [Dataset Create API](/en-us/rest/api/maps/dataset/createpreview) call.", - "type": "string", - "in": "query", - "required": true, - "x-ms-parameter-location": "client" - }, - "TilesetId": { - "name": "tilesetId", - "description": "The Tileset Id", - "type": "string", - "in": "path", - "required": true, - "x-ms-parameter-location": "method" - }, - "DescriptionTileset": { - "name": "description", - "description": "User provided description of the tileset.", - "type": "string", - "in": "query", - "required": false, - "x-ms-parameter-location": "method" - } - }, - "paths": { - "/tileset/create/vector": { - "post": { - "x-publish": true, - "description": "**Tileset Create API**\n\n**Applies to**: see pricing [tiers](https://azure.microsoft.com/en-us/pricing/details/azure-maps/).\n\nCreator makes it possible to develop applications based on your private indoor map data using Azure Maps API \nand SDK. [This](https://docs.microsoft.com/en-us/azure/azure-maps/creator-indoor-maps) article introduces concepts and tools that apply to Azure Maps Creator.\n\nThe Tileset Create API allows the caller to create a tileset from a dataset. A tileset contains a set of tiles that can be consumed \nfrom the [Get Map Tile](/rest/api/maps/render/getmaptile) to retrieve custom tiles. To make a dataset, use the \n[DataSet Create API](/rest/api/maps/dataset/createpreview).\n\n## Submit Create Request\n\nTo create your tileset you will make a `POST` request with an empty body. The `datasetId` query parameter will be \nused as the source of the tileset data.\n\nThe Create Tileset API is a \n[long-running request](https://aka.ms/am-creator-lrt).", - "operationId": "Tileset_CreatePreview", - "x-ms-long-running-operation": true, - "x-ms-long-running-operation-options": { - "final-state-via": "location" - }, - "x-ms-examples": { - "Create Tileset by providing a Dataset Id": { - "$ref": "./examples/Create.json" - } - }, - "parameters": [ - { - "$ref": "#/parameters/ClientId" - }, - { - "$ref": "#/parameters/SubscriptionKey" - }, - { - "$ref": "#/parameters/ApiVersion" - }, - { - "$ref": "#/parameters/DatasetIdQuery" - }, - { - "$ref": "#/parameters/DescriptionTileset" - } - ], - "responses": { - "201": { - "$ref": "#/responses/201Async" - }, - "202": { - "$ref": "#/responses/202Async" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" - } - } - } - }, - "/tileset": { - "get": { - "x-publish": true, - "description": "**Tileset List API**\n\n**Applies to**: see pricing [tiers](https://azure.microsoft.com/en-us/pricing/details/azure-maps/).\n
\n\nCreator makes it possible to develop applications based on your private indoor map data using Azure Maps API and SDK. [This](https://docs.microsoft.com/en-us/azure/azure-maps/creator-indoor-maps) article introduces concepts and tools that apply to Azure Maps Creator.\nThis API allows the caller to fetch a list of all tilesets created. \n
", - "operationId": "Tileset_ListPreview", - "x-ms-examples": { - "Get a list of all tilesets": { - "$ref": "./examples/List.json" - } - }, - "parameters": [ - { - "$ref": "#/parameters/ClientId" - }, - { - "$ref": "#/parameters/SubscriptionKey" - }, - { - "$ref": "#/parameters/ApiVersion" - } - ], - "responses": { - "200": { - "description": "List tileset request completed successfully. The response body contains a list of all tilesets.", - "schema": { - "$ref": "#/definitions/TilesetListResponse" - } - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" - } - } - } - }, - "/tileset/{tilesetId}": { - "delete": { - "x-publish": true, - "description": "**Tileset Delete API**\n\n**Applies to**: see pricing [tiers](https://azure.microsoft.com/en-us/pricing/details/azure-maps/).\n
\n\nCreator makes it possible to develop applications based on your private indoor map data using Azure Maps API and SDK. [This](https://docs.microsoft.com/en-us/azure/azure-maps/creator-indoor-maps) article introduces concepts and tools that apply to Azure Maps Creator.\nThis API allows the caller to delete a created tileset.
\nYou can use this API if a tileset is no longer needed. \n\n### Submit Delete Request\n\nTo delete your content you will issue a `DELETE` request where the path will contain the `tilesetId` of the tileset to delete.
\n\n#### Delete request \"Successful\"\n\nThe Tileset Delete API returns a HTTP `204 No Content` response with an empty body, if the tileset was deleted successfully.
\n\n#### Delete request \"Failed\"\n\nA HTTP `400 Bad Request` error response will be returned if the tileset with the passed-in `tilesetId` is not found. \n\nHere is a sample error response:\n\n
\n\n```json\n{\n \"error\": {\n \"code\": \"400 BadRequest\",\n \"message\": \"Bad request - Tileset Id: d85b5b27-5fc4-4599-8b50-47160e90f8ce does not exist.\"\n }\n}\n```", - "operationId": "Tileset_DeletePreview", - "x-ms-examples": { - "Delete a created tileset": { - "$ref": "./examples/Delete.json" - } - }, - "parameters": [ - { - "$ref": "#/parameters/ClientId" - }, - { - "$ref": "#/parameters/SubscriptionKey" - }, - { - "$ref": "#/parameters/ApiVersion" - }, - { - "$ref": "#/parameters/TilesetId" - } - ], - "responses": { - "204": { - "description": "Tileset delete request completed successfully.", - "schema": { - "$ref": "#/definitions/TilesetDeleteResponse" - } - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" - } - } - } - } - }, - "definitions": { - "ODataErrorResponse": { - "type": "object", - "description": "This response object is returned when an error occurs in the Maps API.", - "properties": { - "error": { - "$ref": "#/definitions/ODataError" - } - } - }, - "ODataError": { - "type": "object", - "description": "This object is returned when an error occurs in the 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 - }, - "resourceLocation": { - "description": "The location URI for details about the created resource. This is only provided when the request was successfully completed.", - "type": "string", - "readOnly": true - }, - "error": { - "$ref": "#/definitions/ODataError" - }, - "warning": { - "$ref": "#/definitions/ODataError" - } - } - }, - "TilesetListResponse": { - "description": "The response model for the Tileset List API. Returns a list of all tilesets.", - "type": "object", - "properties": { - "tilesets": { - "description": "A list of all tilesets.", - "type": "array", - "readOnly": true, - "items": { - "$ref": "#/definitions/TilesetDetailInfo" - } - } - } - }, - "TilesetDetailInfo": { - "description": "Detail information for the data.", - "type": "object", - "properties": { - "tilesetId": { - "description": "The unique tileset id for the tileset.", - "type": "string", - "readOnly": true - }, - "datasetId": { - "description": "The unique dataset Id used to create the tileset.", - "type": "string", - "readOnly": true - }, - "description": { - "description": "The description the caller provided when creating the tileset. Maximum length 1024 characters.", - "type": "string", - "readOnly": true - }, - "minZoom": { - "description": "The lowest tile zoom level tile generated for the tileset.", - "type": "integer", - "readOnly": true - }, - "maxZoom": { - "description": "The highest tile zoom level tile generated for the tileset.", - "type": "integer", - "readOnly": true - }, - "bbox": { - "description": "Bounding box which all features of the tileset lay within. Projection used - EPSG:3857. Format : 'minLon, minLat, maxLon, maxLat'.", - "type": "array", - "readOnly": true, - "items": { - "type": "number" - } - } - } - }, - "TilesetDeleteResponse": { - "description": "The response model for the Delete API. The response body will be empty signifying there's no content available for the `tilesetId` anymore.", - "type": "object" - } - } -} diff --git a/specification/maps/data-plane/Microsoft.Maps/Tileset/preview/2.0/examples/Create.json b/specification/maps/data-plane/Microsoft.Maps/Tileset/preview/2.0/examples/Create.json index e716a4723b7b..0ca2acebc8d8 100644 --- a/specification/maps/data-plane/Microsoft.Maps/Tileset/preview/2.0/examples/Create.json +++ b/specification/maps/data-plane/Microsoft.Maps/Tileset/preview/2.0/examples/Create.json @@ -2,60 +2,24 @@ "parameters": { "geography": "us", "api-version": "2.0", - "subscription-key": "[subscription-key]", "datasetId": "[dataset-Id]" }, "responses": { + "200": { + "body": { + "operationId": "8b1288fa-1958-4a2b-b68e-13a7i5af7d7c", + "created": "2021-04-20T22:43:14.9401559+00:00", + "status": "Succeeded" + }, + "headers": { + "Resource-Location": "https://us.atlas.microsoft.com/mapData/3e36b996-f6d1-b068-0fcb-dd6b014c3447?api-version=2.0" + } + }, "202": { "headers": { "Operation-Location": "https://us.atlas.microsoft.com/tilesets/operations/{operationId}?api-version=2.0", "Access-Control-Expose-Headers": "Operation-Location" } - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive." - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found: the requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "An error occurred while processing the request. Please try again later." - } - } } } } diff --git a/specification/maps/data-plane/Microsoft.Maps/Tileset/preview/2.0/examples/Delete.json b/specification/maps/data-plane/Microsoft.Maps/Tileset/preview/2.0/examples/Delete.json index ae7659af0fd1..71049ceba9d2 100644 --- a/specification/maps/data-plane/Microsoft.Maps/Tileset/preview/2.0/examples/Delete.json +++ b/specification/maps/data-plane/Microsoft.Maps/Tileset/preview/2.0/examples/Delete.json @@ -2,55 +2,9 @@ "parameters": { "geography": "us", "api-version": "2.0", - "subscription-key": "[subscription-key]", "tilesetId": "25084fb7-307a-4720-8f91-7952a0b91012" }, "responses": { - "204": {}, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive." - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found: the requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "An error occurred while processing the request. Please try again later." - } - } - } + "204": {} } } diff --git a/specification/maps/data-plane/Microsoft.Maps/Tileset/preview/2.0/examples/Get.json b/specification/maps/data-plane/Microsoft.Maps/Tileset/preview/2.0/examples/Get.json index f5020314cf6d..f4078cebc0b9 100644 --- a/specification/maps/data-plane/Microsoft.Maps/Tileset/preview/2.0/examples/Get.json +++ b/specification/maps/data-plane/Microsoft.Maps/Tileset/preview/2.0/examples/Get.json @@ -2,7 +2,6 @@ "parameters": { "geography": "us", "api-version": "2.0", - "subscription-key": "[subscription-key]", "tilesetId": "d8fa86de-bb0f-4a02-a6ff-62ae7545dd84" }, "responses": { @@ -20,51 +19,6 @@ 47.637525 ] } - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive." - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found: the requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "An error occurred while processing the request. Please try again later." - } - } } } } diff --git a/specification/maps/data-plane/Microsoft.Maps/Tileset/preview/2.0/examples/GetOperation.json b/specification/maps/data-plane/Microsoft.Maps/Tileset/preview/2.0/examples/GetOperation.json index c3ec377fb2a7..671289b480bb 100644 --- a/specification/maps/data-plane/Microsoft.Maps/Tileset/preview/2.0/examples/GetOperation.json +++ b/specification/maps/data-plane/Microsoft.Maps/Tileset/preview/2.0/examples/GetOperation.json @@ -2,7 +2,6 @@ "parameters": { "geography": "us", "api-version": "2.0", - "subscription-key": "[subscription-key]", "operationId": "8b1288fa-1958-4a2b-b68e-13a7i5af7d7c" }, "responses": { @@ -15,15 +14,6 @@ "headers": { "Resource-Location": "https://us.atlas.microsoft.com/tilesets/3e36b996-f6d1-b068-0fcb-dd6b014c3447?api-version=2.0" } - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive." - } - } } } } diff --git a/specification/maps/data-plane/Microsoft.Maps/Tileset/preview/2.0/examples/GetOperationStillRunning.json b/specification/maps/data-plane/Microsoft.Maps/Tileset/preview/2.0/examples/GetOperationStillRunning.json index 4a0559be1343..52d48d34f311 100644 --- a/specification/maps/data-plane/Microsoft.Maps/Tileset/preview/2.0/examples/GetOperationStillRunning.json +++ b/specification/maps/data-plane/Microsoft.Maps/Tileset/preview/2.0/examples/GetOperationStillRunning.json @@ -2,7 +2,6 @@ "parameters": { "geography": "us", "api-version": "2.0", - "subscription-key": "[subscription-key]", "operationId": "8b1288fa-1958-4a2b-b68e-13a7i5af7d7c" }, "responses": { @@ -12,15 +11,6 @@ "created": "2021-04-23T19:14:03.2452596+00:00", "status": "Running" } - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive." - } - } } } } diff --git a/specification/maps/data-plane/Microsoft.Maps/Tileset/preview/2.0/examples/List.json b/specification/maps/data-plane/Microsoft.Maps/Tileset/preview/2.0/examples/List.json index 5132f8691aef..93cf5ac3c2d2 100644 --- a/specification/maps/data-plane/Microsoft.Maps/Tileset/preview/2.0/examples/List.json +++ b/specification/maps/data-plane/Microsoft.Maps/Tileset/preview/2.0/examples/List.json @@ -1,8 +1,7 @@ { "parameters": { "geography": "us", - "api-version": "2.0", - "subscription-key": "[subscription-key]" + "api-version": "2.0" }, "responses": { "200": { @@ -36,51 +35,6 @@ } ] } - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive." - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found: the requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "An error occurred while processing the request. Please try again later." - } - } } } } diff --git a/specification/maps/data-plane/Microsoft.Maps/Tileset/preview/2.0/tileset.json b/specification/maps/data-plane/Microsoft.Maps/Tileset/preview/2.0/tileset.json index 5c44d0fe5382..7b1a624117e0 100644 --- a/specification/maps/data-plane/Microsoft.Maps/Tileset/preview/2.0/tileset.json +++ b/specification/maps/data-plane/Microsoft.Maps/Tileset/preview/2.0/tileset.json @@ -9,7 +9,7 @@ "hostTemplate": "{geography}.atlas.microsoft.com", "parameters": [ { - "$ref": "#/parameters/GeographicResourceLocation" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/GeographicResourceLocation" } ] }, @@ -20,6 +20,19 @@ "produces": [ "application/json" ], + "security": [ + { + "azure_auth": [ + "user_impersonation" + ] + }, + { + "SubscriptionKeyInHeader": [] + }, + { + "SubscriptionKeyInQuery": [] + } + ], "securityDefinitions": { "azure_auth": { "type": "oauth2", @@ -27,164 +40,38 @@ "flow": "implicit", "description": "These are the [Azure Active Directory OAuth2](https://docs.microsoft.com/en-us/azure/active-directory/develop/v1-overview) Flows. When paired with [Azure Role Based Access](https://docs.microsoft.com/en-us/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#### Note\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* The `Authorization URL` is specific to the Azure public cloud instance. Sovereign clouds have unique Authorization URLs and Azure Active directory configurations. \n* 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.\n* Usage of the [Azure Maps Web SDK](https://aka.ms/amaadmc) allows for configuration based setup of an application for multiple use cases.\n* Currently Azure Active Directory [v1.0](https://docs.microsoft.com/en-us/azure/active-directory/develop/azure-ad-endpoint-comparison) tokens are supported.", "scopes": { - "user_impersonation": "Impersonates a user's Azure Active Directory account." + "user_impersonation": "impersonate your user account" } }, - "apiKeyQuery": { + "SubscriptionKeyInHeader": { "type": "apiKey", - "description": "This is a shared key which 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 which 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": "query" - } - }, - "security": [ - { - "azure_auth": [] - }, - { - "apiKeyQuery": [] - } - ], - "responses": { - "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 Azure Active Directory 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 AAD bearer token.", - "schema": { - "$ref": "#/definitions/ODataErrorResponse" - }, - "headers": { - "WWW-Authenticate": { - "type": "string", - "description": "Bearer realm=\"https://atlas.microsoft.com/\", error=\"invalid_token\", error_description=\"The access token expired\"" - } - } - }, - "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" - } - }, - "200Async": { - "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" - }, - "headers": { - "Resource-Location": { - "type": "string", - "description": "If successful, a URI where details on the newly created resource can be found." - } - } + "in": "header" }, - "202Accepted": { - "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 process." - } - } + "SubscriptionKeyInQuery": { + "type": "apiKey", + "name": "subscription-key", + "in": "query" } }, + "responses": {}, "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 Azure AD security model. It represents a unique ID for the Azure Maps account and can be retrieved from Azure Maps management plane Account API. To use Azure AD 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": { + "TilesetApiVersionV2": { "name": "api-version", - "description": "Version number of Azure Maps API. Current version is 2.0", + "description": "Version number of Azure Maps API.", "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" - }, "DatasetIdQuery": { "name": "datasetId", "description": "The unique `datasetId` that the tileset create API uses to retrieve features to generate tiles. The `datasetId` must have been obtained from a successful [Dataset Create API](/en-us/rest/api/maps/dataset/createpreview) call.", "type": "string", "in": "query", "required": true, - "x-ms-parameter-location": "client" + "x-ms-parameter-location": "method" }, "TilesetId": { "name": "tilesetId", @@ -199,7 +86,6 @@ "description": "User provided description of the tileset.", "type": "string", "in": "query", - "required": false, "x-ms-parameter-location": "method" }, "TilesetOperationId": { @@ -214,9 +100,12 @@ "paths": { "/tilesets": { "post": { - "x-publish": true, "description": "**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).\n\nCreator makes it possible to develop applications based on your private indoor map data using Azure Maps API and SDK. [This](https://docs.microsoft.com/azure/azure-maps/creator-indoor-maps) article introduces concepts and tools that apply to Azure Maps Creator.\n\n [This](https://docs.microsoft.com/en-us/azure/azure-maps/creator-indoor-maps) article introduces concepts and tools that apply to Azure Maps Creator.\n\nThe Tileset Create API allows the caller to create a tileset from a dataset. A tileset contains a set of tiles that can be consumed \nfrom the [Get Map Tile](/rest/api/maps/render/getmaptile) to retrieve custom tiles. To make a dataset, use the \n[DataSet Create API](/rest/api/maps/dataset/createpreview).\n\n## Submit Create Request\n\nTo create your tileset you will make a `POST` request with an empty body. The `datasetId` query parameter will be \nused as the source of the tileset data.\n\nThe Create Tileset API is a \n[long-running request](https://aka.ms/am-creator-lrt-v2).", "operationId": "Tileset_Create", + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, "x-ms-examples": { "Create Tileset by providing a Dataset Id": { "$ref": "./examples/Create.json" @@ -224,13 +113,10 @@ }, "parameters": [ { - "$ref": "#/parameters/ClientId" - }, - { - "$ref": "#/parameters/SubscriptionKey" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ClientId" }, { - "$ref": "#/parameters/ApiVersion" + "$ref": "#/parameters/TilesetApiVersionV2" }, { "$ref": "#/parameters/DatasetIdQuery" @@ -240,28 +126,18 @@ } ], "responses": { - "202": { - "$ref": "#/responses/202Accepted" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" + "200": { + "$ref": "../../../Common/preview/1.0/common.json#/responses/200AsyncV2" }, - "404": { - "$ref": "#/responses/404" + "202": { + "$ref": "../../../Common/preview/1.0/common.json#/responses/202AsyncV2" }, - "500": { - "$ref": "#/responses/500" + "default": { + "$ref": "../../../Common/preview/1.0/common.json#/responses/default" } } }, "get": { - "x-publish": true, "description": "**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).\n\nCreator makes it possible to develop applications based on your private indoor map data using Azure Maps API and SDK. [This](https://docs.microsoft.com/azure/azure-maps/creator-indoor-maps) article introduces concepts and tools that apply to Azure Maps Creator.\n\nThis API allows the caller to fetch a list of all tilesets created. \n
", "operationId": "Tileset_List", "x-ms-examples": { @@ -271,15 +147,16 @@ }, "parameters": [ { - "$ref": "#/parameters/ClientId" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ClientId" }, { - "$ref": "#/parameters/SubscriptionKey" - }, - { - "$ref": "#/parameters/ApiVersion" + "$ref": "#/parameters/TilesetApiVersionV2" } ], + "x-ms-pageable": { + "itemName": "tilesets", + "nextLinkName": "nextLink" + }, "responses": { "200": { "description": "List tileset request completed successfully. The response body contains a list of all tilesets.", @@ -287,27 +164,14 @@ "$ref": "#/definitions/TilesetListResponse" } }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" + "default": { + "$ref": "../../../Common/preview/1.0/common.json#/responses/default" } } } }, "/tilesets/{tilesetId}": { "get": { - "x-publish": true, "description": "**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).\n\nCreator makes it possible to develop applications based on your private indoor map data using Azure Maps API and SDK. [This](https://docs.microsoft.com/azure/azure-maps/creator-indoor-maps) article introduces concepts and tools that apply to Azure Maps Creator.\n\nThis API allows the caller to fetch a tileset.", "operationId": "Tileset_Get", "x-ms-examples": { @@ -317,13 +181,10 @@ }, "parameters": [ { - "$ref": "#/parameters/ClientId" - }, - { - "$ref": "#/parameters/SubscriptionKey" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ClientId" }, { - "$ref": "#/parameters/ApiVersion" + "$ref": "#/parameters/TilesetApiVersionV2" }, { "$ref": "#/parameters/TilesetId" @@ -336,25 +197,12 @@ "$ref": "#/definitions/TilesetDetailInfo" } }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" + "default": { + "$ref": "../../../Common/preview/1.0/common.json#/responses/default" } } }, "delete": { - "x-publish": true, "description": "**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).\n\nCreator makes it possible to develop applications based on your private indoor map data using Azure Maps API and SDK. [This](https://docs.microsoft.com/azure/azure-maps/creator-indoor-maps) article introduces concepts and tools that apply to Azure Maps Creator.\n\nThis API allows the caller to delete a created tileset.
\nYou can use this API if a tileset is no longer needed. \n\n### Submit Delete Request\n\nTo delete your content you will issue a `DELETE` request where the path will contain the `tilesetId` of the tileset to delete.
\n\n#### Delete request \"Successful\"\n\nThe Tileset Delete API returns a HTTP `204 No Content` response with an empty body, if the tileset was deleted successfully.
\n\n#### Delete request \"Failed\"\n\nA HTTP `400 Bad Request` error response will be returned if the tileset with the passed-in `tilesetId` is not found. \n\nHere is a sample error response:\n\n
\n\n```json\n{\n \"error\": {\n \"code\": \"400 BadRequest\",\n \"message\": \"Bad request - Tileset Id: d85b5b27-5fc4-4599-8b50-47160e90f8ce does not exist.\"\n }\n}\n```", "operationId": "Tileset_Delete", "x-ms-examples": { @@ -364,13 +212,10 @@ }, "parameters": [ { - "$ref": "#/parameters/ClientId" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ClientId" }, { - "$ref": "#/parameters/SubscriptionKey" - }, - { - "$ref": "#/parameters/ApiVersion" + "$ref": "#/parameters/TilesetApiVersionV2" }, { "$ref": "#/parameters/TilesetId" @@ -380,20 +225,8 @@ "204": { "description": "Tileset delete request completed successfully." }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" + "default": { + "$ref": "../../../Common/preview/1.0/common.json#/responses/default" } } } @@ -412,10 +245,7 @@ }, "parameters": [ { - "$ref": "#/parameters/SubscriptionKey" - }, - { - "$ref": "#/parameters/ApiVersion" + "$ref": "#/parameters/TilesetApiVersionV2" }, { "$ref": "#/parameters/TilesetOperationId" @@ -423,106 +253,16 @@ ], "responses": { "200": { - "$ref": "#/responses/200Async" + "$ref": "../../../Common/preview/1.0/common.json#/responses/200AsyncV2" }, - "400": { - "$ref": "#/responses/400" + "default": { + "$ref": "../../../Common/preview/1.0/common.json#/responses/default" } } } } }, "definitions": { - "ODataErrorResponse": { - "type": "object", - "description": "This response object is returned when an error occurs in the Maps API.", - "properties": { - "error": { - "$ref": "#/definitions/ODataError" - } - } - }, - "ODataError": { - "type": "object", - "description": "This object is returned when an error occurs in the 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" - } - } - }, "TilesetListResponse": { "description": "The response model for the Tileset List API. Returns a list of all tilesets.", "type": "object", @@ -552,9 +292,7 @@ "readOnly": true }, "ontology": { - "description": "The ontology of the source dataset. Please refer to this [article](https://docs.microsoft.com/en-us/azure/azure-maps/creator-facility-ontology) for more information about Azure Maps Creator ontologies.", - "type": "string", - "readOnly": true + "$ref": "../../../Common/preview/1.0/common.json#/definitions/Ontology" }, "datasetId": { "description": "The unique dataset Id used to create the tileset.", diff --git a/specification/maps/data-plane/Microsoft.Maps/Timezone/preview/1.0/examples/GetTimezoneByCoordinates.json b/specification/maps/data-plane/Microsoft.Maps/Timezone/preview/1.0/examples/GetTimezoneByCoordinates.json index da8cab2ca4b5..64063ac8ceee 100644 --- a/specification/maps/data-plane/Microsoft.Maps/Timezone/preview/1.0/examples/GetTimezoneByCoordinates.json +++ b/specification/maps/data-plane/Microsoft.Maps/Timezone/preview/1.0/examples/GetTimezoneByCoordinates.json @@ -1,10 +1,10 @@ { "parameters": { + "geography": "us", "format": "json", "api-version": "1.0", "query": "47.0,-122", - "options": "all", - "subscription-key": "[subscription-key]" + "options": "all" }, "responses": { "200": { @@ -70,51 +70,6 @@ } ] } - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive." - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found: the requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "An error occurred while processing the request. Please try again later." - } - } } } } diff --git a/specification/maps/data-plane/Microsoft.Maps/Timezone/preview/1.0/examples/GetTimezoneByID.json b/specification/maps/data-plane/Microsoft.Maps/Timezone/preview/1.0/examples/GetTimezoneByID.json index e3b6480a99cb..fbf24ec6e0dc 100644 --- a/specification/maps/data-plane/Microsoft.Maps/Timezone/preview/1.0/examples/GetTimezoneByID.json +++ b/specification/maps/data-plane/Microsoft.Maps/Timezone/preview/1.0/examples/GetTimezoneByID.json @@ -1,10 +1,10 @@ { "parameters": { + "geography": "us", "format": "json", "api-version": "1.0", "query": "Asia/Bahrain", - "options": "all", - "subscription-key": "[subscription-key]" + "options": "all" }, "responses": { "200": { @@ -57,51 +57,6 @@ } ] } - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive." - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found: the requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "An error occurred while processing the request. Please try again later." - } - } } } } diff --git a/specification/maps/data-plane/Microsoft.Maps/Timezone/preview/1.0/examples/GetTimezoneEnumIANA.json b/specification/maps/data-plane/Microsoft.Maps/Timezone/preview/1.0/examples/GetTimezoneEnumIANA.json index ff08c465adf7..ef36fd99830d 100644 --- a/specification/maps/data-plane/Microsoft.Maps/Timezone/preview/1.0/examples/GetTimezoneEnumIANA.json +++ b/specification/maps/data-plane/Microsoft.Maps/Timezone/preview/1.0/examples/GetTimezoneEnumIANA.json @@ -1,8 +1,8 @@ { "parameters": { + "geography": "us", "format": "json", - "api-version": "1.0", - "subscription-key": "[subscription-key]" + "api-version": "1.0" }, "responses": { "200": { @@ -3181,51 +3181,6 @@ "hasZone1970Location": false } ] - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive." - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found: the requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "An error occurred while processing the request. Please try again later." - } - } } } } diff --git a/specification/maps/data-plane/Microsoft.Maps/Timezone/preview/1.0/examples/GetTimezoneEnumWindows.json b/specification/maps/data-plane/Microsoft.Maps/Timezone/preview/1.0/examples/GetTimezoneEnumWindows.json index e6d21bab33b3..cadaf5300931 100644 --- a/specification/maps/data-plane/Microsoft.Maps/Timezone/preview/1.0/examples/GetTimezoneEnumWindows.json +++ b/specification/maps/data-plane/Microsoft.Maps/Timezone/preview/1.0/examples/GetTimezoneEnumWindows.json @@ -1,8 +1,8 @@ { "parameters": { + "geography": "us", "format": "json", - "api-version": "1.0", - "subscription-key": "[subscription-key]" + "api-version": "1.0" }, "responses": { "200": { @@ -3599,51 +3599,6 @@ ] } ] - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive." - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found: the requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "An error occurred while processing the request. Please try again later." - } - } } } } diff --git a/specification/maps/data-plane/Microsoft.Maps/Timezone/preview/1.0/examples/GetTimezoneIANAVersion.json b/specification/maps/data-plane/Microsoft.Maps/Timezone/preview/1.0/examples/GetTimezoneIANAVersion.json index 9c1d1d21cd58..110b1eeea6c0 100644 --- a/specification/maps/data-plane/Microsoft.Maps/Timezone/preview/1.0/examples/GetTimezoneIANAVersion.json +++ b/specification/maps/data-plane/Microsoft.Maps/Timezone/preview/1.0/examples/GetTimezoneIANAVersion.json @@ -1,59 +1,14 @@ { "parameters": { + "geography": "us", "format": "json", - "api-version": "1.0", - "subscription-key": "[subscription-key]" + "api-version": "1.0" }, "responses": { "200": { "body": { "version": "2017b" } - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive." - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found: the requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "An error occurred while processing the request. Please try again later." - } - } } } } diff --git a/specification/maps/data-plane/Microsoft.Maps/Timezone/preview/1.0/examples/GetTimezoneWindowsToIANA.json b/specification/maps/data-plane/Microsoft.Maps/Timezone/preview/1.0/examples/GetTimezoneWindowsToIANA.json index 7bdd480909fb..d62af4a7f4a7 100644 --- a/specification/maps/data-plane/Microsoft.Maps/Timezone/preview/1.0/examples/GetTimezoneWindowsToIANA.json +++ b/specification/maps/data-plane/Microsoft.Maps/Timezone/preview/1.0/examples/GetTimezoneWindowsToIANA.json @@ -1,9 +1,9 @@ { "parameters": { + "geography": "us", "format": "json", "api-version": "1.0", - "query": "pacific standard time", - "subscription-key": "[subscription-key]" + "query": "pacific standard time" }, "responses": { "200": { @@ -14,51 +14,6 @@ "hasZone1970Location": true } ] - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive." - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found: the requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "An error occurred while processing the request. Please try again later." - } - } } } } diff --git a/specification/maps/data-plane/Microsoft.Maps/Timezone/preview/1.0/timezone.json b/specification/maps/data-plane/Microsoft.Maps/Timezone/preview/1.0/timezone.json index 057164c29159..a53627e89779 100644 --- a/specification/maps/data-plane/Microsoft.Maps/Timezone/preview/1.0/timezone.json +++ b/specification/maps/data-plane/Microsoft.Maps/Timezone/preview/1.0/timezone.json @@ -5,14 +5,33 @@ "version": "1.0", "description": "Azure Maps Time Zone REST APIs" }, - "host": "atlas.microsoft.com", + "x-ms-parameterized-host": { + "hostTemplate": "{geography}.atlas.microsoft.com", + "parameters": [ + { + "$ref": "../../../Common/preview/1.0/common.json#/parameters/GeographicResourceLocation" + } + ] + }, "schemes": [ "https" ], "consumes": [], "produces": [ - "application/json", - "application/xml" + "application/json" + ], + "security": [ + { + "azure_auth": [ + "user_impersonation" + ] + }, + { + "SubscriptionKeyInHeader": [] + }, + { + "SubscriptionKeyInQuery": [] + } ], "securityDefinitions": { "azure_auth": { @@ -21,114 +40,35 @@ "flow": "implicit", "description": "These are the [Azure Active Directory OAuth2](https://docs.microsoft.com/en-us/azure/active-directory/develop/v1-overview) Flows. When paired with [Azure Role Based Access](https://docs.microsoft.com/en-us/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#### Note\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* The `Authorization URL` is specific to the Azure public cloud instance. Sovereign clouds have unique Authorization URLs and Azure Active directory configurations. \n* 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.\n* Usage of the [Azure Maps Web SDK](https://aka.ms/amaadmc) allows for configuration based setup of an application for multiple use cases.\n* Currently Azure Active Directory [v1.0](https://docs.microsoft.com/en-us/azure/active-directory/develop/azure-ad-endpoint-comparison) tokens are supported.", "scopes": { - "user_impersonation": "Impersonates a user's Azure Active Directory account." + "user_impersonation": "impersonate your user account" } }, - "apiKeyQuery": { + "SubscriptionKeyInHeader": { "type": "apiKey", - "description": "This is a shared key which 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 which 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": "query" - } - }, - "security": [ - { - "azure_auth": [] - }, - { - "apiKeyQuery": [] - } - ], - "responses": { - "400": { - "description": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive.", - "schema": { - "$ref": "#/definitions/ODataErrorResponse" - } + "in": "header" }, - "401": { - "description": "Access denied due to invalid subscription key or invalid Azure Active Directory 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 AAD bearer token.", - "schema": { - "$ref": "#/definitions/ODataErrorResponse" - }, - "headers": { - "WWW-Authenticate": { - "type": "string", - "description": "Bearer realm=\"https://atlas.microsoft.com/\", error=\"invalid_token\", error_description=\"The access token expired\"" - } - } - }, - "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" - } + "SubscriptionKeyInQuery": { + "type": "apiKey", + "name": "subscription-key", + "in": "query" } }, + "responses": {}, "parameters": { - "ClientId": { - "name": "x-ms-client-id", - "description": "Specifies which account is intended for usage in conjunction with the Azure AD security model. It represents a unique ID for the Azure Maps account and can be retrieved from Azure Maps management plane Account API. To use Azure AD 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": { + "TimezoneApiVersion": { "name": "api-version", - "description": "Version number of Azure Maps API. Current version is 1.0", + "description": "Version number of Azure Maps API.", "type": "string", "in": "query", "required": true, "default": "1.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" - }, "TimezoneAcceptLanguage": { "name": "Accept-Language", "in": "header", "description": "Specifies the language code in which the timezone names should be returned. If no language code is provided, the response will be in \"EN\". Please refer to [Supported Languages](https://docs.microsoft.com/en-us/azure/azure-maps/supported-languages) for details.", - "required": false, "type": "string", "x-ms-parameter-location": "method" }, @@ -136,7 +76,6 @@ "name": "options", "in": "query", "description": "Alternatively, use alias \"o\". Options available for types of information returned in the result.", - "required": false, "type": "string", "enum": [ "none", @@ -172,7 +111,6 @@ "name": "timeStamp", "in": "query", "description": "Alternatively, use alias \"stamp\", or \"s\". Reference time, if omitted, the API will use the machine time serving the request.", - "required": false, "type": "string", "x-ms-parameter-location": "method", "format": "date-time" @@ -181,7 +119,6 @@ "name": "transitionsFrom", "in": "query", "description": "Alternatively, use alias \"tf\". The start date from which daylight savings time (DST) transitions are requested, only applies when \"options\" = all or \"options\" = transitions.", - "required": false, "type": "string", "x-ms-parameter-location": "method", "format": "date-time" @@ -190,7 +127,6 @@ "name": "transitionsYears", "in": "query", "description": "Alternatively, use alias \"ty\". The number of years from \"transitionsFrom\" for which DST transitions are requested, only applies when \"options\" = all or \"options\" = transitions.", - "required": false, "type": "integer", "x-ms-parameter-location": "method" } @@ -198,7 +134,6 @@ "paths": { "/timezone/byId/{format}": { "get": { - "x-publish": true, "description": "__Time Zone by Id__\n\n**Applies to**: S0 and S1 pricing tiers.\n\n\nThis API returns current, historical, and future time zone information for the specified IANA time zone ID.", "operationId": "Timezone_GetTimezoneByID", "x-ms-examples": { @@ -208,13 +143,10 @@ }, "parameters": [ { - "$ref": "#/parameters/ClientId" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ClientId" }, { - "$ref": "#/parameters/SubscriptionKey" - }, - { - "$ref": "#/parameters/ApiVersion" + "$ref": "#/parameters/TimezoneApiVersion" }, { "$ref": "#/parameters/TimezoneAcceptLanguage" @@ -232,15 +164,14 @@ "$ref": "#/parameters/TimezoneTransitionsYears" }, { - "$ref": "#/parameters/JsonFormat" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ResponseFormat" }, { "name": "query", "in": "query", "description": "The IANA time zone ID.", "required": true, - "type": "string", - "x-ms-parameter-location": "method" + "type": "string" } ], "responses": { @@ -250,30 +181,14 @@ "$ref": "#/definitions/TimezoneByIdResult" } }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" + "default": { + "$ref": "../../../Common/preview/1.0/common.json#/responses/default" } - }, - "produces": [ - "application/json" - ] + } } }, "/timezone/byCoordinates/{format}": { "get": { - "x-publish": true, "description": "__Time Zone by Coordinates__\n\n**Applies to**: S0 and S1 pricing tiers.\n\n\nThis API returns current, historical, and future time zone information for a specified latitude-longitude pair. In addition, the API provides sunset and sunrise times for a given location.", "operationId": "Timezone_GetTimezoneByCoordinates", "x-ms-examples": { @@ -283,13 +198,10 @@ }, "parameters": [ { - "$ref": "#/parameters/ClientId" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ClientId" }, { - "$ref": "#/parameters/SubscriptionKey" - }, - { - "$ref": "#/parameters/ApiVersion" + "$ref": "#/parameters/TimezoneApiVersion" }, { "$ref": "#/parameters/TimezoneAcceptLanguage" @@ -307,7 +219,7 @@ "$ref": "#/parameters/TimezoneTransitionsYears" }, { - "$ref": "#/parameters/JsonFormat" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ResponseFormat" }, { "name": "query", @@ -324,30 +236,14 @@ "$ref": "#/definitions/TimezoneByCoordinatesResult" } }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" + "default": { + "$ref": "../../../Common/preview/1.0/common.json#/responses/default" } - }, - "produces": [ - "application/json" - ] + } } }, "/timezone/enumWindows/{format}": { "get": { - "x-publish": true, "description": "__Enumerate Windows Time Zones__\n\n\n**Applies to**: S0 and S1 pricing tiers.\n\n\nThis API returns a full list of Windows Time Zone IDs.", "operationId": "Timezone_GetTimezoneEnumWindows", "x-ms-examples": { @@ -357,16 +253,13 @@ }, "parameters": [ { - "$ref": "#/parameters/ClientId" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ClientId" }, { - "$ref": "#/parameters/SubscriptionKey" + "$ref": "#/parameters/TimezoneApiVersion" }, { - "$ref": "#/parameters/ApiVersion" - }, - { - "$ref": "#/parameters/JsonFormat" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ResponseFormat" } ], "responses": { @@ -376,30 +269,14 @@ "$ref": "#/definitions/TimezoneEnumWindowsResult" } }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" + "default": { + "$ref": "../../../Common/preview/1.0/common.json#/responses/default" } - }, - "produces": [ - "application/json" - ] + } } }, "/timezone/enumIana/{format}": { "get": { - "x-publish": true, "description": "__Enumerate IANA Time Zones__\n\n\n**Applies to**: S0 and S1 pricing tiers.\n\n\nThis API returns a full list of IANA time zone IDs. Updates to the IANA service will be reflected in the system within one day.", "operationId": "Timezone_GetTimezoneEnumIANA", "x-ms-examples": { @@ -409,16 +286,13 @@ }, "parameters": [ { - "$ref": "#/parameters/ClientId" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ClientId" }, { - "$ref": "#/parameters/SubscriptionKey" + "$ref": "#/parameters/TimezoneApiVersion" }, { - "$ref": "#/parameters/ApiVersion" - }, - { - "$ref": "#/parameters/JsonFormat" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ResponseFormat" } ], "responses": { @@ -428,30 +302,14 @@ "$ref": "#/definitions/TimezoneEnumIanaResult" } }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" + "default": { + "$ref": "../../../Common/preview/1.0/common.json#/responses/default" } - }, - "produces": [ - "application/json" - ] + } } }, "/timezone/ianaVersion/{format}": { "get": { - "x-publish": true, "description": "__Time Zone IANA Version__\n\n\n**Applies to**: S0 and S1 pricing tiers.\n\n\nThis API returns the current IANA version number.", "operationId": "Timezone_GetTimezoneIANAVersion", "x-ms-examples": { @@ -461,16 +319,13 @@ }, "parameters": [ { - "$ref": "#/parameters/ClientId" - }, - { - "$ref": "#/parameters/SubscriptionKey" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ClientId" }, { - "$ref": "#/parameters/ApiVersion" + "$ref": "#/parameters/TimezoneApiVersion" }, { - "$ref": "#/parameters/JsonFormat" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ResponseFormat" } ], "responses": { @@ -480,30 +335,14 @@ "$ref": "#/definitions/TimezoneIanaVersionResult" } }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" + "default": { + "$ref": "../../../Common/preview/1.0/common.json#/responses/default" } - }, - "produces": [ - "application/json" - ] + } } }, "/timezone/windowsToIana/{format}": { "get": { - "x-publish": true, "description": "__Windows to IANA Time Zone__\n\n\n**Applies to**: S0 and S1 pricing tiers.\n\n\nThis API returns a corresponding IANA ID, given a valid Windows Time Zone ID. Multiple IANA IDs may be returned for a single Windows ID. It is possible to narrow these results by adding an optional territory parameter.", "operationId": "Timezone_GetTimezoneWindowsToIANA", "x-ms-examples": { @@ -513,16 +352,13 @@ }, "parameters": [ { - "$ref": "#/parameters/ClientId" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ClientId" }, { - "$ref": "#/parameters/SubscriptionKey" + "$ref": "#/parameters/TimezoneApiVersion" }, { - "$ref": "#/parameters/ApiVersion" - }, - { - "$ref": "#/parameters/JsonFormat" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ResponseFormat" }, { "name": "query", @@ -535,7 +371,6 @@ "name": "territory", "in": "query", "description": "Windows Time Zone territory code.", - "required": false, "type": "string" } ], @@ -543,69 +378,18 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/TimezoneWindowToIanaResult" + "$ref": "#/definitions/TimezoneWindowsToIanaResult" } }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" + "default": { + "$ref": "../../../Common/preview/1.0/common.json#/responses/default" } - }, - "produces": [ - "application/json" - ] + } } } }, "definitions": { - "ODataErrorResponse": { - "type": "object", - "description": "This response object is returned when an error occurs in the Maps API.", - "properties": { - "error": { - "$ref": "#/definitions/ODataError" - } - } - }, - "ODataError": { - "type": "object", - "description": "This object is returned when an error occurs in the 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." - } - } - }, - "Country": { + "CountryRecord": { "type": "object", "description": "A country record.", "properties": { @@ -742,7 +526,7 @@ } } }, - "TimezoneWindowToIanaResult": { + "TimezoneWindowsToIanaResult": { "description": "This object is returned from a successful Timezone Windows To IANA call", "type": "array", "items": { @@ -812,11 +596,11 @@ "type": "array", "readOnly": true, "items": { - "$ref": "#/definitions/Country" + "$ref": "#/definitions/CountryRecord" } }, "Names": { - "$ref": "#/definitions/Names" + "$ref": "#/definitions/TimezoneNames" }, "ReferenceTime": { "$ref": "#/definitions/ReferenceTimeById" @@ -856,11 +640,11 @@ "type": "array", "readOnly": true, "items": { - "$ref": "#/definitions/Country" + "$ref": "#/definitions/CountryRecord" } }, "Names": { - "$ref": "#/definitions/Names" + "$ref": "#/definitions/TimezoneNames" }, "ReferenceTime": { "$ref": "#/definitions/ReferenceTimeByCoordinates" @@ -878,7 +662,7 @@ } } }, - "Names": { + "TimezoneNames": { "type": "object", "description": "Timezone names object.", "properties": { diff --git a/specification/maps/data-plane/Microsoft.Maps/Traffic/preview/1.0/examples/GetTrafficFlowSegment.json b/specification/maps/data-plane/Microsoft.Maps/Traffic/preview/1.0/examples/GetTrafficFlowSegment.json index 260df3e59fd3..fc6142d1769d 100644 --- a/specification/maps/data-plane/Microsoft.Maps/Traffic/preview/1.0/examples/GetTrafficFlowSegment.json +++ b/specification/maps/data-plane/Microsoft.Maps/Traffic/preview/1.0/examples/GetTrafficFlowSegment.json @@ -1,11 +1,11 @@ { "parameters": { + "geography": "us", "api-version": "1.0", "format": "json", "style": "absolute", "zoom": 10, - "query": "52.41072,4.84239", - "subscription-key": "[subscription-key]" + "query": "52.41072,4.84239" }, "responses": { "200": { @@ -33,51 +33,6 @@ "@version": "1.0.53-mascoma" } } - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive." - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found: the requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "An error occurred while processing the request. Please try again later." - } - } } } } diff --git a/specification/maps/data-plane/Microsoft.Maps/Traffic/preview/1.0/examples/GetTrafficFlowTile.json b/specification/maps/data-plane/Microsoft.Maps/Traffic/preview/1.0/examples/GetTrafficFlowTile.json index db22b3435096..aba69f220abe 100644 --- a/specification/maps/data-plane/Microsoft.Maps/Traffic/preview/1.0/examples/GetTrafficFlowTile.json +++ b/specification/maps/data-plane/Microsoft.Maps/Traffic/preview/1.0/examples/GetTrafficFlowTile.json @@ -1,61 +1,16 @@ { "parameters": { + "geography": "us", "api-version": "1.0", "format": "png", "style": "absolute", "zoom": 12, "x": 2044, - "y": 1360, - "subscription-key": "[subscription-key]" + "y": 1360 }, "responses": { "200": { "body": "binary string image" - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive." - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found: the requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "An error occurred while processing the request. Please try again later." - } - } } } } diff --git a/specification/maps/data-plane/Microsoft.Maps/Traffic/preview/1.0/examples/GetTrafficIncidentDetail.json b/specification/maps/data-plane/Microsoft.Maps/Traffic/preview/1.0/examples/GetTrafficIncidentDetail.json index 69024b136001..45d2368fe3e3 100644 --- a/specification/maps/data-plane/Microsoft.Maps/Traffic/preview/1.0/examples/GetTrafficIncidentDetail.json +++ b/specification/maps/data-plane/Microsoft.Maps/Traffic/preview/1.0/examples/GetTrafficIncidentDetail.json @@ -1,12 +1,12 @@ { "parameters": { + "geography": "us", "api-version": "1.0", "format": "json", "style": "s3", "boundingbox": "6841263.950712,511972.674418,6886056.049288,582676.925582", "boundingZoom": 11, - "trafficmodelid": "1335294634919", - "subscription-key": "[subscription-key]" + "trafficmodelid": "1335294634919" }, "responses": { "200": { @@ -333,51 +333,6 @@ ] } } - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive." - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found: the requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "An error occurred while processing the request. Please try again later." - } - } } } } diff --git a/specification/maps/data-plane/Microsoft.Maps/Traffic/preview/1.0/examples/GetTrafficIncidentTile.json b/specification/maps/data-plane/Microsoft.Maps/Traffic/preview/1.0/examples/GetTrafficIncidentTile.json index d191b8fedcb3..e36448b48f16 100644 --- a/specification/maps/data-plane/Microsoft.Maps/Traffic/preview/1.0/examples/GetTrafficIncidentTile.json +++ b/specification/maps/data-plane/Microsoft.Maps/Traffic/preview/1.0/examples/GetTrafficIncidentTile.json @@ -1,61 +1,16 @@ { "parameters": { + "geography": "us", "api-version": "1.0", "format": "png", "style": "night", "zoom": 10, "x": 175, - "y": 408, - "subscription-key": "[subscription-key]" + "y": 408 }, "responses": { "200": { "body": {} - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive." - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found: the requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "An error occurred while processing the request. Please try again later." - } - } } } } diff --git a/specification/maps/data-plane/Microsoft.Maps/Traffic/preview/1.0/examples/GetTrafficIncidentViewport.json b/specification/maps/data-plane/Microsoft.Maps/Traffic/preview/1.0/examples/GetTrafficIncidentViewport.json index 42994892b5dd..231a3b4700ca 100644 --- a/specification/maps/data-plane/Microsoft.Maps/Traffic/preview/1.0/examples/GetTrafficIncidentViewport.json +++ b/specification/maps/data-plane/Microsoft.Maps/Traffic/preview/1.0/examples/GetTrafficIncidentViewport.json @@ -1,13 +1,13 @@ { "parameters": { + "geography": "us", "api-version": "1.0", "format": "json", "boundingbox": "-939584.4813015489,-23954526.723651607,14675583.153020501,25043442.895825107", "boundingzoom": 2, "overviewbox": "-939584.4813018347,-23954526.723651607,14675583.153020501,25043442.8958229083", "overviewzoom": 2, - "copyright": true, - "subscription-key": "[subscription-key]" + "copyright": true }, "responses": { "200": { @@ -22,51 +22,6 @@ "@maps": "europe,taiwan,latam,northamerica,israel,middleeast,iraq,guam,australia,newzealand,india,africa,world,southeastasia" } } - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive." - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found: the requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "An error occurred while processing the request. Please try again later." - } - } } } } diff --git a/specification/maps/data-plane/Microsoft.Maps/Traffic/preview/1.0/traffic.json b/specification/maps/data-plane/Microsoft.Maps/Traffic/preview/1.0/traffic.json index 627c49762551..0c5d0d4df53f 100644 --- a/specification/maps/data-plane/Microsoft.Maps/Traffic/preview/1.0/traffic.json +++ b/specification/maps/data-plane/Microsoft.Maps/Traffic/preview/1.0/traffic.json @@ -5,14 +5,33 @@ "version": "1.0", "description": "Azure Maps Traffic REST APIs" }, - "host": "atlas.microsoft.com", + "x-ms-parameterized-host": { + "hostTemplate": "{geography}.atlas.microsoft.com", + "parameters": [ + { + "$ref": "../../../Common/preview/1.0/common.json#/parameters/GeographicResourceLocation" + } + ] + }, "schemes": [ "https" ], "consumes": [], "produces": [ - "application/json", - "application/xml" + "application/json" + ], + "security": [ + { + "azure_auth": [ + "user_impersonation" + ] + }, + { + "SubscriptionKeyInHeader": [] + }, + { + "SubscriptionKeyInQuery": [] + } ], "securityDefinitions": { "azure_auth": { @@ -21,165 +40,31 @@ "flow": "implicit", "description": "These are the [Azure Active Directory OAuth2](https://docs.microsoft.com/en-us/azure/active-directory/develop/v1-overview) Flows. When paired with [Azure Role Based Access](https://docs.microsoft.com/en-us/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#### Note\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* The `Authorization URL` is specific to the Azure public cloud instance. Sovereign clouds have unique Authorization URLs and Azure Active directory configurations. \n* 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.\n* Usage of the [Azure Maps Web SDK](https://aka.ms/amaadmc) allows for configuration based setup of an application for multiple use cases.\n* Currently Azure Active Directory [v1.0](https://docs.microsoft.com/en-us/azure/active-directory/develop/azure-ad-endpoint-comparison) tokens are supported.", "scopes": { - "user_impersonation": "Impersonates a user's Azure Active Directory account." + "user_impersonation": "impersonate your user account" } }, - "apiKeyQuery": { + "SubscriptionKeyInHeader": { "type": "apiKey", - "description": "This is a shared key which 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 which 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": "query" - } - }, - "security": [ - { - "azure_auth": [] + "in": "header" }, - { - "apiKeyQuery": [] - } - ], - "responses": { - "202": { - "description": "Request Accepted: The request has been accepted for processing. Please use the URL in the Location Header to retry or access the results.", - "headers": { - "Location": { - "type": "string", - "description": "New URL to check for the results of the long running process." - } - } - }, - "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 Azure Active Directory 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 AAD bearer token.", - "schema": { - "$ref": "#/definitions/ODataErrorResponse" - }, - "headers": { - "WWW-Authenticate": { - "type": "string", - "description": "Bearer realm=\"https://atlas.microsoft.com/\", error=\"invalid_token\", error_description=\"The access token expired\"" - } - } - }, - "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" - } + "SubscriptionKeyInQuery": { + "type": "apiKey", + "name": "subscription-key", + "in": "query" } }, + "responses": {}, "parameters": { - "ClientId": { - "name": "x-ms-client-id", - "description": "Specifies which account is intended for usage in conjunction with the Azure AD security model. It represents a unique ID for the Azure Maps account and can be retrieved from Azure Maps management plane Account API. To use Azure AD 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": { + "TrafficApiVersion": { "name": "api-version", - "description": "Version number of Azure Maps API. Current version is 1.0", + "description": "Version number of Azure Maps API.", "type": "string", "in": "query", "required": true, "default": "1.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" - }, - "TextFormat": { - "name": "format", - "description": "Desired format of the response. Value can be either _json_ or _xml_.", - "type": "string", - "in": "path", - "required": true, - "enum": [ - "json", - "xml" - ], - "x-ms-enum": { - "name": "TextFormat", - "modelAsString": true, - "values": [ - { - "value": "json", - "description": "[The JavaScript Object Notation Data Interchange Format](https://tools.ietf.org/html/rfc8259)" - }, - { - "value": "xml", - "description": "[The Extensible Markup Language](https://www.w3.org/TR/xml/)" - } - ] - }, - "x-ms-parameter-location": "method" - }, - "RasterTileFormat": { - "name": "format", - "description": "Desired format of the response. Possible value: png.", - "type": "string", - "in": "path", - "required": true, - "enum": [ - "png" - ], - "x-ms-enum": { - "name": "RasterTileFormat", - "modelAsString": true, - "values": [ - { - "value": "png", - "description": "An image in the png format. Supports zoom levels 0 through 18." - } - ] - }, - "x-ms-parameter-location": "method" - }, "TileFormat": { "name": "format", "description": "Desired format of the response. Possible values are png & pbf.", @@ -223,32 +108,11 @@ "type": "integer", "format": "int32", "x-ms-parameter-location": "method" - }, - "xTileIndex": { - "name": "x", - "x-ms-client-name": "xTileIndex", - "in": "query", - "description": "X coordinate of the tile on zoom grid. Value must be in the range [0, 2`zoom` -1].\n\nPlease see [Zoom Levels and Tile Grid](https://docs.microsoft.com/en-us/azure/location-based-services/zoom-levels-and-tile-grid) for details.", - "required": true, - "type": "integer", - "format": "int32", - "x-ms-parameter-location": "method" - }, - "yTileIndex": { - "name": "y", - "x-ms-client-name": "yTileIndex", - "in": "query", - "description": "Y coordinate of the tile on zoom grid. Value must be in the range [0, 2`zoom` -1].\n\nPlease see [Zoom Levels and Tile Grid](https://docs.microsoft.com/en-us/azure/location-based-services/zoom-levels-and-tile-grid) for details.", - "required": true, - "type": "integer", - "format": "int32", - "x-ms-parameter-location": "method" } }, "paths": { "/traffic/flow/tile/{format}": { "get": { - "x-publish": true, "description": "__Traffic Flow Tile__\n\n\n**Applies to**: S0 and S1 pricing tiers.\n\nThe Azure Flow Tile API serves 256 x 256 pixel tiles showing traffic flow. All tiles use the same grid system. Because the traffic tiles use transparent images, they can be layered on top of map tiles to create a compound display. The Flow tiles use colors to indicate either the speed of traffic on different road segments, or the difference between that speed and the free-flow speed on the road segment in question.", "operationId": "Traffic_GetTrafficFlowTile", "x-ms-examples": { @@ -258,13 +122,10 @@ }, "parameters": [ { - "$ref": "#/parameters/ClientId" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ClientId" }, { - "$ref": "#/parameters/SubscriptionKey" - }, - { - "$ref": "#/parameters/ApiVersion" + "$ref": "#/parameters/TrafficApiVersion" }, { "$ref": "#/parameters/TileFormat" @@ -308,54 +169,51 @@ "$ref": "#/parameters/RasterVectorZoom" }, { - "$ref": "#/parameters/xTileIndex" + "$ref": "../../../Render/preview/1.0/render.json#/parameters/xTileIndex" }, { - "$ref": "#/parameters/yTileIndex" + "$ref": "../../../Render/preview/1.0/render.json#/parameters/yTileIndex" }, { "name": "thickness", "in": "query", "description": "The value of the width of the line representing traffic. This value is a multiplier and the accepted values range from 1 - 20. The default value is 10. This parameter is not valid when format is pbf.", - "required": false, "type": "integer", "format": "int32", "minimum": 1, - "maximum": 20, - "default": 10 + "maximum": 20 } ], + "produces": [ + "application/json", + "image/jpeg", + "image/png", + "image/pbf", + "application/vnd.mapbox-vector-tile" + ], "responses": { "200": { - "description": "OK", + "description": "This image is returned from a successful Traffic Flow Tile call", "schema": { - "$ref": "#/definitions/TrafficFlowTileResult" + "type": "object", + "format": "file", + "readOnly": true + }, + "headers": { + "Content-Type": { + "type": "string", + "description": "The content-type for the response." + } } }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" + "default": { + "$ref": "../../../Common/preview/1.0/common.json#/responses/default" } - }, - "produces": [ - "application/json" - ] + } } }, "/traffic/flow/segment/{format}": { "get": { - "x-publish": true, "description": "__Traffic Flow Segment__\n\n\n**Applies to**: S0 and S1 pricing tiers.\n\nThis service provides information about the speeds and travel times of the road fragment closest to the given coordinates. It is designed to work alongside the Flow layer of the Render Service to support clickable flow data visualizations. With this API, the client side can connect any place in the map with flow data on the closest road and present it to the user.", "operationId": "Traffic_GetTrafficFlowSegment", "x-ms-examples": { @@ -365,16 +223,13 @@ }, "parameters": [ { - "$ref": "#/parameters/ClientId" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ClientId" }, { - "$ref": "#/parameters/SubscriptionKey" + "$ref": "#/parameters/TrafficApiVersion" }, { - "$ref": "#/parameters/ApiVersion" - }, - { - "$ref": "#/parameters/TextFormat" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/TextFormat" }, { "name": "style", @@ -406,9 +261,7 @@ "name": "unit", "in": "query", "description": "Unit of speed in KMPH or MPH", - "required": false, "type": "string", - "default": "KMPH", "enum": [ "KMPH", "MPH" @@ -432,10 +285,8 @@ "name": "thickness", "in": "query", "description": "The value of the width of the line representing traffic. This value is a multiplier and the accepted values range from 1 - 20. The default value is 10.", - "required": false, "type": "integer", "format": "int32", - "default": 10, "minimum": 1, "maximum": 20 }, @@ -443,9 +294,7 @@ "name": "openLr", "in": "query", "description": "Boolean on whether the response should include OpenLR code", - "required": false, - "type": "boolean", - "default": false + "type": "boolean" } ], "responses": { @@ -455,27 +304,14 @@ "$ref": "#/definitions/TrafficFlowSegmentResult" } }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" + "default": { + "$ref": "../../../Common/preview/1.0/common.json#/responses/default" } } } }, "/traffic/incident/tile/{format}": { "get": { - "x-publish": true, "description": "__Traffic Incident Tile__\n\n\n**Applies to**: S0 and S1 pricing tiers.\n\nThis service serves 256 x 256 pixel tiles showing traffic incidents. All tiles use the same grid system. Because the traffic tiles use transparent images, they can be layered on top of map tiles to create a compound display. Traffic tiles render graphics to indicate traffic on the roads in the specified area.", "operationId": "Traffic_GetTrafficIncidentTile", "x-ms-examples": { @@ -485,13 +321,10 @@ }, "parameters": [ { - "$ref": "#/parameters/ClientId" - }, - { - "$ref": "#/parameters/SubscriptionKey" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ClientId" }, { - "$ref": "#/parameters/ApiVersion" + "$ref": "#/parameters/TrafficApiVersion" }, { "$ref": "#/parameters/TileFormat" @@ -535,52 +368,49 @@ "$ref": "#/parameters/RasterVectorZoom" }, { - "$ref": "#/parameters/xTileIndex" + "$ref": "../../../Render/preview/1.0/render.json#/parameters/xTileIndex" }, { - "$ref": "#/parameters/yTileIndex" + "$ref": "../../../Render/preview/1.0/render.json#/parameters/yTileIndex" }, { "name": "t", "x-ms-client-name": "trafficState", "in": "query", "description": "Reference value for the state of traffic at a particular time, obtained from the Viewport API call, trafficModelId attribute in trafficState field. It is updated every minute, and is valid for two minutes before it times out. Use -1 to get the most recent traffic information. Default: most recent traffic information.", - "required": false, - "type": "string", - "default": "-1" + "type": "string" } ], + "produces": [ + "application/json", + "image/jpeg", + "image/png", + "image/pbf", + "application/vnd.mapbox-vector-tile" + ], "responses": { "200": { - "description": "OK", + "description": "This object is returned from a successful Traffic Incident Tile call", "schema": { - "$ref": "#/definitions/TrafficIncidentTileResult" + "type": "object", + "format": "file", + "readOnly": true + }, + "headers": { + "Content-Type": { + "type": "string", + "description": "The content-type for the response." + } } }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" + "default": { + "$ref": "../../../Common/preview/1.0/common.json#/responses/default" } - }, - "produces": [ - "application/json" - ] + } } }, "/traffic/incident/detail/{format}": { "get": { - "x-publish": true, "description": "__Traffic Incident Detail__ \n\n\n\n**Applies to**: S0 and S1 pricing tiers.\n\nThis API provides information on traffic incidents inside a given bounding box, based on the current Traffic Model ID. The Traffic Model ID is available to grant synchronization of data between calls and API's. The Traffic Model ID is a key value for determining the currency of traffic incidents. It is updated every minute, and is valid for two minutes before it times out. It is used in rendering [incident tiles](https://docs.microsoft.com/en-us/rest/api/maps/traffic/gettrafficincidenttile). It can be obtained from the [Viewport API](https://docs.microsoft.com/en-us/rest/api/maps/traffic/gettrafficincidentviewport).", "operationId": "Traffic_GetTrafficIncidentDetail", "x-ms-examples": { @@ -590,16 +420,13 @@ }, "parameters": [ { - "$ref": "#/parameters/ClientId" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ClientId" }, { - "$ref": "#/parameters/SubscriptionKey" + "$ref": "#/parameters/TrafficApiVersion" }, { - "$ref": "#/parameters/ApiVersion" - }, - { - "$ref": "#/parameters/TextFormat" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/TextFormat" }, { "name": "style", @@ -664,25 +491,36 @@ "name": "language", "in": "query", "description": "[ISO 639-1 code](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) for the output language. Supported languages are ar, ca, cs, da, de, el, en, en-GB, en-US, es, et, fi, fr, he, hu, id, in*, it, lt, lv, nb, nl, no, pl, pt, ro, ru, sk, sv, th, tr, zh.\n\nPlease refer to [Supported Languages](https://docs.microsoft.com/en-us/azure/azure-maps/supported-languages) for details. When invalid language code is provided response is returned in English. When incident cause or description does not have translation, English description is returned.", - "required": false, "type": "string" }, { "name": "projection", "in": "query", "description": "The projection used to specify the coordinates in the request and response. [EPSG900913](http://docs.openlayers.org/library/spherical_mercator.html) (default) or [EPSG4326](http://spatialreference.org/ref/epsg/4326/)", - "required": false, "type": "string", "enum": [ "EPSG900913", "EPSG4326" - ] + ], + "x-ms-enum": { + "name": "ProjectionStandard", + "modelAsString": true, + "values": [ + { + "value": "EPSG900913", + "description": "[EPSG900913](http://docs.openlayers.org/library/spherical_mercator.html)" + }, + { + "value": "EPSG4326", + "description": "[EPSG4326](http://spatialreference.org/ref/epsg/4326/)" + } + ] + } }, { "name": "geometries", "in": "query", "description": "The type of vector geometry added to incidents (returned in the element of the response).", - "required": false, "type": "string", "enum": [ "original", @@ -707,17 +545,13 @@ "name": "expandCluster", "in": "query", "description": "Boolean to indicate whether to list all traffic incidents in a cluster separately", - "required": false, - "type": "boolean", - "default": false + "type": "boolean" }, { "name": "originalPosition", "in": "query", "description": "Boolean on whether to return the original position of the incident () as well as the one shifted to the beginning of the traffic tube ()", - "required": false, - "type": "boolean", - "default": false + "type": "boolean" } ], "responses": { @@ -727,27 +561,14 @@ "$ref": "#/definitions/TrafficIncidentDetailResult" } }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" + "default": { + "$ref": "../../../Common/preview/1.0/common.json#/responses/default" } } } }, "/traffic/incident/viewport/{format}": { "get": { - "x-publish": true, "description": "__Traffic Incident Viewport__\n\n\n**Applies to**: S0 and S1 pricing tiers.\n\nThis API returns legal and technical information for the viewport described in the request. It should be called by client applications whenever the viewport changes (for instance, through zooming, panning, going to a location, or displaying a route). The request should contain the bounding box and zoom level of the viewport whose information is needed. The return will contain map version information, as well as the current Traffic Model ID and copyright IDs. The Traffic Model ID returned by the Viewport Description is used by other APIs to retrieve last traffic information for further processing.", "operationId": "Traffic_GetTrafficIncidentViewport", "x-ms-examples": { @@ -757,16 +578,13 @@ }, "parameters": [ { - "$ref": "#/parameters/ClientId" - }, - { - "$ref": "#/parameters/SubscriptionKey" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ClientId" }, { - "$ref": "#/parameters/ApiVersion" + "$ref": "#/parameters/TrafficApiVersion" }, { - "$ref": "#/parameters/TextFormat" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/TextFormat" }, { "name": "boundingbox", @@ -806,7 +624,6 @@ "name": "copyright", "in": "query", "description": "Determines what copyright information to return. When true the copyright text is returned; when false only the copyright index is returned.", - "required": true, "type": "boolean", "default": true } @@ -818,86 +635,14 @@ "$ref": "#/definitions/TrafficIncidentViewportResult" } }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" + "default": { + "$ref": "../../../Common/preview/1.0/common.json#/responses/default" } } } } }, "definitions": { - "ODataErrorResponse": { - "type": "object", - "description": "This response object is returned when an error occurs in the Maps API.", - "properties": { - "error": { - "$ref": "#/definitions/ODataError" - } - } - }, - "ODataError": { - "type": "object", - "description": "This object is returned when an error occurs in the 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." - } - } - }, - "Coordinate": { - "description": "A location represented as a latitude and longitude.", - "type": "object", - "properties": { - "latitude": { - "description": "Latitude property", - "type": "number", - "format": "double", - "readOnly": true - }, - "longitude": { - "description": "Longitude property", - "type": "number", - "format": "double", - "readOnly": true - } - } - }, - "TrafficFlowTileResult": { - "description": "This image is returned from a successful Traffic Flow Tile call", - "type": "string", - "format": "binary", - "readOnly": true - }, "TrafficFlowSegmentResult": { "description": "This object is returned from a successful Traffic Flow Segment call", "type": "object", @@ -950,7 +695,7 @@ "type": "array", "readOnly": true, "items": { - "$ref": "#/definitions/Coordinate" + "$ref": "../../../Common/preview/1.0/common.json#/definitions/CoordinatesPair" } } } @@ -969,17 +714,6 @@ } } }, - "TrafficIncidentTileResult": { - "description": "This object is returned from a successful Traffic Incident Tile call", - "type": "object", - "properties": { - "image": { - "description": "Image property", - "type": "string", - "readOnly": true - } - } - }, "TrafficIncidentDetailResult": { "description": "This object is returned from a successful Traffic incident Detail call", "type": "object", diff --git a/specification/maps/data-plane/Microsoft.Maps/WFS/preview/1.0/examples/DeleteItem.json b/specification/maps/data-plane/Microsoft.Maps/WFS/preview/1.0/examples/DeleteItem.json deleted file mode 100644 index 72fdf9389540..000000000000 --- a/specification/maps/data-plane/Microsoft.Maps/WFS/preview/1.0/examples/DeleteItem.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "parameters": { - "geography": "us", - "api-version": "1.0", - "datasetid": "018fda98-e638-0edf-5ef7-28491ff3bed4", - "subscription-key": "[subscription-key]", - "collectionId": "facility", - "featureId": "FCL39" - }, - "responses": { - "204": {}, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive." - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found: the requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "An error occurred while processing the request. Please try again later." - } - } - } - } -} diff --git a/specification/maps/data-plane/Microsoft.Maps/WFS/preview/1.0/examples/GetCollection.json b/specification/maps/data-plane/Microsoft.Maps/WFS/preview/1.0/examples/GetCollection.json deleted file mode 100644 index 289c2decdf0c..000000000000 --- a/specification/maps/data-plane/Microsoft.Maps/WFS/preview/1.0/examples/GetCollection.json +++ /dev/null @@ -1,79 +0,0 @@ -{ - "parameters": { - "geography": "us", - "api-version": "1.0", - "datasetid": "018fda98-e638-0edf-5ef7-28491ff3bed4", - "subscription-key": "[subscription-key]", - "collectionId": "unit" - }, - "responses": { - "200": { - "body": { - "name": "unit", - "description": "A physical and non-overlapping area which might be occupied and traversed by a navigating agent. Can be a hallway, a room, a courtyard, etc. It is surrounded by physical obstruction (wall), unless the isOpenArea attribute is equal to true, and one must add openings where the obstruction shouldn't be there. If isOpenArea attribute is equal to true, all the sides are assumed open to the surroundings and walls are to be added where needed. Walls for open areas are represented as a lineElement or areaElement with isObstruction equal to true.", - "links": [ - { - "href": "https://us.atlas.microsoft.com/wfs/dataset/4a25a249-8bd4-3f78-8cd8-eff11751d35b/collections/unit/definition?api-version=1.0", - "rel": "describedBy", - "title": "Metadata catalogue for unit" - }, - { - "href": "https://us.atlas.microsoft.com/wfs/dataset/4a25a249-8bd4-3f78-8cd8-eff11751d35b/collections/unit/items?api-version=1.0", - "rel": "data", - "title": "unit" - }, - { - "href": "https://us.atlas.microsoft.com/wfs/dataset/4a25a249-8bd4-3f78-8cd8-eff11751d35b/collections/unit?api-version=1.0", - "rel": "self", - "title": "Metadata catalogue for unit" - } - ] - } - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive." - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found: the requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "An error occurred while processing the request. Please try again later." - } - } - } - } -} diff --git a/specification/maps/data-plane/Microsoft.Maps/WFS/preview/1.0/examples/GetCollectionDefinition.json b/specification/maps/data-plane/Microsoft.Maps/WFS/preview/1.0/examples/GetCollectionDefinition.json deleted file mode 100644 index 5abb684137ba..000000000000 --- a/specification/maps/data-plane/Microsoft.Maps/WFS/preview/1.0/examples/GetCollectionDefinition.json +++ /dev/null @@ -1,197 +0,0 @@ -{ - "parameters": { - "geography": "us", - "api-version": "1.0", - "datasetid": "018fda98-e638-0edf-5ef7-28491ff3bed4", - "subscription-key": "[subscription-key]", - "collectionId": "unit" - }, - "responses": { - "200": { - "body": { - "idPrefix": "UNIT", - "name": "unit", - "description": "A physical and non-overlapping area which might be occupied and traversed by a navigating agent. Can be a hallway, a room, a courtyard, etc. It is surrounded by physical obstruction (wall), unless the isOpenArea attribute is equal to true, and one must add openings where the obstruction shouldn't be there. If isOpenArea attribute is equal to true, all the sides are assumed open to the surroundings and walls are to be added where needed. Walls for open areas are represented as a lineElement or areaElement with isObstruction equal to true.", - "geometryType": "Polygon", - "featureTypes": [], - "properties": [ - { - "name": "externalId", - "required": false, - "type": "text" - }, - { - "name": "originalId", - "required": false, - "type": "text" - }, - { - "name": "categoryId", - "required": true, - "type": { - "featureId": "category" - } - }, - { - "name": "isOpenArea", - "required": false, - "type": "boolean" - }, - { - "name": "navigableBy", - "required": false, - "type": { - "array": { - "enum": [ - "pedestrian", - "wheelchair", - "machine", - "bicycle", - "automobile", - "hiredAuto", - "bus", - "railcar", - "emergency", - "ferry", - "boat" - ] - } - } - }, - { - "name": "isRoutable", - "required": false, - "type": "boolean" - }, - { - "name": "routeThroughBehavior", - "required": false, - "type": { - "enum": [ - "disallowed", - "allowed", - "preferred" - ] - } - }, - { - "name": "nonPublic", - "required": false, - "type": "boolean" - }, - { - "name": "levelId", - "required": true, - "type": { - "featureId": "level" - } - }, - { - "name": "occupants", - "required": false, - "type": { - "array": { - "featureId": "directoryInfo" - } - } - }, - { - "name": "addressId", - "required": false, - "type": { - "featureId": "directoryInfo" - } - }, - { - "name": "addressRoomNumber", - "required": false, - "type": "text" - }, - { - "name": "name", - "required": false, - "type": "text" - }, - { - "name": "nameSubtitle", - "required": false, - "type": "text" - }, - { - "name": "nameAlt", - "required": false, - "type": "text" - }, - { - "name": "anchorPoint", - "required": false, - "type": { - "geometry": [ - "Point" - ], - "isFragmented": false, - "srid": 4326 - } - } - ], - "links": [ - { - "href": "https://us.atlas.microsoft.com/wfs/dataset/4a25a249-8bd4-3f78-8cd8-eff11751d35b/collections/unit/definition?api-version=1.0", - "rel": "self", - "title": "Metadata catalogue for unit" - }, - { - "href": "https://us.atlas.microsoft.com/wfs/dataset/4a25a249-8bd4-3f78-8cd8-eff11751d35b/collections/unit/items?api-version=1.0", - "rel": "data", - "title": "unit" - } - ] - } - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive." - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found: the requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "An error occurred while processing the request. Please try again later." - } - } - } - } -} diff --git a/specification/maps/data-plane/Microsoft.Maps/WFS/preview/1.0/examples/GetCollections.json b/specification/maps/data-plane/Microsoft.Maps/WFS/preview/1.0/examples/GetCollections.json deleted file mode 100644 index c66647770907..000000000000 --- a/specification/maps/data-plane/Microsoft.Maps/WFS/preview/1.0/examples/GetCollections.json +++ /dev/null @@ -1,298 +0,0 @@ -{ - "parameters": { - "geography": "us", - "api-version": "1.0", - "datasetid": "018fda98-e638-0edf-5ef7-28491ff3bed4", - "subscription-key": "[subscription-key]" - }, - "responses": { - "200": { - "body": { - "collections": [ - { - "name": "unit", - "description": "A physical and non-overlapping area which might be occupied and traversed by a navigating agent. Can be a hallway, a room, a courtyard, etc. It is surrounded by physical obstruction (wall), unless the isOpenArea attribute is equal to true, and one must add openings where the obstruction shouldn't be there. If isOpenArea attribute is equal to true, all the sides are assumed open to the surroundings and walls are to be added where needed. Walls for open areas are represented as a lineElement or areaElement with isObstruction equal to true.", - "links": [ - { - "href": "https://us.atlas.microsoft.com/wfs/dataset/4a25a249-8bd4-3f78-8cd8-eff11751d35b/collections/unit/definition?api-version=1.0", - "rel": "describedBy", - "title": "Metadata catalogue for unit" - }, - { - "href": "https://us.atlas.microsoft.com/wfs/dataset/4a25a249-8bd4-3f78-8cd8-eff11751d35b/collections/unit/items?api-version=1.0", - "rel": "data", - "title": "unit" - }, - { - "href": "https://us.atlas.microsoft.com/wfs/dataset/4a25a249-8bd4-3f78-8cd8-eff11751d35b/collections/unit?api-version=1.0", - "rel": "self", - "title": "Metadata catalogue for unit" - } - ] - }, - { - "name": "zone", - "description": "A virtual area. ex, wifi zone, emergency assembly area. Zones can be used as destinations but not meant for through traffic.", - "links": [ - { - "href": "https://us.atlas.microsoft.com/wfs/dataset/4a25a249-8bd4-3f78-8cd8-eff11751d35b/collections/zone/definition?api-version=1.0", - "rel": "describedBy", - "title": "Metadata catalogue for zone" - }, - { - "href": "https://us.atlas.microsoft.com/wfs/dataset/4a25a249-8bd4-3f78-8cd8-eff11751d35b/collections/zone/items?api-version=1.0", - "rel": "data", - "title": "zone" - }, - { - "href": "https://us.atlas.microsoft.com/wfs/dataset/4a25a249-8bd4-3f78-8cd8-eff11751d35b/collections/zone?api-version=1.0", - "rel": "self", - "title": "Metadata catalogue for zone" - } - ] - }, - { - "name": "level", - "description": "An indication of the extent and vertical position of a set of features.", - "links": [ - { - "href": "https://us.atlas.microsoft.com/wfs/dataset/4a25a249-8bd4-3f78-8cd8-eff11751d35b/collections/level/definition?api-version=1.0", - "rel": "describedBy", - "title": "Metadata catalogue for level" - }, - { - "href": "https://us.atlas.microsoft.com/wfs/dataset/4a25a249-8bd4-3f78-8cd8-eff11751d35b/collections/level/items?api-version=1.0", - "rel": "data", - "title": "level" - }, - { - "href": "https://us.atlas.microsoft.com/wfs/dataset/4a25a249-8bd4-3f78-8cd8-eff11751d35b/collections/level?api-version=1.0", - "rel": "self", - "title": "Metadata catalogue for level" - } - ] - }, - { - "name": "facility", - "description": "Area of the site, building footprint etc.", - "links": [ - { - "href": "https://us.atlas.microsoft.com/wfs/dataset/4a25a249-8bd4-3f78-8cd8-eff11751d35b/collections/facility/definition?api-version=1.0", - "rel": "describedBy", - "title": "Metadata catalogue for facility" - }, - { - "href": "https://us.atlas.microsoft.com/wfs/dataset/4a25a249-8bd4-3f78-8cd8-eff11751d35b/collections/facility/items?api-version=1.0", - "rel": "data", - "title": "facility" - }, - { - "href": "https://us.atlas.microsoft.com/wfs/dataset/4a25a249-8bd4-3f78-8cd8-eff11751d35b/collections/facility?api-version=1.0", - "rel": "self", - "title": "Metadata catalogue for facility" - } - ] - }, - { - "name": "verticalPenetration", - "description": "An area that, when used in a set, represents a method of navigating vertically between levels. It can be used to model stairs, elevators etc. Geometry can overlap units and other vertical penetration features.", - "links": [ - { - "href": "https://us.atlas.microsoft.com/wfs/dataset/4a25a249-8bd4-3f78-8cd8-eff11751d35b/collections/verticalPenetration/definition?api-version=1.0", - "rel": "describedBy", - "title": "Metadata catalogue for verticalPenetration" - }, - { - "href": "https://us.atlas.microsoft.com/wfs/dataset/4a25a249-8bd4-3f78-8cd8-eff11751d35b/collections/verticalPenetration/items?api-version=1.0", - "rel": "data", - "title": "verticalPenetration" - }, - { - "href": "https://us.atlas.microsoft.com/wfs/dataset/4a25a249-8bd4-3f78-8cd8-eff11751d35b/collections/verticalPenetration?api-version=1.0", - "rel": "self", - "title": "Metadata catalogue for verticalPenetration" - } - ] - }, - { - "name": "opening", - "description": "A usually-traversable boundary between two units, or a unit and verticalPenetration.", - "links": [ - { - "href": "https://us.atlas.microsoft.com/wfs/dataset/4a25a249-8bd4-3f78-8cd8-eff11751d35b/collections/opening/definition?api-version=1.0", - "rel": "describedBy", - "title": "Metadata catalogue for opening" - }, - { - "href": "https://us.atlas.microsoft.com/wfs/dataset/4a25a249-8bd4-3f78-8cd8-eff11751d35b/collections/opening/items?api-version=1.0", - "rel": "data", - "title": "opening" - }, - { - "href": "https://us.atlas.microsoft.com/wfs/dataset/4a25a249-8bd4-3f78-8cd8-eff11751d35b/collections/opening?api-version=1.0", - "rel": "self", - "title": "Metadata catalogue for opening" - } - ] - }, - { - "name": "directoryInfo", - "description": "Name, address, phone number, website, and hours of operation for a unit, facility, or an occupant of a unit or facility.", - "links": [ - { - "href": "https://us.atlas.microsoft.com/wfs/dataset/4a25a249-8bd4-3f78-8cd8-eff11751d35b/collections/directoryInfo/definition?api-version=1.0", - "rel": "describedBy", - "title": "Metadata catalogue for directoryInfo" - }, - { - "href": "https://us.atlas.microsoft.com/wfs/dataset/4a25a249-8bd4-3f78-8cd8-eff11751d35b/collections/directoryInfo/items?api-version=1.0", - "rel": "data", - "title": "directoryInfo" - }, - { - "href": "https://us.atlas.microsoft.com/wfs/dataset/4a25a249-8bd4-3f78-8cd8-eff11751d35b/collections/directoryInfo?api-version=1.0", - "rel": "self", - "title": "Metadata catalogue for directoryInfo" - } - ] - }, - { - "name": "pointElement", - "description": "A point feature in a unit, such as a first aid kit or a sprinkler head.", - "links": [ - { - "href": "https://us.atlas.microsoft.com/wfs/dataset/4a25a249-8bd4-3f78-8cd8-eff11751d35b/collections/pointElement/definition?api-version=1.0", - "rel": "describedBy", - "title": "Metadata catalogue for pointElement" - }, - { - "href": "https://us.atlas.microsoft.com/wfs/dataset/4a25a249-8bd4-3f78-8cd8-eff11751d35b/collections/pointElement/items?api-version=1.0", - "rel": "data", - "title": "pointElement" - }, - { - "href": "https://us.atlas.microsoft.com/wfs/dataset/4a25a249-8bd4-3f78-8cd8-eff11751d35b/collections/pointElement?api-version=1.0", - "rel": "self", - "title": "Metadata catalogue for pointElement" - } - ] - }, - { - "name": "lineElement", - "description": "A line feature in a unit, such as a dividing wall, window.", - "links": [ - { - "href": "https://us.atlas.microsoft.com/wfs/dataset/4a25a249-8bd4-3f78-8cd8-eff11751d35b/collections/lineElement/definition?api-version=1.0", - "rel": "describedBy", - "title": "Metadata catalogue for lineElement" - }, - { - "href": "https://us.atlas.microsoft.com/wfs/dataset/4a25a249-8bd4-3f78-8cd8-eff11751d35b/collections/lineElement/items?api-version=1.0", - "rel": "data", - "title": "lineElement" - }, - { - "href": "https://us.atlas.microsoft.com/wfs/dataset/4a25a249-8bd4-3f78-8cd8-eff11751d35b/collections/lineElement?api-version=1.0", - "rel": "self", - "title": "Metadata catalogue for lineElement" - } - ] - }, - { - "name": "areaElement", - "description": "A polygon feature in a unit, such as an area open to below, an obstruction like an island in a unit.", - "links": [ - { - "href": "https://us.atlas.microsoft.com/wfs/dataset/4a25a249-8bd4-3f78-8cd8-eff11751d35b/collections/areaElement/definition?api-version=1.0", - "rel": "describedBy", - "title": "Metadata catalogue for areaElement" - }, - { - "href": "https://us.atlas.microsoft.com/wfs/dataset/4a25a249-8bd4-3f78-8cd8-eff11751d35b/collections/areaElement/items?api-version=1.0", - "rel": "data", - "title": "areaElement" - }, - { - "href": "https://us.atlas.microsoft.com/wfs/dataset/4a25a249-8bd4-3f78-8cd8-eff11751d35b/collections/areaElement?api-version=1.0", - "rel": "self", - "title": "Metadata catalogue for areaElement" - } - ] - }, - { - "name": "category", - "description": "Category names. e.g. \"room.conference\". The isRoutable attribute puts a feature with that category on the routing graph. The routeThroughBehavior attribute determines whether a feature can be used for through traffic or not.", - "links": [ - { - "href": "https://us.atlas.microsoft.com/wfs/dataset/4a25a249-8bd4-3f78-8cd8-eff11751d35b/collections/category/definition?api-version=1.0", - "rel": "describedBy", - "title": "Metadata catalogue for category" - }, - { - "href": "https://us.atlas.microsoft.com/wfs/dataset/4a25a249-8bd4-3f78-8cd8-eff11751d35b/collections/category/items?api-version=1.0", - "rel": "data", - "title": "category" - }, - { - "href": "https://us.atlas.microsoft.com/wfs/dataset/4a25a249-8bd4-3f78-8cd8-eff11751d35b/collections/category?api-version=1.0", - "rel": "self", - "title": "Metadata catalogue for category" - } - ] - } - ], - "links": [ - { - "href": "https://us.atlas.microsoft.com/wfs/dataset/4a25a249-8bd4-3f78-8cd8-eff11751d35b/collections?api-version=1.0", - "rel": "self" - } - ] - } - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive." - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found: the requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "An error occurred while processing the request. Please try again later." - } - } - } - } -} diff --git a/specification/maps/data-plane/Microsoft.Maps/WFS/preview/1.0/examples/GetConformance.json b/specification/maps/data-plane/Microsoft.Maps/WFS/preview/1.0/examples/GetConformance.json deleted file mode 100644 index 48086e702d21..000000000000 --- a/specification/maps/data-plane/Microsoft.Maps/WFS/preview/1.0/examples/GetConformance.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "parameters": { - "geography": "us", - "api-version": "1.0", - "datasetid": "018fda98-e638-0edf-5ef7-28491ff3bed4", - "subscription-key": "[subscription-key]" - }, - "responses": { - "200": { - "body": { - "conformsTo": [ - "http://www.opengis.net/spec/wfs-1/3.0/req/core", - "http://www.opengis.net/spec/wfs-1/3.0/req/oas30", - "http://www.opengis.net/spec/wfs-1/3.0/req/geojson", - "http://tempuri.org/wfs/3.0/edit" - ] - } - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive." - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found: the requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "An error occurred while processing the request. Please try again later." - } - } - } - } -} diff --git a/specification/maps/data-plane/Microsoft.Maps/WFS/preview/1.0/examples/GetItem.json b/specification/maps/data-plane/Microsoft.Maps/WFS/preview/1.0/examples/GetItem.json deleted file mode 100644 index 20f6305c4e7e..000000000000 --- a/specification/maps/data-plane/Microsoft.Maps/WFS/preview/1.0/examples/GetItem.json +++ /dev/null @@ -1,129 +0,0 @@ -{ - "parameters": { - "geography": "us", - "api-version": "1.0", - "datasetid": "018fda98-e638-0edf-5ef7-28491ff3bed4", - "subscription-key": "[subscription-key]", - "collectionId": "unit", - "featureId": "UNIT39" - }, - "responses": { - "200": { - "body": { - "feature": { - "type": "feature", - "geometry": { - "type": "Polygon", - "coordinates": [ - [ - [ - 139.63304057829211, - 35.457686686108559 - ], - [ - 139.63296283234274, - 35.457783904258683 - ], - [ - 139.63308672404617, - 35.457850229062018 - ], - [ - 139.63314516916711, - 35.457777145699858 - ], - [ - 139.63312747036289, - 35.457767670747167 - ], - [ - 139.63314677109963, - 35.457743535881377 - ], - [ - 139.63304057829211, - 35.457686686108559 - ] - ] - ] - }, - "properties": { - "originalId": "ddbbb583-4621-4e11-8859-299d1057e843", - "categoryId": "CTG10", - "isOpenArea": false, - "navigableBy": [ - "pedestrian" - ], - "isRoutable": false, - "routeThroughBehavior": "allowed", - "nonPublic": false, - "levelId": "LVL18", - "occupants": [], - "addressId": "DIR16", - "addressRoomNumber": "", - "name": "21N13", - "nameSubtitle": "", - "nameAlt": "" - }, - "id": "UNIT39", - "featureType": "" - }, - "links": [ - { - "href": "https://us.atlas.microsoft.com/wfs/dataset/4a25a249-8bd4-3f78-8cd8-eff11751d35b/collections/unit/items/UNIT39?api-version=1.0", - "rel": "self" - }, - { - "href": "https://us.atlas.microsoft.com/wfs/dataset/4a25a249-8bd4-3f78-8cd8-eff11751d35b/collections/unit?api-version=1.0", - "rel": "data" - } - ] - } - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive." - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found: the requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "An error occurred while processing the request. Please try again later." - } - } - } - } -} diff --git a/specification/maps/data-plane/Microsoft.Maps/WFS/preview/1.0/examples/GetItems.json b/specification/maps/data-plane/Microsoft.Maps/WFS/preview/1.0/examples/GetItems.json deleted file mode 100644 index 1862a002e696..000000000000 --- a/specification/maps/data-plane/Microsoft.Maps/WFS/preview/1.0/examples/GetItems.json +++ /dev/null @@ -1,138 +0,0 @@ -{ - "parameters": { - "geography": "us", - "api-version": "1.0", - "datasetid": "018fda98-e638-0edf-5ef7-28491ff3bed4", - "subscription-key": "[subscription-key]", - "collectionId": "unit", - "limit": 1, - "bbox": "-122, 47, -120, 46" - }, - "responses": { - "200": { - "body": { - "type": "FeatureCollection", - "features": [ - { - "type": "feature", - "geometry": { - "type": "Polygon", - "coordinates": [ - [ - [ - 139.63304057829211, - 35.457686686108559 - ], - [ - 139.63296283234274, - 35.457783904258683 - ], - [ - 139.63308672404617, - 35.457850229062018 - ], - [ - 139.63314516916711, - 35.457777145699858 - ], - [ - 139.63312747036289, - 35.457767670747167 - ], - [ - 139.63314677109963, - 35.457743535881377 - ], - [ - 139.63304057829211, - 35.457686686108559 - ] - ] - ] - }, - "properties": { - "originalId": "ddbbb583-4621-4e11-8859-299d1057e843", - "categoryId": "CTG10", - "isOpenArea": false, - "navigableBy": [ - "pedestrian" - ], - "isRoutable": false, - "routeThroughBehavior": "allowed", - "nonPublic": false, - "levelId": "LVL18", - "occupants": [], - "addressId": "DIR16", - "addressRoomNumber": "", - "name": "21N13", - "nameSubtitle": "", - "nameAlt": "" - }, - "id": "UNIT39", - "featureType": "" - } - ], - "numberReturned": 1, - "links": [ - { - "href": "https://us.atlas.microsoft.com/wfs/dataset/4a25a249-8bd4-3f78-8cd8-eff11751d35b/collections/unit/items?api-version=1.0&limit=1", - "rel": "self" - }, - { - "href": "https://us.atlas.microsoft.com/wfs/dataset/4a25a249-8bd4-3f78-8cd8-eff11751d35b/collections/unit?api-version=1.0", - "rel": "data" - }, - { - "href": "https://us.atlas.microsoft.com/wfs/dataset/4a25a249-8bd4-3f78-8cd8-eff11751d35b/collections/unit/items?n=PMRG4ZLYOQRDUMJMEJYHEZLWEI5C2ML5&api-version=1.0&limit=1", - "rel": "next" - } - ] - } - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive." - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found: the requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "An error occurred while processing the request. Please try again later." - } - } - } - } -} diff --git a/specification/maps/data-plane/Microsoft.Maps/WFS/preview/1.0/examples/GetLandingPage.json b/specification/maps/data-plane/Microsoft.Maps/WFS/preview/1.0/examples/GetLandingPage.json deleted file mode 100644 index 508aba14bca4..000000000000 --- a/specification/maps/data-plane/Microsoft.Maps/WFS/preview/1.0/examples/GetLandingPage.json +++ /dev/null @@ -1,86 +0,0 @@ -{ - "parameters": { - "geography": "us", - "api-version": "1.0", - "datasetid": "018fda98-e638-0edf-5ef7-28491ff3bed4", - "subscription-key": "[subscription-key]" - }, - "responses": { - "200": { - "body": { - "links": [ - { - "href": "https://us.atlas.microsoft.com/wfs/datasets/018fda98-e638-0edf-5ef7-28491ff3bed4", - "rel": "self", - "title": "Azure Maps WFS" - }, - { - "href": "https://us.atlas.microsoft.com/wfs/datasets/018fda98-e638-0edf-5ef7-28491ff3bed4/api", - "rel": "service", - "title": "The API definition" - }, - { - "href": "https://us.atlas.microsoft.com/wfs/datasets/018fda98-e638-0edf-5ef7-28491ff3bed4/conformance", - "rel": "conformance", - "title": "WFS 3.0 conformance classes implemented by this server" - }, - { - "href": "https://us.atlas.microsoft.com/wfs/datasets/018fda98-e638-0edf-5ef7-28491ff3bed4/version", - "rel": "data", - "title": "The version information" - }, - { - "href": "https://us.atlas.microsoft.com/wfs/datasets/018fda98-e638-0edf-5ef7-28491ff3bed4/collections", - "rel": "data", - "title": "Metadata about the feature collections" - } - ] - } - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive." - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found: the requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "An error occurred while processing the request. Please try again later." - } - } - } - } -} diff --git a/specification/maps/data-plane/Microsoft.Maps/WFS/preview/1.0/wfs.json b/specification/maps/data-plane/Microsoft.Maps/WFS/preview/1.0/wfs.json deleted file mode 100644 index b3f019323d54..000000000000 --- a/specification/maps/data-plane/Microsoft.Maps/WFS/preview/1.0/wfs.json +++ /dev/null @@ -1,1018 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "Azure Maps Web Feature Service", - "version": "1.0", - "description": "Azure Maps Web Feature REST APIs" - }, - "x-ms-parameterized-host": { - "hostTemplate": "{geography}.atlas.microsoft.com", - "parameters": [ - { - "$ref": "#/parameters/GeographicResourceLocation" - } - ] - }, - "schemes": [ - "https" - ], - "consumes": [], - "produces": [ - "application/json", - "application/xml" - ], - "securityDefinitions": { - "azure_auth": { - "type": "oauth2", - "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", - "flow": "implicit", - "description": "These are the [Azure Active Directory OAuth2](https://docs.microsoft.com/en-us/azure/active-directory/develop/v1-overview) Flows. When paired with [Azure Role Based Access](https://docs.microsoft.com/en-us/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#### Note\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* The `Authorization URL` is specific to the Azure public cloud instance. Sovereign clouds have unique Authorization URLs and Azure Active directory configurations. \n* 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.\n* Usage of the [Azure Maps Web SDK](https://aka.ms/amaadmc) allows for configuration based setup of an application for multiple use cases.\n* Currently Azure Active Directory [v1.0](https://docs.microsoft.com/en-us/azure/active-directory/develop/azure-ad-endpoint-comparison) tokens are supported.", - "scopes": { - "user_impersonation": "Impersonates a user's Azure Active Directory account." - } - }, - "apiKeyQuery": { - "type": "apiKey", - "description": "This is a shared key which 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 which 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": "query" - } - }, - "security": [ - { - "azure_auth": [] - }, - { - "apiKeyQuery": [] - } - ], - "responses": { - "202": { - "description": "Request Accepted: The request has been accepted for processing. Please use the URL in the Location Header to retry or access the results.", - "headers": { - "Location": { - "type": "string", - "description": "New URL to check for the results of the long running process." - } - } - }, - "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 Azure Active Directory 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 AAD bearer token.", - "schema": { - "$ref": "#/definitions/ODataErrorResponse" - }, - "headers": { - "WWW-Authenticate": { - "type": "string", - "description": "Bearer realm=\"https://atlas.microsoft.com/\", error=\"invalid_token\", error_description=\"The access token expired\"" - } - } - }, - "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" - } - } - }, - "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 Azure AD security model. It represents a unique ID for the Azure Maps account and can be retrieved from Azure Maps management plane Account API. To use Azure AD 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 1.0", - "type": "string", - "in": "query", - "required": true, - "default": "1.0", - "x-ms-parameter-location": "client" - }, - "Datasetid": { - "name": "datasetid", - "type": "string", - "in": "path", - "description": "The identifier for the dataset to query from.", - "required": true, - "x-ms-parameter-location": "method" - }, - "LimitWfs": { - "name": "limit", - "in": "query", - "type": "number", - "minimum": 1, - "maximum": 50, - "default": 10, - "description": "The optional limit parameter limits the number of features that are presented in the response document.\nOnly features that are on the first level of the collection in the response document are counted. Nested objects contained within the explicitly requested features shall not be counted.\n* Minimum = 1 * Maximum = 50 * Default = 10", - "x-ms-parameter-location": "method" - }, - "Filter": { - "name": "filter", - "in": "query", - "type": "string", - "description": "Filter expression to search for features with specific property values in a given collection. Only feature properties of scalar type and equals operator are supported.\nThis is a special parameter where the parameter name is a case sensitive property name. The scheme for this parameter is {property name}={property value}. Unless \"filter\" is one of the property names in the collection, \"filter\" should not be used as a parameter name. To search for features with \"name\" property value \"21N13\", use \"name=21N13\".\nMultiple filters are supported and should be represented as multiple query parameters. E.g., =&= String values are case sensitive.", - "x-ms-parameter-location": "method" - }, - "Bbox": { - "name": "bbox", - "in": "query", - "type": "string", - "description": "Only features that have a geometry that intersects the supplied bounding box are selected.\n* Lower left corner, coordinate axis 1 * Lower left corner, coordinate axis 2 * Upper right corner, coordinate axis 1 * Upper right corner, coordinate axis 2\nThe coordinate reference system of the values is WGS84 longitude/latitude (http://www.opengis.net/def/crs/OGC/1.3/CRS84) unless a different coordinate reference system is specified in the parameter `bbox-crs`.\nFor WGS84 longitude/latitude the values are in most cases the sequence of minimum longitude, minimum latitude, maximum longitude and maximum latitude. However, in cases where the box spans the antimeridian the first value (west-most box edge) is larger than the third value (east-most box edge).", - "required": false, - "x-ms-parameter-location": "method" - }, - "CollectionId": { - "name": "collectionId", - "in": "path", - "type": "string", - "required": true, - "description": "Identifier (name) of a specific collection", - "x-ms-parameter-location": "method" - }, - "FeatureId": { - "name": "featureId", - "in": "path", - "type": "string", - "description": "Local identifier of a specific feature", - "required": true, - "x-ms-parameter-location": "method" - } - }, - "paths": { - "/wfs/datasets/{datasetid}/": { - "get": { - "x-publish": true, - "description": "Creator makes it possible to develop applications based on your private indoor map data using Azure Maps API and SDK. The Web Feature Service (WFS) API is part of Creator. WFS API follows the [Open Geospatial Consortium API standard for Features](http://docs.opengeospatial.org/is/17-069r3/17-069r3.html) to query [Datasets](https://docs.microsoft.com/en-us/rest/api/maps/dataset/createpreview). \nA dataset consists of multiple feature collections. A feature collection is a collection of features of a similar type, based on a common schema.\nThe Get Landing Page API provides links to the API definition, the Conformance statements and the metadata about the feature data in this dataset.", - "operationId": "WFS_GetLandingPagePreview", - "x-ms-examples": { - "GetLandingPage": { - "$ref": "./examples/GetLandingPage.json" - } - }, - "parameters": [ - { - "$ref": "#/parameters/ClientId" - }, - { - "$ref": "#/parameters/SubscriptionKey" - }, - { - "$ref": "#/parameters/ApiVersion" - }, - { - "$ref": "#/parameters/Datasetid" - } - ], - "responses": { - "200": { - "description": "Ok", - "schema": { - "$ref": "#/definitions/Root" - } - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" - } - } - } - }, - "/wfs/datasets/{datasetid}/conformance": { - "get": { - "description": "Creator makes it possible to develop applications based on your private indoor map data using Azure Maps API and SDK. The Web Feature Service (WFS) API is part of Creator. WFS API follows the [Open Geospatial Consortium API standard for Features](http://docs.opengeospatial.org/is/17-069r3/17-069r3.html) to query [Datasets](https://docs.microsoft.com/en-us/rest/api/maps/dataset/createpreview). \nA dataset consists of multiple feature collections. A feature collection is a collection of features of a similar type, based on a common schema.\nThe Get Requirements Classes lists all requirements classes specified in the standard that the server conforms to.", - "x-publish": true, - "operationId": "WFS_GetRequirementsClassesPreview", - "x-ms-examples": { - "GetConformance": { - "$ref": "./examples/GetConformance.json" - } - }, - "parameters": [ - { - "$ref": "#/parameters/ClientId" - }, - { - "$ref": "#/parameters/SubscriptionKey" - }, - { - "$ref": "#/parameters/ApiVersion" - }, - { - "$ref": "#/parameters/Datasetid" - } - ], - "responses": { - "200": { - "description": "Ok", - "schema": { - "$ref": "#/definitions/ReqClasses" - } - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" - } - } - } - }, - "/wfs/datasets/{datasetid}/collections": { - "get": { - "description": "Creator makes it possible to develop applications based on your private indoor map data using Azure Maps API and SDK. The Web Feature Service (WFS) API is part of Creator. WFS API follows the [Open Geospatial Consortium API standard for Features](http://docs.opengeospatial.org/is/17-069r3/17-069r3.html) to query [Datasets](https://docs.microsoft.com/en-us/rest/api/maps/dataset/createpreview). \nA dataset consists of multiple feature collections. A feature collection is a collection of features of a similar type, based on a common schema.\nThe Collections Description API provides descriptions of all the collections in a given dataset.", - "operationId": "WFS_CollectionsDescriptionPreview", - "x-publish": true, - "x-ms-examples": { - "GetCollections": { - "$ref": "./examples/GetCollections.json" - } - }, - "parameters": [ - { - "$ref": "#/parameters/ClientId" - }, - { - "$ref": "#/parameters/SubscriptionKey" - }, - { - "$ref": "#/parameters/ApiVersion" - }, - { - "$ref": "#/parameters/Datasetid" - } - ], - "responses": { - "200": { - "description": "Ok", - "schema": { - "$ref": "#/definitions/Content" - } - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" - } - } - } - }, - "/wfs/datasets/{datasetid}/collections/{collectionId}": { - "get": { - "description": "Creator makes it possible to develop applications based on your private indoor map data using Azure Maps API and SDK. The Web Feature Service (WFS) API is part of Creator. WFS API follows the [Open Geospatial Consortium API standard for Features](http://docs.opengeospatial.org/is/17-069r3/17-069r3.html) to query [Datasets](https://docs.microsoft.com/en-us/rest/api/maps/dataset/createpreview). \nA dataset consists of multiple feature collections. A feature collection is a collection of features of a similar type, based on a common schema.\n \nThe Collection Description API provides the description of a given collection. It includes the links to the operations that can be performed on the collection.", - "operationId": "WFS_CollectionDescriptionPreview", - "x-publish": true, - "x-ms-examples": { - "GetCollection": { - "$ref": "./examples/GetCollection.json" - } - }, - "parameters": [ - { - "$ref": "#/parameters/ClientId" - }, - { - "$ref": "#/parameters/SubscriptionKey" - }, - { - "$ref": "#/parameters/ApiVersion" - }, - { - "$ref": "#/parameters/Datasetid" - }, - { - "$ref": "#/parameters/CollectionId" - } - ], - "responses": { - "200": { - "description": "Ok", - "schema": { - "$ref": "#/definitions/CollectionInfo" - } - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" - } - } - } - }, - "/wfs/datasets/{datasetid}/collections/{collectionId}/definition": { - "get": { - "description": "Creator makes it possible to develop applications based on your private indoor map data using Azure Maps API and SDK. The Web Feature Service (WFS) API is part of Creator. WFS API follows the [Open Geospatial Consortium API standard for Features](http://docs.opengeospatial.org/is/17-069r3/17-069r3.html) to query [Datasets](https://docs.microsoft.com/en-us/rest/api/maps/dataset/createpreview). \nA dataset consists of multiple feature collections. A feature collection is a collection of features of a similar type, based on a common schema.\n \nThe Collection Definition API provides the detailed data model of a given collection.", - "operationId": "WFS_CollectionDefinitionPreview", - "x-publish": true, - "x-ms-examples": { - "GetCollectionDefinition": { - "$ref": "./examples/GetCollectionDefinition.json" - } - }, - "parameters": [ - { - "$ref": "#/parameters/ClientId" - }, - { - "$ref": "#/parameters/SubscriptionKey" - }, - { - "$ref": "#/parameters/ApiVersion" - }, - { - "$ref": "#/parameters/Datasetid" - }, - { - "$ref": "#/parameters/CollectionId" - } - ], - "responses": { - "200": { - "description": "Ok", - "schema": { - "$ref": "#/definitions/CollectionDefinition" - } - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" - } - } - } - }, - "/wfs/datasets/{datasetid}/collections/{collectionId}/items": { - "get": { - "description": "Creator makes it possible to develop applications based on your private indoor map data using Azure Maps API and SDK. The Web Feature Service (WFS) API is part of Creator. WFS API follows the [Open Geospatial Consortium API standard for Features](http://docs.opengeospatial.org/is/17-069r3/17-069r3.html) to query [Datasets](https://docs.microsoft.com/en-us/rest/api/maps/dataset/createpreview). \nA dataset consists of multiple feature collections. A feature collection is a collection of features of a similar type, based on a common schema.\nThe Get Features API returns the list of features in the given collection.", - "operationId": "WFS_GetFeaturesPreview", - "x-publish": true, - "x-ms-examples": { - "Getitems": { - "$ref": "./examples/GetItems.json" - } - }, - "parameters": [ - { - "$ref": "#/parameters/ClientId" - }, - { - "$ref": "#/parameters/SubscriptionKey" - }, - { - "$ref": "#/parameters/ApiVersion" - }, - { - "$ref": "#/parameters/Datasetid" - }, - { - "$ref": "#/parameters/CollectionId" - }, - { - "$ref": "#/parameters/LimitWfs" - }, - { - "$ref": "#/parameters/Bbox" - }, - { - "$ref": "#/parameters/Filter" - } - ], - "responses": { - "200": { - "description": "Ok", - "schema": { - "$ref": "#/definitions/FeatureCollectionGeoJSON" - } - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" - } - } - } - }, - "/wfs/datasets/{datasetid}/collections/{collectionId}/items/{featureId}": { - "get": { - "description": "Creator makes it possible to develop applications based on your private indoor map data using Azure Maps API and SDK. The Web Feature Service (WFS) API is part of Creator. WFS API follows the [Open Geospatial Consortium API standard for Features](http://docs.opengeospatial.org/is/17-069r3/17-069r3.html) to query [Datasets](https://docs.microsoft.com/en-us/rest/api/maps/dataset/createpreview). \nA dataset consists of multiple feature collections. A feature collection is a collection of features of a similar type, based on a common schema.\nThe Get Feature API returns the feature identified by the provided id in the given collection.", - "x-publish": true, - "operationId": "WFS_GetFeaturePreview", - "x-ms-examples": { - "GetFeature": { - "$ref": "./examples/GetItem.json" - } - }, - "parameters": [ - { - "$ref": "#/parameters/SubscriptionKey" - }, - { - "$ref": "#/parameters/ApiVersion" - }, - { - "$ref": "#/parameters/Datasetid" - }, - { - "$ref": "#/parameters/CollectionId" - }, - { - "$ref": "#/parameters/FeatureId" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/Feature" - } - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" - } - } - }, - "delete": { - "description": "Creator makes it possible to develop applications based on your private indoor map data using Azure Maps API and SDK. The Web Feature Service (WFS) API is part of Creator. WFS API follows the [Open Geospatial Consortium API standard for Features](http://docs.opengeospatial.org/is/17-069r3/17-069r3.html) to query [Datasets](https://docs.microsoft.com/en-us/rest/api/maps/dataset/createpreview). \nA dataset consists of multiple feature collections. A feature collection is a collection of features of a similar type, based on a common schema.\nThe Delete Feature API deletes the feature identified by the provided id in the given collection. At this point this API supports only facility features. Deleting a facility feature deletes all the child features of that facility recursively.", - "x-publish": true, - "operationId": "WFS_DeleteFeaturePreview", - "x-ms-examples": { - "GetFeature": { - "$ref": "./examples/DeleteItem.json" - } - }, - "parameters": [ - { - "$ref": "#/parameters/SubscriptionKey" - }, - { - "$ref": "#/parameters/ApiVersion" - }, - { - "$ref": "#/parameters/Datasetid" - }, - { - "$ref": "#/parameters/CollectionId" - }, - { - "$ref": "#/parameters/FeatureId" - } - ], - "responses": { - "204": { - "description": "Feature Deleted." - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" - } - } - } - } - }, - "definitions": { - "ODataErrorResponse": { - "type": "object", - "description": "This response object is returned when an error occurs in the Maps API.", - "properties": { - "error": { - "$ref": "#/definitions/ODataError" - } - } - }, - "ODataError": { - "type": "object", - "description": "This object is returned when an error occurs in the 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." - } - } - }, - "Exception": { - "type": "object", - "required": [ - "code" - ], - "properties": { - "code": { - "type": "string" - }, - "description": { - "type": "string" - } - } - }, - "Root": { - "type": "object", - "required": [ - "links" - ], - "properties": { - "links": { - "type": "array", - "items": { - "$ref": "#/definitions/Link" - } - } - } - }, - "ReqClasses": { - "type": "object", - "required": [ - "conformsTo" - ], - "properties": { - "conformsTo": { - "type": "array", - "items": { - "type": "string" - }, - "example": [ - "http://www.opengis.net/spec/wfs-1/3.0/req/core", - "http://www.opengis.net/spec/wfs-1/3.0/req/oas30", - "http://www.opengis.net/spec/wfs-1/3.0/req/html", - "http://www.opengis.net/spec/wfs-1/3.0/req/geojson" - ] - } - } - }, - "Link": { - "description": "Links to other WFS endpoints", - "type": "object", - "required": [ - "href" - ], - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string", - "example": "prev" - }, - "type": { - "type": "string", - "example": "application/geo+json" - }, - "hreflang": { - "type": "string", - "example": "en" - }, - "title": { - "type": "string" - } - } - }, - "Content": { - "type": "object", - "required": [ - "links", - "collections" - ], - "properties": { - "links": { - "type": "array", - "items": { - "$ref": "#/definitions/Link" - }, - "example": [ - { - "href": "http://data.example.org/collections.json", - "rel": "self", - "type": "application/json", - "title": "this document" - }, - { - "href": "http://data.example.org/collections.html", - "rel": "alternate", - "type": "text/html", - "title": "this document as HTML" - }, - { - "href": "http://schemas.example.org/1.0/foobar.xsd", - "rel": "describedBy", - "type": "application/xml", - "title": "XML schema for Acme Corporation data" - } - ] - }, - "collections": { - "type": "array", - "items": { - "$ref": "#/definitions/CollectionInfo" - } - } - } - }, - "Version": { - "type": "object", - "required": [ - "version", - "revisionTimestamp", - "links" - ], - "properties": { - "version": { - "description": "version number of the dataset", - "type": "string", - "example": "1.0.0" - }, - "revisionTimestamp": { - "description": "timestamp of the revision", - "type": "string", - "example": "2020-01-02T03:04:05" - }, - "links": { - "type": "array", - "items": { - "$ref": "#/definitions/Link" - }, - "example": [ - { - "href": "http://data.example.org/collections.json", - "rel": "self", - "type": "application/json", - "title": "this document" - }, - { - "href": "http://data.example.org/collections.html", - "rel": "alternate", - "type": "text/html", - "title": "this document as HTML" - }, - { - "href": "http://schemas.example.org/1.0/foobar.xsd", - "rel": "describedBy", - "type": "application/xml", - "title": "XML schema for Acme Corporation data" - } - ] - } - } - }, - "CollectionInfo": { - "type": "object", - "required": [ - "name", - "links" - ], - "properties": { - "name": { - "description": "identifier of the collection used, for example, in URIs", - "type": "string", - "example": "buildings" - }, - "title": { - "description": "human readable title of the collection", - "type": "string", - "example": "Buildings" - }, - "description": { - "description": "a description of the features in the collection", - "type": "string", - "example": "Buildings in the city of Bonn." - }, - "links": { - "type": "array", - "items": { - "$ref": "#/definitions/Link" - }, - "example": [ - { - "href": "http://data.example.org/collections/buildings/items", - "rel": "item", - "type": "application/geo+json", - "title": "Buildings" - }, - { - "href": "http://example.org/concepts/building.html", - "rel": "describedBy", - "type": "text/html", - "title": "Feature catalogue for buildings" - } - ] - } - } - }, - "CollectionDefinition": { - "description": "collection of GeoJSON features", - "type": "object", - "required": [ - "idPrefix", - "name", - "geometryType", - "featureTypes" - ], - "properties": { - "description": { - "description": "describes the collection", - "type": "string" - }, - "idPrefix": { - "description": "prefix of the collection used", - "type": "string", - "example": "BLD" - }, - "name": { - "description": "identifier of the collection used, for example, in URIs", - "type": "string", - "example": "buildings" - }, - "title": { - "description": "title of collection", - "type": "string", - "example": "Feature Class buildings" - }, - "geometryType": { - "description": "type of geometry returned", - "type": "string", - "enum": [ - "Point", - "MultiPoint", - "LineString", - "MultiLineString", - "Polygon", - "MultiPolygon", - "GeometryCollection" - ] - }, - "featureTypes": { - "description": "type of features returned", - "type": "array", - "items": { - "type": "string" - } - }, - "properties": { - "description": "attributes of the collection used", - "type": "array", - "items": { - "$ref": "#/definitions/DefinitionProperties" - } - }, - "links": { - "type": "array", - "items": { - "$ref": "#/definitions/Link" - } - } - } - }, - "DefinitionProperties": { - "type": "object", - "required": [ - "name", - "required", - "type" - ], - "properties": { - "name": { - "description": "name of attribute", - "type": "string", - "example": "external_id" - }, - "required": { - "description": "is attribute required", - "type": "boolean" - }, - "type": { - "description": "type of attribute", - "type": "object" - } - } - }, - "FeatureCollectionGeoJSON": { - "type": "object", - "required": [ - "type", - "features" - ], - "properties": { - "type": { - "type": "string" - }, - "numberReturned": { - "type": "integer" - }, - "features": { - "type": "array", - "items": { - "$ref": "#/definitions/FeatureGeoJSON" - } - }, - "links": { - "type": "array", - "items": { - "$ref": "#/definitions/Link" - } - } - } - }, - "Feature": { - "type": "object", - "required": [ - "feature" - ], - "properties": { - "feature": { - "$ref": "#/definitions/FeatureGeoJSON" - }, - "links": { - "type": "array", - "items": { - "$ref": "#/definitions/Link" - } - } - } - }, - "FeatureGeoJSON": { - "description": "GeoJSON Feature", - "type": "object", - "required": [ - "type", - "geometry", - "properties" - ], - "properties": { - "type": { - "description": "feature", - "type": "string" - }, - "geometry": { - "description": "This represents the geometry for one or more geographical features (parks, state boundary etc.) and should be a `GeoJSON` compliant type. Please refer to [RFC 7946](https://tools.ietf.org/html/rfc7946) for details.", - "type": "object" - }, - "properties": { - "description": "Additional properties of the feature.", - "type": "object" - }, - "id": { - "description": "Identifier for the feature.", - "type": "string" - }, - "featureType": { - "description": "The type of the feature. The value depends on the data model the current feature is part of. Some data models may have an empty value.", - "type": "string" - } - } - } - } -} diff --git a/specification/maps/data-plane/Microsoft.Maps/WFS/preview/2.0/examples/DeleteFeature.json b/specification/maps/data-plane/Microsoft.Maps/WFS/preview/2.0/examples/DeleteFeature.json new file mode 100644 index 000000000000..e27d3eff14bf --- /dev/null +++ b/specification/maps/data-plane/Microsoft.Maps/WFS/preview/2.0/examples/DeleteFeature.json @@ -0,0 +1,12 @@ +{ + "parameters": { + "geography": "us", + "api-version": "2.0", + "datasetId": "218fda98-e638-0edf-5ef7-28491ff3bed4", + "collectionId": "facility", + "featureId": "FCL39" + }, + "responses": { + "204": {} + } +} diff --git a/specification/maps/data-plane/Microsoft.Maps/WFS/preview/2.0/examples/DeleteItem.json b/specification/maps/data-plane/Microsoft.Maps/WFS/preview/2.0/examples/DeleteItem.json deleted file mode 100644 index 5f7f389b443e..000000000000 --- a/specification/maps/data-plane/Microsoft.Maps/WFS/preview/2.0/examples/DeleteItem.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "parameters": { - "geography": "us", - "api-version": "2.0", - "datasetid": "218fda98-e638-0edf-5ef7-28491ff3bed4", - "subscription-key": "[subscription-key]", - "collectionId": "facility", - "featureId": "FCL39" - }, - "responses": { - "204": {}, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive." - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found: the requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "An error occurred while processing the request. Please try again later." - } - } - } - } -} diff --git a/specification/maps/data-plane/Microsoft.Maps/WFS/preview/2.0/examples/GetCollection.json b/specification/maps/data-plane/Microsoft.Maps/WFS/preview/2.0/examples/GetCollection.json index 6cb01b9fb6e5..9f263859487b 100644 --- a/specification/maps/data-plane/Microsoft.Maps/WFS/preview/2.0/examples/GetCollection.json +++ b/specification/maps/data-plane/Microsoft.Maps/WFS/preview/2.0/examples/GetCollection.json @@ -2,8 +2,7 @@ "parameters": { "geography": "us", "api-version": "2.0", - "datasetid": "218fda98-e638-0edf-5ef7-28491ff3bed4", - "subscription-key": "[subscription-key]", + "datasetId": "218fda98-e638-0edf-5ef7-28491ff3bed4", "collectionId": "unit" }, "responses": { @@ -30,51 +29,6 @@ } ] } - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive." - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found: the requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "An error occurred while processing the request. Please try again later." - } - } } } } diff --git a/specification/maps/data-plane/Microsoft.Maps/WFS/preview/2.0/examples/GetCollectionDefinition.json b/specification/maps/data-plane/Microsoft.Maps/WFS/preview/2.0/examples/GetCollectionDefinition.json index 765d1761b535..e2e020b432c8 100644 --- a/specification/maps/data-plane/Microsoft.Maps/WFS/preview/2.0/examples/GetCollectionDefinition.json +++ b/specification/maps/data-plane/Microsoft.Maps/WFS/preview/2.0/examples/GetCollectionDefinition.json @@ -2,8 +2,7 @@ "parameters": { "geography": "us", "api-version": "2.0", - "datasetid": "218fda98-e638-0edf-5ef7-28491ff3bed4", - "subscription-key": "[subscription-key]", + "datasetId": "218fda98-e638-0edf-5ef7-28491ff3bed4", "collectionId": "unit" }, "responses": { @@ -38,11 +37,48 @@ "required": false, "type": "boolean" }, + { + "name": "navigableBy", + "required": false, + "type": { + "array": { + "enum": [ + "pedestrian", + "wheelchair", + "machine", + "bicycle", + "automobile", + "hiredAuto", + "bus", + "railcar", + "emergency", + "ferry", + "boat" + ] + } + } + }, { "name": "isRoutable", "required": false, "type": "boolean" }, + { + "name": "routeThroughBehavior", + "required": false, + "type": { + "enum": [ + "disallowed", + "allowed", + "preferred" + ] + } + }, + { + "name": "nonPublic", + "required": false, + "type": "boolean" + }, { "name": "levelId", "required": true, @@ -111,51 +147,6 @@ } ] } - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive." - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found: the requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "An error occurred while processing the request. Please try again later." - } - } } } } diff --git a/specification/maps/data-plane/Microsoft.Maps/WFS/preview/2.0/examples/GetCollections.json b/specification/maps/data-plane/Microsoft.Maps/WFS/preview/2.0/examples/GetCollections.json index 678e45acb725..ab9196a76fc6 100644 --- a/specification/maps/data-plane/Microsoft.Maps/WFS/preview/2.0/examples/GetCollections.json +++ b/specification/maps/data-plane/Microsoft.Maps/WFS/preview/2.0/examples/GetCollections.json @@ -2,8 +2,7 @@ "parameters": { "geography": "us", "api-version": "2.0", - "datasetid": "218fda98-e638-0edf-5ef7-28491ff3bed4", - "subscription-key": "[subscription-key]" + "datasetId": "218fda98-e638-0edf-5ef7-28491ff3bed4" }, "responses": { "200": { @@ -249,51 +248,6 @@ } ] } - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive." - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found: the requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "An error occurred while processing the request. Please try again later." - } - } } } } diff --git a/specification/maps/data-plane/Microsoft.Maps/WFS/preview/2.0/examples/GetConformance.json b/specification/maps/data-plane/Microsoft.Maps/WFS/preview/2.0/examples/GetConformance.json index 2384e3bf7945..00fc7956f640 100644 --- a/specification/maps/data-plane/Microsoft.Maps/WFS/preview/2.0/examples/GetConformance.json +++ b/specification/maps/data-plane/Microsoft.Maps/WFS/preview/2.0/examples/GetConformance.json @@ -2,8 +2,7 @@ "parameters": { "geography": "us", "api-version": "2.0", - "datasetid": "218fda98-e638-0edf-5ef7-28491ff3bed4", - "subscription-key": "[subscription-key]" + "datasetId": "218fda98-e638-0edf-5ef7-28491ff3bed4" }, "responses": { "200": { @@ -15,51 +14,6 @@ "http://tempuri.org/wfs/3.0/edit" ] } - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive." - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found: the requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "An error occurred while processing the request. Please try again later." - } - } } } } diff --git a/specification/maps/data-plane/Microsoft.Maps/WFS/preview/2.0/examples/GetItem.json b/specification/maps/data-plane/Microsoft.Maps/WFS/preview/2.0/examples/GetFeature.json similarity index 61% rename from specification/maps/data-plane/Microsoft.Maps/WFS/preview/2.0/examples/GetItem.json rename to specification/maps/data-plane/Microsoft.Maps/WFS/preview/2.0/examples/GetFeature.json index e62f4c285a2d..2d90e3409188 100644 --- a/specification/maps/data-plane/Microsoft.Maps/WFS/preview/2.0/examples/GetItem.json +++ b/specification/maps/data-plane/Microsoft.Maps/WFS/preview/2.0/examples/GetFeature.json @@ -2,8 +2,7 @@ "parameters": { "geography": "us", "api-version": "2.0", - "datasetid": "218fda98-e638-0edf-5ef7-28491ff3bed4", - "subscription-key": "[subscription-key]", + "datasetId": "218fda98-e638-0edf-5ef7-28491ff3bed4", "collectionId": "unit", "featureId": "UNIT39" }, @@ -12,7 +11,7 @@ "body": { "ontology": "Facility-2.0", "feature": { - "type": "feature", + "type": "Feature", "geometry": { "type": "Polygon", "coordinates": [ @@ -52,7 +51,12 @@ "originalId": "ddbbb583-4621-4e11-8859-299d1057e843", "categoryId": "CTG10", "isOpenArea": false, + "navigableBy": [ + "pedestrian" + ], "isRoutable": false, + "routeThroughBehavior": "allowed", + "nonPublic": false, "levelId": "LVL18", "occupants": [], "addressId": "DIR16", @@ -75,51 +79,6 @@ } ] } - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive." - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found: the requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "An error occurred while processing the request. Please try again later." - } - } } } } diff --git a/specification/maps/data-plane/Microsoft.Maps/WFS/preview/2.0/examples/GetItems.json b/specification/maps/data-plane/Microsoft.Maps/WFS/preview/2.0/examples/GetFeatures.json similarity index 65% rename from specification/maps/data-plane/Microsoft.Maps/WFS/preview/2.0/examples/GetItems.json rename to specification/maps/data-plane/Microsoft.Maps/WFS/preview/2.0/examples/GetFeatures.json index 6610cc697011..baadf9b72821 100644 --- a/specification/maps/data-plane/Microsoft.Maps/WFS/preview/2.0/examples/GetItems.json +++ b/specification/maps/data-plane/Microsoft.Maps/WFS/preview/2.0/examples/GetFeatures.json @@ -2,8 +2,7 @@ "parameters": { "geography": "us", "api-version": "2.0", - "datasetid": "018fda98-e638-0edf-5ef7-28491ff3bed4", - "subscription-key": "[subscription-key]", + "datasetId": "018fda98-e638-0edf-5ef7-28491ff3bed4", "collectionId": "unit", "limit": 1, "bbox": "-122, 47, -120, 46" @@ -15,7 +14,7 @@ "ontology": "Facility-2.0", "features": [ { - "type": "feature", + "type": "Feature", "geometry": { "type": "Polygon", "coordinates": [ @@ -55,7 +54,12 @@ "originalId": "ddbbb583-4621-4e11-8859-299d1057e843", "categoryId": "CTG10", "isOpenArea": false, + "navigableBy": [ + "pedestrian" + ], "isRoutable": false, + "routeThroughBehavior": "allowed", + "nonPublic": false, "levelId": "LVL18", "occupants": [], "addressId": "DIR16", @@ -84,51 +88,6 @@ } ] } - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive." - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found: the requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "An error occurred while processing the request. Please try again later." - } - } } } } diff --git a/specification/maps/data-plane/Microsoft.Maps/WFS/preview/2.0/examples/GetLandingPage.json b/specification/maps/data-plane/Microsoft.Maps/WFS/preview/2.0/examples/GetLandingPage.json index 06c981081250..488dc128f5fc 100644 --- a/specification/maps/data-plane/Microsoft.Maps/WFS/preview/2.0/examples/GetLandingPage.json +++ b/specification/maps/data-plane/Microsoft.Maps/WFS/preview/2.0/examples/GetLandingPage.json @@ -2,8 +2,7 @@ "parameters": { "geography": "us", "api-version": "2.0", - "datasetid": "218fda98-e638-0edf-5ef7-28491ff3bed4", - "subscription-key": "[subscription-key]" + "datasetId": "218fda98-e638-0edf-5ef7-28491ff3bed4" }, "responses": { "200": { @@ -37,51 +36,6 @@ } ] } - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive." - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found: the requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "An error occurred while processing the request. Please try again later." - } - } } } } diff --git a/specification/maps/data-plane/Microsoft.Maps/WFS/preview/2.0/wfs.json b/specification/maps/data-plane/Microsoft.Maps/WFS/preview/2.0/wfs.json index dbd9c75202c5..90cfd266cd87 100644 --- a/specification/maps/data-plane/Microsoft.Maps/WFS/preview/2.0/wfs.json +++ b/specification/maps/data-plane/Microsoft.Maps/WFS/preview/2.0/wfs.json @@ -9,7 +9,7 @@ "hostTemplate": "{geography}.atlas.microsoft.com", "parameters": [ { - "$ref": "#/parameters/GeographicResourceLocation" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/GeographicResourceLocation" } ] }, @@ -18,8 +18,20 @@ ], "consumes": [], "produces": [ - "application/json", - "application/xml" + "application/json" + ], + "security": [ + { + "azure_auth": [ + "user_impersonation" + ] + }, + { + "SubscriptionKeyInHeader": [] + }, + { + "SubscriptionKeyInQuery": [] + } ], "securityDefinitions": { "azure_auth": { @@ -28,130 +40,37 @@ "flow": "implicit", "description": "These are the [Azure Active Directory OAuth2](https://docs.microsoft.com/en-us/azure/active-directory/develop/v1-overview) Flows. When paired with [Azure Role Based Access](https://docs.microsoft.com/en-us/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#### Note\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* The `Authorization URL` is specific to the Azure public cloud instance. Sovereign clouds have unique Authorization URLs and Azure Active directory configurations. \n* 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.\n* Usage of the [Azure Maps Web SDK](https://aka.ms/amaadmc) allows for configuration based setup of an application for multiple use cases.\n* Currently Azure Active Directory [v1.0](https://docs.microsoft.com/en-us/azure/active-directory/develop/azure-ad-endpoint-comparison) tokens are supported.", "scopes": { - "user_impersonation": "Impersonates a user's Azure Active Directory account." + "user_impersonation": "impersonate your user account" } }, - "apiKeyQuery": { + "SubscriptionKeyInHeader": { "type": "apiKey", - "description": "This is a shared key which 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 which 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": "query" - } - }, - "security": [ - { - "azure_auth": [] - }, - { - "apiKeyQuery": [] - } - ], - "responses": { - "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 Azure Active Directory 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 AAD bearer token.", - "schema": { - "$ref": "#/definitions/ODataErrorResponse" - }, - "headers": { - "WWW-Authenticate": { - "type": "string", - "description": "Bearer realm=\"https://atlas.microsoft.com/\", error=\"invalid_token\", error_description=\"The access token expired\"" - } - } - }, - "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" - } + "in": "header" }, - "500": { - "description": "An error occurred while processing the request. Please try again later.", - "schema": { - "$ref": "#/definitions/ODataErrorResponse" - } + "SubscriptionKeyInQuery": { + "type": "apiKey", + "name": "subscription-key", + "in": "query" } }, + "responses": {}, "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 Azure AD security model. It represents a unique ID for the Azure Maps account and can be retrieved from Azure Maps management plane Account API. To use Azure AD 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": { + "WFSApiVersionV2": { "name": "api-version", - "description": "Version number of Azure Maps API. Current version is 2.0", + "description": "Version number of Azure Maps API.", "type": "string", "in": "query", "required": true, "default": "2.0", "x-ms-parameter-location": "client" }, - "Datasetid": { - "name": "datasetid", - "type": "string", - "in": "path", - "description": "The identifier for the dataset to query from.", - "required": true, - "x-ms-parameter-location": "method" - }, "LimitWfs": { "name": "limit", "in": "query", - "type": "number", + "type": "integer", "minimum": 1, "maximum": 50, - "default": 10, "description": "The optional limit parameter limits the number of features that are presented in the response document.\nOnly features that are on the first level of the collection in the response document are counted. Nested objects contained within the explicitly requested features shall not be counted.\n* Minimum = 1 * Maximum = 50 * Default = 10", "x-ms-parameter-location": "method" }, @@ -167,7 +86,6 @@ "in": "query", "type": "string", "description": "Only features that have a geometry that intersects the supplied bounding box are selected.\n* Lower left corner, coordinate axis 1 * Lower left corner, coordinate axis 2 * Upper right corner, coordinate axis 1 * Upper right corner, coordinate axis 2\nThe coordinate reference system of the values is WGS84 longitude/latitude (http://www.opengis.net/def/crs/OGC/1.3/CRS84) unless a different coordinate reference system is specified in the parameter `bbox-crs`.\nFor WGS84 longitude/latitude the values are in most cases the sequence of minimum longitude, minimum latitude, maximum longitude and maximum latitude. However, in cases where the box spans the antimeridian the first value (west-most box edge) is larger than the third value (east-most box edge).", - "required": false, "x-ms-parameter-location": "method" }, "CollectionId": { @@ -188,9 +106,8 @@ } }, "paths": { - "/wfs/datasets/{datasetid}/": { + "/wfs/datasets/{datasetId}/": { "get": { - "x-publish": true, "description": "**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).\n\nCreator makes it possible to develop applications based on your private indoor map data using Azure Maps API and SDK. [This](https://docs.microsoft.com/azure/azure-maps/creator-indoor-maps) article introduces concepts and tools that apply to Azure Maps Creator.\n\n The Web Feature Service (WFS) API is part of Creator. WFS API follows the [Open Geospatial Consortium API standard for Features](http://docs.opengeospatial.org/is/17-069r3/17-069r3.html) to query [Datasets](https://docs.microsoft.com/en-us/rest/api/maps/dataset/createpreview). \nA dataset consists of multiple feature collections. A feature collection is a collection of features of a similar type, based on a common schema.\nThe Get Landing Page API provides links to the API definition, the Conformance statements and the metadata about the feature data in this dataset.", "operationId": "WFS_GetLandingPage", "x-ms-examples": { @@ -200,48 +117,32 @@ }, "parameters": [ { - "$ref": "#/parameters/ClientId" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ClientId" }, { - "$ref": "#/parameters/SubscriptionKey" + "$ref": "#/parameters/WFSApiVersionV2" }, { - "$ref": "#/parameters/ApiVersion" - }, - { - "$ref": "#/parameters/Datasetid" + "$ref": "../../../Dataset/preview/2.0/dataset.json#/parameters/DatasetId" } ], "responses": { "200": { "description": "Ok", "schema": { - "$ref": "#/definitions/Root" + "$ref": "#/definitions/LandingPageResponse" } }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" + "default": { + "$ref": "../../../Common/preview/1.0/common.json#/responses/default" } } } }, - "/wfs/datasets/{datasetid}/conformance": { + "/wfs/datasets/{datasetId}/conformance": { "get": { "description": "**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).\n\nCreator makes it possible to develop applications based on your private indoor map data using Azure Maps API and SDK. [This](https://docs.microsoft.com/azure/azure-maps/creator-indoor-maps) article introduces concepts and tools that apply to Azure Maps Creator.\n\nThe Web Feature Service (WFS) API is part of Creator. WFS API follows the [Open Geospatial Consortium API standard for Features](http://docs.opengeospatial.org/is/17-069r3/17-069r3.html) to query [Datasets](https://docs.microsoft.com/en-us/rest/api/maps/dataset/createpreview). \nA dataset consists of multiple feature collections. A feature collection is a collection of features of a similar type, based on a common schema.\nThe Get Requirements Classes lists all requirements classes specified in the standard that the server conforms to.", - "x-publish": true, - "operationId": "WFS_GetRequirementsClasses", + "operationId": "WFS_GetConformance", "x-ms-examples": { "GetConformance": { "$ref": "./examples/GetConformance.json" @@ -249,48 +150,32 @@ }, "parameters": [ { - "$ref": "#/parameters/ClientId" - }, - { - "$ref": "#/parameters/SubscriptionKey" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ClientId" }, { - "$ref": "#/parameters/ApiVersion" + "$ref": "#/parameters/WFSApiVersionV2" }, { - "$ref": "#/parameters/Datasetid" + "$ref": "../../../Dataset/preview/2.0/dataset.json#/parameters/DatasetId" } ], "responses": { "200": { "description": "Ok", "schema": { - "$ref": "#/definitions/ReqClasses" + "$ref": "#/definitions/ConformanceResponse" } }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" + "default": { + "$ref": "../../../Common/preview/1.0/common.json#/responses/default" } } } }, - "/wfs/datasets/{datasetid}/collections": { + "/wfs/datasets/{datasetId}/collections": { "get": { "description": "**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).\n\nCreator makes it possible to develop applications based on your private indoor map data using Azure Maps API and SDK. [This](https://docs.microsoft.com/azure/azure-maps/creator-indoor-maps) article introduces concepts and tools that apply to Azure Maps Creator.\n\n The Web Feature Service (WFS) API is part of Creator. WFS API follows the [Open Geospatial Consortium API standard for Features](http://docs.opengeospatial.org/is/17-069r3/17-069r3.html) to query [Datasets](https://docs.microsoft.com/en-us/rest/api/maps/dataset/createpreview). \nA dataset consists of multiple feature collections. A feature collection is a collection of features of a similar type, based on a common schema.\nThe Collections Description API provides descriptions of all the collections in a given dataset.", - "operationId": "WFS_CollectionsDescription", - "x-publish": true, + "operationId": "WFS_GetCollections", "x-ms-examples": { "GetCollections": { "$ref": "./examples/GetCollections.json" @@ -298,48 +183,32 @@ }, "parameters": [ { - "$ref": "#/parameters/ClientId" - }, - { - "$ref": "#/parameters/SubscriptionKey" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ClientId" }, { - "$ref": "#/parameters/ApiVersion" + "$ref": "#/parameters/WFSApiVersionV2" }, { - "$ref": "#/parameters/Datasetid" + "$ref": "../../../Dataset/preview/2.0/dataset.json#/parameters/DatasetId" } ], "responses": { "200": { "description": "Ok", "schema": { - "$ref": "#/definitions/Content" + "$ref": "#/definitions/CollectionsResponse" } }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" + "default": { + "$ref": "../../../Common/preview/1.0/common.json#/responses/default" } } } }, - "/wfs/datasets/{datasetid}/collections/{collectionId}": { + "/wfs/datasets/{datasetId}/collections/{collectionId}": { "get": { "description": "**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).\n\nCreator makes it possible to develop applications based on your private indoor map data using Azure Maps API and SDK. [This](https://docs.microsoft.com/azure/azure-maps/creator-indoor-maps) article introduces concepts and tools that apply to Azure Maps Creator.\n\n The Web Feature Service (WFS) API is part of Creator. WFS API follows the [Open Geospatial Consortium API standard for Features](http://docs.opengeospatial.org/is/17-069r3/17-069r3.html) to query [Datasets](https://docs.microsoft.com/en-us/rest/api/maps/dataset/createpreview). \nA dataset consists of multiple feature collections. A feature collection is a collection of features of a similar type, based on a common schema.\n \nThe Collection Description API provides the description of a given collection. It includes the links to the operations that can be performed on the collection.", - "operationId": "WFS_CollectionDescription", - "x-publish": true, + "operationId": "WFS_GetCollection", "x-ms-examples": { "GetCollection": { "$ref": "./examples/GetCollection.json" @@ -347,16 +216,13 @@ }, "parameters": [ { - "$ref": "#/parameters/ClientId" - }, - { - "$ref": "#/parameters/SubscriptionKey" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ClientId" }, { - "$ref": "#/parameters/ApiVersion" + "$ref": "#/parameters/WFSApiVersionV2" }, { - "$ref": "#/parameters/Datasetid" + "$ref": "../../../Dataset/preview/2.0/dataset.json#/parameters/DatasetId" }, { "$ref": "#/parameters/CollectionId" @@ -369,29 +235,16 @@ "$ref": "#/definitions/CollectionInfo" } }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" + "default": { + "$ref": "../../../Common/preview/1.0/common.json#/responses/default" } } } }, - "/wfs/datasets/{datasetid}/collections/{collectionId}/definition": { + "/wfs/datasets/{datasetId}/collections/{collectionId}/definition": { "get": { "description": "**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).\n\nCreator makes it possible to develop applications based on your private indoor map data using Azure Maps API and SDK. [This](https://docs.microsoft.com/azure/azure-maps/creator-indoor-maps) article introduces concepts and tools that apply to Azure Maps Creator.\n\n [This](https://docs.microsoft.com/en-us/azure/azure-maps/creator-indoor-maps) article introduces concepts and tools that apply to Azure Maps Creator. WFS API follows the [Open Geospatial Consortium API standard for Features](http://docs.opengeospatial.org/is/17-069r3/17-069r3.html) to query [Datasets](https://docs.microsoft.com/en-us/rest/api/maps/dataset/createpreview). \nA dataset consists of multiple feature collections. A feature collection is a collection of features of a similar type, based on a common schema.\n \nThe Collection Definition API provides the detailed data model of a given collection.", - "operationId": "WFS_CollectionDefinition", - "x-publish": true, + "operationId": "WFS_GetCollectionDefinition", "x-ms-examples": { "GetCollectionDefinition": { "$ref": "./examples/GetCollectionDefinition.json" @@ -399,16 +252,13 @@ }, "parameters": [ { - "$ref": "#/parameters/ClientId" - }, - { - "$ref": "#/parameters/SubscriptionKey" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ClientId" }, { - "$ref": "#/parameters/ApiVersion" + "$ref": "#/parameters/WFSApiVersionV2" }, { - "$ref": "#/parameters/Datasetid" + "$ref": "../../../Dataset/preview/2.0/dataset.json#/parameters/DatasetId" }, { "$ref": "#/parameters/CollectionId" @@ -418,49 +268,33 @@ "200": { "description": "Ok", "schema": { - "$ref": "#/definitions/CollectionDefinition" + "$ref": "#/definitions/CollectionDefinitionResponse" } }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" + "default": { + "$ref": "../../../Common/preview/1.0/common.json#/responses/default" } } } }, - "/wfs/datasets/{datasetid}/collections/{collectionId}/items": { + "/wfs/datasets/{datasetId}/collections/{collectionId}/items": { "get": { "description": "**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).\n\nCreator makes it possible to develop applications based on your private indoor map data using Azure Maps API and SDK. [This](https://docs.microsoft.com/azure/azure-maps/creator-indoor-maps) article introduces concepts and tools that apply to Azure Maps Creator.\n\n The Web Feature Service (WFS) API is part of Creator. WFS API follows the [Open Geospatial Consortium API standard for Features](http://docs.opengeospatial.org/is/17-069r3/17-069r3.html) to query [Datasets](https://docs.microsoft.com/en-us/rest/api/maps/dataset/createpreview). \nA dataset consists of multiple feature collections. A feature collection is a collection of features of a similar type, based on a common schema.\nThe Get Features API returns the list of features in the given collection.", "operationId": "WFS_GetFeatures", - "x-publish": true, "x-ms-examples": { - "Getitems": { - "$ref": "./examples/GetItems.json" + "GetFeatures": { + "$ref": "./examples/GetFeatures.json" } }, "parameters": [ { - "$ref": "#/parameters/ClientId" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ClientId" }, { - "$ref": "#/parameters/SubscriptionKey" + "$ref": "#/parameters/WFSApiVersionV2" }, { - "$ref": "#/parameters/ApiVersion" - }, - { - "$ref": "#/parameters/Datasetid" + "$ref": "../../../Dataset/preview/2.0/dataset.json#/parameters/DatasetId" }, { "$ref": "#/parameters/CollectionId" @@ -479,46 +313,30 @@ "200": { "description": "Ok", "schema": { - "$ref": "#/definitions/FeatureCollectionGeoJSON" + "$ref": "#/definitions/ExtendedGeoJsonFeatureCollection" } }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" + "default": { + "$ref": "../../../Common/preview/1.0/common.json#/responses/default" } } } }, - "/wfs/datasets/{datasetid}/collections/{collectionId}/items/{featureId}": { + "/wfs/datasets/{datasetId}/collections/{collectionId}/items/{featureId}": { "get": { "description": "**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).\n\nCreator makes it possible to develop applications based on your private indoor map data using Azure Maps API and SDK. [This](https://docs.microsoft.com/azure/azure-maps/creator-indoor-maps) article introduces concepts and tools that apply to Azure Maps Creator.\n\n The Web Feature Service (WFS) API is part of Creator. WFS API follows the [Open Geospatial Consortium API standard for Features](http://docs.opengeospatial.org/is/17-069r3/17-069r3.html) to query [Datasets](https://docs.microsoft.com/en-us/rest/api/maps/dataset/createpreview). \nA dataset consists of multiple feature collections. A feature collection is a collection of features of a similar type, based on a common schema.\nThe Get Feature API returns the feature identified by the provided id in the given collection.", - "x-publish": true, "operationId": "WFS_GetFeature", "x-ms-examples": { "GetFeature": { - "$ref": "./examples/GetItem.json" + "$ref": "./examples/GetFeature.json" } }, "parameters": [ { - "$ref": "#/parameters/SubscriptionKey" + "$ref": "#/parameters/WFSApiVersionV2" }, { - "$ref": "#/parameters/ApiVersion" - }, - { - "$ref": "#/parameters/Datasetid" + "$ref": "../../../Dataset/preview/2.0/dataset.json#/parameters/DatasetId" }, { "$ref": "#/parameters/CollectionId" @@ -531,44 +349,28 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/Feature" + "$ref": "#/definitions/FeatureResponse" } }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" + "default": { + "$ref": "../../../Common/preview/1.0/common.json#/responses/default" } } }, "delete": { "description": "**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).\n\nCreator makes it possible to develop applications based on your private indoor map data using Azure Maps API and SDK. [This](https://docs.microsoft.com/azure/azure-maps/creator-indoor-maps) article introduces concepts and tools that apply to Azure Maps Creator.\n\n The Web Feature Service (WFS) API is part of Creator. WFS API follows the [Open Geospatial Consortium API standard for Features](http://docs.opengeospatial.org/is/17-069r3/17-069r3.html) to query [Datasets](https://docs.microsoft.com/en-us/rest/api/maps/dataset/createpreview). \nA dataset consists of multiple feature collections. A feature collection is a collection of features of a similar type, based on a common schema.\nThe Delete Feature API deletes the feature identified by the provided id in the given collection. At this point this API supports only facility features. Deleting a facility feature deletes all the child features of that facility recursively.", - "x-publish": true, "operationId": "WFS_DeleteFeature", "x-ms-examples": { - "GetFeature": { - "$ref": "./examples/DeleteItem.json" + "DeleteFeature": { + "$ref": "./examples/DeleteFeature.json" } }, "parameters": [ { - "$ref": "#/parameters/SubscriptionKey" - }, - { - "$ref": "#/parameters/ApiVersion" + "$ref": "#/parameters/WFSApiVersionV2" }, { - "$ref": "#/parameters/Datasetid" + "$ref": "../../../Dataset/preview/2.0/dataset.json#/parameters/DatasetId" }, { "$ref": "#/parameters/CollectionId" @@ -581,100 +383,40 @@ "204": { "description": "Feature Deleted." }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" + "default": { + "$ref": "../../../Common/preview/1.0/common.json#/responses/default" } } } } }, "definitions": { - "ODataErrorResponse": { - "type": "object", - "description": "This response object is returned when an error occurs in the Maps API.", - "properties": { - "error": { - "$ref": "#/definitions/ODataError" - } - } - }, - "ODataError": { - "type": "object", - "description": "This object is returned when an error occurs in the 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." - } - } - }, - "Exception": { - "type": "object", - "required": [ - "code" - ], - "properties": { - "code": { - "type": "string" - }, - "description": { - "type": "string" - } - } - }, - "Root": { + "LandingPageResponse": { "type": "object", "required": [ "links" ], "properties": { "ontology": { - "$ref": "#/definitions/Ontology" + "$ref": "../../../Common/preview/1.0/common.json#/definitions/Ontology" }, "links": { + "description": "Links to other WFS endpoints.", "type": "array", "items": { - "$ref": "#/definitions/Link" + "$ref": "#/definitions/WfsEndpointLink" } } } }, - "ReqClasses": { + "ConformanceResponse": { "type": "object", "required": [ "conformsTo" ], "properties": { "conformsTo": { + "description": "List of requirements classes that the server conforms to.", "type": "array", "items": { "type": "string" @@ -688,7 +430,7 @@ } } }, - "Link": { + "WfsEndpointLink": { "description": "Links to other WFS endpoints", "type": "object", "required": [ @@ -696,26 +438,31 @@ ], "properties": { "href": { + "description": "The link target.", "type": "string" }, "rel": { + "description": "The relation type.", "type": "string", "example": "prev" }, "type": { + "description": "A hint indicating what the media type of the result of dereferencing the link should be.", "type": "string", "example": "application/geo+json" }, "hreflang": { + "description": "A hint indicating what the language of the result of dereferencing the link should be.", "type": "string", "example": "en" }, "title": { + "description": "Used to label the destination of a link such that it can be used as a human-readable identifier (e.g., a menu entry) in the language indicated by the Content-Language header field (if present).", "type": "string" } } }, - "Content": { + "CollectionsResponse": { "type": "object", "required": [ "links", @@ -723,12 +470,13 @@ ], "properties": { "ontology": { - "$ref": "#/definitions/Ontology" + "$ref": "../../../Common/preview/1.0/common.json#/definitions/Ontology" }, "links": { + "description": "Links to other WFS endpoints.", "type": "array", "items": { - "$ref": "#/definitions/Link" + "$ref": "#/definitions/WfsEndpointLink" }, "example": [ { @@ -752,6 +500,7 @@ ] }, "collections": { + "description": "All the collections in a given dataset.", "type": "array", "items": { "$ref": "#/definitions/CollectionInfo" @@ -759,52 +508,6 @@ } } }, - "Version": { - "type": "object", - "required": [ - "version", - "revisionTimestamp", - "links" - ], - "properties": { - "version": { - "description": "version number of the dataset", - "type": "string", - "example": "1.0.0" - }, - "revisionTimestamp": { - "description": "timestamp of the revision", - "type": "string", - "example": "2020-01-02T03:04:05" - }, - "links": { - "type": "array", - "items": { - "$ref": "#/definitions/Link" - }, - "example": [ - { - "href": "http://data.example.org/collections.json", - "rel": "self", - "type": "application/json", - "title": "this document" - }, - { - "href": "http://data.example.org/collections.html", - "rel": "alternate", - "type": "text/html", - "title": "this document as HTML" - }, - { - "href": "http://schemas.example.org/1.0/foobar.xsd", - "rel": "describedBy", - "type": "application/xml", - "title": "XML schema for Acme Corporation data" - } - ] - } - } - }, "CollectionInfo": { "type": "object", "required": [ @@ -823,7 +526,7 @@ "example": "Buildings" }, "ontology": { - "$ref": "#/definitions/Ontology" + "$ref": "../../../Common/preview/1.0/common.json#/definitions/Ontology" }, "description": { "description": "a description of the features in the collection", @@ -831,9 +534,10 @@ "example": "Buildings in the city of Bonn." }, "links": { + "description": "Links to other WFS endpoints.", "type": "array", "items": { - "$ref": "#/definitions/Link" + "$ref": "#/definitions/WfsEndpointLink" }, "example": [ { @@ -852,7 +556,7 @@ } } }, - "CollectionDefinition": { + "CollectionDefinitionResponse": { "description": "collection of GeoJSON features", "type": "object", "required": [ @@ -882,7 +586,7 @@ "example": "Feature Class buildings" }, "ontology": { - "$ref": "#/definitions/Ontology" + "$ref": "../../../Common/preview/1.0/common.json#/definitions/Ontology" }, "geometryType": { "description": "type of geometry returned", @@ -895,7 +599,48 @@ "Polygon", "MultiPolygon", "GeometryCollection" - ] + ], + "x-ms-enum": { + "name": "GeoJsonGeometryType", + "modelAsString": true, + "values": [ + { + "value": "Point", + "description": "`GeoJSON Point` geometry.", + "name": "GeoJsonPoint" + }, + { + "value": "MultiPoint", + "description": "`GeoJSON MultiPoint` geometry.", + "name": "GeoJsonMultiPoint" + }, + { + "value": "LineString", + "description": "`GeoJSON LineString` geometry.", + "name": "GeoJsonLineString" + }, + { + "value": "MultiLineString", + "description": "`GeoJSON MultiLineString` geometry.", + "name": "GeoJsonMultiLineString" + }, + { + "value": "Polygon", + "description": "`GeoJSON Polygon` geometry.", + "name": "GeoJsonPolygon" + }, + { + "value": "MultiPolygon", + "description": "`GeoJSON MultiPolygon` geometry.", + "name": "GeoJsonMultiPolygon" + }, + { + "value": "GeometryCollection", + "description": "`GeoJSON GeometryCollection` geometry.", + "name": "GeoJsonGeometryCollection" + } + ] + } }, "featureTypes": { "description": "type of features returned", @@ -905,6 +650,7 @@ } }, "properties": { + "x-ms-client-flatten": true, "description": "attributes of the collection used", "type": "array", "items": { @@ -912,9 +658,10 @@ } }, "links": { + "description": "Links to other WFS endpoints.", "type": "array", "items": { - "$ref": "#/definitions/Link" + "$ref": "#/definitions/WfsEndpointLink" } } } @@ -942,91 +689,58 @@ } } }, - "FeatureCollectionGeoJSON": { + "ExtendedGeoJsonFeatureCollection": { + "description": "A valid `GeoJSON FeatureCollection` object type extended with numberReturned and links array. Please refer to [RFC 7946](https://tools.ietf.org/html/rfc7946#section-3.3) for details.", + "x-ms-discriminator-value": "FeatureCollection", "type": "object", - "required": [ - "type", - "features" - ], - "properties": { - "type": { - "type": "string" + "allOf": [ + { + "$ref": "../../../Common/preview/1.0/common.json#/definitions/GeoJsonFeatureCollection" }, + { + "$ref": "#/definitions/ExtendedGeoJsonFeatureCollectionData" + } + ] + }, + "ExtendedGeoJsonFeatureCollectionData": { + "type": "object", + "properties": { "ontology": { - "$ref": "#/definitions/Ontology" + "$ref": "../../../Common/preview/1.0/common.json#/definitions/Ontology" }, "numberReturned": { + "description": "Number of returned features.", "type": "integer" }, - "features": { - "type": "array", - "items": { - "$ref": "#/definitions/FeatureGeoJSON" - } - }, "links": { + "description": "Links to other WFS endpoints.", "type": "array", "items": { - "$ref": "#/definitions/Link" + "$ref": "#/definitions/WfsEndpointLink" } } } }, - "Feature": { + "FeatureResponse": { "type": "object", "required": [ "feature" ], "properties": { "ontology": { - "$ref": "#/definitions/Ontology" + "$ref": "../../../Common/preview/1.0/common.json#/definitions/Ontology" }, "feature": { - "$ref": "#/definitions/FeatureGeoJSON" + "$ref": "../../../Common/preview/1.0/common.json#/definitions/GeoJsonFeature" }, "links": { + "description": "Links to other WFS endpoints.", "type": "array", "items": { - "$ref": "#/definitions/Link" + "$ref": "#/definitions/WfsEndpointLink" } } } - }, - "FeatureGeoJSON": { - "description": "GeoJSON Feature", - "type": "object", - "required": [ - "type", - "geometry", - "properties" - ], - "properties": { - "type": { - "description": "feature", - "type": "string" - }, - "geometry": { - "description": "This represents the geometry for one or more geographical features (parks, state boundary etc.) and should be a `GeoJSON` compliant type. Please refer to [RFC 7946](https://tools.ietf.org/html/rfc7946) for details.", - "type": "object" - }, - "properties": { - "description": "Additional properties of the feature.", - "type": "object" - }, - "id": { - "description": "Identifier for the feature.", - "type": "string" - }, - "featureType": { - "description": "The type of the feature. The value depends on the data model the current feature is part of. Some data models may have an empty value.", - "type": "string" - } - } - }, - "Ontology": { - "type": "string", - "description": "The ontology version of this dataset. Please refer to this [article](https://docs.microsoft.com/en-us/azure/azure-maps/creator-facility-ontology) for more information about Azure Maps Creator ontologies.", - "readOnly": true } } } diff --git a/specification/maps/data-plane/Microsoft.Maps/Weather/preview/1.0/examples/GetCurrentConditions.json b/specification/maps/data-plane/Microsoft.Maps/Weather/preview/1.0/examples/GetCurrentConditions.json index 7a176b6faf64..46c29b7b55af 100644 --- a/specification/maps/data-plane/Microsoft.Maps/Weather/preview/1.0/examples/GetCurrentConditions.json +++ b/specification/maps/data-plane/Microsoft.Maps/Weather/preview/1.0/examples/GetCurrentConditions.json @@ -1,5 +1,6 @@ { "parameters": { + "geography": "us", "api-version": "1.0", "format": "json", "query": "47.641268,-122.125679" @@ -174,51 +175,6 @@ } ] } - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive." - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found: the requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "An error occurred while processing the request. Please try again later." - } - } } } } diff --git a/specification/maps/data-plane/Microsoft.Maps/Weather/preview/1.0/examples/GetDailyForecast.json b/specification/maps/data-plane/Microsoft.Maps/Weather/preview/1.0/examples/GetDailyForecast.json index 01c9363275db..70f70f61f1b6 100644 --- a/specification/maps/data-plane/Microsoft.Maps/Weather/preview/1.0/examples/GetDailyForecast.json +++ b/specification/maps/data-plane/Microsoft.Maps/Weather/preview/1.0/examples/GetDailyForecast.json @@ -1,5 +1,6 @@ { "parameters": { + "geography": "us", "api-version": "1.0", "format": "json", "query": "62.6490341,30.0734812", @@ -234,51 +235,6 @@ } ] } - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive." - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found: the requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "An error occurred while processing the request. Please try again later." - } - } } } } diff --git a/specification/maps/data-plane/Microsoft.Maps/Weather/preview/1.0/examples/GetDailyIndices.json b/specification/maps/data-plane/Microsoft.Maps/Weather/preview/1.0/examples/GetDailyIndices.json index 660e58e670ca..9220885d2504 100644 --- a/specification/maps/data-plane/Microsoft.Maps/Weather/preview/1.0/examples/GetDailyIndices.json +++ b/specification/maps/data-plane/Microsoft.Maps/Weather/preview/1.0/examples/GetDailyIndices.json @@ -1,5 +1,6 @@ { "parameters": { + "geography": "us", "api-version": "1.0", "format": "json", "query": "43.84745,-79.37849", @@ -201,51 +202,6 @@ } ] } - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive." - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found: the requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "An error occurred while processing the request. Please try again later." - } - } } } } diff --git a/specification/maps/data-plane/Microsoft.Maps/Weather/preview/1.0/examples/GetHourlyForecast.json b/specification/maps/data-plane/Microsoft.Maps/Weather/preview/1.0/examples/GetHourlyForecast.json index f3ea02454b5d..7f4150359173 100644 --- a/specification/maps/data-plane/Microsoft.Maps/Weather/preview/1.0/examples/GetHourlyForecast.json +++ b/specification/maps/data-plane/Microsoft.Maps/Weather/preview/1.0/examples/GetHourlyForecast.json @@ -1,5 +1,6 @@ { "parameters": { + "geography": "us", "api-version": "1.0", "format": "json", "query": "47.632346,-122.138874", @@ -1007,51 +1008,6 @@ } ] } - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive." - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found: the requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "An error occurred while processing the request. Please try again later." - } - } } } } diff --git a/specification/maps/data-plane/Microsoft.Maps/Weather/preview/1.0/examples/GetMinuteForecast.json b/specification/maps/data-plane/Microsoft.Maps/Weather/preview/1.0/examples/GetMinuteForecast.json index d122f2685328..089479b97981 100644 --- a/specification/maps/data-plane/Microsoft.Maps/Weather/preview/1.0/examples/GetMinuteForecast.json +++ b/specification/maps/data-plane/Microsoft.Maps/Weather/preview/1.0/examples/GetMinuteForecast.json @@ -1,5 +1,6 @@ { "parameters": { + "geography": "us", "api-version": "1.0", "format": "json", "query": "47.632346,-122.138874", @@ -130,51 +131,6 @@ } ] } - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive." - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found: the requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "An error occurred while processing the request. Please try again later." - } - } } } } diff --git a/specification/maps/data-plane/Microsoft.Maps/Weather/preview/1.0/examples/GetQuarterDayForecast.json b/specification/maps/data-plane/Microsoft.Maps/Weather/preview/1.0/examples/GetQuarterDayForecast.json index add8661be976..052f229eed32 100644 --- a/specification/maps/data-plane/Microsoft.Maps/Weather/preview/1.0/examples/GetQuarterDayForecast.json +++ b/specification/maps/data-plane/Microsoft.Maps/Weather/preview/1.0/examples/GetQuarterDayForecast.json @@ -1,5 +1,6 @@ { "parameters": { + "geography": "us", "api-version": "1.0", "format": "json", "query": "47.632346,-122.138874", @@ -373,51 +374,6 @@ } ] } - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive." - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found: the requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "An error occurred while processing the request. Please try again later." - } - } } } } diff --git a/specification/maps/data-plane/Microsoft.Maps/Weather/preview/1.0/examples/GetSevereWeatherAlerts.json b/specification/maps/data-plane/Microsoft.Maps/Weather/preview/1.0/examples/GetSevereWeatherAlerts.json index 3974b02f3a3a..2d687d1bcf63 100644 --- a/specification/maps/data-plane/Microsoft.Maps/Weather/preview/1.0/examples/GetSevereWeatherAlerts.json +++ b/specification/maps/data-plane/Microsoft.Maps/Weather/preview/1.0/examples/GetSevereWeatherAlerts.json @@ -1,5 +1,6 @@ { "parameters": { + "geography": "us", "api-version": "1.0", "format": "json", "query": "48.057,-81.091" @@ -62,51 +63,6 @@ } ] } - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive." - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found: the requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "An error occurred while processing the request. Please try again later." - } - } } } } diff --git a/specification/maps/data-plane/Microsoft.Maps/Weather/preview/1.0/examples/GetWeatherAlongRoute.json b/specification/maps/data-plane/Microsoft.Maps/Weather/preview/1.0/examples/GetWeatherAlongRoute.json index 8e2d64d78d09..ca54d81a45c1 100644 --- a/specification/maps/data-plane/Microsoft.Maps/Weather/preview/1.0/examples/GetWeatherAlongRoute.json +++ b/specification/maps/data-plane/Microsoft.Maps/Weather/preview/1.0/examples/GetWeatherAlongRoute.json @@ -1,5 +1,6 @@ { "parameters": { + "geography": "us", "api-version": "1.0", "format": "json", "query": "38.907,-77.037,0:38.907,-77.009,10:38.926,-76.928,20:39.033,-76.852,30:39.168,-76.732,40:39.269,-76.634,50:39.287,-76.612,60" @@ -303,51 +304,6 @@ } ] } - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "400 BadRequest", - "message": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive." - } - } - }, - "401": { - "headers": {}, - "body": { - "error": { - "code": "401 Unauthorized", - "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." - } - } - }, - "403": { - "headers": {}, - "body": { - "error": { - "code": "403 Forbidden", - "message": "Permission, capacity, or authentication issues." - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "404 NotFound", - "message": "Not Found: the requested resource could not be found, but it may be available again in the future." - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "500 InternalServerError", - "message": "An error occurred while processing the request. Please try again later." - } - } } } } diff --git a/specification/maps/data-plane/Microsoft.Maps/Weather/preview/1.0/weather.json b/specification/maps/data-plane/Microsoft.Maps/Weather/preview/1.0/weather.json index 16dc39630f47..17db7cd5830b 100644 --- a/specification/maps/data-plane/Microsoft.Maps/Weather/preview/1.0/weather.json +++ b/specification/maps/data-plane/Microsoft.Maps/Weather/preview/1.0/weather.json @@ -4,7 +4,14 @@ "title": "Azure Maps Weather Service", "version": "1.0" }, - "host": "atlas.microsoft.com", + "x-ms-parameterized-host": { + "hostTemplate": "{geography}.atlas.microsoft.com", + "parameters": [ + { + "$ref": "../../../Common/preview/1.0/common.json#/parameters/GeographicResourceLocation" + } + ] + }, "schemes": [ "https" ], @@ -12,6 +19,19 @@ "produces": [ "application/json" ], + "security": [ + { + "azure_auth": [ + "user_impersonation" + ] + }, + { + "SubscriptionKeyInHeader": [] + }, + { + "SubscriptionKeyInQuery": [] + } + ], "securityDefinitions": { "azure_auth": { "type": "oauth2", @@ -19,130 +39,49 @@ "flow": "implicit", "description": "These are the [Azure Active Directory OAuth2](https://docs.microsoft.com/en-us/azure/active-directory/develop/v1-overview) Flows. When paired with [Azure Role Based Access](https://docs.microsoft.com/en-us/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#### Note\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* The `Authorization URL` is specific to the Azure public cloud instance. Sovereign clouds have unique Authorization URLs and Azure Active directory configurations. \n* 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.\n* Usage of the [Azure Maps Web SDK](https://aka.ms/amaadmc) allows for configuration based setup of an application for multiple use cases.\n* Currently Azure Active Directory [v1.0](https://docs.microsoft.com/en-us/azure/active-directory/develop/azure-ad-endpoint-comparison) tokens are supported.", "scopes": { - "user_impersonation": "Impersonates a user's Azure Active Directory account." + "user_impersonation": "impersonate your user account" } }, - "apiKeyQuery": { + "SubscriptionKeyInHeader": { "type": "apiKey", - "description": "This is a shared key which 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 which 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": "query" - } - }, - "security": [ - { - "azure_auth": [] + "in": "header" }, - { - "apiKeyQuery": [] - } - ], - "responses": { - "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 Azure Active Directory 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 AAD bearer token.", - "schema": { - "$ref": "#/definitions/ODataErrorResponse" - }, - "headers": { - "WWW-Authenticate": { - "type": "string", - "description": "Bearer realm=\"https://atlas.microsoft.com/\", error=\"invalid_token\", error_description=\"The access token expired\"" - } - } - }, - "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" - } + "SubscriptionKeyInQuery": { + "type": "apiKey", + "name": "subscription-key", + "in": "query" } }, + "responses": {}, "parameters": { - "ClientId": { - "name": "x-ms-client-id", - "description": "Specifies which account is intended for usage in conjunction with the Azure AD security model. It represents a unique ID for the Azure Maps account and can be retrieved from Azure Maps management plane Account API. To use Azure AD 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": { + "WeatherApiVersion": { "name": "api-version", - "description": "Version number of Azure Maps API. Current version is 1.0", + "description": "Version number of Azure Maps API.", "type": "string", "in": "query", "required": true, "default": "1.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" - }, "WeatherLanguage": { "name": "language", "description": "Language in which search results should be returned. Should be one of supported IETF language tags, case insensitive. When data in specified language is not available for a specific field, default language is used. Default value is en-us. \n\nPlease refer to [Supported languages](https://docs.microsoft.com/azure/azure-maps/supported-languages) for details.", "type": "string", "in": "query", - "required": false, "x-ms-parameter-location": "method" }, - "WeatherUnit": { + "WeatherDataUnit": { "name": "unit", "description": "Specifies to return the data in either metric units or imperial units. Default value is metric.", - "default": "metric", "in": "query", "type": "string", - "required": false, "enum": [ "metric", "imperial" ], "x-ms-enum": { - "name": "Unit", + "name": "WeatherDataUnit", "modelAsString": true, "values": [ { @@ -164,22 +103,19 @@ "description": "**Get Hourly Forecast**\n\n**Applies to**: S0 and S1 pricing tiers.\n\n\nRequest detailed weather forecast by the hour for the next 1, 12, 24 (1 day), 72 (3 days), 120 (5 days), and 240 hours (10 days) for the given the given coordinate location. The API returns details such as temperature, humidity, wind, precipitation, and ultraviolet (UV) index.\n\nIn S0 you can request hourly forecast for the next 1, 12, 24 hours (1 day), and 72 hours (3 days). In S1 you can also request hourly forecast for the next 120 (5 days) and 240 hours (10 days).", "operationId": "Weather_GetHourlyForecast", "x-ms-examples": { - "HourlyForecast": { + "GetHourlyForecast": { "$ref": "./examples/GetHourlyForecast.json" } }, "parameters": [ { - "$ref": "#/parameters/ClientId" - }, - { - "$ref": "#/parameters/SubscriptionKey" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ClientId" }, { - "$ref": "#/parameters/ApiVersion" + "$ref": "#/parameters/WeatherApiVersion" }, { - "$ref": "#/parameters/JsonFormat" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ResponseFormat" }, { "name": "query", @@ -189,12 +125,11 @@ "required": true }, { - "$ref": "#/parameters/WeatherUnit" + "$ref": "#/parameters/WeatherDataUnit" }, { "name": "duration", "description": "Time frame of the returned weather forecast. By default, the forecast data for next hour will be returned. Available values are\n * `1` - Return forecast data for the next hour. Default value.\n * `12` - Return hourly forecast for next 12 hours.\n * `24` - Return hourly forecast for next 24 hours.\n * `72` - Return hourly forecast for next 72 hours (3 days).\n * `120` - Return hourly forecast for next 120 hours (5 days). Only available in S1 SKU. \n * `240` - Return hourly forecast for next 240 hours (10 days). Only available in S1 SKU.", - "default": 1, "in": "query", "type": "integer" }, @@ -209,20 +144,8 @@ "$ref": "#/definitions/HourlyForecastResponse" } }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" + "default": { + "$ref": "../../../Common/preview/1.0/common.json#/responses/default" } } } @@ -232,22 +155,19 @@ "description": "**Get Minute Forecast**\n \n \n**Applies to**: S1 pricing tier.\n\n\nGet Minute Forecast service returns minute-by-minute forecasts for a given location for the next 120 minutes. Users can request weather forecasts in the interval of 1, 5 and 15 minutes. The response will include details such as the type of precipitation (including rain, snow, or a mixture of both), start time, and precipitation intensity value (dBZ).", "operationId": "Weather_GetMinuteForecast", "x-ms-examples": { - "MinuteForecast": { + "GetMinuteForecast": { "$ref": "./examples/GetMinuteForecast.json" } }, "parameters": [ { - "$ref": "#/parameters/ClientId" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ClientId" }, { - "$ref": "#/parameters/SubscriptionKey" + "$ref": "#/parameters/WeatherApiVersion" }, { - "$ref": "#/parameters/ApiVersion" - }, - { - "$ref": "#/parameters/JsonFormat" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ResponseFormat" }, { "name": "query", @@ -259,7 +179,6 @@ { "name": "interval", "description": "Specifies time interval in minutes for the returned weather forecast. Supported values are\n * `1` - Retrieve forecast for 1-minute intervals. Returned by default.\n * `5` - Retrieve forecasts for 5-minute intervals.\n * `15` - Retrieve forecasts for 15-minute intervals.", - "default": 1, "in": "query", "type": "integer" }, @@ -274,20 +193,8 @@ "$ref": "#/definitions/MinuteForecastResponse" } }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" + "default": { + "$ref": "../../../Common/preview/1.0/common.json#/responses/default" } } } @@ -297,22 +204,19 @@ "description": "**Get Quarter-Day Forecast**\n \n \n**Applies to**: S0 and S1 pricing tiers.\n\n\nService returns detailed weather forecast by quarter-day for the next 1, 5, 10, or 15 days for a given location. Response data is presented by quarters of the day - morning, afternoon, evening, and overnight. Details such as temperature, humidity, wind, precipitation, and UV index are returned.", "operationId": "Weather_GetQuarterDayForecast", "x-ms-examples": { - "QuarterDayForecast": { + "GetQuarterDayForecast": { "$ref": "./examples/GetQuarterDayForecast.json" } }, "parameters": [ { - "$ref": "#/parameters/ClientId" - }, - { - "$ref": "#/parameters/SubscriptionKey" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ClientId" }, { - "$ref": "#/parameters/ApiVersion" + "$ref": "#/parameters/WeatherApiVersion" }, { - "$ref": "#/parameters/JsonFormat" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ResponseFormat" }, { "name": "query", @@ -322,12 +226,11 @@ "required": true }, { - "$ref": "#/parameters/WeatherUnit" + "$ref": "#/parameters/WeatherDataUnit" }, { "name": "duration", "description": "Specifies for how many days the quester-day forecast responses are returned. Supported values are:\n * `1` - Return forecast data for the next day. Returned by default.\n * `5` - Return forecast data for the next 5 days.\n * `10` - Return forecast data for next 10 days.\n * `15` - Return forecast data for the next 15 days.", - "default": 1, "in": "query", "type": "integer" }, @@ -342,20 +245,8 @@ "$ref": "#/definitions/QuarterDayForecastResponse" } }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" + "default": { + "$ref": "../../../Common/preview/1.0/common.json#/responses/default" } } } @@ -365,22 +256,19 @@ "description": "**Get Current Conditions**\n \n \n**Applies to**: S0 and S1 pricing tiers.\n\n\nGet Current Conditions service returns detailed current weather conditions such as precipitation, temperature and wind for a given coordinate location. Also, observations from the past 6 or 24 hours for a particular location can be retrieved. The basic information returned with the response include details such as observation date and time, brief description of the weather conditions, weather icon, precipitation indicator flags, and temperature. Additional details such as RealFeel™ Temperature and UV index are also returned.", "operationId": "Weather_GetCurrentConditions", "x-ms-examples": { - "CurrentConditions": { + "GetCurrentConditions": { "$ref": "./examples/GetCurrentConditions.json" } }, "parameters": [ { - "$ref": "#/parameters/ClientId" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ClientId" }, { - "$ref": "#/parameters/SubscriptionKey" + "$ref": "#/parameters/WeatherApiVersion" }, { - "$ref": "#/parameters/ApiVersion" - }, - { - "$ref": "#/parameters/JsonFormat" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ResponseFormat" }, { "name": "query", @@ -390,19 +278,17 @@ "required": true }, { - "$ref": "#/parameters/WeatherUnit" + "$ref": "#/parameters/WeatherDataUnit" }, { "name": "details", "description": "Return full details for the current conditions. Available values are\n * `true` - Returns full details. By default all details are returned.\n * `false` - Returns a truncated version of the current condition data, which includes observation date time, weather phrase, icon code, precipitation indicator flag, and temperature.", - "default": "true", "in": "query", "type": "string" }, { "name": "duration", "description": "Time frame of the returned weather conditions. By default, the most current weather conditions will be returned. Default value is 0. Supported values are:\n * `0` - Return the most current weather conditions.\n * `6` - Return weather conditions from past 6 hours.\n * `24` - Return weather conditions from past 24 hours.", - "default": 0, "in": "query", "type": "integer" }, @@ -417,20 +303,8 @@ "$ref": "#/definitions/CurrentConditionsResponse" } }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" + "default": { + "$ref": "../../../Common/preview/1.0/common.json#/responses/default" } } } @@ -440,22 +314,19 @@ "description": "**Get Daily Forecast**\n \n \n**Applies to**: S0 and S1 pricing tiers.\n\n\nThe service returns detailed weather forecast such as temperature and wind by day for the next 1, 5, 10, 15, 25, or 45 days for a given coordinate location. The response include details such as temperature, wind, precipitation, air quality, and UV index.\n\nIn S0 you can request daily forecast for the next 1, 5, 10, and 15 days. In S1 you can also request daily forecast for the next 25 days, and 45 days.", "operationId": "Weather_GetDailyForecast", "x-ms-examples": { - "DailyForecast": { + "GetDailyForecast": { "$ref": "./examples/GetDailyForecast.json" } }, "parameters": [ { - "$ref": "#/parameters/ClientId" - }, - { - "$ref": "#/parameters/SubscriptionKey" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ClientId" }, { - "$ref": "#/parameters/ApiVersion" + "$ref": "#/parameters/WeatherApiVersion" }, { - "$ref": "#/parameters/JsonFormat" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ResponseFormat" }, { "name": "query", @@ -465,12 +336,11 @@ "required": true }, { - "$ref": "#/parameters/WeatherUnit" + "$ref": "#/parameters/WeatherDataUnit" }, { "name": "duration", "description": "Specifies for how many days the daily forecast responses are returned. Available values are\n * `1` - Return forecast data for the next day. Returned by default.\n * `5` - Return forecast data for the next 5 days.\n * `10` - Return forecast data for the next 10 days.\n * `25` - Return forecast data for the next 25 days. Only available in S1 SKU.\n * `45` - Return forecast data for the next 45 days. Only available in S1 SKU.", - "default": 1, "in": "query", "type": "integer" }, @@ -485,20 +355,8 @@ "$ref": "#/definitions/DailyForecastResponse" } }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" + "default": { + "$ref": "../../../Common/preview/1.0/common.json#/responses/default" } } } @@ -508,22 +366,19 @@ "description": "**Get Weather along route**\n \n \n **Applies to**: S1 pricing tier.\n\n Weather along a route API returns hyper local (one kilometer or less), up-to-the-minute weather nowcasts, weather hazard assessments, and notifications along a route described as a sequence of waypoints. \n This includes a list of weather hazards affecting the waypoint or route, and the aggregated hazard index for each waypoint might be used to paint each portion of a route according to how safe it is for the driver. When submitting the waypoints, it is recommended to stay within, or close to, the distance that can be traveled within 120-mins or shortly after. Data is updated every five minutes. \n \n The service supplements Azure Maps [Route Service](https://docs.microsoft.com/rest/api/maps/route) that allows you to first request a route between an origin and a destination and use that as an input for Weather Along Route endpoint.\n \n In addition, the service supports scenarios to generate weather notifications for waypoints that experience an increase in intensity of a weather hazard. For example, if the vehicle is expected to begin experiencing heavy rain as it reaches a waypoint, a weather notification for heavy rain will be generated for that waypoint allowing the end product to display a heavy rain notification before the driver reaches that waypoint. \n The trigger for when to display the notification for a waypoint could be based, for example, on a [geofence](https://docs.microsoft.com/azure/azure-maps/tutorial-iot-hub-maps), or selectable distance to the waypoint.\n\n The API covers all regions of the planet except latitudes above Greenland and Antarctica.", "operationId": "Weather_GetWeatherAlongRoute", "x-ms-examples": { - "WeatherAlongRoute": { + "GetWeatherAlongRoute": { "$ref": "./examples/GetWeatherAlongRoute.json" } }, "parameters": [ { - "$ref": "#/parameters/ClientId" - }, - { - "$ref": "#/parameters/SubscriptionKey" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ClientId" }, { - "$ref": "#/parameters/ApiVersion" + "$ref": "#/parameters/WeatherApiVersion" }, { - "$ref": "#/parameters/JsonFormat" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ResponseFormat" }, { "name": "query", @@ -543,20 +398,8 @@ "$ref": "#/definitions/WeatherAlongRouteResponse" } }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" + "default": { + "$ref": "../../../Common/preview/1.0/common.json#/responses/default" } } } @@ -566,22 +409,19 @@ "description": "**Get Severe Weather Alerts**\n\n**Applies to**: S0 and S1 pricing tiers.\n\nSevere weather phenomenon can significantly impact our everyday life and business operations. For example, severe weather conditions such as tropical storms, high winds or flooding can close roads and force logistics companies to reroute their fleet causing delays in reaching destinations and breaking the cold chain of refrigerated food products.  Azure Maps Severe Weather Alerts API returns the severe weather alerts that are available worldwide from both official Government Meteorological Agencies and leading global to regional weather alert providers. The service can return details such as alert type, category, level and detailed description about the active severe alerts for the requested location, like hurricanes, thunderstorms, lightning, heat waves or forest fires.", "operationId": "Weather_GetSevereWeatherAlerts", "x-ms-examples": { - "SevereWeatherAlert": { + "GetSevereWeatherAlerts": { "$ref": "./examples/GetSevereWeatherAlerts.json" } }, "parameters": [ { - "$ref": "#/parameters/ClientId" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ClientId" }, { - "$ref": "#/parameters/SubscriptionKey" + "$ref": "#/parameters/WeatherApiVersion" }, { - "$ref": "#/parameters/ApiVersion" - }, - { - "$ref": "#/parameters/JsonFormat" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ResponseFormat" }, { "name": "query", @@ -596,7 +436,6 @@ { "name": "details", "description": "Return full details for the severe weather alerts. Available values are\n * `true` - Returns full details. By default all details are returned.\n * `false` - Returns a truncated version of the alerts data, which excludes the area-specific full description of alert details (`alertDetails`).", - "default": "true", "in": "query", "type": "string" } @@ -608,20 +447,8 @@ "$ref": "#/definitions/SevereWeatherAlertsResponse" } }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" + "default": { + "$ref": "../../../Common/preview/1.0/common.json#/responses/default" } } } @@ -631,22 +458,19 @@ "description": "**Get Daily Indices**\n\n**Applies to**: S0 and S1 pricing tiers.\n\nThere may be times when you want to know if the weather conditions are optimal for a specific activity, for example, for outdoor construction, indoor activities, running or farming including soil moisture information. Azure Maps Indices API returns index values that will guide end users to plan future activities. For example, a health mobile application can notify users that today is good weather for running or for other outdoors activities like for playing golf, and retail stores can optimize their digital marketing campaigns based on predicted index values. The service returns in daily indices values for current and next 5, 10 and 15 days starting from current day.", "operationId": "Weather_GetDailyIndices", "x-ms-examples": { - "DailyIndices": { + "GetDailyIndices": { "$ref": "./examples/GetDailyIndices.json" } }, "parameters": [ { - "$ref": "#/parameters/ClientId" - }, - { - "$ref": "#/parameters/SubscriptionKey" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ClientId" }, { - "$ref": "#/parameters/ApiVersion" + "$ref": "#/parameters/WeatherApiVersion" }, { - "$ref": "#/parameters/JsonFormat" + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ResponseFormat" }, { "name": "query", @@ -661,7 +485,6 @@ { "name": "duration", "description": "Specifies for how many days the daily indices are returned. By default, the indices data for the current day will be returned. When requesting future indices data, the current day is included in the response as day 1. Available values are\n * `1` - Return daily index data for the current day. Default value.\n * `5` - Return 5 days of daily index data starting from the current day.\n * `10` - Return 10 days of daily index data starting from the current day.\n * `15` - Return 15 days of daily index data starting from the current day.", - "default": 1, "in": "query", "type": "integer" }, @@ -685,63 +508,16 @@ "$ref": "#/definitions/DailyIndicesResponse" } }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" + "default": { + "$ref": "../../../Common/preview/1.0/common.json#/responses/default" } } } } }, "definitions": { - "ODataErrorResponse": { - "type": "object", - "description": "This response object is returned when an error occurs in the Maps API.", - "properties": { - "error": { - "$ref": "#/definitions/ODataError" - } - } - }, - "ODataError": { - "type": "object", - "description": "This object is returned when an error occurs in the 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." - } - } - }, "WeatherUnit": { + "description": "Specific value of a given unit related to weather.", "type": "object", "properties": { "value": { @@ -760,7 +536,7 @@ } } }, - "Wind": { + "WindDetails": { "type": "object", "description": "Wind details being returned including speed and direction.", "properties": { @@ -874,11 +650,11 @@ "description": "The dewpoint temperature in specified unit. The dewpoint temperature is the temperature that the air must be cooled to in order to reach saturation." }, "wind": { - "$ref": "#/definitions/Wind", + "$ref": "#/definitions/WindDetails", "description": "Wind details being returned including speed and direction." }, "windGust": { - "$ref": "#/definitions/Wind", + "$ref": "#/definitions/WindDetails", "description": "Wind gust. Wind gust is a sudden, brief increase in speed of the wind." }, "relativeHumidity": { @@ -1020,7 +796,7 @@ } } }, - "Interval": { + "ForecastInterval": { "type": "object", "properties": { "startTime": { @@ -1046,11 +822,11 @@ "description": "Key that specifies the threshold value. Along with precipitationType, can be used to determine the simplifiedColor. If dbz is zero, not present in the response." }, "color": { - "$ref": "#/definitions/Color", + "$ref": "#/definitions/ColorValue", "description": "The full spectrum color that maps to the dBZ (decibel relative to Z). If dbz is zero, color is not present in the response." }, "simplifiedColor": { - "$ref": "#/definitions/Color", + "$ref": "#/definitions/ColorValue", "description": "The band color that maps to the precipitation type and threshold. If dbz is zero, not present in the response." }, "precipitationType": { @@ -1086,12 +862,12 @@ "type": "array", "description": "Forecast data for each interval in the forecast.", "items": { - "$ref": "#/definitions/Interval" + "$ref": "#/definitions/ForecastInterval" } } } }, - "Color": { + "ColorValue": { "type": "object", "properties": { "red": { @@ -1137,7 +913,7 @@ 3 ], "x-ms-enum": { - "name": "Quarter", + "name": "DayQuarter", "modelAsString": true, "values": [ { @@ -1190,11 +966,11 @@ "description": "Relative humidity is the amount of water vapor present in air expressed as a percentage of the amount needed for saturation at the same temperature." }, "wind": { - "$ref": "#/definitions/Wind", + "$ref": "#/definitions/WindDetails", "description": "Wind details being returned including speed and direction." }, "windGust": { - "$ref": "#/definitions/Wind", + "$ref": "#/definitions/WindDetails", "description": "Wind gust. Wind gust is a sudden, brief increase in speed of the wind." }, "visibility": { @@ -1262,6 +1038,7 @@ "type": "object", "properties": { "results": { + "description": "Detailed current weather conditions.", "type": "array", "items": { "$ref": "#/definitions/CurrentConditions" @@ -1408,11 +1185,11 @@ "description": "The dewpoint temperature in specified unit. The dewpoint temperature is the temperature that the air must be cooled to in order to reach saturation." }, "wind": { - "$ref": "#/definitions/Wind", + "$ref": "#/definitions/WindDetails", "description": "Wind details being returned including speed and direction." }, "windGust": { - "$ref": "#/definitions/Wind", + "$ref": "#/definitions/WindDetails", "description": "Wind gust. Wind gust is a sudden, brief increase in speed of the wind." }, "uvIndex": { @@ -1584,10 +1361,10 @@ "description": "Night" }, "sources": { + "description": "Source(s) of the forecast data.", "type": "array", "items": { - "type": "string", - "description": "Source(s) of the forecast data." + "type": "string" } } } @@ -1608,6 +1385,7 @@ } }, "LocalSource": { + "description": "Local weather data provider information.", "type": "object", "properties": { "id": { @@ -1686,11 +1464,11 @@ "description": "Percent representing the probability of ice. For example, '30'." }, "wind": { - "$ref": "#/definitions/Wind", + "$ref": "#/definitions/WindDetails", "description": "Wind details being returned including speed and direction." }, "windGust": { - "$ref": "#/definitions/Wind", + "$ref": "#/definitions/WindDetails", "description": "Wind gust. Wind gust is a sudden, brief increase in speed of the wind." }, "totalLiquid": { @@ -1737,6 +1515,7 @@ } }, "WeatherAlongRouteSummary": { + "description": "Short summary of the weather along the route.", "type": "object", "properties": { "iconCode": { @@ -1745,7 +1524,7 @@ "description": "Numeric value representing an image that displays the `iconPhrase`. Please refer to [Weather Service Concepts](https://aka.ms/AzureMapsWeatherConcepts) for details." }, "hazards": { - "$ref": "#/definitions/Hazards" + "$ref": "#/definitions/WeatherHazards" } } }, @@ -1760,12 +1539,13 @@ "type": "array", "description": "Data for each waypoint returned in the same order as specified in the request.", "items": { - "$ref": "#/definitions/Waypoint" + "$ref": "#/definitions/WeatherWaypoint" } } } }, "WeatherAlongRoutePrecipitation": { + "description": "Precipitation forecast of the weather along the route.", "type": "object", "properties": { "dbz": { @@ -1795,7 +1575,7 @@ } } }, - "Waypoint": { + "WeatherWaypoint": { "type": "object", "properties": { "iconCode": { @@ -1820,10 +1600,10 @@ "$ref": "#/definitions/WeatherUnit" }, "wind": { - "$ref": "#/definitions/Wind" + "$ref": "#/definitions/WindDetails" }, "windGust": { - "$ref": "#/definitions/Wind" + "$ref": "#/definitions/WindDetails" }, "precipitation": { "$ref": "#/definitions/WeatherAlongRoutePrecipitation" @@ -1838,17 +1618,19 @@ "description": "A rating that indicates how blinding the sun is for the driver." }, "hazards": { - "$ref": "#/definitions/Hazards" + "$ref": "#/definitions/WeatherHazards" }, "notifications": { + "description": "List of weather hazard notifications.", "type": "array", "items": { - "$ref": "#/definitions/Notification" + "$ref": "#/definitions/WeatherNotification" } } } }, - "Hazards": { + "WeatherHazards": { + "description": "Description of the weather hazard affecting the trip.", "type": "object", "properties": { "maxHazardIndex": { @@ -1879,7 +1661,7 @@ } } }, - "Notification": { + "WeatherNotification": { "type": "object", "properties": { "type": { @@ -1926,7 +1708,7 @@ "description": "A unique numerical identifier for a weather alert." }, "description": { - "$ref": "#/definitions/Description", + "$ref": "#/definitions/SevereWeatherAlertDescription", "description": "Description of the alert." }, "category": { @@ -1968,7 +1750,7 @@ } } }, - "Description": { + "SevereWeatherAlertDescription": { "type": "object", "description": "Description of a severe weather alert.", "properties": { @@ -2135,255 +1917,6 @@ "description": "A textual explanation that can be used for display purposes to summarize the index value and category. For example, when the index value for Flight Delays is very good, the description will be \"Conditions are excellent for flying!\"." } } - }, - "CurrentAirQualityResponse": { - "type": "object", - "description": "This object is returned from a successful Get Current Air Quality call.", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/AirQuality" - }, - "description": "A list of all air quality results for the queried location." - } - } - }, - "HourlyAirQualityForecastResponse": { - "type": "object", - "description": "This object is returned from a successful Get Hourly Air Quality Forecast call.", - "properties": { - "forecasts": { - "type": "array", - "items": { - "$ref": "#/definitions/AirQuality" - }, - "description": "A list of all hourly air quality forecasts for the queried location." - } - } - }, - "DailyAirQualityForecastResponse": { - "type": "object", - "description": "This object is returned from a successful Get Daily Air Quality Forecast call.", - "properties": { - "forecasts": { - "type": "array", - "items": { - "$ref": "#/definitions/DailyAirQuality" - }, - "description": "A list of all daily air quality forecasts for the queried location." - } - } - }, - "AirQuality": { - "type": "object", - "description": "Information about the air quality in a specific location at a specific time.", - "properties": { - "dateTime": { - "type": "string", - "description": "Date and time of the current observation displayed in ISO 8601 format, for example, 2019-10-27T19:39:57-08:00." - }, - "index": { - "type": "number", - "format": "float", - "description": "Air quality rating on a scale set by local regulating bodies. Scales can vary widely based on location. See [Wikipedia](https://en.wikipedia.org/wiki/Air_quality_index) for more information." - }, - "globalIndex": { - "type": "number", - "format": "float", - "description": "Internationally normalized air quality rating on a scale from 0 to 300 and up, with higher numbers representing worse air quality." - }, - "dominantPollutant": { - "type": "string", - "description": "The pollutant with the highest concentration." - }, - "category": { - "type": "string", - "description": "One-word description of the air quality in the requested language. For example, \"Excellent\"." - }, - "categoryColor": { - "type": "string", - "description": "A unique color corresponding to the category of this air quality result." - }, - "description": { - "type": "string", - "description": "A textual explanation of this air quality result in the requested language." - }, - "pollutants": { - "type": "array", - "items": { - "$ref": "#/definitions/Pollutant" - }, - "description": "Information about individual pollutants." - } - } - }, - "DailyAirQuality": { - "type": "object", - "description": "Information about the air quality in a specific location at a specific time.", - "properties": { - "dateTime": { - "type": "string", - "description": "Date and time of the current observation displayed in ISO 8601 format, for example, 2019-10-27T19:39:57-08:00." - }, - "index": { - "type": "number", - "format": "float", - "description": "Air quality rating on a scale set by local regulating bodies. Scales can vary widely based on location. See [Wikipedia](https://en.wikipedia.org/wiki/Air_quality_index) for more information." - }, - "globalIndex": { - "type": "number", - "format": "float", - "description": "Internationally normalized air quality rating on a scale from 0 to 300 and up, with higher numbers representing worse air quality." - }, - "dominantPollutant": { - "$ref": "#/definitions/DominantPollutant", - "description": "The pollutant with the highest concentration." - }, - "category": { - "type": "string", - "description": "One-word description of the air quality in the requested language. For example, \"Excellent\"." - }, - "categoryColor": { - "type": "string", - "description": "A unique color corresponding to the category of this air quality result." - }, - "description": { - "type": "string", - "description": "A textual explanation of this air quality result in the requested language." - } - } - }, - "Pollutant": { - "type": "object", - "description": "Detailed information about an individual pollutant. Not returned if `pollutants`=false.", - "properties": { - "type": { - "$ref": "#/definitions/PollutantType", - "description": "Type of pollutant. Please note that more may be added at any time." - }, - "name": { - "type": "string", - "description": "The name of the pollutant in English." - }, - "index": { - "type": "number", - "format": "float", - "description": "Air quality rating on a scale set by local regulating bodies. Scales can vary widely based on location. See [Wikipedia](https://en.wikipedia.org/wiki/Air_quality_index) for more information." - }, - "globalIndex": { - "type": "number", - "format": "float", - "description": "Internationally normalized air quality rating on a scale from 0 to 300 and up, with higher numbers representing worse air quality." - }, - "concentration": { - "$ref": "#/definitions/Concentration", - "description": "An object containing the number of pollutant particles per volume of air." - } - } - }, - "PollutantType": { - "type": "string", - "description": "Type of pollutant. Please note that more may be added at any time.", - "enum": [ - "CO", - "NO2", - "O3", - "PM2.5", - "PM10", - "SO2" - ], - "x-ms-enum": { - "name": "PollutantType", - "modelAsString": true, - "values": [ - { - "value": "CO", - "description": "Carbon monoxide (\"CO\")" - }, - { - "value": "NO2", - "description": "Nitrogen dioxide (\"NO2\")" - }, - { - "value": "O3", - "description": "Ozone (\"O3\")" - }, - { - "value": "PM2.5", - "description": "Particulate matter 2.5 (\"PM2.5\")" - }, - { - "value": "PM10", - "description": "Particulate matter 10 (\"PM10\")" - }, - { - "value": "SO2", - "description": "Sulfur dioxide (\"SO2\")" - } - ] - } - }, - "Concentration": { - "type": "object", - "description": "An object containing the number of pollutant particles per volume of air.", - "properties": { - "value": { - "type": "number", - "format": "float", - "description": "The numerical value indicating the concentration of the corresponding pollutant." - }, - "unit": { - "type": "string", - "description": "Type of unit for the concentration of the pollutant." - }, - "unitType": { - "type": "integer", - "description": "Numeric ID value associated with the type of unit being displayed. Can be used for unit translation. Please refer to [Weather Service Concepts](https://aka.ms/AzureMapsWeatherConcepts) for details." - } - } - }, - "DominantPollutant": { - "type": "string", - "description": "Type of pollutant. Please note that more may be added at any time.", - "enum": [ - "Carbon Monoxide", - "Nitrogen Dioxide", - "Ozone", - "Particulate Matter 2.5", - "Particulate Matter 10", - "Sulfur Dioxide" - ], - "x-ms-enum": { - "name": "DominantPollutant", - "modelAsString": true, - "values": [ - { - "value": "Carbon Monoxide", - "description": "Carbon monoxide (\"CO\")" - }, - { - "value": "Nitrogen Dioxide", - "description": "Nitrogen dioxide (\"NO2\")" - }, - { - "value": "Ozone", - "description": "Ozone (\"O3\")" - }, - { - "value": "Particulate Matter 2.5", - "description": "Particulate matter 2.5 (\"PM2.5\")" - }, - { - "value": "Particulate Matter 10", - "description": "Particulate matter 10 (\"PM10\")" - }, - { - "value": "Sulfur Dioxide", - "description": "Sulfur dioxide (\"SO2\")" - } - ] - } } } } diff --git a/specification/maps/data-plane/readme.csharp.md b/specification/maps/data-plane/readme.csharp.md new file mode 100644 index 000000000000..fa1c55a0fb09 --- /dev/null +++ b/specification/maps/data-plane/readme.csharp.md @@ -0,0 +1,13 @@ +## C# + +These settings apply only when `--csharp` is specified on the command line. +Please also specify `--csharp-sdks-folder=`. + +```yaml $(csharp) +csharp: + sync-methods: None + license-header: MICROSOFT_MIT_NO_VERSION + namespace: Azure.Maps.Service + output-folder: $(csharp-sdks-folder)/maps/Azure.Maps.Service/src/Generated + clear-output-folder: true +``` \ No newline at end of file diff --git a/specification/maps/data-plane/readme.go.md b/specification/maps/data-plane/readme.go.md new file mode 100644 index 000000000000..76311d78d22b --- /dev/null +++ b/specification/maps/data-plane/readme.go.md @@ -0,0 +1,26 @@ +## Go + +These settings apply only when `--go` is specified on the command line. + +``` yaml $(go) +go: + license-header: MICROSOFT_MIT_NO_VERSION + namespace: azmaps + clear-output-folder: true +``` + +### Go multi-api + +``` yaml $(go) && $(multiapi) +batch: + - tag: package-preview-2.0 +``` + +### Tag: package-preview-2.0 and go + +These settings apply only when `--tag=package-preview-2.0 --go` is specified on the command line. +Please also specify `--go-sdk-folder=`. + +``` yaml $(tag) == 'package-preview-2.0' && $(go) +output-folder: $(go-sdk-folder)/services/preview/maps/2.0/$(namespace) +``` \ No newline at end of file diff --git a/specification/maps/data-plane/readme.java.md b/specification/maps/data-plane/readme.java.md new file mode 100644 index 000000000000..848477f37a3e --- /dev/null +++ b/specification/maps/data-plane/readme.java.md @@ -0,0 +1,9 @@ +## Java + +``` yaml $(java) +java: + namespace: com.azure.maps.service + license-header: MICROSOFT_MIT_NO_CODEGEN + payload-flattening-threshold: 0 + output-folder: $(azure-libraries-for-java-folder)/azure-maps-service +``` \ No newline at end of file diff --git a/specification/maps/data-plane/readme.md b/specification/maps/data-plane/readme.md index cd93b9d99169..6cb2b1dc8cf3 100644 --- a/specification/maps/data-plane/readme.md +++ b/specification/maps/data-plane/readme.md @@ -28,6 +28,9 @@ These are the global settings for MapsClient. title: MapsClient openapi-type: data-plane tag: package-preview-2.0 +add-credentials: true +credential-default-policy-type: BearerTokenCredentialPolicy +credential-scopes: https://atlas.microsoft.com/.default ``` ### Suppression @@ -45,7 +48,7 @@ directive: These settings apply only when `--tag=package-preview-2.0` is specified on the command line. -```yaml $(tag) == 'package-preview-2.0' +``` yaml $(tag) == 'package-preview-2.0' input-file: - Microsoft.Maps/Alias/preview/2.0/alias.json - Microsoft.Maps/Data/preview/2.0/data.json @@ -53,7 +56,6 @@ input-file: - Microsoft.Maps/DEM/preview/1.0/elevation.json - Microsoft.Maps/DwgConversion/preview/2.0/dwgconversion.json - Microsoft.Maps/FeatureState/preview/2.0/featurestate.json - - Microsoft.Maps/Feedback/preview/1.0/feedback.json - Microsoft.Maps/Geolocation/preview/1.0/geolocation.json - Microsoft.Maps/Mobility/preview/1.0/mobility.json - Microsoft.Maps/Render/preview/1.0/render.json @@ -67,29 +69,42 @@ input-file: - Microsoft.Maps/Weather/preview/1.0/weather.json - Microsoft.Maps/WFS/preview/2.0/wfs.json ``` -### Tag: package-1.0-preview -These settings apply only when `--tag=package-1.0-preview` is specified on the command line. +# Code Generation -``` yaml $(tag) == 'package-1.0-preview' -input-file: - - Microsoft.Maps/Alias/preview/1.0/alias.json - - Microsoft.Maps/Data/preview/1.0/data.json - - Microsoft.Maps/Dataset/preview/1.0/dataset.json - - Microsoft.Maps/DEM/preview/1.0/elevation.json - - Microsoft.Maps/DwgConversion/preview/1.0/dwgconversion.json - - Microsoft.Maps/FeatureState/preview/1.0/featurestate.json - - Microsoft.Maps/Feedback/preview/1.0/feedback.json - - Microsoft.Maps/Geolocation/preview/1.0/geolocation.json - - Microsoft.Maps/Mobility/preview/1.0/mobility.json - - Microsoft.Maps/Render/preview/1.0/render.json - - Microsoft.Maps/Render/preview/2.0/render.json - - Microsoft.Maps/Route/preview/1.0/route.json - - Microsoft.Maps/Search/preview/1.0/search.json - - Microsoft.Maps/Spatial/preview/1.0/spatial.json - - Microsoft.Maps/Tileset/preview/1.0/tileset.json - - Microsoft.Maps/Timezone/preview/1.0/timezone.json - - Microsoft.Maps/Traffic/preview/1.0/traffic.json - - Microsoft.Maps/Weather/preview/1.0/weather.json - - Microsoft.Maps/WFS/preview/1.0/wfs.json +## Swagger to SDK + +This section describes what SDK should be generated by the automatic system. +This is not used by Autorest itself. + +```yaml $(swagger-to-sdk) +swagger-to-sdk: + - repo: azure-sdk-for-python-track2 + - repo: azure-sdk-for-java + #track1 doesn't support data-plane for go + #manually generate for now with track2 + #- repo: azure-sdk-for-go + #track1 doesn't support features needed for typescript + #manually generate for now with track2 + #- repo: azure-sdk-for-js + - repo: azure-sdk-for-net-track2 ``` +## Python + +See configuration in [readme.python.md](./readme.python.md) + +## Java + +See configuration in [readme.java.md](./readme.java.md) + +## TypeScript + +See configuration in [readme.typescript.md](./readme.typescript.md) + +## CSharp + +See configuration in [readme.csharp.md](./readme.csharp.md) + +## Go + +See configuration in [readme.go.md](./readme.go.md) diff --git a/specification/maps/data-plane/readme.python.md b/specification/maps/data-plane/readme.python.md new file mode 100644 index 000000000000..277c12c8899e --- /dev/null +++ b/specification/maps/data-plane/readme.python.md @@ -0,0 +1,42 @@ +## Python + +These settings apply only when `--python` is specified on the command line. +Please also specify `--python-sdks-folder=`. +Use `--python-mode=update` if you already have a setup.py and just want to update the code itself. + +``` yaml $(python) && !$(track2) +python-mode: create +python: + license-header: MICROSOFT_MIT_NO_VERSION + payload-flattening-threshold: 2 + namespace: azure.maps.service + package-name: azure-maps-service + package-version: preview-2.0 + clear-output-folder: true +``` +``` yaml $(python) && $(track2) +python-mode: create +license-header: MICROSOFT_MIT_NO_VERSION +namespace: azure.maps.service +package-name: azure-maps-service +package-version: preview-2.0 +clear-output-folder: true +``` +``` yaml $(python) && $(python-mode) == 'update' && !$(track2) +python: + no-namespace-folders: true + output-folder: $(python-sdks-folder)/maps/azure-maps-service/azure/maps/service +``` +``` yaml $(python) && $(python-mode) == 'create' && !$(track2) +python: + basic-setup-py: true + output-folder: $(python-sdks-folder)/maps/azure-maps-service +``` +``` yaml $(python) && $(python-mode) == 'update' && $(track2) +no-namespace-folders: true +output-folder: $(python-sdks-folder)/maps/azure-maps-service/azure/maps/service +``` +``` yaml $(python) && $(python-mode) == 'create' && $(track2) +basic-setup-py: true +output-folder: $(python-sdks-folder)/maps/azure-maps-service +``` diff --git a/specification/maps/data-plane/readme.typescript.md b/specification/maps/data-plane/readme.typescript.md new file mode 100644 index 000000000000..383b2f5ef20f --- /dev/null +++ b/specification/maps/data-plane/readme.typescript.md @@ -0,0 +1,63 @@ +## TypeScript + +These settings apply only when `--typescript` is specified on the command line. +Please also specify `--typescript-sdks-folder=`. + +``` yaml $(typescript) +azure-arm: false +package-name: "@azure/maps-service" +license-header: MICROSOFT_MIT_NO_VERSION +output-folder: "$(typescript-sdks-folder)/sdk/maps/maps-service/src/generated" +source-code-folder-path: "." +clear-output-folder: true +generate-metadata: false +v3: true +use-extension: + "@autorest/typescript": "6.0.0-alpha.20210514.1" +directive: + - from: route.json + where: $.definitions.PostRouteDirectionsRequestBody.properties.supportingPoints + transform: > + $ = { + "description": "A GeoJSON Geometry collection representing sequence of coordinates used as input for route reconstruction and for calculating zero or more alternative routes to this reference route.\n - The provided sequence of supporting points is used as input for route reconstruction.\n - The alternative routes are calculated between the origin and destination points specified in the base path parameter locations.\n - If both _minDeviationDistance_ and _minDeviationTime_ are set to zero, then these origin and destination points are\n expected to be at (or very near) the beginning and end of the reference route, respectively.\n - Intermediate locations (_waypoints_) are not supported when using <_supportingPoints_>.\n - The reference route may contain traffic incidents of type _ROAD_CLOSURE_, which are\n ignored for the calculation of the reference route's travel time and traffic delay.", + "type": "object" + }; + reason: Autorest TS codegen does not deserialize array of base class objects as an operation parameter properly + - from: search.json + where: $.definitions.SearchInsideGeometryRequestBody.properties.geometry + transform: > + $ = { + "description": "A valid `GeoJSON` object. Please refer to [RFC 7946](https://tools.ietf.org/html/rfc7946#section-3) for details.", + "type": "object" + }; + reason: Autorest TS codegen does not deserialize array of base class objects as an operation parameter properly + - from: spatial.json + where: $.parameters.SearchGeofenceRequestBody.schema + transform: > + $ = { + "type": "object" + }; + reason: Autorest TS codegen does not deserialize array of base class objects as an operation parameter properly + - from: spatial.json + where: $.parameters.ClosestPointRequestBody.schema + transform: > + $ = { + "type": "object" + }; + reason: Autorest TS codegen does not deserialize array of base class objects as an operation parameter properly + - from: spatial.json + where: $.parameters.PointInPolygonRequestBody.schema + transform: > + $ = { + "type": "object" + }; + reason: Autorest TS codegen does not deserialize array of base class objects as an operation parameter properly + - from: spatial.json + where: $.definitions.BufferRequestBody.properties.geometries + transform: > + $ = { + "description": "A valid `GeoJSON FeatureCollection` object type. Please refer to [RFC 7946](https://tools.ietf.org/html/rfc7946#section-3.3) for details.", + "type": "object" + }; + reason: Autorest TS codegen does not deserialize array of base class objects as an operation parameter properly +``` diff --git a/specificationRepositoryConfiguration.json b/specificationRepositoryConfiguration.json index 7a501283b316..6d176f075f69 100644 --- a/specificationRepositoryConfiguration.json +++ b/specificationRepositoryConfiguration.json @@ -66,6 +66,11 @@ "integrationRepository": "azure-sdk/azure-sdk-for-net-pr", "mainRepository": "Azure/azure-sdk-for-net-pr" }, + "azure-sdk-for-net-track2": { + "integrationRepository": "azure-sdk/azure-sdk-for-net-pr", + "mainRepository": "Azure/azure-sdk-for-net-pr", + "configFilePath": "eng/swagger_to_sdk_config.json" + }, "azure-sdk-for-python": { "integrationRepository": "azure-sdk/azure-sdk-for-python-pr", "mainRepository": "Azure/azure-sdk-for-python-pr",