Routing services

CautionCaution:

For up-to-date information about routing services, see the most recent edition of this topic in the web help.

Routing services allow you to perform analysis on transportation networks, such as finding the best route across a city, finding the closest emergency vehicle or facility, identifying a service area around a location, or servicing a set of orders with a fleet of vehicles. If you have used ArcGIS Pro to perform analysis on a street network, routing services allow you to perform similar analysis using web services running on your ArcGIS Server site.

Dive-inDive-in:

Routing services are either map services with network analysis capability (also known as Network Analysis services) or geoprocessing services available with ArcGIS Server. If you have previously worked with either map services or geoprocessing services, the REST API for routing services will be familiar to you. For routing services that are map services, the REST API for routing services is distinct from the REST API for map services. However, for routing services that are geoprocessing services, the routing services have the same REST API as any other geoprocessing service. You can think of a routing service as a geoprocessing service designed for performing a particular network analysis.

There are six types of analysis that can be performed using the routing services. Each type is available as a service and can be accessed using a unique REST endpoint for the service.

Execution modes

A routing service can support the synchronous or the asynchronous execution mode. An execution mode defines how the application using the service interacts with the service and gets the result. When using the synchronous execution mode, the application must wait for the request to finish and get the results. This execution mode is well-suited for requests that complete quickly (under 10 seconds). When using the asynchronous execution mode, the client must periodically check whether the service has finished execution and, once completed, get the result. While the service is executing, the application is available to do other things. This execution mode is well-suited for requests that take a long time to complete because it allows you to continue to interact with the application while the results are generated. Another advantage of the asynchronous mode for long running requests is that the application does not need to keep a connection open with the web server in your ArcGIS Server site while the request is being processed. This can prevent web server timeouts that can occur with long-running synchronous requests.

A routing service for an analysis type supports the same functionality regardless of the execution mode. However, the request URL and the parameter names supported by the service are different based on the execution mode. Certain network analysis types are available in both execution modes and some are only available in asynchronous execution mode.

The table below summarizes the execution mode available for each analysis type and links to detailed API reference for the routing services.

Publish routing services

To use the routing services from their REST endpoints, you must first publish the services to an ArcGIS Server site in your ArcGIS Enterprise deployment. The routing services need a network dataset that defines the data model for your transportation network on which the analysis is performed. Once you have a network dataset, you can publish the routing services using the Publish Routing Services utility available with ArcGIS Server.