Skip to content

Commit b7b2728

Browse files
author
Will Huang
committed
remove async result
1 parent 1ab7652 commit b7b2728

3 files changed

Lines changed: 108 additions & 211 deletions

File tree

specification/maps/data-plane/Route/preview/2024-06-01-preview/examples/GetRouteAsyncOperationStatusSucceeded.json

Lines changed: 106 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,112 @@
99
"operationType": "RouteMatrix",
1010
"status": "Succeeded",
1111
"result": {
12-
"resultUrl": "https://atlas.microsoft.com/route/operations/a2-aa117770-8831-49d8-b721-19a04246bf6c-0015/result?api-version=2024-06-01-preview"
13-
},
14-
"summary": {
15-
"totalCount": 4,
16-
"successfulCount": 2
12+
"operationType": "RouteMatrix",
13+
"type": "FeatureCollection",
14+
"features": [
15+
{
16+
"type": "Feature",
17+
"geometry": {
18+
"type": "MultiPoint",
19+
"coordinates": [
20+
[
21+
9.15049,
22+
45.458545
23+
],
24+
[
25+
11.499931,
26+
48.149853
27+
]
28+
]
29+
},
30+
"properties": {
31+
"originIndex": 0,
32+
"destinationIndex": 0,
33+
"departureTime": "2022-12-19T16:39:57+01:00",
34+
"arrivalTime": "2022-12-20T00:21:14+01:00",
35+
"distanceInMeters": 573064,
36+
"durationInSeconds": 27677,
37+
"durationTrafficInSeconds": 27677
38+
}
39+
},
40+
{
41+
"type": "Feature",
42+
"geometry": {
43+
"type": "MultiPoint",
44+
"coordinates": [
45+
[
46+
9.15049,
47+
45.458545
48+
],
49+
[
50+
11.499931,
51+
48.149853
52+
]
53+
]
54+
},
55+
"properties": {
56+
"originIndex": 0,
57+
"destinationIndex": 1,
58+
"error": {
59+
"code": "OUT_OF_REGION",
60+
"message": "Input coordinates out of region"
61+
}
62+
}
63+
},
64+
{
65+
"type": "Feature",
66+
"geometry": {
67+
"type": "MultiPoint",
68+
"coordinates": [
69+
[
70+
11.050541,
71+
45.403337
72+
],
73+
[
74+
11.499931,
75+
48.149853
76+
]
77+
]
78+
},
79+
"properties": {
80+
"originIndex": 1,
81+
"destinationIndex": 0,
82+
"departureTime": "2022-12-19T16:39:57+01:00",
83+
"arrivalTime": "2022-12-19T22:19:10+01:00",
84+
"distanceInMeters": 452488,
85+
"durationInSeconds": 20353,
86+
"durationTrafficInSeconds": 20353
87+
}
88+
},
89+
{
90+
"type": "Feature",
91+
"geometry": {
92+
"type": "MultiPoint",
93+
"coordinates": [
94+
[
95+
11.050541,
96+
45.403337
97+
],
98+
[
99+
14.538226,
100+
50.033688
101+
]
102+
]
103+
},
104+
"properties": {
105+
"originIndex": 1,
106+
"destinationIndex": 1,
107+
"error": {
108+
"code": "OUT_OF_REGION",
109+
"message": "Input coordinates out of region"
110+
}
111+
}
112+
}
113+
],
114+
"summary": {
115+
"totalCount": 4,
116+
"successfulCount": 2
117+
}
17118
}
18119
}
19120
}

specification/maps/data-plane/Route/preview/2024-06-01-preview/examples/GetRouteMatrixAsyncResult.json

Lines changed: 0 additions & 118 deletions
This file was deleted.

specification/maps/data-plane/Route/preview/2024-06-01-preview/route.json

