Skip To Content ArcGIS for Developers Sign In Dashboard

Geoprocessing services 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. 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.

To learn more about supported data types and how unsupported data types are converted during the publish process, see Geoprocessing task settings and related topics if you publish from ArcGIS Desktop. If you publish from ArcGIS Pro, see Input and output parameters.

GPFeatureRecordSetLayer

Input

The input parameter value for the GPFeatureRecordSetLayer data type is a JSON structure containing the url or itemID field, or the geometryType, hasZ, hasM, spatialReference, fields, and features fields.

  • features—An array of features. Each feature is defined with the following properties:
    • geometry—Points, lines, or polygons. The structure for the geometries is the same as the structure of the JSON geometry objects returned by ArcGIS REST API.
    • attributes—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.
  • spatialReference—The well-known ID (WKID) of a spatial reference. This is optional.
  • geometryType—The geometry type of the GPFeatureRecordsSetLayer. This is optional.
  • hasZ=true—The GPFeatureRecordSetLayer includes z-values. This is optional.
  • hasM=true—The GPFeatureRecordSetLayer includes m-values. This is optional.
  • fields—Contains name, alias, and fieldType properties for the fields returned in the response. This is optional.

If GPFeatureRecordSetLayer contains geometry with z- or m-values, it must include the hasZ or hasM property, respectively, at the feature set level.

FeatureSet syntax

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

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>
                }
            }
        ]
    }
}

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, a time filter can be specified. Time can be filtered as a single instant or by separating the two ends of a time extent with a comma.

{ 
    "url": "<url of a map service or a feature service layer>",
    "filter": <attribute expression>,
    "time": <time value>
}

itemID syntax

For a large set of geometries, you can specify an uploaded item as input for geoprocessing services that support uploads.

{
    "itemID" : "<itemID>" 
}

Example 1: FeatureSet result

