Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
follow azure's convention
  • Loading branch information
Will Huang committed May 24, 2024
commit 83311574f2b4ed7655ddac927a560d4264bcf862
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
{
"parameters": {
"api-version": "2024-06-01-preview",
"operationId": "a2-aa117770-8831-49d8-b721-19a04246bf6c-001"
"id": "a2-aa117770-8831-49d8-b721-19a04246bf6c-001"
},
"responses": {
"200": {
"body": {
"operationType": "RouteMatrix",
"kind": "RouteMatrix",
"status": "Failed",
"error": {
"code": "BAD_ARGUMENT",
"message": "Error(s) detected in POST body."
"code": "Service is temporarily unavailable",
"message": "Please try again later."
}
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"parameters": {
"api-version": "2024-06-01-preview",
"operationId": "a2-aa117770-8831-49d8-b721-19a04246bf6c-001"
"id": "a2-aa117770-8831-49d8-b721-19a04246bf6c-001"
},
"responses": {
"200": {
"body": {
"operationType": "RouteMatrix",
"kind": "RouteMatrix",
"status": "Running"
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"parameters": {
"api-version": "2024-06-01-preview",
"operationId": "a2-aa117770-8831-49d8-b721-19a04246bf6c-001"
"id": "a2-aa117770-8831-49d8-b721-19a04246bf6c-001"
},
"responses": {
"200": {
"body": {
"operationType": "RouteMatrix",
"kind": "RouteMatrix",
"status": "Succeeded",
"result": {
"resultUrl": "https://atlas.microsoft.com/route/operations/a2-aa117770-8831-49d8-b721-19a04246bf6c-0015/result?api-version=2024-06-01-preview"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"parameters": {
"api-version": "2024-06-01-preview",
"operationId": "a2-aa117770-8831-49d8-b721-19a04246bf6c-001"
"id": "a2-aa117770-8831-49d8-b721-19a04246bf6c-001"
},
"responses": {
"200": {
"body": {
"operationType": "RouteMatrix",
"kind": "RouteMatrix",
"type": "FeatureCollection",
"features": [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
"x-ms-parameter-location": "client"
},
"OperationId": {
"name": "operationId",
"name": "id",
"description": "System generated unique identifier for the asynchronous batch operation after it has been submitted.",
"type": "string",
"maxLength": 43,
Expand Down Expand Up @@ -569,7 +569,7 @@
},
"/route/matrix:async": {
"post": {
"description": "**Applies to**: see pricing [tiers](https://aka.ms/AzureMapsPricingTier).\n\n\nThe `Post Route Matrix` API is an HTTP `POST` request that allows calculation of a matrix of route summaries for a set of routes defined by origin and destination locations by using an asynchronous (async) 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 **50000** and for sync request it's **2500** (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 2500, you might want to make synchronous request. The maximum size of a matrix for this API is **2500** (the number of origins multiplied by the number of destinations). With that constraint in mind, examples of possible matrix dimensions are: 50x50, 60x40, 90x20 (it does not need to be square).\n\n```\nPOST https://atlas.microsoft.com/route/matrix?api-version=2024-06-01-preview&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 status is Succeeded. \n\n\nThe maximum size of a matrix for this API is **50000** (the number of origins multiplied by the number of destinations). With that constraint in mind, examples of possible matrix dimensions are: 500x100, 100x100, 280x170. 100x50 (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:async?api-version=2024-06-01-preview&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 get the status of the request. This status URI looks like the following:\n\n ```\n GET https://atlas.microsoft.com/route/operations/{operationId}?api-version=1.0?subscription-key={subscription-key}\n ```\n\n\n4. Client issues a GET request on the resultUrl obtained in Step 3 to get the results\n\n \n\n ```\n GET https://atlas.microsoft.com/route/operations/{operationId}/result?api-version=1.0?subscription-key={subscription-key}\n ```\n\n\n\n",
"description": "**Applies to**: see pricing [tiers](https://aka.ms/AzureMapsPricingTier).\n\n\nThe `Post Route Matrix` API is an HTTP `POST` request that allows calculation of a matrix of route summaries for a set of routes defined by origin and destination locations by using an asynchronous (async) 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 **50000** and for sync request it's **2500** (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 2500, you might want to make synchronous request. The maximum size of a matrix for this API is **2500** (the number of origins multiplied by the number of destinations). With that constraint in mind, examples of possible matrix dimensions are: 50x50, 60x40, 90x20 (it does not need to be square).\n\n```\nPOST https://atlas.microsoft.com/route/matrix?api-version=2024-06-01-preview&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 URL in the Operation-Location field of the response header. This URL should be checked periodically until the status is Succeeded. \n\n\nThe maximum size of a matrix for this API is **50000** (the number of origins multiplied by the number of destinations). With that constraint in mind, examples of possible matrix dimensions are: 500x100, 100x100, 280x170. 100x50 (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:async?api-version=2024-06-01-preview&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 get the status of the request. This status URI looks like the following:\n\n ```\n GET https://atlas.microsoft.com/route/operations/{id}?api-version=1.0?subscription-key={subscription-key}\n ```\n\n\n4. Client issues a GET request on the resultUrl obtained in Step 3 to get the results\n\n \n\n ```\n GET https://atlas.microsoft.com/route/operations/{id}/result?api-version=1.0?subscription-key={subscription-key}\n ```\n\n\n\n",
"operationId": "Route_PostRouteMatrixAsync",
"x-ms-long-running-operation": true,
"x-ms-long-running-operation-options": {
Expand Down Expand Up @@ -634,7 +634,7 @@
}
}
},
"/route/operations/{operationId}": {
"/route/operations/{id}": {
"get": {
"description": "**Applies to**: see pricing [tiers](https://aka.ms/AzureMapsPricingTier).\n\n\n Get the status of an asynchronous operation by its operation ID.",
"operationId": "Route_GetRouteAsyncOperationsStatus",
Expand Down Expand Up @@ -683,7 +683,7 @@
}
}
},
"/route/operations/{operationId}/result": {
"/route/operations/{id}/result": {
"get": {
"description": "**Applies to**: see pricing [tiers](https://aka.ms/AzureMapsPricingTier).\n\n\nGet the result of an asynchronous operation by its operation ID.",
"operationId": "Route_GetRouteAsyncOperationResult",
Expand Down Expand Up @@ -1165,13 +1165,13 @@
"type": "object",
"description": "This object is returned from a successful call.",
"properties": {
"operationType": {
"$ref": "#/definitions/RouteOperationTypeEnum"
"kind": {
"$ref": "#/definitions/RouteOperationKindEnum"
}
},
"discriminator": "operationType",
"discriminator": "kind",
"required": [
"operationType"
"kind"
]
},
"RouteMatrixAsyncResponse": {
Expand Down Expand Up @@ -3435,7 +3435,7 @@
"type": "object",
"description": "This object is returned from a successful Get Operation request.",
"properties": {
"operationId": {
"id": {
"description": "Unique identifier for the asynchronous operation.",
"type": "string"
},
Expand Down Expand Up @@ -3471,8 +3471,8 @@
]
}
},
"operationType": {
"$ref": "#/definitions/RouteOperationTypeEnum"
"kind": {
"$ref": "#/definitions/RouteOperationKindEnum"
},
"result": {
"description": "The result of async operation",
Expand All @@ -3490,14 +3490,14 @@
}
}
},
"RouteOperationTypeEnum": {
"RouteOperationKindEnum": {
"type": "string",
"description": "Type of asynchronous operation",
"enum": [
"RouteMatrix"
],
"x-ms-enum": {
"name": "RouteOperationTypeEnum",
"name": "RouteOperationKindEnum",
"modelAsString": true,
"values": [
{
Expand Down