URL:
https://<task-url>/submitJob
Methods:
GETPOST
Version Introduced:
9.3

Description

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

To run a synchronous geoprocessing service task, see Execute a task .

Request parameters

ParameterDescription

<gpParameter1>, <gpParameter2>, ...

(Optional)

The various input parameters accepted by the corresponding geoprocessing task. These parameters are listed in the parameters property of the JSON representation associated with the geoprocessing 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 Geoprocessing services data types.

context

(Optional)

The context of the service can be specified. See the Context Parameter for usage.

returnTrueCurves

(Optional)

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

Values: true | false

Default: false

simplifyFeatures

(Optional)

There is an option to maintain the original geometry without simplifying it by setting this option to false. Simplifying return features can significantly reduce the size of the response while fulfilling the accuracy needs for most analysis, especially for complex and large geometries.

Values: true | false

Default: true

outputRasterFormat

(Optional)

Added at ArcGIS Enterprise 12.2, this parameter specifies the output format of the result raster. When set to to TIF, or when left unspecified, the output raster is returned as a .tif file. When set to CRF, the output raster is returned as a CRF formatted archive. The default value is TIF.

Values: TIF | CRF

f

(Optional)

The response format. The default response format is html.

Values: html | json | kmz | geojson

Default: html

Input parameters

Learn more about the syntax and examples of supported input data types. For the output_feature_service_name parameter, see the last section.

Context parameter

The context parameter, available for all geoprocessing services, supports outSR, processSR, and extent. The outSR property is the spatial reference of the output geometries for all outputs, which is equivalent to the new environment property 'outputCoordinateSystem' added at ArcGIS Enterprise 12.2. The processSR property is the spatial reference that the model will use to perform geometry operations, and it acts like the outputCoordinateSystem for tools running locally in Pro, for individual tools in the service if they support it. The spatial reference can be specified as either a well-known ID or a spatial reference JSON object. If the outSR value 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. For more information, see Using spatial references. extent will only process features that overlap the specified extent. The output features will have an extent that is the same or larger than the extent value.

Starting at ArcGIS Enterprise 12.2, most environments can be specified in the context parameter, like cellSize, ZTolerance, pyramid, and many more. For more information, see geoprocessing environment settings. You tool must honor the environment settings, otherwise they will not have any effects on the result. Below is a limited sample showing some of the most commonly used setting.

