- URL:
- https://<task-url>/submitJob
- Methods:
GET
POST
- Version Introduced:
- 9.3
Description
The submit
operation is performed on an asynchronous task
resource. The result of this operation is a Jobs
resource. You can provide arguments to the submit
operation as query parameters defined in the parameters table below.
To run a synchronous geoprocessing service task, see Execute a task .
Request parameters
Parameter | Description |
---|---|
(Optional) | The various input parameters accepted by the corresponding geoprocessing task. These parameters are listed in the The valid values for the input parameters are dependent on the data type of the parameter. These values are discussed in more detail in Geoprocessing services data types. |
(Optional) | Added at 10.6.1. The context of the service can be specified. Currently, The spatial reference can be specified as either a well-known ID or a spatial reference JSON object. If the
|
(Optional) | Added at 10.5. If Values: Default: |
(Optional) | Added at 11.4, there is an option to maintain the original geometry without simplifying it by setting this option to Values: Default: |
(Optional) | The response format. The default response format is Values: Default: |
Input parameters
Learn more about the syntax and examples of supported input data types. For the output_
parameter, see the last section.
GET request example usage
With the submit
operation, the majority of the parameters that you include in a request are dependent on the input parameter types of the geoprocessing task you are submitting. You must encode the URL if the client you are using does not encode a request automatically.
Example 1: Submit a job
Submit a job to the ERGBy
task.
Submit a request with values for the Incident_
parameter and HTML return type. There is no need to provide other parameters if you want to use the default value.
https://machine.domain.com/webadaptor/rest/services/PublicSafety/EMModels/GPServer/ERGByChemical/submitJob?Incident_Point={"features":[{"geometry":{"x":-104.44,"y":34.83},"attributes":{"Id":43,"Name":"Incident"}}]}&f=html
Example 2: Request a different output spatial reference
Submit a job to the task similar to Example 1 but request that the output spatial reference be Web Mercator (102100) on 10.6 or earlier:
Adding env:
to the request with value 102100.
https://machine.domain.com/webadaptor/rest/services/PublicSafety/EMModels/GPServer/ERGByChemical/submitJob?Incident_Point={"features":[{"geometry":{"x":-104.44,"y":34.83},"attributes":{"Id":43,"Name":"Incident"}}]}&env:outSR=102100&f=html
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).
The value of the input
parameter is points
, and the context
has a value as above.
https://machine.domain.com/webadaptor/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
The input is a feature layer of a sample server feature service with a buffer distance, among other input parameters.
https://machine.domain.com/webadaptor/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
The response of the submit
operation is the Jobs
resource.
Output feature service name
Starting with ArcGIS Enterprise 11, you can overwrite an output feature service when you submit a job.
To overwrite an existing hosted feature service, the user running the web tool must be the owner of that hosted feature service or the ArcGIS Enterprise administrator. This requirement is in addition to all other prerequisites when using the output feature service. To learn more about the prerequisites, see Use web tools with an output feature service. Use the name
, service
, or item
property of the hosted feature service to specify the hosted feature service to overwrite. If the existing hosted feature service contains critical information, back up the data, as the overwrite process will delete all existing layers of the hosted feature layer. When possible, use service
or item
, because they provide the most accurate identification of a hosted feature service. Using a name to identify a hosted feature service may not provide an exact match in some circumstances.
To learn more about how to publish a geoprocessing service with this parameter, see Use web tools with an output feature service.
JSON schema for the esri_
parameter. Some properties will not have any effect in an earlier version of ArcGIS Enterprise.
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "JSON Schema for esri_out_feature_service_name",
"description": "The JSON schema for the output feature service name parameter. Before ArcGIS Enterprise 11, only a string, which is the name of the desired output feature service name, is valid. Starting at ArcGIS Enterprise 11, new properties allow the overwrite of an output feature service.",
"type": [
"string",
"object"
],
"properties": {
"serviceProperties": {
"description": "Use a service URL or the name of a service to specify an existing hosted feature service.",
"type": "object",
"properties": {
"serviceUrl": {
"description": "The URL of a hosted feature service.",
"type": "string",
"format": "uri"
},
"name": {
"description": "The name of a hosted feature service, this is not recommended",
"type": "string"
}
}
},
"itemProperties": {
"type": "object",
"properties": {
"overwrite": {
"description": "Whether to allow overwrite.",
"type": "boolean"
},
"itemId": {
"description": "The itemId of the hosted feature service to be overwritten. This is the best way to specify a hosted feature service.",
"type": "string"
},
"tags": {
"description": "New tags to be added after the overwrite.",
"type": "string"
},
"description": {
"description": "New description of the overwritten hosted feature service.",
"type": "string"
},
"snippet": {
"description": "New snippet of the overwritten hosted feature service",
"type": "string"
},
"newFeatureServiceOnOverwriteFail":{
"description": "Whether to try reproject the result to overwrite.",
"type": "boolean"
}
}
}
}
}
Sample JSON to use an item
to overwrite an output feature service.
{
"itemProperties": {
"itemId": "52d34e7598e7484188228xxxxxx",
"overwrite": true
}
}
Sample JSON to use a service
to overwrite an output feature service.
{
"serviceProperties": {
"serviceUrl": "https://machine.domain.com/webadaptor/rest/services/Hosted/FeatureServiceName/FeatureServer"
},
"itemProperties": {
"overwrite": true
}
}
Sample JSON to use a name
to overwrite an output feature service.
{
"serviceProperties": {
"name": "currentfeatureservicename"
},
"itemProperties": {
"overwrite": true
}
}
In addition, you can specify the tags, description, and snippet of the new service. The new description and snippet will overwrite the existing descriptions and snippets of the hosted feature service, and the new tags will merge with existing tags.
Sample JSON to overwrite an output feature service with tags, description, and snippet.
{
"itemProperties": {
"itemId": "52d34e7598e7484188228xxxxxx",
"overwrite": true,
"tags": "a, b, c",
"description": "custom description",
"snippet": "custom snippet"
}
}
You can also set an additional property when submitting a job with the output feature service parameter. For example, the geoprocessing result's spatial reference may differ from the hosted feature service you want to overwrite, or there may be temporary issues with the data store. In these cases, the overwrite will fail, resulting in a failed geoprocessing service run. However, you can use the new
property to keep the geoprocessing result, especially after a long run. If the overwrite fails, an incrementing number will be appended to the current hosted feature service name, for example, currentname_
. These new hosted feature services will have the new spatial reference from the latest geoprocessing result.
Sample JSON using the new
property to overwrite an output feature service with an extra attempt.
{
"itemProperties": {
"itemId": "52d34e7598e7484188228xxxxxx",
"overwrite": true,
"newFeatureServiceOnOverwriteFail": true
}
}