Lines changed: 2 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -531,9 +531,6 @@
531531
{
532532
"$ref": "../../../Common/preview/1.0/common.json#/parameters/ClientId"
533533
},
534-
{
535-
"$ref": "#/parameters/Accept-Language"
536-
},
537534
{
538535
"name": "routeMatrixRequest",
539536
"in": "body",
@@ -569,7 +566,7 @@
569566
},
570567
"/route/matrix:async": {
571568
"post": {
572-
"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",
569+
"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/{operationId}?api-version=1.0?subscription-key={subscription-key}\n ```\n\n\n4. Client can get the results directly from result field once status is Succeeded\n\n \n\n",
573570
"operationId": "Route_PostRouteMatrixAsync",
574571
"x-ms-long-running-operation": true,
575572
"x-ms-long-running-operation-options": {
@@ -595,9 +592,6 @@
595592
{
596593
"$ref": "../../../Common/preview/1.0/common.json#/parameters/ClientId"
597594
},
598-
{
599-
"$ref": "#/parameters/Accept-Language"
600-
},
601595
{
602596
"name": "routeMatrixAsyncRequest",
603597
"in": "body",
@@ -682,59 +676,6 @@
682676
}
683677
}
684678
}
685-
},
686-
"/route/operations/{operationId}/result": {
687-
"get": {
688-
"description": "**Applies to**: see pricing [tiers](https://aka.ms/AzureMapsPricingTier).\n\n\nGet the result of an asynchronous operation by its operation ID.",
689-
"operationId": "Route_GetRouteAsyncOperationResult",
690-
"consumes": [
691-
"application/json"
692-
],
693-
"produces": [
694-
"application/json"
695-
],
696-
"x-ms-client-name": "Route_GetAsyncOperationResult",
697-
"x-ms-examples": {
698-
"Successfully retrieve the async matrix result": {
699-
"$ref": "./examples/GetRouteMatrixAsyncResult.json"
700-
}
701-
},
702-
"parameters": [
703-
{
704-
"$ref": "#/parameters/ApiVersion"
705-
},
706-
{
707-
"$ref": "../../../Common/preview/1.0/common.json#/parameters/ClientId"
708-
},
709-
{
710-
"$ref": "#/parameters/Accept-Language"
711-
},
712-
{
713-
"$ref": "#/parameters/OperationId"
714-
}
715-
],
716-
"responses": {
717-
"200": {
718-
"description": "OK",
719-
"schema": {
720-
"$ref": "#/definitions/RouteAsyncResponse"
721-
}
722-
},
723-
"default": {
724-
"description": "An unexpected error occurred.",
725-
"schema": {
726-
"$ref": "../../../Common/preview/1.0/common.json#/definitions/MapsErrorResponse"
727-
},
728-
"headers": {
729-
"x-ms-error-code": {
730-
"type": "string",
731-
"description": "Error code of the error that occurred."
732-
}
733-
},
734-
"x-ms-error-response": true
735-
}
736-
}
737-
}
738679
}
739680
},
740681
"definitions": {
@@ -3474,19 +3415,8 @@
34743415
"operationType": {
34753416
"$ref": "#/definitions/RouteOperationTypeEnum"
34763417
},
3477-
"summary": {
3478-
"$ref": "#/definitions/RouteOperationSummary"
3479-
},
34803418
"result": {
3481-
"description": "The result of async operation",
3482-
"type": "object",
3483-
"properties": {
3484-
"resultUrl": {
3485-
"description": "URL to the get the result of async operation",
3486-
"type": "string",
3487-
"format": "uri"
3488-
}
3489-
}
3419+
"$ref": "#/definitions/RouteAsyncResponse"
34903420
},
34913421
"error": {
34923422
"$ref": "../../../../../common-types/data-plane/v1/types.json#/definitions/ErrorDetail"
@@ -3526,22 +3456,6 @@
35263456
}
35273457
}
35283458
},
3529-
"RouteOperationSummary": {
3530-
"type": "object",
3531-
"description": "Summary for the route async request",
3532-
"properties": {
3533-
"successfulCount": {
3534-
"description": "Number of successful count within this route operation.",
3535-
"type": "integer",
3536-
"format": "int32"
3537-
},
3538-
"totalCount": {
3539-
"description": "Total number of count within this route operation.",
3540-
"type": "integer",
3541-
"format": "int32"
3542-
}
3543-
}
3544-
},
35453459
"AsyncBatchOperation": {
35463460
"$ref": "../../../AsyncBatchManagement/preview/2024-04-01-preview/asyncBatchManagement.json#/definitions/AsyncBatchOperation"
35473461
},

0 commit comments

Comments
 (0)