Context JSON Schema

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://schemas.esri.com/geoprocessing/environments.schema.json",
  "title": "Geoprocessing Environments",
  "type": "object",
  "properties": {
    "extent": {"type": "string", "esriType": "GPExtent"},
    "outputCoordinateSystem": {"type": "string", "esriType": "GPCoordinateSystem"},
    "outputMFlag": {"type": "string", "esriType": "GPString"},
    "outputZFlag": {"type": "string", "esriType": "GPString"},
    "cellSize": {"anyOf": [{"type": "number"}, {"type": "string", "format": "uri", "description": "Image service URL."}], "esriType": "GPSACellSize"},
    "cellSizeProjectionMethod": {"type": "string", "esriType": "GPString"},
    "mask": {"type": "string", "esriType": "GPRasterDataLayer"},
    "snapRaster": {"type": "string", "esriType": "GPRasterDataLayer"},
    "processorType": {"type": "string", "esriType": "GPString"},
    "gpuId": {"type": "integer", "esriType": "GPLong"},
    "nodata": {"type": "string", "esriType": "GPString"},
    "randomGenerator": {"$ref": "#/$defs/GPRandomNumberGenerator"},
    "parallelProcessingFactor": {"type": "string", "esriType": "GPString"},
    "geographicTransformations": {"type": "string", "esriType": "GPValueTable:[GPString]"},
    "autoCommit": {"type": "integer", "esriType": "GPLong"},
    "outputZValue": {"type": "number", "esriType": "GPDouble"},
    "qualifiedFieldNames": {"type": "boolean", "esriType": "GPBoolean"},
    "transferDomains": {"type": "boolean", "esriType": "GPBoolean"},
    "transferGDBAttributeProperties": {"type": "boolean", "esriType": "GPBoolean"},
    "configKeyword": {"type": "string", "esriType": "GPString"},
    "maintainAttachments": {"type": "boolean", "esriType": "GPBoolean"},
    "XYDomain": {"$ref": "#/$defs/GPXYDomain"},
    "MDomain": {"$ref": "#/$defs/GPMDomain"},
    "ZDomain": {"$ref": "#/$defs/GPZDomain"},
    "preserveGlobalIds": {"type": "boolean", "esriType": "GPBoolean"},
    "cellAlignment": {"type": "string", "esriType": "GPString"},
    "XYTolerance": {"type": "string", "esriType": "GPLinearUnit"},
    "MTolerance": {"type": "number", "esriType": "GPDouble"},
    "ZTolerance": {"type": "string", "esriType": "GPLinearUnit"},
    "XYResolution": {"type": "string", "esriType": "GPLinearUnit"},
    "MResolution": {"type": "number", "esriType": "GPDouble"},
    "ZResolution": {"type": "string", "esriType": "GPLinearUnit"},
    "recycleProcessingWorkers": {"type": "integer", "esriType": "GPLong"},
    "retryOnFailures": {"type": "integer", "esriType": "GPLong"},
    "matchMultidimensionalVariable": {"type": "boolean", "esriType": "GPBoolean"},
    "unionDimension": {"type": "boolean", "esriType": "GPBoolean"},
    "maintainCurveSegments": {"type": "boolean", "esriType": "GPBoolean"},
    "curveProcessingMethod": {"type": "string", "esriType": "GPString"},
    "timeZone": {"type": "string", "esriType": "GPString"},
    "daylightSaving": {"type": "boolean", "esriType": "GPBoolean"},
    "pyramid": {"$ref": "#/$defs/GPRasterGDBEnvPyramid"},
    "rasterStatistics": {"$ref": "#/$defs/GPRasterGDBEnvStatistics"},
    "compression": {"$ref": "#/$defs/GPRasterGDBEnvCompression"},
    "tileSize": {"$ref": "#/$defs/GPRasterGDBEnvTileSize"},
    "resamplingMethod": {"type": "string", "esriType": "GPString"},
    "referenceScale": {"type": "number", "esriType": "GPDouble"},
    "cartographicCoordinateSystem": {"type": "string", "esriType": "GPCoordinateSystem"},
    "cartographicPartitions": {"type": "string", "esriType": "GPFeatureLayer"},
    "annotationTextStringFieldLength": {"type": "integer", "esriType": "GPLong"},
    "tinSaveVersion": {"type": "string", "esriType": "GPString"},
    "terrainMemoryUsage": {"type": "boolean", "esriType": "GPBoolean"},
    "coincidentPoints": {"type": "string", "esriType": "GPString"},
    "S100FeatureCatalogueFile": {"type": "string", "esriType": "DEFile"},
    "baUseDetailedAggregation": {"type": "boolean", "esriType": "GPBoolean"},
    "baUseSegmentNames": {"type": "string", "esriType": "GPString"}
  },
  "$defs": {
    "GPRandomNumberGenerator": {
      "type": "object",
      "properties": {
        "seed": {
          "type": "integer"
        },
        "generator": {
          "type": "string",
          "enum": [
            "ACM599",
            "MERSENNE_TWISTER",
            "STANDARD_C"
          ]
        }
      }
    },
    "GPXYDomain": {
      "type": "object",
      "properties": {
        "xmin": {
          "type": "number"
        },
        "ymin": {
          "type": "number"
        },
        "xmax": {
          "type": "number"
        },
        "ymax": {
          "type": "number"
        }
      }
    },
    "GPMDomain": {
      "type": "object",
      "properties": {
        "mmin": {
          "type": "number"
        },
        "mmax": {
          "type": "number"
        }
      }
    },
    "GPZDomain": {
      "type": "object",
      "properties": {
        "zmin": {
          "type": "number"
        },
        "zmax": {
          "type": "number"
        }
      }
    },
    "GPRasterGDBEnvStatistics": {
      "type": "object",
      "required": [
        "calculateStatistics",
        "xSkipFactor",
        "ySkipFactor",
        "ignoreValue"
      ],
      "properties": {
        "calculateStatistics": {
          "type": "boolean",
          "description": "Indicates whether raster statistics should be calculated."
        },
        "xSkipFactor": {
          "type": "integer",
          "minimum": 1,
          "description": "The horizontal skip factor used when calculating statistics."
        },
        "ySkipFactor": {
          "type": "integer",
          "minimum": 1,
          "description": "The vertical skip factor used when calculating statistics."
        },
        "ignoreValue": {
          "type": "string",
          "description": "Raster pixel value or values to ignore when calculating statistics."
        }
      }
    },
    "GPRasterGDBEnvCompression": {
      "type": "object",
      "description": "Raster geodatabase compression environment settings.",
      "required": [
        "compressionType",
        "compressionQuality",
        "maxError"
      ],
      "properties": {
        "compressionType": {
          "type": "string",
          "description": "Raster geodatabase compression type.",
          "enum": [
            "LZ77",
            "JPEG",
            "JPEG2000",
            "PackBits",
            "LZW",
            "RLE",
            "CCITT Group 3",
            "CCITT Group 4",
            "CCITT_1D",
            "JPEG_YCbCr",
            "LERC",
            "JPEGPNG",
            "NONE",
            "WEBP",
            "ZSTD",
            "QB3",
            "JXL"
          ]
        },
        "compressionQuality": {
          "type": "integer",
          "minimum": 0,
          "maximum": 100,
          "default": 75,
          "description": "Compression quality value. Commonly used by lossy compression types such as JPEG."
        },
        "maxError": {
          "type": "number",
          "default": 0.0,
          "description": "Maximum allowed compression error, used by error-bounded compression types such as LERC."
        }
      }
    },
    "GPRasterGDBEnvTileSize": {
      "type": "object",
      "description": "Raster geodatabase tile size environment value.",
      "required": [
        "tileWidth",
        "tileHeight"
      ],
      "properties": {
        "tileWidth": {
          "type": "integer",
          "minimum": 1,
          "default": 128,
          "description": "The raster tile width in pixels."
        },
        "tileHeight": {
          "type": "integer",
          "minimum": 1,
          "default": 128,
          "description": "The raster tile height in pixels."
        }
      }
    },
    "GPRasterGDBEnvPyramid": {
      "type": "object",
      "required": [
        "createPyramids",
        "pyramidLevels",
        "resampleMethod",
        "compressionType",
        "compressionQuality",
        "pyramidSkipFirst",
        "pyramidSipsMode"
      ],
      "properties": {
        "createPyramids": {
          "type": "boolean",
          "description": "Whether raster pyramids should be created."
        },
        "pyramidLevels": {
          "type": "integer",
          "minimum": -1,
          "description": "Number of pyramid levels. A value of -1 indicates the default or automatic level behavior."
        },
        "resampleMethod": {
          "type": "string",
          "enum": [
            "NEAREST",
            "BILINEAR",
            "CUBIC"
          ],
          "description": "Resampling method used when building pyramids."
        },
        "compressionType": {
          "type": "string",
          "description": "Pyramid compression type serialized from esriRasterCompressionType."
        },
        "compressionQuality": {
          "type": "integer",
          "minimum": 0,
          "maximum": 100,
          "description": "Compression quality value."
        },
        "pyramidSkipFirst": {
          "type": "boolean",
          "description": "Whether to skip the first pyramid level."
        },
        "pyramidSipsMode": {
          "type": "boolean",
          "description": "Whether pyramid SIPS mode is enabled."
        }
      }
    }
  }
}

