Skip to content

Commit 5791f02

Browse files
committed
Updated api_version to 2025-01-01 for example requests to the Route service.
1 parent 9fdd350 commit 5791f02

11 files changed

+21
-21
lines changed

articles/azure-maps/azure-maps-authentication.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ After the application receives an access token, the SDK and/or application sends
7474
Here's an example of an Azure Maps route request that uses a Microsoft Entra ID OAuth Bearer token:
7575

7676
```http
77-
GET /route/directions/json?api-version=1.0&query=52.50931,13.42936:52.50274,13.43872
77+
GET /route/directions/json?api-version=2025-01-01&query=52.50931,13.42936:52.50274,13.43872
7878
Host: atlas.microsoft.com
7979
x-ms-client-id: 30d7cc….9f55
8080
Authorization: Bearer eyJ0e…HNIVN

articles/azure-maps/how-to-use-best-practices-for-routing.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ The next sections demonstrate how to make calls to the Route APIs using the disc
8181
In the first example below the departure time is set to the future, at the time of writing.
8282

8383
```http
84-
https://atlas.microsoft.com/route/directions/json?subscription-key={Your-Azure-Maps-Subscription-key}&api-version=1.0&query=51.368752,-0.118332:51.385426,-0.128929&travelMode=car&traffic=true&departAt=2025-03-29T08:00:20&computeTravelTimeFor=all
84+
https://atlas.microsoft.com/route/directions/json?api-version=2025-01-01&subscription-key={Your-Azure-Maps-Subscription-key}&query=51.368752,-0.118332:51.385426,-0.128929&travelMode=car&traffic=true&departAt=2025-03-29T08:00:20&computeTravelTimeFor=all
8585
```
8686

8787
The response contains a summary element, like the following example. Because the departure time is set to the future, the **trafficDelayInSeconds** value is zero. The **travelTimeInSeconds** value is calculated using time-dependent historic traffic data. So, in this case, the **travelTimeInSeconds** value is equal to the **historicTrafficTravelTimeInSeconds** value.
@@ -104,7 +104,7 @@ The response contains a summary element, like the following example. Because the
104104
In the next example, we have a real-time routing request, where departure time is now. It's not explicitly specified in the URL because it's the default value.
105105

106106
```http
107-
https://atlas.microsoft.com/route/directions/json?subscription-key={Your-Azure-Maps-Subscription-key}&api-version=1.0&query=47.6422356,-122.1389797:47.6641142,-122.3011268&travelMode=car&traffic=true&computeTravelTimeFor=all
107+
https://atlas.microsoft.com/route/directions/json?api-version=2025-01-01&subscription-key={Your-Azure-Maps-Subscription-key}&query=47.6422356,-122.1389797:47.6641142,-122.3011268&travelMode=car&traffic=true&computeTravelTimeFor=all
108108
```
109109

110110
The response contains a summary as shown in the following example. Because of congestion, the **trafficDelaysInSeconds** value is greater than zero. It's also greater than **historicTrafficTravelTimeInSeconds**.
@@ -155,7 +155,7 @@ Azure Maps Routing APIs support commercial vehicle routing, covering commercial
155155
The sample request below queries a route for a commercial truck. The truck is carrying class 1 hazardous waste material.
156156

157157
```http
158-
https://atlas.microsoft.com/route/directions/json?subscription-key={Your-Azure-Maps-Subscription-key}&api-version=1.0&vehicleWidth=2&vehicleHeight=2&vehicleCommercial=true&vehicleLoadType=USHazmatClass1&travelMode=truck&instructionsType=text&query=51.368752,-0.118332:41.385426,-0.128929
158+
https://atlas.microsoft.com/route/directions/json?api-version=2025-01-01&subscription-key={Your-Azure-Maps-Subscription-key}&vehicleWidth=2&vehicleHeight=2&vehicleCommercial=true&vehicleLoadType=USHazmatClass1&travelMode=truck&instructionsType=text&query=51.368752,-0.118332:41.385426,-0.128929
159159
```
160160

161161
The Route API returns directions that accommodate the dimensions of the truck and the hazardous waste. You can read the route instructions by expanding the `guidance` element.
@@ -167,7 +167,7 @@ The Route API returns directions that accommodate the dimensions of the truck an
167167
Changing the US Hazmat Class, from the above query, results in a different route to accommodate this change.
168168

169169
```http
170-
https://atlas.microsoft.com/route/directions/json?subscription-key={Your-Azure-Maps-Subscription-key}&api-version=1.0&vehicleWidth=2&vehicleHeight=2&vehicleCommercial=true&vehicleLoadType=USHazmatClass9&travelMode=truck&instructionsType=text&query=51.368752,-0.118332:41.385426,-0.128929
170+
https://atlas.microsoft.com/route/directions/json?api-version=2025-01-01&subscription-key={Your-Azure-Maps-Subscription-key}&vehicleWidth=2&vehicleHeight=2&vehicleCommercial=true&vehicleLoadType=USHazmatClass9&travelMode=truck&instructionsType=text&query=51.368752,-0.118332:41.385426,-0.128929
171171
```
172172

173173
The following response is for a truck carrying a class 9 hazardous material, which is less dangerous than a class 1 hazardous material. When you expand the `guidance` element to read the directions, notice that the directions aren't the same. There are more route instructions for the truck carrying class 1 hazardous material.
@@ -183,7 +183,7 @@ With the Azure Maps Route Direction APIs, developers can request details for eac
183183
The following query sets the `sectionType` to `traffic`. It requests the sections that contain traffic information from Seattle to San Diego.
184184

185185
```http
186-
https://atlas.microsoft.com/route/directions/json?subscription-key={Your-Azure-Maps-Subscription-key}&api-version=1.0&sectionType=traffic&query=47.6062,-122.3321:32.7157,-117.1611
186+
https://atlas.microsoft.com/route/directions/json?api-version=2025-01-01&subscription-key={Your-Azure-Maps-Subscription-key}&sectionType=traffic&query=47.6062,-122.3321:32.7157,-117.1611
187187
```
188188

189189
The response contains the sections that are suitable for traffic along the given coordinates.
@@ -211,7 +211,7 @@ If you want to optimize the best order to visit the given waypoints, then you ne
211211
The following query requests the path for six waypoints, with the `computeBestOrder` parameter set to `false`. It's also the default value for the `computeBestOrder` parameter.
212212

213213
```http
214-
https://atlas.microsoft.com/route/directions/json?api-version=1.0&subscription-key={Your-Azure-Maps-Subscription-key}&computeBestOrder=false&query=47.606544,-122.336502:47.759892,-122.204821:47.670682,-122.120415:47.480133,-122.213369:47.615556,-122.193689:47.676508,-122.206054:47.495472,-122.360861
214+
https://atlas.microsoft.com/route/directions/json?api-version=2025-01-01&subscription-key={Your-Azure-Maps-Subscription-key}&computeBestOrder=false&query=47.606544,-122.336502:47.759892,-122.204821:47.670682,-122.120415:47.480133,-122.213369:47.615556,-122.193689:47.676508,-122.206054:47.495472,-122.360861
215215
```
216216

217217
The response describes the path length to be 140,851 meters, and that it would take 9,991 seconds to travel that path.
@@ -229,7 +229,7 @@ This route waypoint order is: 0, 1, 2, 3, 4, 5, and 6.
229229
The following query requests the path for the same six waypoints, as in the above sample. This time, the `computeBestOrder` parameter set to `true` (the traveling salesman optimization).
230230

231231
```http
232-
https://atlas.microsoft.com/route/directions/json?api-version=1.0&subscription-key={Your-Azure-Maps-Subscription-key}&computeBestOrder=true&query=47.606544,-122.336502:47.759892,-122.204821:47.670682,-122.120415:47.480133,-122.213369:47.615556,-122.193689:47.676508,-122.206054:47.495472,-122.360861
232+
https://atlas.microsoft.com/route/directions/json?api-version=2025-01-01&subscription-key={Your-Azure-Maps-Subscription-key}&computeBestOrder=true&query=47.606544,-122.336502:47.759892,-122.204821:47.670682,-122.120415:47.480133,-122.213369:47.615556,-122.193689:47.676508,-122.206054:47.495472,-122.360861
233233
```
234234

235235
The response describes the path length to be 91,814 meters, and that it would take 7,797 seconds to travel that path. The travel distance and the travel time are both lower here because the API returned the optimized route.

articles/azure-maps/itinerary-optimization-service.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ Matrix size = 5 origins x 5 destinations = 25
7878
The Route Matrix POST request:
7979

8080
```html
81-
https://atlas.microsoft.com/route/matrix/json?api-version=1.0&routeType=shortest
81+
https://atlas.microsoft.com/route/matrix/json?api-version=2025-01-01&routeType=shortest
8282
```
8383

8484
```json

