Skip to content

Commit 31b8400

Browse files
koyasu221bWill Huang
andauthored
Add AdminDistrictTruck objects and merge CountryRegion object the document look better (#33938)
* update snapToRoads batch example * add AdminDistrictTruck * Merge countryRegion * update description --------- Co-authored-by: Will Huang <huangwill@microsoft.com>
1 parent 77f42f4 commit 31b8400

File tree

1 file changed

+30
-26
lines changed
  • specification/maps/data-plane/Route/stable/2025-01-01

1 file changed

+30
-26
lines changed

specification/maps/data-plane/Route/stable/2025-01-01/route.json

Lines changed: 30 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@
264264
},
265265
"/route/snapToRoads:batch": {
266266
"post": {
267-
"description": "The Snap To Roads Batch API sends batches of up to **100** queries as a single call to the [Snap To Roads API](/rest/api/maps/route/post-snap-to-roads?view=rest-maps-2025-01-01). This API enables efficient processing of multiple queries in one request, reducing the need for individual calls. \n\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/snapToRoads:batch?api-version=2025-01-01\n```\n### POST Body for Batch Request\nTo send the _snap to roads_ 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 2 _snap to roads_ queries:\n\n\n```\n{\n \"batchItems\": [\n {\n \"type\": \"FeatureCollection\",\n \"features\": [\n {\n \"type\": \"Feature\",\n \"geometry\": {\n \"coordinates\": [\n -122.122353,\n 47.672662\n ],\n \"type\": \"Point\"\n },\n \"properties\": {\n \n }\n },\n {\n \"type\": \"Feature\",\n \"geometry\": {\n \"coordinates\": [\n -122.132452,\n 47.644234\n ],\n \"type\": \"Point\"\n },\n \"properties\": {\n \n }\n }\n ],\n \"interpolate\": true,\n \"includeSpeedLimit\": true,\n \"travelMode\": \"driving\"\n },\n {\n \"type\": \"FeatureCollection\",\n \"features\": [\n {\n \"type\": \"Feature\",\n \"geometry\": {\n \"coordinates\": [\n -122.33669,\n 47.590849\n ],\n \"type\": \"Point\"\n },\n \"properties\": {\n \"pointIndex\": 0\n }\n },\n {\n \"type\": \"Feature\",\n \"geometry\": {\n \"coordinates\": [\n 122.34509,\n 47.610524\n ],\n \"type\": \"Point\"\n },\n \"properties\": {\n \"pointIndex\": 1\n }\n }\n ],\n \"interpolate\": false,\n \"includeSpeedLimit\": false,\n \"travelMode\": \"driving\"\n }\n ]\n}\n```\n\nA _snap to roads_ batchItem object can accept any of the supported _snap to roads_ [Request body](/rest/api/maps/route/post-snap-to-roads?view=rest-maps-2025-01-01#request-body) \n\n\nThe batch should contain at least **1** query.\n\n\n### Batch Response Model\nThe 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 is of one of the following types:\n\n - [`SnapToRoadsResponse`](/rest/api/maps/route/post-snap-to-roads#response) - 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\n",
267+
"description": "The Snap To Roads Batch API sends batches of up to **100** queries as a single call to the [Snap To Roads API](/rest/api/maps/route/post-snap-to-roads?view=rest-maps-2025-01-01). This API enables efficient processing of multiple queries in one request, reducing the need for individual calls. \n\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/snapToRoads:batch?api-version=2025-01-01\n```\n### POST Body for Batch Request\nTo send the _snap to roads_ 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 2 _snap to roads_ queries:\n\n\n```\n{\n \"batchItems\": [\n {\n \"optionalId\": \"bbc9c0f6-ab52-49d8-a788-a658fa654c94\",\n \"type\": \"FeatureCollection\",\n \"features\": [\n {\n \"type\": \"Feature\",\n \"geometry\": {\n \"type\": \"Point\",\n \"coordinates\": [\n -122.336691,\n 47.59085\n ]\n },\n \"properties\": {\n }\n }\n ],\n \"includeSpeedLimit\": true,\n \"travelMode\": \"driving\"\n },\n {\n \"optionalId\": \"300af787-589b-4088-accd-56828542e293\",\n \"type\": \"FeatureCollection\",\n \"features\": [\n {\n \"type\": \"Feature\",\n \"geometry\": {\n \"type\": \"Point\",\n \"coordinates\": [\n -122.336023,\n 47.601616\n ]\n },\n \"properties\": {\n }\n }\n ],\n \"includeSpeedLimit\": true,\n \"travelMode\": \"driving\"\n }\n ]\n}\n```\n\nA _snap to roads_ batchItem object can accept any of the supported _snap to roads_ [Request body](/rest/api/maps/route/post-snap-to-roads?view=rest-maps-2025-01-01#request-body) \n\n\nThe batch should contain at least **1** query.\n\n\n### Batch Response Model\nThe 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 is of one of the following types:\n\n - [`SnapToRoadsResponse`](/rest/api/maps/route/post-snap-to-roads#response) - 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\n",
268268
"operationId": "Route_PostSnapToRoadsBatch",
269269
"consumes": [
270270
"application/geo+json"
@@ -380,7 +380,7 @@
380380
},
381381
"/route/range:batch": {
382382
"post": {
383-
"description": "The Route Range Batch API sends batches of up to **100** queries as a single call to the [Route Range API](https://learn.microsoft.com/rest/api/maps/route/post-route-range?view=rest-maps-2025-01-01). This API enables efficient processing of multiple queries in one request, reducing the need for individual calls. \n\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/range:batch?api-version=2025-01-01\n```\n### POST Body for Batch Request\nTo send the _route range_ 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 2 _route_range_ queries:\n\n\n```\n{\n \"batchItems\": [\n {\n \"type\": \"Feature\",\n \"geometry\": {\n \"type\": \"Point\",\n \"coordinates\": [\n 5.86605,\n 50.9745\n ]\n },\n \"properties\": {\n \"timeBudgetInSec\": 6000\n }\n },\n {\n \"type\": \"Feature\",\n \"geometry\": {\n \"type\": \"Point\",\n \"coordinates\": [\n -122.201669,\n 47.615076\n ]\n },\n \"properties\": {\n \"timeBudgetInSec\": 2000\n }\n }\n ]\n}\n```\n\nA _route range_ batchItem object can accept any of the supported _snap to roads_ [Request body](/rest/api/maps/route/post-snap-to-roads?view=rest-maps-2025-01-01#request-body) \n\n\nThe batch should contain at least **1** query.\n\n\n### Batch Response Model\nThe 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 is of one of the following types:\n\n - [`RouteRangeResponse`](/rest/api/maps/route/post-route-range#response) - 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\n",
383+
"description": "The Route Range Batch API sends batches of up to **100** queries as a single call to the [Route Range API](https://learn.microsoft.com/rest/api/maps/route/post-route-range?view=rest-maps-2025-01-01). This API enables efficient processing of multiple queries in one request, reducing the need for individual calls. \n\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/range:batch?api-version=2025-01-01\n```\n### POST Body for Batch Request\nTo send the _route range_ 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 2 _route_range_ queries:\n\n\n```\n{\n \"batchItems\": [\n {\n \"optionalId\": \"bbc9c0f6-ab52-49d8-a788-a658fa654c94\",\n \"type\": \"Feature\",\n \"geometry\": {\n \"type\": \"Point\",\n \"coordinates\": [\n 5.86605,\n 50.9745\n ]\n },\n \"properties\": {\n \"timeBudgetInSec\": 6000\n }\n },\n {\n \"optionalId\": \"300af787-589b-4088-accd-56828542e293\",\n \"type\": \"Feature\",\n \"geometry\": {\n \"type\": \"Point\",\n \"coordinates\": [\n -122.201669,\n 47.615076\n ]\n },\n \"properties\": {\n \"timeBudgetInSec\": 2000\n }\n }\n ]\n}\n```\n\nA _route range_ batchItem object can accept any of the supported _snap to roads_ [Request body](/rest/api/maps/route/post-snap-to-roads?view=rest-maps-2025-01-01#request-body) \n\n\nThe batch should contain at least **1** query.\n\n\n### Batch Response Model\nThe 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 is of one of the following types:\n\n - [`RouteRangeResponse`](/rest/api/maps/route/post-route-range#response) - 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\n",
384384
"operationId": "Route_PostRouteRangeBatch",
385385
"consumes": [
386386
"application/json"
@@ -1169,14 +1169,7 @@
11691169
"type": "object",
11701170
"properties": {
11711171
"countryRegion": {
1172-
"type": "object",
1173-
"description": "Represents a country or region, containing related details.",
1174-
"properties": {
1175-
"name": {
1176-
"description": "name of country/region",
1177-
"type": "string"
1178-
}
1179-
}
1172+
"$ref": "#/definitions/CountryRegion"
11801173
},
11811174
"adminDistricts": {
11821175
"description": "adminDistrict array.",
@@ -1493,30 +1486,17 @@
14931486
"$ref": "#/definitions/Instruction"
14941487
},
14951488
"address": {
1496-
"description": "The address of the result. `Note`: Only supported for truck travelMode.",
1489+
"description": "The administrative district and country region for the waypoints and maneuver points on the truck route. Note: Only supported for truck travelMode.",
14971490
"type": "object",
14981491
"properties": {
14991492
"countryRegion": {
1500-
"type": "object",
1501-
"description": "Represents a country or region, containing related details.",
1502-
"properties": {
1503-
"ISO": {
1504-
"description": "ISO of country/region represents an [ISO 3166-1 Alpha-2 region/country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)",
1505-
"type": "string"
1506-
}
1507-
}
1493+
"$ref": "#/definitions/CountryRegion"
15081494
},
15091495
"adminDistricts": {
15101496
"description": "The subdivision name in the country or region for an address. This element is typically treated as the first order administrative subdivision, but in some cases it also contains the second, third, or fourth order subdivision in a country, dependency, or region.",
15111497
"type": "array",
15121498
"items": {
1513-
"type": "object",
1514-
"properties": {
1515-
"shortName": {
1516-
"type": "string",
1517-
"description": "The short name for the corresponding adminDistrict field, \nFor adminDistrict[0], this could be short name of state such as WA. This is only available for the US, Canada, and Mexico."
1518-
}
1519-
}
1499+
"$ref": "#/definitions/AdminDistrictTruck"
15201500
}
15211501
}
15221502
}
@@ -1742,6 +1722,30 @@
17421722
}
17431723
}
17441724
},
1725+
"AdminDistrictTruck": {
1726+
"description": "The subdivision name in the country or region for an address. This element is typically treated as the first order administrative subdivision, but in some cases it also contains the second, third, or fourth order subdivision in a country, dependency, or region.",
1727+
"type": "object",
1728+
"properties": {
1729+
"shortName": {
1730+
"type": "string",
1731+
"description": "The short name for the corresponding adminDistrict field, \nFor adminDistrict[0], this could be short name of state such as WA. This is only available for the US, Canada, and Mexico."
1732+
}
1733+
}
1734+
},
1735+
"CountryRegion": {
1736+
"type": "object",
1737+
"description": "Represents a country or region, containing related details.",
1738+
"properties": {
1739+
"name": {
1740+
"description": "name of country/region",
1741+
"type": "string"
1742+
},
1743+
"ISO": {
1744+
"description": "ISO of country/region represents an [ISO 3166-1 Alpha-2 region/country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)",
1745+
"type": "string"
1746+
}
1747+
}
1748+
},
17451749
"Leg": {
17461750
"x-ms-client-name": "RouteLeg",
17471751
"description": "Information about a section of a route between two waypoints. More information about the fields contained in a route Leg:",

0 commit comments

Comments
 (0)