Description
Retrieve travel modes service is used to get the supported travel modes configured in your ArcGIS Online organization.
A travel mode is essentially a template consisting of a long list of travel settings that define the physical characteristics of a vehicle or pedestrian. Those characteristics are considered when performing a network analysis to define how the vehicle or pedestrian travels and where it can go. Selecting a predefined travel mode allows you to efficiently and consistently set a number of properties that are appropriate for the mode of travel you intend to model. The benefits are time savings and reduced complexity—you don't need to remember and configure, with each analysis, the parameter values that most accurately characterize the vehicles you're modeling.
An administrator of your organization can configure travel modes to change the properties of the default travel modes provided by ArcGIS Online, add new travel modes that better reflect your organization’s workflows, or remove travel modes that are not suitable for your organization’s workflows.
Learn more about configuring travel modes
Request URL
retrive
is an operation on each network analysis layer. You can make a request on each network analysis layer to retrieve travel modes using the following url's:
https://route.arcgis.com/arcgis/rest/services/World/Route/NAServer/Route_World/retrieveTravelModes
https://route.arcgis.com/arcgis/rest/services/World/ServiceAreas/NAServer/ServiceArea_World/retrieveTravelModes
https://route.arcgis.com/arcgis/rest/services/World/OriginDestinationCostMatrix/NAServer/OriginDestinationCostMatrix_World/retrieveTravelModes
https://route.arcgis.com/arcgis/rest/services/World/ClosestFacility/NAServer/ClosestFacility_World/retrieveTravelModes
Request parameters
Parameter | Details |
---|---|
(Required) | The identity of a user who has permissions to access the service. |
(Optional) | Specify the response format. The default value is Values: |
Required parameter
token
Use this parameter to specify a token that provides the identity of a user that has the permissions to access the service. The security and authentication page provides more information about how an access token can be obtained.
token=<yourToken>
Optional parameter
f
Use this parameter to specify the response format. The parameter can have html
, json
or pjson
as arguments, for example, f=json
. The pjson
value is used for printing the JSON response in a prettified format.
Example usage
You can make a request to retrieve travel modes using the following form:
https://route.arcgis.com/arcgis/rest/services/World/Route/NAServer/Route_World/retrieveTravelModes?f=json&token=
JSON Response example
The response below is returned by the retrieve
service.
{
"currentVersion": 11.1,
"defaultTravelMode": "FEgifRtFndKNcJMJ",
"supportedTravelModes": [
{
"attributeParameterValues": [
{
"attributeName": "Avoid Private Roads",
"parameterName": "Restriction Usage",
"value": "AVOID_MEDIUM"
},
{
"attributeName": "Walking",
"parameterName": "Restriction Usage",
"value": "PROHIBITED"
},
{
"attributeName": "Preferred for Pedestrians",
"parameterName": "Restriction Usage",
"value": "PREFER_LOW"
},
{
"attributeName": "WalkTime",
"parameterName": "Walking Speed (km/h)",
"value": 5
},
{
"attributeName": "Avoid Roads Unsuitable for Pedestrians",
"parameterName": "Restriction Usage",
"value": "AVOID_HIGH"
}
],
"description": "Follows paths and roads that allow pedestrian traffic and finds solutions that optimize travel time. The walking speed is set to 5 kilometers per hour.",
"distanceAttributeName": "Kilometers",
"id": "caFAgoThrvUpkFBW",
"impedanceAttributeName": "WalkTime",
"name": "Walking Time",
"restrictionAttributeNames": [
"Avoid Private Roads",
"Avoid Roads Unsuitable for Pedestrians",
"Preferred for Pedestrians",
"Walking"
],
"simplificationTolerance": 2,
"simplificationToleranceUnits": "esriMeters",
"timeAttributeName": "WalkTime",
"type": "WALK",
"useHierarchy": false,
"uturnAtJunctions": "esriNFSBAllowBacktrack"
},
{
"attributeParameterValues": [
{
"attributeName": "Avoid Private Roads",
"parameterName": "Restriction Usage",
"value": "AVOID_MEDIUM"
},
{
"attributeName": "Walking",
"parameterName": "Restriction Usage",
"value": "PROHIBITED"
},
{
"attributeName": "Preferred for Pedestrians",
"parameterName": "Restriction Usage",
"value": "PREFER_LOW"
},
{
"attributeName": "WalkTime",
"parameterName": "Walking Speed (km/h)",
"value": 5
},
{
"attributeName": "Avoid Roads Unsuitable for Pedestrians",
"parameterName": "Restriction Usage",
"value": "AVOID_HIGH"
}
],
"description": "Follows paths and roads that allow pedestrian traffic and finds solutions that optimize travel distance.",
"distanceAttributeName": "Kilometers",
"id": "yFuMFwIYblqKEefX",
"impedanceAttributeName": "Kilometers",
"name": "Walking Distance",
"restrictionAttributeNames": [
"Avoid Private Roads",
"Avoid Roads Unsuitable for Pedestrians",
"Preferred for Pedestrians",
"Walking"
],
"simplificationTolerance": 2,
"simplificationToleranceUnits": "esriMeters",
"timeAttributeName": "WalkTime",
"type": "WALK",
"useHierarchy": false,
"uturnAtJunctions": "esriNFSBAllowBacktrack"
},
{
"attributeParameterValues": [
{
"attributeName": "Avoid Private Roads",
"parameterName": "Restriction Usage",
"value": "AVOID_MEDIUM"
},
{
"attributeName": "Driving an Automobile",
"parameterName": "Restriction Usage",
"value": "PROHIBITED"
},
{
"attributeName": "Through Traffic Prohibited",
"parameterName": "Restriction Usage",
"value": "AVOID_HIGH"
},
{
"attributeName": "TravelTime",
"parameterName": "Vehicle Maximum Speed (km/h)",
"value": 0
},
{
"attributeName": "Roads Under Construction Prohibited",
"parameterName": "Restriction Usage",
"value": "PROHIBITED"
},
{
"attributeName": "Avoid Gates",
"parameterName": "Restriction Usage",
"value": "AVOID_MEDIUM"
},
{
"attributeName": "Avoid Express Lanes",
"parameterName": "Restriction Usage",
"value": "PROHIBITED"
},
{
"attributeName": "Avoid Carpool Roads",
"parameterName": "Restriction Usage",
"value": "PROHIBITED"
}
],
"description": "Models the movement of cars and other similar small automobiles, such as pickup trucks, and finds solutions that optimize travel time. Travel obeys one-way roads, avoids illegal turns, and follows other rules that are specific to cars, but does not discourage travel on unpaved roads. When you specify a start time, dynamic travel speeds based on traffic are used where it is available.",
"distanceAttributeName": "Kilometers",
"id": "NmNhNDUwZmE1YTlj",
"impedanceAttributeName": "TravelTime",
"name": "Rural Driving Time",
"restrictionAttributeNames": [
"Avoid Carpool Roads",
"Avoid Express Lanes",
"Avoid Gates",
"Avoid Private Roads",
"Driving an Automobile",
"Roads Under Construction Prohibited",
"Through Traffic Prohibited"
],
"simplificationTolerance": 10,
"simplificationToleranceUnits": "esriMeters",
"timeAttributeName": "TravelTime",
"type": "AUTOMOBILE",
"useHierarchy": true,
"uturnAtJunctions": "esriNFSBAtDeadEndsAndIntersections"
},
{
"attributeParameterValues": [
{
"attributeName": "Avoid Private Roads",
"parameterName": "Restriction Usage",
"value": "AVOID_MEDIUM"
},
{
"attributeName": "Driving an Automobile",
"parameterName": "Restriction Usage",
"value": "PROHIBITED"
},
{
"attributeName": "Through Traffic Prohibited",
"parameterName": "Restriction Usage",
"value": "AVOID_HIGH"
},
{
"attributeName": "TravelTime",
"parameterName": "Vehicle Maximum Speed (km/h)",
"value": 0
},
{
"attributeName": "Roads Under Construction Prohibited",
"parameterName": "Restriction Usage",
"value": "PROHIBITED"
},
{
"attributeName": "Avoid Gates",
"parameterName": "Restriction Usage",
"value": "AVOID_MEDIUM"
},
{
"attributeName": "Avoid Express Lanes",
"parameterName": "Restriction Usage",
"value": "PROHIBITED"
},
{
"attributeName": "Avoid Carpool Roads",
"parameterName": "Restriction Usage",
"value": "PROHIBITED"
}
],
"description": "Models the movement of cars and other similar small automobiles, such as pickup trucks, and finds solutions that optimize travel distance. Travel obeys one-way roads, avoids illegal turns, and follows other rules that are specific to cars, but does not discourage travel on unpaved roads.",
"distanceAttributeName": "Kilometers",
"id": "Yzk3NjI1NTU5NjVj",
"impedanceAttributeName": "Kilometers",
"name": "Rural Driving Distance",
"restrictionAttributeNames": [
"Avoid Carpool Roads",
"Avoid Express Lanes",
"Avoid Gates",
"Avoid Private Roads",
"Driving an Automobile",
"Roads Under Construction Prohibited",
"Through Traffic Prohibited"
],
"simplificationTolerance": 10,
"simplificationToleranceUnits": "esriMeters",
"timeAttributeName": "TravelTime",
"type": "AUTOMOBILE",
"useHierarchy": true,
"uturnAtJunctions": "esriNFSBAtDeadEndsAndIntersections"
},
...
],
}
JSON Response syntax
JSON Response syntax for a failed request
{
"error": {
"code": <code>,
"message": "<message>",
"details": ["<details>"]
}
}