Geoprocessing services data types

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 GPBoolean , GPDouble , GPLong , and GPString parameter values, use their literal values.

1
InputBoolean=true&InputDouble=345.678&InputLong=345&InputString=MyString

Output

These simple data types have parameter values that are their literal values.

JSON Response syntax

1
2
3
4
5
{
  "paramName": "",
  "dataType": "<GPBoolean | GPDouble | GPLong | GPString>",
  "value": <valueLiteral>
}

JSON Response example

1
2
3
4
5
{
  "paramName": "Output_Double",
  "dataType": "GPDouble",
  "value": 1234.56
}

GPDataFile

The parameter value for the GPDataFile 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.

1
2
3
{
  "url": "https://machine.domain.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.

1
2
3
{
  "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

1
2
3
4
5
6
7
{
  "paramName": "<paramName>",
  "dataType": "GPDataFile",
  "value": {
    "url": "<url>"
  }
}

JSON Response example

1
2
3
4
5
6
7
{
  "dataType": "GPDataFile",
  "paramName": "output_file",
  "value": {
    "url": "https://domain.machine.com/webadaptor/rest/services/6e54cfd0dd54478c87fa6aea11fd6c62/GPServer/all_data_types/jobs/j3230de9e-1a57-479b-a35e-b3421cf1e6ec/scratch/lake1711673645870.tif"
  }
}

GPDate

The parameter value for the GPDate 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:00:00 GMT :

1
InputDate=1199145600000

Output

JSON Response syntax

1
2
3
4
5
{
  "paramName": "",
  "dataType": "GPDate",
  "value": <valueLiteral>
}

JSON Response example

The following value corresponds to 1 Jan 2008 00:00:00 GMT :

1
2
3
4
5
{
  "paramName": "Output_Date",
  "dataType": "GPDate",
  "value": 1199145600000
}

GPFeatureRecordSetLayer

The parameter value for the GPFeatureRecordSetLayer data type is a JSON structure containing the geometryType , hasZ , hasM , spatialReference , 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

1

Layer URL syntax

To specify a feature service layer or map service layer, provide the URL to the layer.

1
2
3
{
  "url": "<url of a map service or a feature service layer>",
}

FeatureCollection syntax

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
{
  "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

1

Example 2: FeatureSet without schema

When the input geometryType , spatialReference , and fields values match the default values, the input GPFeatureRecordSetLayer value can exclude geometryType , spatialReference , and fields information. The geometryType , spatialReference , and fields values will be the default values if no other values are provided.

The geometryType value can be esriGeometryPoint , esriGeometryPolyline , or esriGeometryPolygon . If the geometry type is not specified, it defaults to esriGeometryPoint . If spatialReference is not specified, it defaults to an unknown coordinate system.

1

Example 3: hasZ or hasM

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
{
  "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

1
2
3
{
  "url": "https://sampleserver6.arcgisonline.com/arcgis/rest/services/USA/MapServer/0"
}

Output

FeatureSet output

The parameter value for GPFeatureRecordSetLayer is a JSON structure that is the same as FeatureSet input for GPFeatureRecordSetLayer .

JSON Response syntax

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
{
  "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

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
{
  "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 GPFeatureRecordSetLayer is a JSON structure with the following properties.

JSON Response syntax

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
{
  "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

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
{
  "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 GPRasterDataLayer 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 GPRasterDataLayer 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

1
2
3
4
5
6
7
{
  "paramName": "<paramName>",
  "dataType": "GPRasterDataLayer",
  "value": {
    "url": "<url>"
  }
}

JSON Response example

1
2
3
4
5
{
  "dataType": "GPRasterDataLayer",
  "paramName": "output_raster_layer",
  "value": {"url": "https://myserver.domain.com/raserver/rest/directories/arcgisoutput/System/RasterRendering_ImageServer/_ags_3c961683_d272_4503_a35f_77963b201934.png"}
}

GPRecordSet

The input parameter value for a GPRecordSet data ype is a JSON structure containing the features and fields fields, the URL field, and the itemID 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

1
l

Layer URL syntax

The input of GPRecordSet can be the URL of a table layer.

1
2
3
{
  "url": "<url of a table layer>"
}

Output

The output parameter value for a GPRecordSet 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.

1

JSON Response example

1

GPLinearUnit

Input

The input parameter value for a GPLinearUnit data type is a JSON structure with the following fields:

  • distance —A positive number.
  • units —A string with unit values such as esriMeters or esriMiles . Newer units, including esriIntInches , esriIntFeet , esriIntYards , esriIntMiles , and esriIntNauticalMiles are not supported.

GPMultiValue:GPLinearUnit data type:

1

Output

Although rare, you can have a GPLinearUnit value as an output. The output parameter value for a GPLinearUnit data type is a JSON structure with the following fields:

  • distance —A double value
  • units —A string with a value of esriMeters , esriMiles , and so on

JSON Response syntax

1
2
3
4
5
6
7
8
{
  "paramName": "<paramName>",
  "dataType": "GPLinearUnit",
  "value": {
    "distance": <distance>,
    "units": "<units>"
  }
}

JSON Response example

1
2
3
4
5
6
7
8
{
  "paramName": "Output_Linear_Unit",
  "dataType": "GPLinearUnit",
  "value": {
    "distance": 1234.56,
    "units": "esriMiles"
  }
}

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

You can no longer sign into this site. Go to your ArcGIS portal or the ArcGIS Location Platform dashboard to perform management tasks.

Your ArcGIS portal

Create, manage, and access API keys and OAuth 2.0 developer credentials, hosted layers, and data services.

Your ArcGIS Location Platform dashboard

Manage billing, monitor service usage, and access additional resources.

Learn more about these changes in the What's new in Esri Developers June 2024 blog post.

Close