Context JSON sample

This is a hypothetical JSON assuming your geoprocessing service has many tools, and the tools are using the context parameter to set the environment setting when that specific tool is running.

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
{
  "extent": {
    "xmin": -104.44,
    "ymin": 34.83,
    "xmax": -104.43,
    "ymax": 34.84,
    "spatialReference": {
      "wkid": 4326
    }
  },
  "processSR": {
    "wkid": 3857
  },
  "outSR": {
    "wkid": 102100
  },
  "cellSize": 10,
  "ZTolerance": {"distance": 0.001, "units": "esriMeters"},
  "randomGenerator": {"seed":50,"generator":"MERSENNE_TWISTER"},
  "pyramid": {
    "createPyramids": true,
    "pyramidLevels": 6,
    "resampleMethod": "BILINEAR",
    "compressionType": "JPEG",
    "compressionQuality": 75,
    "pyramidSkipFirst": false,
    "pyramidSipsMode": false
  },
  "daylightSaving": true
}

GET request example usage

With the submitJob 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 ERGByChemical task.

Submit a request with values for the Incident_Point parameter and HTML return type. There is no need to provide other parameters if you want to use the default value.

Use dark colors for code blocksCopy
1
https://organization.example.com/<context>/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 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.

Use dark colors for code blocksCopy
1
https://organization.example.com/<context>/rest/services/ServiceName/GPServer/TaskName/submitJob?input=points&context={extent:{"xmin":7602115,"ymin":660605,"xmax":7619050,"ymax":676100,spatialReference:{"wkid":102726}}}

