Description
Geoprocessing services published to ArcGIS Notebook Server support the following input and output data types. The majority of the parameters that you include in your request are dependent on the input parameter types of the geoprocessing task that you are submitting.
GPBoolean, GPDouble, GPLong, and GPString
Input
For simple data types and the GP , GP , GP , and GP parameter values, use their literal values.
InputBoolean=true&InputDouble=345.678&InputLong=345&InputString=MyStringOutput
These simple data types have parameter values that are their literal values.
JSON Response syntax
{
"paramName": "",
"dataType": "<GPBoolean | GPDouble | GPLong | GPString>",
"value": <valueLiteral>
}JSON Response example
{
"paramName": "Output_Double",
"dataType": "GPDouble",
"value": 1234.56
}GPDataFile
The parameter value for the GP data type.
Input
URL syntax
The input parameter value for GPDataFile is a JSON struture with a URL field. The value of the URL is a URL to the location of the input file.
{
"url": "https://organization.example.com/myfile.extension"
}Portal item ID syntax
Alternatively, you can specify a file item from the portal as input for GPDataFile. The user running the web tool must have access to the item.
{
"portalItemID": "<portalItemID>"
}Output
The output parameer value for a GPDataFile 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 output is a file, the file will be in the scratch folder of that job in the jobs directory.
JSON Response syntax
{
"paramName": "<paramName>",
"dataType": "GPDataFile",
"value": {
"url": "<url>"
}
}JSON Response example
{
"dataType": "GPDataFile",
"paramName": "output_file",
"value": {
"url": "https://notebookserver.example.com/arcgis/rest/services/6e54cfd0dd54478c87fa6aea11fd6c62/GPServer/all_data_types/jobs/j3230de9e-1a57-479b-a35e-b3421cf1e6ec/scratch/lake1711673645870.tif"
}
}GPDate
The parameter value for the GP data type is a number that represents the number of milliseconds since epoch (January 1, 1970) in coordinated universal time.
Input
The following value corresponds to 1 Jan 2008 00 :
InputDate=1199145600000Output
JSON Response syntax
{
"paramName": "",
"dataType": "GPDate",
"value": <valueLiteral>
}JSON Response example
The following value corresponds to 1 Jan 2008 00 :
{
"paramName": "Output_Date",
"dataType": "GPDate",
"value": 1199145600000
}GPFeatureRecordSetLayer
The parameter value for the GP data type is a JSON structure containing the geometry , has , has , spatial , fields , and features fields..
If contains with z- or m-values, it must include the or property, respectively, at the feature set level.
FeatureSet syntax
Layer URL syntax
To specify a feature service layer or map service layer, provide the URL to the layer.
{
"url": "<url of a map service or a feature service layer>",
}FeatureCollection syntax
{
"layerDefinition": {
"name": "<name>",
"type": "Feature Layer",
"geometryType": "<geometryType>",
"objectIdField": "<FieldName>",
"fields": [
{
"name": "<field1>",
"type": "<field1Type>",
"alias": "<field1Alias>"
},
{
"name": "<field2>",
"type": "<field2Type>",
"alias": "<field2Alias>"
}
],
"drawingInfo": {
"renderer": {
<renderer>
}
},
"templates": [
<template>
]
},
"featureSet": {
"displayFieldName": "<displayFieldName>",
"geometryType": "<geometryType>",
"spatialReference": {
<spatialReference>
},
"features": [
{
"attributes": {
"<field1>":<value1>,
"<field2>":<value2>,
},
"geometry": {
<geometry1>
}
},
{
"attributes": {
"<field1>": <value11>,
"<field2>": <value22>,
},
"geometry": {<geometry2>
}
]
}
}Example 1: FeatureSet result
Example 2: FeatureSet without 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.
Example 3: hasZ or hasM
{
"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 feature layer
{
"url": "https://sampleserver6.arcgisonline.com/arcgis/rest/services/USA/MapServer/0"
}Output
FeatureSet output
The parameter value for GP is a JSON structure that is the same as Feature input for GP .
JSON Response syntax
{
"paramName": "<paramName>",
"dataType": "GPFeatureRecordSetLayer",
"value": {
"geometryType": "<geometryType>",
"hasZ": <true|false>,
"hasM": <true|false>,
"spatialReference": {
<spatialReference>
},
"fields": [
{
"name": "<field1>",
"type": "<field1Type>",
"alias": "<field1Alias>"
},
{
"name": "<field2>",
"type": "<field2Type>",
"alias": "<field2Alias>"
}
],
"features": [
{
"geometry": {
<geometry1>
},
"attributes": {
"<field1>": <value11>,
"<field2>": <value12>
}
},
{
"geometry": {
<geometry2>
},
"attributes": {
"<field1>": <value21>,
"<field2>": <value22>
}
}
]
}
}JSON Response example
{
"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
}
}
]
}
}FeatureCollection output
The parameter value for GP is a JSON structure with the following properties.
JSON Response syntax
{
"paramName": "<paramName>",
"dataType": "GPFeatureRecordSetLayer",
"value": {
"layerDefinition": {
"name": "<name>",
"type": "Feature Layer",
"geometryType": "<geometryType>",
"objectIdField": "<FieldName>",
"fields": [
{
"name": "<field1>",
"type": "<field1Type>",
"alias": "<field1Alias>"
},
{
"name": "<field2>",
"type": "<field2Type>",
"alias": "<field2Alias>"
}
],
"drawingInfo": {
"renderer": {
<renderer>
}
},
"templates": [
<template>
]
},
"featureSet": {
"displayFieldName": "<displayFieldName>",
"geometryType": "<geometryType>",
"spatialReference": {
<spatialReference>
},
"features": [
{
"attributes": {
"<field1>":<value1>,
"<field2>":<value2>,
},
"geometry": {
<geometry1>
}
},
{
"attributes": {
"<field1>":<value11>,
"<field2>":<value22>,
},
"geometry": {
<geometry2>
}
}
],
"exceededTransferLimit":<true or false>
}
}
}JSON Response syntax
{
"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
}
}
}GPRasterDataLayer
Input
The input parameter value for a GP data type is a JSON structure with the URL field set to the URL of the input raster data file.
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 data.format- A string representing the format of the raster.
JSON Response syntax
{
"paramName": "<paramName>",
"dataType": "GPRasterDataLayer",
"value": {
"url": "<url>"
}
}JSON Response example
{
"dataType": "GPRasterDataLayer",
"paramName": "output_raster_layer",
"value": {"url": "https://myserver.example.com/raserver/rest/directories/arcgisoutput/System/RasterRendering_ImageServer/_ags_3c961683_d272_4503_a35f_77963b201934.png"}
}GPRecordSet
The input parameter value for a GP data ype is a JSON structure containing the features and fields fields, the URL field, and 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.
GPRecordSet syntax
lLayer URL syntax
The input of GP can be the URL of a table layer.
{
"url": "<url of a table layer>"
}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.
JSON Response example
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 asesriorMeters esri. Newer units, includingMiles esri,Int Inches esri,Int Feet esri,Int Yards esri, andInt Miles esriare not supported.Int Nautical Miles
GP data type:
Output
Although rare, you can have a GP value as an output. The output parameter value for a GP data type is a JSON structure with the following fields:
distance—A double valueunits—A string with a value ofesri,Meters esri, and so onMiles
JSON Response syntax
{
"paramName": "<paramName>",
"dataType": "GPLinearUnit",
"value": {
"distance": <distance>,
"units": "<units>"
}
}JSON Response example
{
"paramName": "Output_Linear_Unit",
"dataType": "GPLinearUnit",
"value": {
"distance": 1234.56,
"units": "esriMiles"
}
}