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. The geoprocessing execute
and submit
operations share the same syntax for all input parameter types. For outputs, the result data syntax may be different from the inputs.
The data types listed in this topic are the data types supported on the server side. To learn more about supported data types from the publishing client, and how unsupported data types are converted during the publish process, see Input and output parameters.
GPFeatureRecordSetLayer
Input
The input parameter value for the GP
data type can be a feature
object, a layer, the URL of a map service or a feature service layer, or an uploaded server item.
featureSet syntax
For the syntax of feature
, see featureSet object.
Layer syntax
For the syntax of a layer, see Layer object.
Layer URL syntax
To specify a feature service layer or map service layer, provide the URL to the layer. An optional attribute filter can be added. Starting at 10.7.1, instead of querying time-enabled map service layers or time-enabled feature service layers, an optional time filter can be specified. Time can be filtered as a single integer timestamp using epoch time. Time can also be a range in a comma-delimited string, with a lower end and an upper end. Either end of the range can be null
.
Layer URL syntax
{
"url": "<url of a map service or a feature service layer>",
"filter": <attribute expression>,
"time": <time value>
}
Layer URL JSON schema
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Layer URL Input Schema",
"description": "It describes the JSON Schema for an input layer URL for the GPFeatureRecordSetLayer data type.",
"type": "object",
"required": [
"url"
],
"properties": {
"url": {
"description": "The URL of a feature service or map service layer. Attribute filters can also be applied at the end of the URL as a parameter.",
"type": "uri"
},
"filter": {
"description": "It filters based on the attribute value",
"type": "string"
},
"time": {
"description": "The desired time for a time-enabled service layer. Use the number to specify a timestamp, or use a comma delimited string to specify a range with a lower and an upper end, including null."
"type": ["string", "integer"],
"pattern": "^((?:-?\d+)+|null),((?:-?\d+)+|null)$"
}
}
}
itemID syntax
For a large set of geometries, you can specify an uploaded item as input for geoprocessing services that support uploads, which is one of the Child Resources values of the geoprocessing service. The item ID will be available once you use the upload
item operation to upload a JSON-based .txt
file or a .json
file. The item
value of the portal item is not supported regardless of the type of item, even if the server is federated.
{
"itemID" : "<itemID>"
}
Example 1: featureSet input
{
"geometryType": "esriGeometryPoint",
"spatialReference": {
"wkid": 4326
},
"fields": [
{
"name": "Id",
"type": "esriFieldTypeOID",
"alias": "Id"
},
{
"name": "Name",
"type": "esriFieldTypeString",
"alias": "Name"
}
],
"features": [
{
"geometry": {
"x": -104.44,
"y": 34.83
},
"attributes": {
"Id": 43,
"Name": "Feature 1"
}
},
{
"geometry": {
"x": -100.65,
"y": 33.69
},
"attributes": {
"Id": 67,
"Name": "Feature 2"
}
}
]
}
Example 2: featureSet value without a schema
When the input geometry
, spatial
, and fields
values match the default values, the input GP
value can exclude geometry
, spatial
, and fields
information. The geometry
, spatial
, and fields
values will be the default values if no other values are provided.
The geometry
value can be esri
, esri
, or esri
. If the geometry type is not specified, it defaults to esri
. If spatial
is not specified, it defaults to an unknown coordinate system.
{
"features": [
{
"geometry": {
"x": -104.44,
"y": 34.83
},
"attributes": {
"Id": 43,
"Name": "Feature 1"
}
},
{
"geometry": {
"x": -100.65,
"y": 33.69
},
"attributes": {
"Id": 67,
"Name": "Feature 2"
}
}
]
}
Example 3: hasZ or hasM property
Provide the has
or has
property for feature sets that contain z- or m-values, respectively. The following example has z-values:
{
"geometryType": "esriGeometryPoint",
"hasZ": true,
"spatialReference": {
"wkid": 4326
},
"fields": [
{
"name": "Id",
"type": "esriFieldTypeOID",
"alias": "Id"
},
{
"name": "Name",
"type": "esriFieldTypeString",
"alias": "Name"
}
],
"features": [
{
"geometry": {
"x": -104.44,
"y": 34.83,
"z": 10.0
},
"attributes": {
"Id": 43,
"Name": "Feature 1"
}
},
{
"geometry": {
"x": -100.65,
"y": 33.69,
"z": 11.0
},
"attributes": {
"Id": 67,
"Name": "Feature 2"
}
}
]
}
Example 4: URL to geometries or feature queries
For a large set of geometries, you can specify a URL to the input geometries stored in a JSON structure in a file on a public server. The URL value can also be a URL to an operation such as a Map
or Feature
query that returns a JSON feature set.
{
"url": "https://machine.domain.com/folder/filename.txt"
}
{
"url": "https://sampleserver6.arcgisonline.com/arcgis/rest/services/USA/MapServer/0/query?where=1%3D1&f=json"
}
Example 5: itemID value of an uploaded item
Once you upload the .json
or .txt
file, a unique item
value is generated, such as i1057fd92-669e-40c0-98c8-cf1b0500fa13.
Specify the itemID value returned using the upload
item operation.
{
"itemID":"i1057fd92-669e-40c0-98c8-cf1b0500fa13"
}
Example 6: URL of a service with an attribute filter
You can specify the URL of a map service layer or a feature service layer.
Specify the commercial damage assessment layer from a feature service on sampleserver6 with no filter.
{
"url": "https://sampleserver6.arcgisonline.com/arcgis/rest/services/CommercialDamageAssessment/FeatureServer/0"
}
Filter the citizen requests layer from a map service on sampleserver6 with an attribute filter selecting requests having a level 2 severity and null names.
{
"url": "https://sampleserver6.arcgisonline.com/arcgis/rest/services/LocalGovernment/CitizenRequests/MapServer/0",
"filter": "severity=2 and name is null"
}
Example 7: Time filter
Starting at 10.7.1, you can specify a time filter. Time can be filtered as a single instant or by separating the two ends of a time extent with a comma.
Specify a single timestamp.
{
"url": "https://machine.domain.com/webadaptor/rest/services/Hosted/myservicename/FeatureServer/0",
"time": 967855732000
}
Specify a time extent with a known lower end and a null upper end.
{
"url": "https://machine.domain.com/webadaptor/rest/services/Hosted/myservicename/FeatureServer/0",
"time": "967855732000,null"
}
Example 8: Use a 64-bit object ID
Starting at ArcGIS Enterprise 11.2, a geoprocessing service can support an input GP
value with a 64-bit object ID. If the object ID will exceed the 32-bit range, ensure that the field length in the schema is set to 8 bytes. You cannot use a feature
value with an object ID exceeding the 32-bit range without a schema. Otherwise, the object ID will result in a parsing error if any of the object ID values exceed the 32-bit range.
For a 64-bit object ID field, specify a field length of 8.
{
"displayFieldName": "",
"fieldAliases": {
"OBJECTID": "OBJECTID",
"AREA": "AREA",
"SHAPE_Length": "SHAPE_Length",
"SHAPE_Area": "SHAPE_Area"
},
"geometryType": "esriGeometryPolygon",
"spatialReference": {
"wkid": 4267,
"latestWkid": 4267
},
"fields": [
{
"name": "OBJECTID",
"type": "esriFieldTypeOID",
"alias": "OBJECTID",
"length": 8
},
{
"name": "AREA",
"type": "esriFieldTypeDouble",
"alias": "AREA"
},
{
"name": "SHAPE_Length",
"type": "esriFieldTypeDouble",
"alias": "SHAPE_Length"
},
{
"name": "SHAPE_Area",
"type": "esriFieldTypeDouble",
"alias": "SHAPE_Area"
}
],
"features": [
{
"attributes": {
"OBJECTID": 10000000001,
"AREA": 110667.29300000001,
"SHAPE_Length": 23.608489581822141,
"SHAPE_Area": 29.969228222488425
},
"geometry": {
"rings": [
[
[
-119.15146541595459,
38.411884784698486
],
[
-119.9942774772644,
39.311637878417969
],
[
-114.66767859458923,
35.656409978866577
],
[
-117.15952253341675,
36.959656000137329
],
[
-119.15146541595459,
38.411884784698486
]
]
]
}
}
]
}
Example 9: Date only, time only, and timestamp offset fields
Starting at ArcGIS Enterprise 11.2, a geoprocessing service can support an input with date only, time only, and timestamp offset fields. No special syntax is necessary to use these new field types if the features have them.
An input feature
value containing esri
, esri
, and esri
fields.
{
"geometryType": "esriGeometryPoint",
"hasZ": true,
"spatialReference": {
"wkid": 4326
},
"fields": [
{
"name": "OBJECTID",
"type": "esriFieldTypeOID",
"alias": "OBJECTID",
"length": 8
},
{
"name": "sampletime",
"type": "esriFieldTypeTimeOnly",
"alias": "sampletime"
},
{
"name": "sampledate",
"type": "esriFieldTypeDateOnly",
"alias": "sampledate"
},
{
"name": "sampleoffset",
"type": "esriFieldTypeTimestampOffset",
"alias": "sampleoffset"
}
],
"features": [
{
"geometry": {
"x": -104.44,
"y": 34.83,
"z": 10.0
},
"attributes": {
"OBJECTID": 1,
"sampletime": "10:00:00 AM",
"sampledate": "8/2/2020",
"sampleoffset": "8/2/2020 10:00:00.0000 AM -07:00"
}
}
]
}
Output
featureSet output
If the geoprocessing service is not associated with a result map service or if the return
parameter is set to data
, the parameter value for GP
is a JSON structure that is almost identical to feature
input for GP
other than the additional exceeded
property.
The exceeded
property is true
only if the number of records exceeds the maximum number configured by the server administrator. Otherwise, the property is set to false
. This additional property is unique to a feature
value generated by a geoprocessing service. To adjust the transfer limit, see Max Domain Count. There is no transfer limit if you use the output feature service.
If the geoprocessing service is associated with a result map service, the default output for the GP
parameter is a map image. However, you can explicitly request the feature data using the return
parameter in the URL and set its value to data
.
Starting at ArcGIS Enterprise 11.2, a geoprocessing service can support an output feature
value with a 64-bit object ID and esri
, esri
, and esri
field types, in addition to all other field types previously supported.
{
"paramName": "<paramName>",
"dataType": "GPFeatureRecordSetLayer",
"value": <featureSet object>
}
{
"paramName": "Output_Features",
"dataType": "GPFeatureRecordSetLayer",
"value": {
"geometryType": "esriGeometryPoint",
"hasZ": true,
"spatialReference": {
"wkid": 4326
},
"fields": [
{
"name": "OBJECTID",
"type": "esriFieldTypeOID",
"alias": "OBJECTID"
},
{
"name": "TextField",
"type": "esriFieldTypeString",
"alias": "TextField"
},
{
"name": "IntField",
"type": "esriFieldTypeInteger",
"alias": "IntegerField"
},
{
"name": "DoubleField",
"type": "esriFieldTypeDouble",
"alias": "DoubleField"
},
{
"name": "DateField",
"type": "esriFieldTypeDate",
"alias": "DateField"
}
],
"features": [
{
"geometry": {
"x": -104.36,
"y": 34.657,
"z": 10.0
},
"attributes": {
"OBJECTID": 1,
"TextField": "a",
"IntField": 1234,
"DoubleField": 1234.56,
"DateField": 229564800000
}
},
{
"geometry": {
"x": -114.749,
"y": 31.439,
"z": 11.0
},
"attributes": {
"OBJECTID": 2,
"TextField": "b",
"IntField": 5678,
"DoubleField": 5678.91,
"DateField": 239564800000
}
}
],
"exceededTransferLimit": false
}
}
An example when the number of result features exceeds the transfer limit. The features
section will become an empty list.
{
"paramName": "outputBuffer",
"dataType": "GPFeatureRecordSetLayer",
"value": {
"displayFieldName": "",
"geometryType": "esriGeometryPolygon",
"spatialReference": {
"wkid": 102100,
"latestWkid": 3857
},
"fields": [
{
"name": "OBJECTID",
"type": "esriFieldTypeOID",
"alias": "OID"
},
{
"name": "BUFF_DIST",
"type": "esriFieldTypeDouble",
"alias": "BUFF_DIST"
},
{
"name": "ORIG_FID",
"type": "esriFieldTypeInteger",
"alias": "ORIG_FID"
},
{
"name": "shape_Length",
"type": "esriFieldTypeDouble",
"alias": "shape_Length"
},
{
"name": "shape_Area",
"type": "esriFieldTypeDouble",
"alias": "shape_Area"
}
],
"features": [],
"exceededTransferLimit": true
}
}
FeatureCollection output
If the geoprocessing service is not associated with a result map service, and return
is set to true
, the parameter value for GP
is a JSON structure similar to the input layer
object.
Similar to the feature
output, the only additional property the exceeded
.
{
"paramName": "<paramName>",
"dataType": "GPFeatureRecordSetLayer",
"value": <LayerObject>
}
{
"paramName": "Output_Feature_Class",
"dataType": "GPFeatureRecordSetLayer",
"value": {
"layerDefinition": {
"name": "Output Feature Class",
"type": "Feature Layer",
"geometryType": "esriGeometryPolygon",
"objectIdField": "OBJECTID",
"fields": [
{
"name": "OBJECTID",
"type": "esriFieldTypeOID",
"alias": "OBJECTID"
},
{
"name": "Shape",
"type": "esriFieldTypeGeometry",
"alias": "Shape"
},
{
"name": "X",
"type": "esriFieldTypeInteger",
"alias": "X"
},
{
"name": "Y",
"type": "esriFieldTypeInteger",
"alias": "Y"
},
{
"name": "UserName",
"type": "esriFieldTypeString",
"alias": "UserName",
"length": 50
},
{
"name": "BUFF_DIST",
"type": "esriFieldTypeDouble",
"alias": "BUFF_DIST"
},
{
"name": "ORIG_FID",
"type": "esriFieldTypeInteger",
"alias": "ORIG_FID"
},
{
"name": "Shape_Length",
"type": "esriFieldTypeDouble",
"alias": "Shape_Length"
},
{
"name": "Shape_Area",
"type": "esriFieldTypeDouble",
"alias": "Shape_Area"
}
],
"drawingInfo": {
"renderer": {
"type": "simple",
"symbol": {
"type": "esriSFS",
"style": "esriSFSSolid",
"color": [
252,
193,
184,
255
],
"outline": {
"type": "esriSLS",
"style": "esriSLSSolid",
"color": [
110,
110,
110,
255
],
"width": 0.7
}
}
}
},
"templates": []
},
"featureSet": {
"displayFieldName": "",
"geometryType": "esriGeometryPolygon",
"spatialReference": {
"wkid": 26944,
"latestWkid": 26944
},
"features": [
{
"attributes": {
"OBJECTID": 1,
"X": 1959000,
"Y": 642000,
"UserName": null,
"BUFF_DIST": 152.40030480060963,
"ORIG_FID": 1,
"Shape_Length": 957.5593559328076,
"Shape_Area": 72966.16885441207
},
"geometry": {
"curveRings": [
[
[
1959000,
642152.4002999999
],
{
"a": [
[
1959000,
642152.4002999999
],
[
1959000,
641999.9999951993
],
0,
1
]
}
]
]
}
},
{
"attributes": {
"OBJECTID": 2,
"X": 1959000,
"Y": 641000,
"UserName": null,
"BUFF_DIST": 152.40030480060963,
"ORIG_FID": 2,
"Shape_Length": 957.5593559328076,
"Shape_Area": 72966.16885441207
},
"geometry": {
"curveRings": [
[
[
1959000,
641152.4002999999
],
{
"a": [
[
1959000,
641152.4002999999
],
[
1959000,
640999.9999951993
],
0,
1
]
}
]
]
}
}
],
"exceededTransferLimit": false
}
}
}
Feature service output
If the asynchronous geoprocessing service is not associated with a result map service, and the output feature service name is provided during the service consumption, the parameter value for the GP
or GP
data type is a JSON structure with only one property: the URL of the result output feature service. There is no limit to the number of features allowed in a feature service output.
{
"paramName": "<paramName>",
"dataType": "GPFeatureRecordSetLayer" | "GPRecordSet",
"value": {
"url": "<URL to a result feature service layer>"
}
}
{
"paramName": "ResultPolygons",
"dataType": "GPFeatureRecordSetLayer",
"value": {
"url": "https://machine.domain.com/webadaptor/rest/services/Hosted/outputFeatureServiceName/FeatureServer/0"
}
}
GPRecordSet
Input
The input parameter value for a GP
data type is a JSON structure containing the features
and fields
fields, the url
field, or the item
field.
The features
field is an array of features. Each feature contains an attributes
field in which the key is a field name in the list of fields of the record set, and the value is the value for the corresponding field.
Starting at ArcGIS Enterprise 11.2, a geoprocessing service can support an input with a 64-bit object ID, and esri
, esri
, and esri
field types, in addition to all previously supported field types.
GPRecordSet syntax
{
"fields": [
{
"name": "<field1>",
"type": "<field1Type>",
"alias": "<field1Alias>"
},
{
"name": "<field2>",
"type": "<field2Type>",
"alias": "<field2Alias>"
}
],
"features": [
{
"attributes": {
"<field1>": <value11>,
"<field2>": <value12>
}
},
{
"attributes": {
"<field1>": <value21>,
"<field2>": <value22>
}
}
]
}
Layer URL syntax
The GP
input can be the URL of a table layer.
{
"url": "<url of a table layer>"
}
Example 1: Use a 64-bit object ID
Starting at ArcGIS Enterprise 11.2, a geoprocessing service can support a GP
input with a 64-bit object ID. If the object ID will exceed the 32-bit range, ensure that the field length in the schema is set to 8 bytes. You cannot use a feature
value with an object ID exceeding the 32-bit range without a schema. Otherwise, the object ID will result in a parsing error if any of the object ID values exceed the 32-bit range.
For a 64-bit object ID field, specify a field length of 8.
{
"displayFieldName": "",
"fields": [
{
"name": "OBJECTID",
"type": "esriFieldTypeOID",
"alias": "OBJECTID",
"length": 8
},
{
"name": "sampletext",
"type": "esriFieldTypeString",
"alias": "sampletext",
"length": 255
}
],
"features": [
{
"attributes": {
"OBJECTID": 10000000001,
"sampletext": "sample"
}
}
]
}
Example 2: Date only, time only, and timestamp offset fields
Starting at ArcGIS Enterprise 11.2, a geoprocessing service can support an input with date only, time only, and timestamp offset fields. No special syntax is necessary to use these new field types if the features have them.
An input GP
value containing esri
, esri
, and esri
fields.
{
"displayFieldName": "",
"fields": [
{
"name": "OBJECTID",
"type": "esriFieldTypeOID",
"alias": "OBJECTID",
"length": 8
},
{
"name": "sampletext",
"type": "esriFieldTypeString",
"alias": "sampletext",
"length": 255
},
{
"name": "sampletimeonly",
"type": "esriFieldTypeTimeOnly",
"alias": "sampletimeonly"
},
{
"name": "sampledateonly",
"type": "esriFieldTypeDateOnly",
"alias": "sampledateonly"
},
{
"name": "sampleoffset",
"type": "esriFieldTypeTimestampOffset",
"alias": "sampleoffset"
}
],
"features": [
{
"attributes": {
"OBJECTID": 10000000001,
"sampletext": "sample",
"sampledateonly":"8/2/2020",
"sampletimeonly":"10:00:00 AM",
"sampleoffset": "8/2/2020 10:00:00.0000 AM -07:00"
}
}
]
}
Output
The output parameter value for a GP
data type is a JSON structure with the features
field.
The features
field is an array of features. Each feature contains an attributes
field. The attributes
field consists of key-value pairs in which the key is a field name in the list of fields of the record set, and the value is the value of the corresponding field.
Starting at ArcGIS Enterprise 11.2, a geoprocessing service can support an output with a 64-bit object ID and esri
, esri
, and esri
field types, in addition to all previously supported field types.
The exceeded
property is true
only if the number of records exceeds the maximum number configured by the server administrator. Otherwise, it is false
.
JSON Response syntax
{
"paramName": "<paramName>",
"dataType": "GPRecordSet",
"value": {
"fields": [
{
"name": "<field1>",
"type": "<field1Type>",
"alias": "<field1Alias>"
},
{
"name": "<field2>",
"type": "<field2Type>",
"alias": "<field2Alias>"
}
],
"features": [
{
"attributes": {
"<field1>": <value11>,
"<field2>": <value12>
}
},
{
"attributes": {
"<field1>": <value21>,
"<field2>": <value22>
}
}
],
"exceededTransferLimit": false | true
}
}
JSON Response example
{
"paramName": "Output_Record_Set",
"dataType": "GPRecordSet",
"value": {
"fields": [
{
"name": "OBJECTID",
"type": "esriFieldTypeOID",
"alias": "OBJECTID"
},
{
"name": "TextField",
"type": "esriFieldTypeString",
"alias": "TextField"
},
{
"name": "IntField",
"type": "esriFieldTypeInteger",
"alias": "IntegerField"
},
{
"name": "DoubleField",
"type": "esriFieldTypeDouble",
"alias": "DoubleField"
},
{
"name": "DateField",
"type": "esriFieldTypeDate",
"alias": "DateField"
}
],
"features": [
{
"attributes": {
"TextField": "a",
"IntField": 1234,
"DoubleField": 1234.56,
"DateField": 229564800000
}
},
{
"attributes": {
"TextField": "b",
"IntField": 5678,
"DoubleField": 5678.91,
"DateField": 239564800000
}
}
],
"exceededTransferLimit": false
}
}
Output feature service
The output can be a feature service. See the Feature service output section above.
GPRasterDataLayer
Input
The input parameter value for a GP
data type is a JSON structure with the url
field, which is the URL to the location of the input raster data file.
{
"url": "https://myserver/lake.tif"
}
For geoprocessing services that support uploads
, you can specify an uploaded item as input to GP
as follows:
{
"itemID": "<itemID>"
}
At 10.8, a URL to an image service is supported as an input, provided the tool supports an image service as input.
{
"url": "<url to your image service>"
}
Example
Use the NDFD wind data from sampleserver 6.
{
"url": "https://sampleserver6.arcgisonline.com/arcgis/rest/services/ScientificData/NDFD_wind/ImageServer"
}
Output
The output parameter value for a GP
data type is a JSON structure with the following fields:
url
—A URL to the location of the raw raster dataformat
—A string representing the format of the raster
If the file it is from a synchronous geoprocessing service, the file will be in the output directory of the service. The file may include the _ags
prefix. If running a task multiple times, or different tasks of the same service generate a file with the same file name with an existing file in the output directory, a numbered suffix will also be added, incrementing from 1.
If the file is from an asynchronous job, the file will be in the scratch folder of that job in the jobs directory. To learn more about these directories, see Server directories.
JSON Response syntax
{
"paramName": "<paramName>",
"dataType": "GPRasterDataLayer",
"value": {
"url": "<url>",
"format": "<format>"
}
}
JSON Response example
A TIF output from a synchronous geoprocessing service.
{
"paramName": "Output_Raster_Layer",
"dataType": "GPRasterDataLayer",
"value": {
"url": "https://machine.domain.com/webadaptor/rest/directories/arcgisoutput/RastersProcessing_Sync_GPServer/_ags_africa_150m_earthsat_Cl_Clip.tif",
"format": "tif"
}
}
A TIF output from an asynchronous geoprocessing service.
{
"paramName": "Output_Raster_Dataset",
"dataType": "GPRasterDataLayer",
"value": {
"url": "https://machine.domain.com/webadaptor/rest/directories/arcgisjobs/rasters_async_gpserver/jca44ef50c99840e7b38f4e0b00b45a83/scratch/rgb22_Resample.tif",
"format": "tif"
}
}
Field
Field
is supported starting at 10.7. For information about specific requirements to publish a web tool with a Field
input, see Input and output parameters. Starting at ArcGIS Enterprise 11.2, a geoprocessing service can support esri
, esri
, and esri
field types.
Input
The name
and type
fields are required. The alias
, editable
, nullable
, and length
fields are optional.
Field syntax
The syntax for a field parameter is below.
{
"name": "<Field name>",
"type": "<Field type>",
"alias": "<Field alias>",
"editable": false | true,
"nullable": false | true,
"length": <Field length>
}
Example
An example of a field parameter named distance having an integer type.
{
"name": "distance",
"type": "esriFieldTypeInteger",
"alias": "int",
"editable": true,
"nullable": true,
"length": 4
}
Output
JSON Response syntax
{
"paramName": "<paramName>",
"dataType": "Field",
"value": {
"name": "<FieldName>",
"type": "<FieldType>",
"alias": "<Field alias>",
"editable": false | true,
"nullable": false | true,
"length": <Field length>
}
}
JSON Response example
{
"paramName": "Probability_Field",
"dataType": "Field",
"value": {
"name": "GiPValue",
"type": "esriFieldTypeInteger",
"alias": "GiPValue",
"editable": true,
"nullable": true,
"length": 0
}
}
GPDataFile
Input
The input of a GPDataFile parameter can be an URL to a file, an itemID of an ArcGIS Server item, or an itemID of a Portal for ArcGIS Enterprise item.
URL syntax
The input parameter value for GP
is a JSON structure with a url
field. The value of the url
field is a URL to the location of the input file.
{
"url": "https://machine.domain.com/myfile.extension"
}
ArcGIS Server item ID syntax
For geoprocessing services that support uploads
, you can specify an uploaded item as input to GP
as follows. The uploads
operation will upload an item into ArcGIS Server resulting an item
. However, your service can use other ArcGIS Server items as long as you provide a correct item
.
{
"itemID": "<itemID>"
}
Portal for ArcGIS item ID syntax
Starting at ArcGIS Enterprise 10.8, you can specify a portal itemID as an input when you publish geoprocessing services to a federated server. You can not use a portal item ID if your geoprocessing service is not in the same portal as that item.
{
"portalItemID": "<portalItemID>"
}
Output
The output parameter value for a GP
data type is a JSON structure with a url
field. The value of the url
field is a URL to the location of the output file.
If the file is from a synchronous geoprocessing service, the file will be in the output directory of the service. The file name may include the _ags
prefix. If you run a task multiple times, or different tasks of the same service generate a file with the same file name with an existing file in the output directory, a numbered suffix will also be added, incrementing from 1.
If the file is from an asynchronous job, the file will be in the scratch folder of that job in the jobs directory.
By default, these files will no longer be available when the directories get cleaned up periodically. To learn more about these directories, and configure the frequency of the cleanup, see Server directories.
JSON Response syntax
{
"paramName": "<paramName>",
"dataType": "GPDataFile",
"value": {
"url": "<url>"
}
}
JSON Response example
A sample file output for a synchronous job.
{
"paramName": "Output_File",
"dataType": "GPDataFile",
"value": {
"url": "https://domain.machine.com/webadaptor/rest/directories/arcgisoutput/SampleFileOutputSync_GPServer/_ags_output_samplefile.txt"
}
}
A sample file output for an asynchronous job with an ID of jea1c9dad477a444fa48a24418152b83d
.
{
"paramName": "Output_File",
"dataType": "GPDataFile",
"value": {
"url": "https://domain.machine.com/webadaptor/rest/directories/arcgisjobs/samplefile_output_async_gpServer/jea1c9dad477a444fa48a24418152b83d/scratch/output_samplefile.txt"
}
}
GPBoolean, GPDouble, GPLong, and GPString
Input
For simple data types and the GP
, GP
, GP
, and GP
parameter values, use their literal values in the request.
A sample GET request with four input parameters, Input
, Input
, Input
, and Input
with a type the name indicates for a service.
https://machine.domain.com/webadaptor/rest/services/SimpleTypesService/GPServer/SimpleTypesTask/submitJob?InputBoolean=true&InputDouble=345.678&InputLong=345&InputString=MyString&f=json
Starting at ArcGIS Enterprise 11.2, the GP
data type supports a 64-bit value range of -4503599627370495 to 4503599627370495.
Output
These simple data types have parameter values that are their literal values.
JSON Response syntax
{
"paramName": "<paramName>",
"dataType": "<GPBoolean | GPDouble | GPLong | GPString>",
"value": <valueLiteral>
}
JSON Response example
{
"paramName": "Output_Double",
"dataType": "GPDouble",
"value": 1234.56
}
Starting at ArcGIS Enterprise 11.2, the GP
data type supports a 64-bit value range of -4503599627370495 to 4503599627370495.
GPLinearUnit
Input
The input parameter value for a GP
data type is a JSON structure with the following fields:
distance
— A positive number.units
— A string with unit values such asesri
orMeters esri
.Miles
JSON schema
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "JSON Schema for GPLinearUnit",
"description": "The JSON schema for a GPLinearUnit as an input.",
"type": "object",
"required": [
"distance",
"units"
],
"properties": {
"distance": {
"description": "The distance in a numeric format."
"type": "number"
},
"units":{
"description": "The unit of the distance."
"type": "string",
"enum": [
"esriUnknownUnits",
"esriInches",
"esriPoints",
"esriFeet",
"esriYards",
"esriMiles",
"esriNauticalMiles",
"esriMillimeters",
"esriCentimeters",
"esriMeters",
"esriKilometers",
"esriDecimalDegrees",
"esriDecimeters",
"esriIntInches",
"esriIntFeet",
"esriIntYards",
"esriIntMiles",
"esriIntNauticalMiles"
]
}
}
}
Sample JSON input
{
"distance": 345.678,
"units": "esriMiles"
}
If you provide an invalid or unsupported unit type, or don't provide a unit type, esri
will be used.
Output
Although rare, you can have a GP
value as an output. The output parameter value will be in the same format as the JSON input.
GPArealUnit
Starting at ArcGIS Enterprise 11.3, GP
is avaialbe if you publish your geoprocessing service from ArcGIS Pro 3.3 or later.
Input
For an input GPArealUnit, you can provide either a string or JSON object format.
For a string format, it will be the area with a unit. For example, 3 Square
or 1 Square
. The allowed units for the string representation are Unknown, Square
, and their singular form like Square
and Square
.
For a JSON object syntax, it needs to have both the area
and units
fields as the JSON schema below.
JSON schema for the JSON Object syntax
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "JSON Schema for GPArealUnit",
"description": "The JSON schema for a GPArealUnit as an input.",
"type": "object",
"required": [
"area",
"units"
],
"properties": {
"distance": {
"area": "The area in a numeric format."
"type": "number"
},
"units":{
"description": "The unit of the area."
"type": "string",
"enum": [
"esriUnknownAreaUnits",
"esriSquareInches"
"esriSquareFeet",
"esriSquareYards",
"esriAcres",
"esriSquareMiles",
"esriSquareMillimeters",
"esriSquareCentimeters",
"esriSquareDecimeters",
"esriSquareMeters",
"esriAres",
"esriHectares",
"esriSquareKilometers",
"esriSquareInchesUS",
"esriSquareFeetUS",
"esriSquareYardsUS",
"esriAcresUS",
"esriSquareMilesUS",
]
}
}
}
Sample JSON object inputs
{
"area": 50,
"units": "esriSquareMiles"
}
Output
Although rare, you can have a GP
as an output. The value will be in the JSON object format like the input.
GPDate
The parameter value for a GP
data type is a number that represents the number of milliseconds since epoch (January 1, 1970) in UTC.
Input
A sample GET request with an input date that corresponds to 1 Jan 2008 00
.
https://machine.domain.com/webadaptor/rest/services/DateService/GPServer/DateTask/submitJob?InputDate=1199145600000
Output
JSON Response syntax
{
"paramName": "<paramName>",
"dataType": "GPDate",
"value": <millisecondsSinceEpoch>
}
JSON Response example
The value corresponds to 1 Jan 2008 00:00:00 GMT.
{
"paramName": "Output_Date",
"dataType": "GPDate",
"value": 1199145600000
}
GPMultiValue
Input
The fully qualified data type for the GP
parameter is GP
in which <member
is one of the data types defined above, for example, GP
, GP
, and so on. All geoprocessing data types other than GP
are supported by GP
. There can be only one <member
value for the GP
parameter. This restriction also applies to GP
when the parameter has a filter.
The input parameter value for a GP
data type is a JSON array. Each element in this array is of the data type defined by the <member
suffix of the fully qualified GP
data type name.
Example 1: Use GPFeatureRecordSetLayer
GP
data type using three government feature service layers.
[
{
"url": "https://machine.domain.com/webadaptor/rest/services/LocalGovernment/CatchbasinInspections/FeatureServer/0"
},
{
"url": "https://machine.domain.com/webadaptor/rest/services/FederalGovernment/CitizenRequests/FeatureServer/0"
},
{
"url": "https://machine.domain.com/webadaptor/rest/services/StateGovernment/Events/FeatureServer/0"
}
]
Example 2: Use GPString
GP
data type:
["Parcels", "Street Lights"]
Example 3: Use GPLinearUnit
GP
data type:
[
{
"distance": 345.67,
"units": "esriMiles"
},
{
"distance": 36,
"units": "esriMiles"
}
]
Output
All geoprocessing data types other than GP
are supported in the GP
parameter.
The fully qualified data type for the GP
parameter is GP
in which member
is one of the data types defined above, for example, GP
, GP
, and so on.
The output parameter value for a GP
data type is a JSON array.
JSON Response example 1
GP
data type
{
"paramName": "Output_Strings",
"dataType": "GPMultiValue:GPString",
"value": ["Davis", "Irvine"]
}
JSON Response example 2
GP
data type
{
"paramName": "Output_Distances",
"dataType": "GPMultiValue:GPLinearUnit",
"value": [
{
"distance": 345.67,
"units": "esriMiles"
},
{
"distance": 36,
"units": "esriMiles"
}
]
}
GPValueTable
A value table is a flexible table-like object consisting of rows and columns containing various values. To learn more about value tables, see ValueTable. All data types described in this topic, other than GP
and GP
, can be a value in GP
. A GP
value cannot nest within another GP
value. This data type is available starting at ArcGIS Enterprise 11.0 when publishing a web tool or geoprocessing service from ArcGIS Pro 3.0.
Input
You can create a GP
input using an array of arrays or JSON with column names. If all of the columns have unique names that are not empty, you can use both syntaxes described below. Otherwise, you must use the array of arrays syntax.
Array of arrays syntax
For the array of arrays syntax, the outer array contains all JSON arrays representing each row of a value table. For the JSON array representing values of each column in a row, the sequence of those values must match the value table columns in the tool. For example, if each row of a value table requires a string, a number, and a Boolean as the three columns, you must pass the values in that order. In the case of an empty string, use ""
as the placeholder. For all other types, use null
as a placeholder for an empty value.
Array of arrays example 1
This example shows a GP
input with three columns and three rows. The first column is a GPLong data type, the second is a GPString data type, and the third is a GPFeatureRecordSetLayer data type.
[
[
0,
"first row second column string",
{
"url": "https://myserver.com/server/rest/services/Hosted/myfs/FeatureServer/0"
}
],
[
1,
"second row second column string",
{
"spatialReference": {
"wkid": 102100
},
"features": [
{
"attributes": {
"ID": 0
},
"geometry": {
"x": -84.2868721699999,
"y": 41.593834992
}
},
{
"attributes": {
"ID": 1
},
"geometry": {
"x": -80.8615858519999,
"y": 38.955970817
}
}
]
}
],
[
2,
"third row second column string",
{
"url": "https://myserver.com/server/rest/services/mymapservice/MapServer/3"
}
]
]
Array of arrays example 2
This example shows a GP
input with four columns and two rows. The first column is GPString, the second column is GPLinearUnit, the third column is GPBoolean, and the last column is GPRasterDataLayer. Some of them do not have values, so a null or an empty string is a placeholder for the value.
[
[
"",
{
"distance": 10,
"units": "esriKilometers"
},
true,
null
],
[
"first column second row string",
null,
null,
{
"url": "https://myserver.com/server/rest/services/myImageService/ImageServer"
}
]
]
Column name syntax
The column name syntax requires all columns of a value table to have a unique column name that is not empty. This syntax allows the flexibility to provide values in any order, because the unique column names allow the values to match the value table correctly. In the case of an empty value, that column name and key-value pair can be absent or you can provide an empty string or null
as the value.
Column name example 1
This example shows a GP
input with two columns and two rows. The first column is GPLong and the second column is GPRecordSet. For empty values, this example shows a null value.
[
{
"myGPLongColumn": 0,
"myTableColumn": null,
},
{
"myGPLongColumn": null,
"myTableColumn": {
"features": [
{
"attributes": {
"ObjectId": 1,
"TextFld": "SampleText",
"DateFld": 282096000000
}
}
]
}
}
]
Column name example 2
This is the same GP
input as in the example directly above, except instead of showing columns with null values, this example omits those columns in corresponding rows.
[
{
"myGPLongColumn": 0
},
{
"myTableColumn": {
"features": [
{
"attributes": {
"ObjectId": 1,
"TextFld": "SampleText",
"DateFld": 282096000000
}
}
]
}
}
]
Output
By default, the array of arrays syntax will be the output for GP
. To retrieve the column names along with all values, use return
for operations related to execute
or GP
.
Array of arrays syntax
The value of each column in a row will be based on the order of the columns in a value table parameter. If there is an empty value, an empty string in the case of GP
and null
for all other data types will be placeholders for that value.
Array of arrays example
This sample output shows a value table with three columns and two rows. The first column is GPBoolean, the second column is GPString, and the third column is GPLinearUnit.
[
[
true,
"first row second column",
null
],
[
null,
"",
{
"distance": 5,
"units": "esriMiles"
}
]
]
Column name syntax
The column name syntax will show all column names, along with corresponding values, for all rows in a value table. Even if there are columns with null values, the value of that column will still show null
, along with the column name, in the JSON response. There is no option to hide those column names with null values, unlike the input. If there are duplicate column names, or if a column does not have a name, an error occurs when using return
. The order of columns will follow the order of the columns defined in the value table parameter. To use this column name syntax for synchronous jobs, see Execute a task. To use this column name syntax for asynchronous jobs, see Result parameters.
Column name example
This sample shows the same output as the array of arrays example above. For columns with null values, the column name still shows.
[
{
"myBooleanColumn": true,
"myStringColumn": "first row second column",
"myLinearUnitColumn": null
},
{
"myBooleanColumn": null,
"myStringColumn": "",
"myLinearUnitColumn": {
"distance": 5,
"units": "esriMiles"
}
}
]
GPComposite
A composite data type allows a parameter to accept multiple data types. A GP
, another GP
, or a GP
data type cannot be one of the data types for GP
. However, a GP
data type of a GP
data type is possible. The GP
data type is available starting at ArcGIS Enterprise 11.2 when publishing a web tool or geoprocessing service from ArcGIS Pro 3.2 or later.
Input
The syntax for the input composite parameter will be the same as for the data type in use. Although not required, providing the data type and its value for GP
is recommended.
Data type declaration syntax
To declare the data type you pass in for an input parameter, use the data type name, along with its value.
{
"dataType": "<data Type you declare>",
"value": "The value here"
}
Declare the GP
type for an input parameter allowing it as part of the composite.
{
"dataType": "GPFeatureRecordSetLayer",
"value": {
"url": "https://machine.domain.com/webadaptor/rest/services/Hosted/myservicename/FeatureServer/0"
}
}
Provide inputs for GP
data type with GP
as one of the allowing types in the composite.
[
{
"dataType": "GPString",
"value": "first value"
},
{
"dataType": "GPString",
"value": "second value"
}
]
Regular syntax
If the data type is not known when providing the input, provide the JSON of the data type without declaring its type. In this case, a geoprocessing service will check the value using each type in GP
in the order it was defined. This also applies to GP
, with the exception that if there is a filter for the parameter, only the data type matching the filter can be a valid value for the GP
parameter. The value of each value in a GP
does not need to be the same, as long as the value is one of the allowed data types in the GP
.
The sample below provides a value for each parameter without declaring a type. This GP
input allows GP
and GP
.
[
{"url":"https://machine.domain.com/webadaptor/rest/services/Hosted/myservicename/FeatureServer/0"},
{"url":"https://machine.domain.com/folder/raster.tif"}
]
A GP
input allows a Field
input type. You need to pass the value of a field just like it is a Field
input parameter.
{
"name": "bufferDistance",
"type": "esriFieldTypeLong",
"alias": "bufferDistance",
"editable": true,
"nullable": true,
"length": 0
}
Output
The syntax for the output parameter will be the same syntax for the actual data type, as long as the tool generates a result matching one of the data types in the composite. For example, you may have an output parameter of GP
with possible types of GP
and GP
. The result will follow the syntax for either type, as if the output is either a GP
or GP
. You will never see an output parameter with a data type of GP
and a value with it.