JSON response

The response of the submitJob operation is the Jobs resource.

Output feature service name

Providing a value to the output feature service name parameter will enable your federated asynchronous geoprocessing service to generate a hosted feature service for all of your feature and table results. 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_out_feature_service_name parameter. Some properties will not have any effect in an earlier version of ArcGIS Enterprise.

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
{
    "$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": "Provide a name to create a new output feature service. Use a service URL or the name of a service to specify an existing hosted feature service to be overwritten.",
            "type": "object",
            "properties": {
                "serviceUrl": {
                    "description": "The URL of a hosted feature service which will be overwritten.",
                    "type": "string",
                    "format": "uri"
                },
                "name": {
                    "description": "The name of a hosted feature service when creating a new output feature service. You can also use the name to specify a hosted feature service to be overwritten, but this is not recommended",
                    "type": "string"
                }
            }
        },
        "itemProperties": {
            "description": "Specify whether you want to overwrite an existing hosted feature service, along with the portal item metadata.",
            "type": "object",
            "properties": {
                "overwrite": {
                    "description": "Whether you want to overwrite an existing hosted feature service.",
                    "type": "boolean"
                },
                "itemId": {
                    "description": "The itemId of the hosted feature service to be overwritten. This is recommended to specify an existing hosted feature service.",
                    "type": "string"
                },
                "tags": {
                    "description": "Tags to be added for the new or overwritten hosted feature service in addition to default tags.",
                    "type": "string"
                },
                "description": {
                    "description": "Description of the new or overwritten hosted feature service.",
                    "type": "string"
                },
                "snippet": {
                    "description": "Snippet of the new or overwritten hosted feature service",
                    "type": "string"
                },
                "newFeatureServiceOnOverwriteFail":{
                    "description": "Whether to try reprojecting the result into the spatial reference of the existing hosted feature service during overwrite.",
                    "type": "boolean"
                }
            }
        }
    }
}

Example 1: Request an output feature service as the result using a string

This example specify the output_requests_hosted_featureservice as the name of the output feature service.

Use dark colors for code blocksCopy
1
https://organization.example.com/<context>/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

Example 2: Request an output feature service as the result using a JSON object

This example uses a JSON object when creating a new output feature service. Only name of the serviceProperties, and tags, description, and snippet for the itemProperties are available if you want to specify them.

