Submit GP Job

Description

The submitJob operation is performed on an asynchronous geoprocessing task resource. The result of this operation is a geoprocessing job resource. You can provide arguments to the submitJob operation as query parameters defined in the parameters table below.

Request parameters

Parameter

Description

f

Description: The response format. The default response format is html. Support for f=amf was added at 10.0 and removed at 10.7. Support for f=geojson was added at 10.5.

Values: html | json | kmz | geojson

<gpParameter1>, <gpParameter2>, ...

Description: The various input parameters accepted by the corresponding GP task. These parameters are listed in the parameters property of the JSON representation associated with the GP task resource.

The valid values for the input parameters are dependent on the data type of the parameter. These values are discussed in more detail in Submit GP Job.

env:outSR

This option was deprecated at 10.6.1. See the context parameter below.

env:processSR

This option was deprecated at 10.6.1. See the context parameter below.

context

This option was added at 10.6.1.

Description: The context of the service can be specified. Currently, context supports outSR, processSR, and extent.

outSR is the spatial reference of the output geometries.

processSR is the spatial reference that the model will use to perform geometry operations.

The spatial reference can be specified as either a well-known ID or as a spatial reference JSON object. If the outSR is not specified, the output geometries are in the spatial reference of the input geometries. If processSR is specified and outSR is not specified, the output geometries are in the spatial reference of the process spatial reference. If processSR is specified and outSR is not specified, the output geometries are in the spatial reference of the process spatial reference.

extent will only process features that overlap the specified extent. The output features will have an extent that is the same or larger than extent.

returnTrueCurves

This option was added at 10.5.

Description: If true, true curves will be returned in the results if the features have curves. The default is false.

The geojson output format does not support curves. The combination of f=geojson and returnTrueCurves=true should not be used.

Input parameters

Learn more about the syntax and examples of supported input GP data types.

GET request example usage

With this operation, the majority of the parameters that you include in your request are dependent on the input parameter types of the geoprocessing task you are submitting. The execute and submitJob geoprocessing operations share the same syntax for all input parameter types, and examples of all input parameter types are discussed in subsequent sections of this topic.

Example 3: Request a processing extent

Submit a job to a geoprocessing task, but request that the extent have xmin 7,602,115, ymin 660,605, xmax 7,619,050, and ymax 676,100, with the extent in spatial reference in NAD 1983 State Plane Oregon North (wkid 102726, feet).

https://server/ServerWebAdaptor/rest/services/ServiceName/GPServer/TaskName/submitJob?input=points&context={extent:{"xmin":7602115,"ymin":660605,"xmax":7619050,"ymax":676100,spatialReference:{"wkid":102726}}}

Example 4: Request an output feature service with input as a hosted feature service layer

https://server/ServerWebAdaptor/rest/services/ServiceName/GPServer/TaskName/submitJob?in_features={"url":"https://sampleserver6.arcgisonline.com/arcgis/rest/services/LocalGovernment/CitizenRequests/FeatureServer/0"}&buffer_distance_or_field={"distance":10,"units":"esriMiles"}&line_side=FULL&line_end_type=ROUND&method=PLANAR&esri_out_feature_service_name=output_requests_hosted_featureservice&f=json

JSON response syntax and example

Learn more about JSON response syntax and examples