GP Service

Description

Geoprocessing is a fundamental part of enterprise GIS operations. Geoprocessing provides GIS users with data analysis, data management, and data conversion tools.

A geoprocessing service is a collection of published tools that perform tasks necessary for manipulating and analyzing geographic information across a wide range of disciplines. Each tool performs one or more operations, such as projecting a dataset from one map projection to another, adding fields to a table, or creating buffer zones around features. A tool accepts input (such as feature sets, tables, and property values), executes operations using the input data, and generates output for presentation in a map or further processing by the client. Tools can be executed synchronously (in sequence) or asynchronously.

Use a geoprocessing service to do the following:

Many GIS tasks involve the repetition of work, and this creates the need for a framework to provide automation of workflows. Geoprocessing services address this need by using a model to combine a series of operations in a sequence and then exposing the model as a tool.

The GP Service resource provides basic information associated with the service, such as the service description, the tasks provided, the execution type, and the result's map server name.

The GP Service resource has operations that return results after a task is successfully completed. The supported operations are as follows:

Child resources

The Info child resource is always available to any geoprocessing service. If the upload capability is enabled, the uploads child resource will be added. To enable the upload capability, turn on the Upload option during publishing, or edit the service properties in Server Manager.

Request parameters

Parameter

Details

f

The response format. The default response format is html.

Values: html | json | pjson

Example GET usage

JSON Response syntax

The syntax will vary depending on the ArcGIS Server version and where the geoprocessing service is published. For example, if a geoprocessing service is published from ArcGIS Desktop, the cimVersion and capabilities fields may not be available. Some older versions of ArcGIS Server will not have currentVersion available.

JSON response syntax

{
    "currentVersion": <currentVersion>,
    "cimVersion": <CIM version>,
    "serviceDescription" : "<serviceDescription>",
    "tasks": ["<taskName1>", "<taskName2>"],
    "executionType": "esriExecutionTypeAsynchronous"|"esriExecutionTypeSynchronous",
    "resultMapServerName": "<resultMapServerName>",
    "maximumRecords": <maximumRecords>,
    "capabilities": <capabilities>
}

JSON Response example

A sample JSON response to the Esri Drive Time tool on sample server 1

{
  "serviceDescription": "Use this service to calculate drive time polygons in the United States using an input location and drive times. The maximum drive time allowed for this service is 15 minutes. This is a sample service hosted by Esri, powered by ArcGIS Server. This example allows you to practice using ArcGIS APIs for JavaScript, Flex, and Silverlight. Esri reserves the right to change or remove this service at any time and without notice.\n\n", 
  "tasks": [
    "CreateDriveTimePolygons", 
    "CreateDriveTimePolygonsDisks"
  ], 
  "executionType": "esriExecutionTypeSynchronous", 
  "resultMapServerName": ""
}

JSON Response example from SampleServer 6

URL for the 911 call hot spot analysis on sampleserver 6 with a JSON return format: https://sampleserver6.arcgisonline.com/arcgis/rest/services/911CallsHotspot/GPServer?f=json

This is a sample JSON response to the 911 Calls Hotspot tool on sample server 6. A request can be made using Example GET usage number 2 in the section above.

{
 "currentVersion": 10.71,
 "serviceDescription": "The tool filters 911 calls based on the query provided by the client and creates a hot spot raster based on the frequency of calls. The hot spot raster is created using the Spatial Statistics Hot Spot Analysis tool, which ... (see Description)",
 "tasks": [
  "911 Calls Hotspot"
 ],
 "executionType": "esriExecutionTypeAsynchronous",
 "resultMapServerName": "911CallsHotspot",
 "maximumRecords": 1000
}

JSON Response example for services published from ArcGIS Pro

This is a sample for the hot spot analysis tool published from ArcGIS Pro 2.5 to ArcGIS Server 10.8.

{
 "currentVersion": 10.8,
 "cimVersion": "2.5.0",
 "serviceDescription": "Test tool",
 "tasks": [
  "HotspotAnalysis"
 ],
 "executionType": "esriExecutionTypeAsynchronous",
 "resultMapServerName": "",
 "maximumRecords": 1000,
 "capabilities": "Uploads"
}