The sample JSON used in the following request is

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
{
  "serviceProperties":{
    "name":"output_requests_hosted_featureservice"
  },
  "itemProperties":{
    "tags":"resultTag",
    "description":"demo description",
    "snippet":"demo snippet"
  }
}

A similar request as example 1 but using the JSON object above instead for the esri_out_feature_service_name parameter. You may need to manually encode the request if your client does not encode it.

Use dark colors for code blocksCopy
1
https://organization.example.com/<context>/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={"serviceProperties":{"name":"output_requests_hosted_featureservice"},"itemProperties":{"tags":"resultTag","description":"demo description","snippet":"demo snippet"}}&f=json

Overwrite an output feature service

Starting with ArcGIS Enterprise 11.0, 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 a user assigned an administrator role. 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, serviceURL, or itemID 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 serviceURL or itemID, 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.

Sample JSON to use an itemID to overwrite an output feature service.

Use dark colors for code blocksCopy
1
2
3
4
5
6
{
  "itemProperties":  {
    "itemId": "52d34e7598e7484188228xxxxxx",
    "overwrite": true
  }
}

Sample JSON to use a serviceURL to overwrite an output feature service.

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
{
  "serviceProperties": {
    "serviceUrl": "https://organization.example.com/<context>/rest/services/Hosted/FeatureServiceName/FeatureServer"
  },
  "itemProperties": {
    "overwrite": true
  }
}

