Skip To Content

Using geoprocessing services

A geoprocessing service that has been published to ArcGIS Server, whether on its own or as part of a web tool, can be used in a variety of applications. Because geoprocessing services can be used simultaneously by multiple authorized users and clients, they allow your organization to extend and automate its custom geoprocessing workflows.

Even when you are working with a web tool in your ArcGIS Enterprise portal, you can still access its underlying geoprocessing service or services using the ArcGIS REST API. This enables you to script and extend the geoprocessing workflow executed by the service. You can use a geoprocessing service to do the following:

  • List available tools and their input and output properties.
  • Execute a task synchronously.
  • Submit a job to a task asynchronously.
  • Get job details, including job status.
  • Display results using a map service.
  • Display results using a hosted feature service.
  • Retrieve results for further processing by the client.

You can incorporate geoprocessing services into your web GIS applications, whether you're using ArcGIS Web AppBuilder, ArcGIS Developer resources, or any other environment capable of making REST API calls.

This topic provides an overview of the Esri client applications and resources that can use geoprocessing services published to ArcGIS Server.

ArcGIS Pro

Once a geoprocessing service has been published, you can work with it in ArcGIS Pro, where geoprocessing services can be used in the same way as built-in geoprocessing tools to execute geoprocessing tasks.

There are advantages to using geoprocessing services in your desktop GIS workflows: Instead of using your desktop machine's own processing power to execute geoprocessing tasks, you can use the more powerful server machines running the geoprocessing service. In addition, geoprocessing services and web tools often provide custom geoprocessing workflows and task chains to help accomplish your specific GIS workflows.

You don't have to be the author or owner of a geoprocessing service or web tool to use it in your desktop GIS application. If you have the appropriate credentials to access the resource on the web, you can connect from ArcGIS Pro and use the service.

Use a geoprocessing service in ArcGIS Pro

By connecting from ArcGIS Pro to ArcGIS Enterprise, you can take advantage of the geoprocessing resources running on its servers.

To use a web tool that's been shared to your ArcGIS Enterprise portal, ensure you've signed in and set it as your Active Portal.

To directly use the underlying geoprocessing service of a web tool, or to use a geoprocessing service published to a stand-alone server site, you can make a server connection under Servers of the Catalog pane.

Learn more about using geoprocessing services

Python scripts

You can write a Python script to execute and make use of a geoprocessing service in multiple ways. The primary way to execute a script is to make use of ArcPy, Esri's Python site package. ArcPy has built-in methods to connect to, execute, and handle the result from the service.

Alternatively, using the ArcGIS Server Services Directory to access a geoprocessing service directly, you can use built-in Python modules to make REST calls using a JSON structure to transfer results. You will have to build a client from scratch with Python code to make use of this. The majority of scripts will connect to and use geoprocessing services through ArcPy.

The following topic provides details on Python Script Authoring in ArcGIS Pro.

Use geoprocessing services in Python scripts with ArcGIS Pro

Web applications

There are several ways to make your geoprocessing service's capabilities available on the web in applications other than the ArcGIS Enterprise portal's Map Viewer Classic. While each client application that uses a geoprocessing service ultimately does so through the ArcGIS REST API, you don't necessarily need to know how to make programmatic REST requests. For example, ArcGIS Web AppBuilder allows you to add your geoprocessing services through a user-friendly widget. More advanced options are available with custom coding through the ArcGIS Developer APIs and SDKs.

ArcGIS REST API

Any client capable of making REST API calls can invoke the ArcGIS REST API to query a geoprocessing service. Each programmatic request to the service prompts it to execute its geoprocessing task or tasks and return a response to the client.

A number of data types can be input parameters when making a REST API request to a geoprocessing service. You can make requests in two ways:

  1. To make a synchronous task request, use the execute operation. You must wait for the results to return before performing other operations.
  2. To make an asynchronous task request, use the submitJob operation. You can do other tasks while waiting for the results to return; you can also cancel a queued asynchronous job.

ArcGIS Web AppBuilder

Regardless of whether your geoprocessing services are on a federated or a stand-alone server, you can use the Geoprocessing Widget of the ArcGIS Web AppBuilder by providing the URL of your geoprocessing services; see Geoprocessing widget. For more detailed information, see Use web tools with ArcGIS Web AppBuilder and Use geoprocessing services with ArcGIS Web AppBuilder.