Retrieve travel modes

URL:
https://<root>/<ndlayer-url>/retrieveTravelModes
Methods:
GETPOST

Description

The retrieveTravelModes service is used to get the supported travel modes configured in your organization or on the network dataset.

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 in ArcGIS Enterprise, add new travel modes that better reflect your organization’s workflows, or remove travel modes that are not suitable for your organization’s workflows.

To learn more about travel modes, see Configure travel modes.

In ArcGIS Server Manager, if the Use portal travel modes setting is checked, the retrieveTravelModes service will use travel modes configured in your ArcGIS Enterprise portal instead of the travel modes defined on the network dataset used by the service.

Learn more about edit routing service properties

Request parameters

ParameterDetails

token

(Required)

The identity of the user who has permissions to access the service.

f

(Optional)

The response format. The default response format is html .

Values: html | json | pjson

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.

Use dark colors for code blocksCopy
1
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:

Use dark colors for code blocksCopy
1
https://machine.domain.com/webadaptor/rest/services/Routing/NetworkAnalysis/NAServer/Route/retrieveTravelModes?f=json&token=<yourToken>

JSON Response example

The response below is returned by the retrieveTravelModes service.

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
{
    "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

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
{
  "error": {
    "code": <code>,
    "message": "<message>",
    "details": ["<details>"]
  }
}

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.