{
    "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 without a schema

In cases in which the input geometryType, spatialReference, and fields values match the default values, the input GPFeatureRecordSetLayer can exclude geometryType, spatialReference, and fields information. The geometryType, spatialReference, and fields values will be the default values if no other values are supplied.

The geometryType 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.

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

Provide the hasZ or hasM 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 MapService or FeatureService query that returns a JSON feature set.

{
    "url": "https://myserver/myfeatures/afile.txt"
}
{
    "url": "https://sampleserver6.arcgisonline.com/arcgis/rest/services/USA/MapServer/0/query?where=1%3D1&f=json"
}

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 without any 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, instead of querying time-enabled map service layers or time-enabled feature service layers, a time filter can be specified. Time can be filtered as a single instant or by separating the two ends of a time extent with a comma.

Specify a single time instant.

{
    "url": "https://myserver/../myservicename/FeatureServer/0",
    "time": 967855732000
}

Specify a time extent (including null on either end of the extent).

{
    "url": "https://myserver/../myservicename/FeatureServer/0",
    "time": "967855732000,null"
}

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 the same as FeatureSet input for GPFeatureRecordSetLayer.

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.

Note:

The exceededTransferLimit property is true only if the number of records exceeds the maximum number configured by the server administrator. Otherwise, it is set to false.

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

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 with the following properties:

  • layerDefinition—Contains the name, type, geometryType, objectIdField, fields, and drawingInfo properties.
  • featureSet—Contains the displayFieldName, geometryType, spatialReference, and features 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 example

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

JSON Response syntax

{
    "paramName": "<paramName>",
    "dataType": "GPFeatureRecordSetLayer" | "GPRecordSet",
    "value": {
        "url": "<URL to a result feature service layer>"
    }
}

JSON Response example

{
    "paramName": "ResultPolygons",
    "dataType": "GPFeatureRecordSetLayer",
    "value": {"url": "https://myserver/server/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, 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 for the corresponding field.

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

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

Note:

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

{
    "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 Feature service output 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.

{ 
    "url": "https://myserver/lake.tif"
}

For geoprocessing services that support uploads, you can specify an uploaded item as input to GPRasterDataLayer 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 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

{
    "paramName": "<paramName>",
    "dataType": "GPRasterDataLayer",
    "value": {
        "url": "<url>",
        "format": "<format>"
    }
}

JSON Response example

{
    "paramName": "Output_Raster_Layer",
    "dataType": "GPRasterDataLayer",
    "value": {
        "url": "https://flame7/arcgisjobs/ByRefTools_GPServer/J3D1737BA4584441FACBD5563AD1A47D5/scratch/outrast.tif",
        "format": "tif"
    }
}

Field

Field is supported at 10.7. For information about specific requirements to publish a web tool with a Field input, see Input and output parameters.

Input

name and type are required fields. alias, editable, nullable, and length are optional fields.

Field syntax

{
    "name": "<Field name>",
     "type": "<Field type>",
    "alias": "<Field alias>",
    "editable": false | true,
    "nullable": false | true,
    "length": <Field length>
}

Example

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

URL Syntax:

{ 
    "url": "https://myserver/myfile" 
}

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

ArcGIS Server item ID syntax

{
    "itemID": "<itemID>" 
}

At 10.8, you can specify a portal item ID as an input when you publish your geoprocessing services to a federated server. To find the ID of a portal item, this blog post describes a similar process for ArcGIS Online.

Portal item ID syntax

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

JSON Response syntax

{
    "paramName": "<paramName>",
    "dataType": "GPDataFile",
    "value": {
        "url": "<url>" 
    }
}

JSON Response example

{
    "paramName": "Output_File",
    "dataType": "GPDataFile",
    "value": {
        "url": "https://flame7/arcgisjobs/ByValTools_GPServer/J1E7A1738AC054CDCBFC4A413DD9033CE/scratch/output.txt"
    }
}

GPBoolean, GPDouble, GPLong, and GPString

Input

For simple data types and the GPBoolean, GPDouble, GPLong, and GPString parameter values, use their literal values.

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

{
    "paramName": "<paramName>",
    "dataType": "<GPBoolean | GPDouble | GPLong | GPString>",
    "value": <valueLiteral>
}

JSON Response example

{
    "paramName": "Output_Double",
    "dataType": "GPDouble",
    "value": 1234.56
}

GPLinearUnit

Input

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

  • distance—A double value
  • units—A string with unit values such as esriMeters or esriMiles

{
    "distance": 345.678,
    "units": "esriMiles"
}

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

{
    "paramName": "<paramName>",
    "dataType": "GPLinearUnit",
    "value": {
        "distance": <distance>,
        "units": "<units>"
    }
}

JSON Response example

{
    "paramName": "Output_Linear_Unit",
    "dataType": "GPLinearUnit",
    "value": {
        "distance": 1234.56,
        "units": "esriMiles"
    }
}

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

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

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 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 are supported by GPMultiValue.

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

Example 1: Using GPFeatureRecordSetLayer

GPMultiValue:GPFeatureRecordSetLayer data type using 3 local government feature service layers from sampleserver6:

[
    {
        "url": "https://sampleserver6.arcgisonline.com/arcgis/rest/services/LocalGovernment/CatchbasinInspections/FeatureServer/0"
    },
    {
        "url": "https://sampleserver6.arcgisonline.com/arcgis/rest/services/LocalGovernment/CitizenRequests/FeatureServer/0"
    },
    {
        "url": "https://sampleserver6.arcgisonline.com/arcgis/rest/services/LocalGovernment/Events/FeatureServer/0"
    }
]

Example 2: Using GPString

GPMultiValue:GPString data type:

["Parcels", "Street Lights"]

Example 3: Using GPLinearUnit

GPMultiValue:GPLinearUnit data type:

[
    {
        "distance": 345.67,
        "units": "esriMiles"
    },
    {
        "distance": 36,
        "units": "esriMiles"
    }
]

Output

Note:

All geoprocessing data types 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:GPStringdata type

{
    "paramName": "Output_Layers",
    "dataType": "GPMultiValue:GPString",
    "value": ["Parcels", "Street Lights"]
}

JSON Response example 2

GPMultiValue:GPLinearUnit data type

{
    "paramName": "Output_Distances",
    "dataType": "GPMultiValue:GPLinearUnit",
    "value": [
        {
            "distance": 345.67,
            "units": "esriMiles"
        },
        {
            "distance": 36,
            "units": "esriMiles"
        }
    ]
}