articles/azure-maps/map-route.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ const onload = () => {
256256

257257
// Send a request to the route API
258258
let url = "https://atlas.microsoft.com/route/directions/json?";
259-
url += "&api-version=1.0";
259+
url += "&api-version=2025-01-01";
260260
url +=
261261
"&query=" +
262262
startPoint.geometry.coordinates[1] +

articles/azure-maps/migrate-calculate-route.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ http://dev.virtualearth.net/REST/V1/Routes/driving?wp.0=47.610173,-122.204171&wp
6969
Azure Maps _Route Directions_ API POST request:
7070

7171
``` http
72-
https://atlas.microsoft.com/route/directions?api-version=2023-10-01-preview&subscription-key={Your-Azure-Maps-Subscription-key}
72+
https://atlas.microsoft.com/route/directions?api-version=2025-01-01&subscription-key={Your-Azure-Maps-Subscription-key}
7373
```
7474

7575
Included in the body of the request:

articles/azure-maps/migrate-calculate-truck-route.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ Included in the body of the request:
9494
Azure Maps _Route Directions_ API POST request:
9595

9696
``` http
97-
https://atlas.microsoft.com/route/directions?api-version=2023-10-01-preview&subscription-key={Your-Azure-Maps-Subscription-key}
97+
https://atlas.microsoft.com/route/directions?api-version=2025-01-01&subscription-key={Your-Azure-Maps-Subscription-key}
9898
```
9999

100100
Included in the body of the request:

articles/azure-maps/migrate-help-using-copilot.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ Step 6. Create and add a SymbolLayer to the map.
208208

209209
Step 7. Create and add a LineLayer to the map.
210210

211-
Step 8. Utilize the Route POST API: <https://atlas.microsoft.com/route/directions?api-version=2023-10-01-preview&subscription-key=${subscriptionKey}> to find the route between the start and end points. Add the GeoJSON response to the DataSource and adjust the map's camera based on the bounding box of the response.
211+
Step 8. Utilize the Route POST API: <https://atlas.microsoft.com/route/directions?api-version=2025-01-01&subscription-key=${subscriptionKey}> to find the route between the start and end points. Add the GeoJSON response to the DataSource and adjust the map's camera based on the bounding box of the response.
212212

213213
Example request body:
214214

@@ -335,7 +335,7 @@ GitHub Copilot can create the following code snippet to provide an interface for
335335
336336
function getRoute(startCoordinates, endCoordinates) {
337337
fetch(
338-
`https://atlas.microsoft.com/route/directions?api-version=2023-10-01-preview&subscription-key=${subscriptionKey}`,
338+
`https://atlas.microsoft.com/route/directions?api-version=2025-01-01&subscription-key=${subscriptionKey}`,
339339
{
340340
method: "POST",
341341
headers: {

articles/azure-maps/tutorial-ev-routing.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ routeType="eco"
9797
constantSpeedConsumptionInkWhPerHundredkm="50,8.2:130,21.3"
9898

9999
# Get boundaries for the electric vehicle's reachable range.
100-
routeRangeResponse = await (await session.get("https://atlas.microsoft.com/route/range/json?subscription-key={}&api-version=1.0&query={}&travelMode={}&vehicleEngineType={}&currentChargeInkWh={}&maxChargeInkWh={}&timeBudgetInSec={}&routeType={}&constantSpeedConsumptionInkWhPerHundredkm={}"
100+
routeRangeResponse = await (await session.get("https://atlas.microsoft.com/route/range/json?subscription-key={}&api-version=2025-01-01&query={}&travelMode={}&vehicleEngineType={}&currentChargeInkWh={}&maxChargeInkWh={}&timeBudgetInSec={}&routeType={}&constantSpeedConsumptionInkWhPerHundredkm={}"
101101
.format(subscriptionKey,str(currentLocation[0])+","+str(currentLocation[1]),travelMode, vehicleEngineType, currentChargeInkWh, maxChargeInkWh, timeBudgetInSec, routeType, constantSpeedConsumptionInkWhPerHundredkm))).json()
102102

103103
polyBounds = routeRangeResponse["reachableRange"]["boundary"]
@@ -200,7 +200,7 @@ locationData = {
200200
}
201201

202202
# Get the travel time and distance to each specified charging station.
203-
searchPolyRes = await (await session.post(url = "https://atlas.microsoft.com/route/matrix/json?subscription-key={}&api-version=1.0&routeType=shortest&waitForResults=true".format(subscriptionKey), json = locationData)).json()
203+
searchPolyRes = await (await session.post(url = "https://atlas.microsoft.com/route/matrix/json?subscription-key={}&api-version=2025-01-01&routeType=shortest&waitForResults=true".format(subscriptionKey), json = locationData)).json()
204204

205205
distances = []
206206
for dist in range(len(reachableLocations)):
@@ -218,7 +218,7 @@ After locating the nearest charging station, use the [Get Route Directions] API
218218

219219
```python
220220
# Get the route from the electric vehicle's current location to the closest charging station.
221-
routeResponse = await (await session.get("https://atlas.microsoft.com/route/directions/json?subscription-key={}&api-version=1.0&query={}:{}".format(subscriptionKey, str(currentLocation[0])+","+str(currentLocation[1]), closestChargeLoc))).json()
221+
routeResponse = await (await session.get("https://atlas.microsoft.com/route/directions/json?subscription-key={}&api-version=2025-01-01&query={}:{}".format(subscriptionKey, str(currentLocation[0])+","+str(currentLocation[1]), closestChargeLoc))).json()
222222

223223
route = []
224224
for loc in range(len(routeResponse["routes"][0]["legs"][0]["points"])):

articles/azure-maps/tutorial-prioritized-routes.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ This section shows you how to use the Azure Maps Route service to get directions
231231
endPoint.geometry.coordinates[1] + "," +
232232
endPoint.geometry.coordinates[0];
233233
//Make a search route request for a truck vehicle type
234-
var truckRouteUrl = `https://atlas.microsoft.com/route/directions/json?api-version=1.0&travelMode=truck&vehicleWidth=2&vehicleHeight=2&vehicleLength=5&vehicleLoadType=USHazmatClass2&query=${query}`;
234+
var truckRouteUrl = `https://atlas.microsoft.com/route/directions/json?api-version=2025-01-01&travelMode=truck&vehicleWidth=2&vehicleHeight=2&vehicleLength=5&vehicleLoadType=USHazmatClass2&query=${query}`;
235235
fetch(truckRouteUrl, {
236236
headers: {
237237
"Subscription-Key": map.authentication.getToken()
@@ -275,7 +275,7 @@ This section shows you how to use the Azure Maps Route service to get directions
275275
2. Next, append the following JavaScript code to create a route for a car.
276276

277277
```JavaScript
278-
var carRouteUrl = `https://atlas.microsoft.com/route/directions/json?api-version=1.0&query=${query}`;
278+
var carRouteUrl = `https://atlas.microsoft.com/route/directions/json?api-version=2025-01-01&query=${query}`;
279279
fetch(carRouteUrl, {
280280
headers: {
281281
"Subscription-Key": map.authentication.getToken()

articles/azure-maps/tutorial-route-location.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ This section shows you how to use the Azure Maps Route Directions API to get rou
205205
startPoint.geometry.coordinates[0] + ":" +
206206
endPoint.geometry.coordinates[1] + "," +
207207
endPoint.geometry.coordinates[0];
208-
var url = `https://atlas.microsoft.com/route/directions/json?api-version=1.0&query=${query}`;
208+
var url = `https://atlas.microsoft.com/route/directions/json?api-version=2025-01-01&query=${query}`;
209209

210210
//Make a search route request
211211
fetch(url, {

0 commit comments

Comments
 (0)