Geoprocessing service data types

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 submitJob 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 GPFeatureRecordSetLayer data type can be a featureSet 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 featureSet, 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

Use dark colors for code blocksCopy
1
2
3
4
5
{
  "url": "<url of a map service or a feature service layer>",
  "filter": <attribute expression>,
  "time": <time value>
}

Layer URL 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
{
  "$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 itemID value of the portal item is not supported regardless of the type of item, even if the server is federated.

Use dark colors for code blocksCopy
1
2
3
{
  "itemID" : "<itemID>"
}

Example 1: featureSet input

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

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
{
  "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 hasZ or hasM property for feature sets that contain z- or m-values, respectively. The following example has z-values:

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
{
  "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 MapService or FeatureService query that returns a JSON feature set.

Use dark colors for code blocksCopy
1
2
3
{
  "url": "https://machine.domain.com/folder/filename.txt"
}
Use dark colors for code blocksCopy
1
2
3
{
  "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 itemID value is generated, such as i1057fd92-669e-40c0-98c8-cf1b0500fa13.

Specify the itemID value returned using the upload item operation.

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

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

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

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

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

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
{
  "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 featureSet value containing esriFieldTypeDateOnly, esriFieldTypeTimeOnly, and esriFieldTypeTimestampOffset fields.

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
{
  "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 returnType parameter is set to data, the parameter value for GPFeatureRecordSetLayer is a JSON structure that is almost identical to featureSet input for GPFeatureRecordSetLayer other than the additional exceededTransferLimit property.

The exceededTransferLimit 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 featureSet 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 GPFeatureRecordSetLayer parameter is a map image. However, you can explicitly request the feature data using the returnType parameter in the URL and set its value to data.

Starting at ArcGIS Enterprise 11.2, a geoprocessing service can support an output featureSet value with a 64-bit object ID and esriFieldTypeDateOnly, esriFieldTypeTimeOnly, and esriFieldTypeTimestampOffset field types, in addition to all other field types previously supported.

Use dark colors for code blocksCopy
1
2
3
4
5
{
  "paramName": "<paramName>",
  "dataType": "GPFeatureRecordSetLayer",
  "value": <featureSet object>
}
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
{
  "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.

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
{
  "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 returnFeatureCollection is set to true, the parameter value for GPFeatureRecordSetLayer is a JSON structure similar to the input layer object.

Similar to the featureSet output, the only additional property the exceededTransferLimit.

Use dark colors for code blocksCopy
1
2
3
4
5
{
  "paramName": "<paramName>",
  "dataType": "GPFeatureRecordSetLayer",
  "value": <LayerObject>
}
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
{
  "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 GPFeatureRecordSetLayer or GPRecordSetLayer 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.

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
{
  "paramName": "<paramName>",
  "dataType": "GPFeatureRecordSetLayer" | "GPRecordSet",
  "value": {
    "url": "<URL to a result feature service layer>"
  }
}
Use dark colors for code blocksCopy
1
2
3
4
5
6
7
{
  "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 GPRecordSet data type is a JSON structure containing the features and fields fields, the url field, or 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.

Starting at ArcGIS Enterprise 11.2, a geoprocessing service can support an input with a 64-bit object ID, and esriFieldTypeDateOnly, esriFieldTypeTimeOnly, and esriFieldTypeTimestampOffset field types, in addition to all previously supported field types.

GPRecordSet syntax

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
{
  "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 GPRecordSet input can be the URL of a table layer.

Use dark colors for code blocksCopy
1
2
3
{
  "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 GPRecordSet 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 featureSet 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.

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
{
  "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 GPRecordSet value containing esriFieldTypeDateOnly, esriFieldTypeTimeOnly, and esriFieldTypeTimestampOffset fields.

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

Starting at ArcGIS Enterprise 11.2, a geoprocessing service can support an output with a 64-bit object ID and esriFieldTypeDateOnly, esriFieldTypeTimeOnly, and esriFieldTypeTimestampOffset field types, in addition to all previously supported field types.

The exceededTransferLimit 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

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

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
{
  "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 GPRasterDataLayer data type is a JSON structure with the url field, which is the URL to the location of the input raster data file.

Use dark colors for code blocksCopy
1
2
3
{
  "url": "https://myserver/lake.tif"
}

For geoprocessing services that support uploads, you can specify an uploaded item as input to GPRasterDataLayer as follows:

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

Use dark colors for code blocksCopy
1
2
3
{
  "url": "<url to your image service>"
}

Example

Use the NDFD wind data from sampleserver 6.

Use dark colors for code blocksCopy
1
2
3
{
  "url": "https://sampleserver6.arcgisonline.com/arcgis/rest/services/ScientificData/NDFD_wind/ImageServer"
}

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

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

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
{
  "paramName": "<paramName>",
  "dataType": "GPRasterDataLayer",
  "value": {
    "url": "<url>",
    "format": "<format>"
  }
}

JSON Response example

A TIF output from a synchronous geoprocessing service.

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

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

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

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
{
  "name": "distance",
  "type": "esriFieldTypeInteger",
  "alias": "int",
  "editable": true,
  "nullable": true,
  "length": 4
}

Output

JSON Response syntax

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
12
{
  "paramName": "<paramName>",
  "dataType": "Field",
  "value": {
    "name": "<FieldName>",
    "type": "<FieldType>",
    "alias": "<Field alias>",
    "editable": false | true,
    "nullable": false | true,
    "length": <Field length>
  }
}

JSON Response example

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
12
{
  "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 GPDataFile is a JSON structure with a url field. The value of the url field is a URL to the location of the input file.

Use dark colors for code blocksCopy
1
2
3
{
  "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 GPDataFile as follows. The uploads operation will upload an item into ArcGIS Server resulting an itemID. However, your service can use other ArcGIS Server items as long as you provide a correct itemID.

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

Use dark colors for code blocksCopy
1
2
3
{
  "portalItemID": "<portalItemID>"
}

Output

The output parameter 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 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

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
{
  "paramName": "<paramName>",
  "dataType": "GPDataFile",
  "value": {
    "url": "<url>"
  }
}

JSON Response example

A sample file output for a synchronous job.

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

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
{
  "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 GPBoolean, GPDouble, GPLong, and GPString parameter values, use their literal values in the request.

A sample GET request with four input parameters, InputBoolean, InputDouble, InputLong, and InputString with a type the name indicates for a service.

Use dark colors for code blocksCopy
1
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 GPLong 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

Use dark colors for code blocksCopy
1
2
3
4
5
{
  "paramName": "<paramName>",
  "dataType": "<GPBoolean | GPDouble | GPLong | GPString>",
  "value": <valueLiteral>
}

JSON Response example

Use dark colors for code blocksCopy
1
2
3
4
5
{
  "paramName": "Output_Double",
  "dataType": "GPDouble",
  "value": 1234.56
}

Starting at ArcGIS Enterprise 11.2, the GPLong data type supports a 64-bit value range of -4503599627370495 to 4503599627370495.

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.

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

Use dark colors for code blocksCopy
1
2
3
4
{
  "distance": 345.678,
  "units": "esriMiles"
}

If you provide an invalid or unsupported unit type, or don't provide a unit type, esriMeters will be used.

Output

Although rare, you can have a GPLinearUnit 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, GPArealUnit 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 SquareKilometers or 1 SquareFoot. The allowed units for the string representation are Unknown, SquareInches, SquareInchesUS, SquareFeet, SquareFeetUS, SquareYards, SquareYardsUS, Acres, AcresUS, SquareMiles, SquareMilesUS, SquareMillimeters, SquareCentimeters, SquareDecimeters, SquareMeters, Ares, Hectares, SquareKilometers, and their singular form like SquareFoot and SquareYardUS.

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

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

Use dark colors for code blocksCopy
1
2
3
4
{
  "area": 50,
  "units": "esriSquareMiles"
}

Output

Although rare, you can have a GPAreauUnit as an output. The value will be in the JSON object format like the input.

GPDate

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

Use dark colors for code blocksCopy
1
https://machine.domain.com/webadaptor/rest/services/DateService/GPServer/DateTask/submitJob?InputDate=1199145600000

Output

JSON Response syntax

Use dark colors for code blocksCopy
1
2
3
4
5
{
  "paramName": "<paramName>",
  "dataType": "GPDate",
  "value": <millisecondsSinceEpoch>
}

JSON Response example

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

Use dark colors for code blocksCopy
1
2
3
4
5
{
  "paramName": "Output_Date",
  "dataType": "GPDate",
  "value": 1199145600000
}

GPMultiValue

Input

The fully qualified data type for the GPMultiValue parameter is GPMultiValue:<memberDataType> in which <memberDataType> is one of the data types defined above, for example, GPMultiValue:GPString, GPMultiValue:GPLong, and so on. All geoprocessing data types other than GPValueTable are supported by GPMultiValue. There can be only one <memberDataType> value for the GPMultiValue parameter. This restriction also applies to GPMultiValue:GPComposite when the parameter has a filter.

The input parameter value for a GPMultiValue data type is a JSON array. Each element in this array is of the data type defined by the <memberDataType> suffix of the fully qualified GPMultiValue data type name.

Example 1: Use GPFeatureRecordSetLayer

GPMultiValue:GPFeatureRecordSetLayer data type using three government feature service layers.

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

GPMultiValue:GPString data type:

Use dark colors for code blocksCopy
1
["Parcels", "Street Lights"]

Example 3: Use GPLinearUnit

GPMultiValue:GPLinearUnit data type:

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
[
  {
    "distance": 345.67,
    "units": "esriMiles"
  },
  {
    "distance": 36,
    "units": "esriMiles"
  }
]

Output

All geoprocessing data types other than GPValueTable are supported in the GPMultiValue parameter.

The fully qualified data type for the GPMultiValue parameter is GPMultiValue:<memberDataType> in which memberDataType is one of the data types defined above, for example, GPMultiValue:GPString, GPMultiValue:GPLong, and so on.

The output parameter value for a GPMultiValue data type is a JSON array.

JSON Response example 1

GPMultiValue:GPString data type

Use dark colors for code blocksCopy
1
2
3
4
5
{
  "paramName": "Output_Strings",
  "dataType": "GPMultiValue:GPString",
  "value": ["Davis", "Irvine"]
}

JSON Response example 2

GPMultiValue:GPLinearUnit data type

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
{
  "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 GPMultiValue and GPComposite, can be a value in GPValueTable. A GPValueTable value cannot nest within another GPValueTable 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 GPValueTable 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 GPValueTable 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.

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
[
  [
    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 GPValueTable 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.

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
[
  [
  "",
    {
      "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 GPValueTable 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.

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
[
  {
    "myGPLongColumn": 0,
    "myTableColumn": null,
  },
  {
    "myGPLongColumn": null,
    "myTableColumn": {
      "features": [
        {
          "attributes": {
            "ObjectId": 1,
            "TextFld": "SampleText",
            "DateFld": 282096000000
          }
        }
      ]
    }
  }
]

Column name example 2

This is the same GPValueTable input as in the example directly above, except instead of showing columns with null values, this example omits those columns in corresponding rows.

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
[
  {
    "myGPLongColumn": 0
  },
  {
    "myTableColumn": {
      "features": [
        {
          "attributes": {
            "ObjectId": 1,
            "TextFld": "SampleText",
            "DateFld": 282096000000
          }
        }
      ]
    }
  }
]

Output

By default, the array of arrays syntax will be the output for GPValueTable. To retrieve the column names along with all values, use returnColumnName=True for operations related to execute or GPResult.

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 GPString 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.

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
[
  [
    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 returnColumnName=True. 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.

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
[
  {
    "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 GPValueTable, another GPComposite, or a GPMultiValue data type cannot be one of the data types for GPComposite. However, a GPMultiValue data type of a GPComposite data type is possible. The GPComposite 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 GPComposite 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.

Use dark colors for code blocksCopy
1
2
3
4
{
  "dataType": "<data Type you declare>",
  "value": "The value here"
}

Declare the GPFeatureRecordSetLayer type for an input parameter allowing it as part of the composite.

Use dark colors for code blocksCopy
1
2
3
4
5
6
{
  "dataType": "GPFeatureRecordSetLayer",
  "value": {
    "url": "https://machine.domain.com/webadaptor/rest/services/Hosted/myservicename/FeatureServer/0"
  }
}

Provide inputs for GPMultivalue:GPComposite data type with GPString as one of the allowing types in the composite.

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
[
  {
    "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 GPComposite in the order it was defined. This also applies to GPMultiValue:GPComposite, 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 GPMultiValue:GPComposite parameter. The value of each value in a GPMultiValue:GPComposite does not need to be the same, as long as the value is one of the allowed data types in the GPComposite.

The sample below provides a value for each parameter without declaring a type. This GPMultiValue:GPComposite input allows GPFeatureRecordSetLayer and GPRasterDataLayer.

Use dark colors for code blocksCopy
1
2
3
4
[
  {"url":"https://machine.domain.com/webadaptor/rest/services/Hosted/myservicename/FeatureServer/0"},
  {"url":"https://machine.domain.com/folder/raster.tif"}
]

A GPComposite input allows a Field input type. You need to pass the value of a field just like it is a Field input parameter.

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
{
        "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 GPComposite with possible types of GPFeatureRecordSetLayer and GPLong. The result will follow the syntax for either type, as if the output is either a GPFeatureRecordSetLayer or GPLong. You will never see an output parameter with a data type of GPComposite and a value with it.

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