Sample JSON to use a name to overwrite an output feature service.

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
{
  "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.

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
{
  "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 newFeatureServiceOnOverwriteFail 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_1. These new hosted feature services will have the new spatial reference from the latest geoprocessing result.

Sample JSON using the newFeatureServiceOnOverwriteFail property to overwrite an output feature service with an extra attempt.

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
{
  "itemProperties": {
    "itemId": "52d34e7598e7484188228xxxxxx",
    "overwrite": true,
    "newFeatureServiceOnOverwriteFail": true
  }
}

Output image service

With ArcGIS Enterprise 11.4 and later, you can use the esri_out_image_service parameter to generate shared instance image services for all of your raster results for your asynchronous geoprocessing services, regardless if they are on a federated or a stand-alone server. To learn more about output image service, see Use an output image service.

The JSON schema for the esri_out_image_service parameter. You can specify an explicit name if you have one output raster parameter, or multiple explicit names for multiple output raster parameter starting at ArcGIS Enterprise 11.5 or later. You can also use a combination of prefix and names if you want some of your output with explicit names, and the rest of them using the prefix format. The overwrite property is only available starting at ArcGIS Enterprise 11.5.

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
{
    "$schema": "http://json-schema.org/draft-07/schema#",
    "title": "JSON Schema for esri_out_image service",
    "description": "The JSON schema for the output image service parameter.",
    "type": [
        "string",
        "object"
    ],
    "properties": {
        "serviceProperties": {
            "description": "Specify the prefix for your result.",
            "type": "object",
            "properties": {
                "prefix": {
                    "description": "The prefix of your output image services.",
                    "type": "string"
                },
                "name":{
                    "description": "The explicit name of your output image service when you have a single output raster parameter.",
                    "type": "string"
                },
                "names":{
                    "description": "The names of the outout raster parameter which you want to specific an explicit output image service name.",
                    "type": "object",
                    "patternProperties ": {
                      "^.*$": {
                        "description": "The key will be the name of the output raster parameter, and the value will be the explicit name you want to specify for that output parameter.",
                        "type": "string"
                      }
                    }
                },
                "format":{
                    "description": "The format of the image service data source. This property only applies when the output is in memory. Default is crf.",
                    "type": "string",
                    "enum": ["crf", "tif"]
                },
                "folder":{
                    "description": "The folder of your image service in the server directory. If this folder does not exist, it will be created.",
                    "type": "string"
                }
            }
        },
        "itemProperties": {
            "description": "The metadata for the portal item of your web imagery layers, and the metadata of your image services.",
            "type": "object",
            "properties": {
                "tags": {
                    "description": "New tags of the new web imagery layer item and the image service.",
                    "type": "string"
                },
                "description": {
                    "description": "New description of the new web imagery layer item and the image service.",
                    "type": "string"
                },
                "snippet": {
                    "description": "New snippet of the new web imagery layer item and the image service.",
                    "type": "string"
                },
                "folder": {
                    "description": "The folder of new web imagery layer item. If this folder does not exist, it will be created.",
                    "type": "string"
                },
                "overwrite":{
                    "description": "Whether you want to overwrite existing image services.",
                    "type": "boolean"
                }
            }
        }
    }
}

Example 1: Provide a prefix in string format

This example requests an output image service as a result by providing a prefix in string format.

Use dark colors for code blocksCopy
1
https://organization.example.com/<context>/rest/services/ServiceName/GPServer/TaskName/submitJob?inputRaster=choice1&esri_out_image_service=testing

Example 2: Provide a JSON object

This example requests an output image service as the result using a JSON object with optional properties specification.

The sample JSON used in the following request.

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
12
13
{
  "serviceProperties":{
    "prefix": "testing",
    "format": "tif",
    "folder": "all_image_services"
  },
  "itemProperties":{
    "tags": "resultTag",
    "description": "demo description",
    "snippet": "demo snippet",
    "folder": "analyst_testing"
  }
}

A similar request as example 1 but using the JSON object above instead for the esri_out_image_service_name parameter. You may need to manually encode the request if your client does not encode it.

Use dark colors for code blocksCopy
1
https://organization.example.com/<context>/rest/services/ServiceName/GPServer/TaskName/submitJob?inputRaster=choice1&esri_out_image_service={"serviceProperties":{"prefix":"testing","format":"tif","folder":"all_image_services"},"itemProperties":{"tags":"resultTag","description":"demo description","snippet":"demo snippet","folder":"analyst_testing"}}&f=json

Example 3: Provide a JSON object by specify explicit names for different output parameters

This example specifies the output_raster_layer output parameter to have an image service with a name california_clip, and the processed_output_raster output parameter to have an image service with a name california_processed.

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
{
  "serviceProperties":{
    "names": {
        "output_raster_layer": "california_clip",
        "processed_output_raster": "california_processed"
    }
  }
}

Overwrite an image service

With ArcGIS Enterprise 11.5 or later, you can overwrite an existing image service when you submit a job.

To overwrite an existing image service, the user running the web tool must be the owner of that image service or a user assigned an administrator role. This requirement is in addition to all other prerequisites when using the output image service. To learn more about the prerequisites, see Use an output image service. Use the name property if you have only one image service to overwrite. Use the prefix property if your existing image services follow the <prefix>_<output parameter name> format. You can also use names property if your output image service is explicitly specified before. If the existing image service contains critical information, back up the data, as the overwrite process will delete the data of the image service first.

All other properties, like the snippet, summary, tags, and format are also available if you want to overwrite them.

Sample JSON to use prefix to overwrite two existing image services corresponding to two required raster output parameters, which are testrun_first_raster_output and testrun_second_raster_output in the all_image_services folder of ArcGIS Server.

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
{
  "serviceproperties": {
    "prefix": "testrun",
    "folder": "all_image_services"
  },
  "itemProperties": {
    "overwrite":  true
  }
}

Sample JSON to use names to overwrite several existing image services corresponding to multiple raster outputs, along with some other metadata to be overwritten.

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
{
  "serviceproperties": {
    "names": {
      "Output_Terrain": "terrain",
      "Output_Slope": "slope",
      "Output_Processed_Raster": "processed"
    }
  },
  "itemProperties": {
    "overwrite":  true,
    "tags": "daily, updates",
    "snippet": "Dec 29, 2024",
    "description": "Script update results."
  }
}

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.