Skip To Content
ArcGIS Developer
Dashboard

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.

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": "",
  "dataType": "<GPBoolean | GPDouble | GPLong | GPString>",
  "value": <valueLiteral>
}

JSON Response example


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

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:

InputDate=1199145600000

Output

JSON Response syntax


{
  "paramName": "",
  "dataType": "GPDate",
  "value": <valueLiteral>
}

JSON Response example

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


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

  • 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

Layer URL syntax

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


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

FeatureCollection syntax


{
  "layerDefinition": {
    "name": "<name>",
    "type": "Feature Layer",
    "geometryType": "<geometryType>",
    "objectIdField": "<FieldName>",
    "fields": [
      {
        "name": "<field1>",
        "type": "<field1Type>",
        "alias": "<field1Alias>"
      },
      {
        "name": "<field2>",
        "type": "<field2Type>",
        "alias": "<field2Alias>"
      }
    ],
    "drawingInfo": {
      "renderer": {
        <renderer>
      }
    },
    "templates": [
      <template>
    ]
  },
  "featureSet": {
    "displayFieldName": "<displayFieldName>",
    "geometryType": "<geometryType>",
    "spatialReference": {
      <spatialReference>
    },
    "features": [
      {
        "attributes": {
          "<field1>":<value1>,
          "<field2>":<value2>,
        },
        "geometry": {
          <geometry1>
        }
      },
      {
        "attributes": {
          "<field1>": <value11>,
          "<field2>": <value22>,
        },
        "geometry": {<geometry2>
      }
    ]
  }
}

Example 1: FeatureSet result


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


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


{
  "geometryType": "esriGeometryPoint",
  "hasZ": true,
  "spatialReference": {
    "wkid": 4326
  },
  "fields": [
    {
      "name": "Id",
      "type": "esriFieldTypeOID",
      "alias": "Id"
    },
    {
      "name": "Name",
      "type": "esriFieldTypeString",
      "alias": "Name"
    }
  ],
  "features": [
    {
      "geometry": {
        "x": -104.44,
        "y": 34.83,
        "z": 10.0
      },
      "attributes": {
        "Id": 43,
        "Name": "Feature 1"
      }
    },
    {
      "geometry": {
        "x": -100.65,
        "y": 33.69,
        "z": 11.0
      },
      "attributes": {
        "Id": 67,
        "Name": "Feature 2"
      }
    }
  ]
}

Example 4: URL to feature layer


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

Output

FeatureSet output

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

JSON Response syntax


{
  "paramName": "<paramName>",
  "dataType": "GPFeatureRecordSetLayer",
  "value": {
    "geometryType": "<geometryType>",
    "hasZ": <true|false>,
    "hasM": <true|false>,
    "spatialReference": {
      <spatialReference>
    },
    "fields": [
      {
        "name": "<field1>",
        "type": "<field1Type>",
        "alias": "<field1Alias>"
      },
      {
        "name": "<field2>",
        "type": "<field2Type>",
        "alias": "<field2Alias>"
      }
    ],
    "features": [
      {
        "geometry": {
          <geometry1>
        },
        "attributes": {
          "<field1>": <value11>,
          "<field2>": <value12>
        }
      },
      {
        "geometry": {
          <geometry2>
        },
        "attributes": {
          "<field1>": <value21>,
          "<field2>": <value22>
        }
      }
    ]
  }
}

JSON Response example


{
  "paramName": "Output_Features",
  "dataType": "GPFeatureRecordSetLayer",
  "value": {
    "geometryType": "esriGeometryPoint",
    "hasZ": true,
    "spatialReference": {
      "wkid": 4326
    },
    "fields": [
      {
        "name": "OBJECTID",
        "type": "esriFieldTypeOID",
        "alias": "OBJECTID"
      },
      {
        "name": "TextField",
        "type": "esriFieldTypeString",
        "alias": "TextField"
      },
      {
        "name": "IntField",
        "type": "esriFieldTypeInteger",
        "alias": "IntegerField"
      },
      {
        "name": "DoubleField",
        "type": "esriFieldTypeDouble",
        "alias": "DoubleField"
      },
      {
        "name": "DateField",
        "type": "esriFieldTypeDate",
        "alias": "DateField"
      }
    ],
    "features": [
      {
        "geometry": {
          "x": -104.36,
          "y": 34.657,
          "z": 10.0
        },
        "attributes": {
          "OBJECTID": 1,
          "TextField": "a",
          "IntField": 1234,
          "DoubleField": 1234.56,
          "DateField": 229564800000
        }
      },
      {
        "geometry": {
          "x": -114.749,
          "y": 31.439,
          "z": 11.0
        },
        "attributes": {
          "OBJECTID": 2,
          "TextField": "b",
          "IntField": 5678,
          "DoubleField": 5678.91,
          "DateField": 239564800000
        }
      }
    ]
  }
}

FeatureCollection output

The parameter value for GPFeatureRecordSetLayer is a JSON structure with the following properties.

JSON Response syntax


{
  "paramName": "<paramName>",
  "dataType": "GPFeatureRecordSetLayer",
  "value": {
    "layerDefinition": {
      "name": "<name>",
      "type": "Feature Layer",
      "geometryType": "<geometryType>",
      "objectIdField": "<FieldName>",
      "fields": [
        {
          "name": "<field1>",
          "type": "<field1Type>",
          "alias": "<field1Alias>"
        },
        {
          "name": "<field2>",
          "type": "<field2Type>",
          "alias": "<field2Alias>"
        }
      ],
      "drawingInfo": {
        "renderer": {
          <renderer>
        }
      },
      "templates": [
        <template>
      ]
    },
    "featureSet": {
      "displayFieldName": "<displayFieldName>",
      "geometryType": "<geometryType>",
      "spatialReference": {
        <spatialReference>
      },
      "features": [
        {
          "attributes": {
            "<field1>":<value1>,
            "<field2>":<value2>,
          },
          "geometry": {
            <geometry1>
          }
        },
        {
          "attributes": {
            "<field1>":<value11>,
            "<field2>":<value22>,
          },
          "geometry": {
            <geometry2>
          }
        }
      ],
      "exceededTransferLimit":<true or false>
    }
  }
}

JSON Response syntax


{
  "paramName": "Output_Feature_Class",
  "dataType": "GPFeatureRecordSetLayer",
  "value": {
    "layerDefinition": {
      "name": "Output Feature Class",
      "type": "Feature Layer",
      "geometryType": "esriGeometryPolygon",
      "objectIdField": "OBJECTID",
      "fields": [
        {
          "name": "OBJECTID",
          "type": "esriFieldTypeOID",
          "alias": "OBJECTID"
        },
        {
          "name": "Shape",
          "type": "esriFieldTypeGeometry",
          "alias": "Shape"
        },
        {
          "name": "X",
          "type": "esriFieldTypeInteger",
          "alias": "X"
        },
        {
          "name": "Y",
          "type": "esriFieldTypeInteger",
          "alias": "Y"
        },
        {
          "name": "UserName",
          "type": "esriFieldTypeString",
          "alias": "UserName",
          "length": 50
        },
        {
          "name": "BUFF_DIST",
          "type": "esriFieldTypeDouble",
          "alias": "BUFF_DIST"
        },
        {
          "name": "ORIG_FID",
          "type": "esriFieldTypeInteger",
          "alias": "ORIG_FID"
        },
        {
          "name": "Shape_Length",
          "type": "esriFieldTypeDouble",
          "alias": "Shape_Length"
        },
        {
          "name": "Shape_Area",
          "type": "esriFieldTypeDouble",
          "alias": "Shape_Area"
        }
      ],
      "drawingInfo": {
        "renderer": {
          "type": "simple",
          "symbol": {
            "type": "esriSFS",
            "style": "esriSFSSolid",
            "color": [
              252,
              193,
              184,
              255
            ],
            "outline": {
              "type": "esriSLS",
              "style": "esriSLSSolid",
              "color": [
                110,
                110,
                110,
                255
              ],
              "width": 0.7
            }
          }
        }
      },
      "templates": []
    },
    "featureSet": {
      "displayFieldName": "",
      "geometryType": "esriGeometryPolygon",
      "spatialReference": {
        "wkid": 26944,
        "latestWkid": 26944
      },
      "features": [
        {
          "attributes": {
            "OBJECTID": 1,
            "X": 1959000,
            "Y": 642000,
            "UserName": null,
            "BUFF_DIST": 152.40030480060963,
            "ORIG_FID": 1,
            "Shape_Length": 957.5593559328076,
            "Shape_Area": 72966.16885441207
          },
          "geometry": {
            "curveRings": [
              [
                [
                  1959000,
                  642152.4002999999
                ],
                {
                  "a": [
                    [
                      1959000,
                      642152.4002999999
                    ],
                    [
                      1959000,
                      641999.9999951993
                    ],
                    0,
                    1
                  ]
                }
              ]
            ]
          }
        },
        {
          "attributes": {
            "OBJECTID": 2,
            "X": 1959000,
            "Y": 641000,
            "UserName": null,
            "BUFF_DIST": 152.40030480060963,
            "ORIG_FID": 2,
            "Shape_Length": 957.5593559328076,
            "Shape_Area": 72966.16885441207
          },
          "geometry": {
            "curveRings": [
              [
                [
                  1959000,
                  641152.4002999999
                ],
                {
                  "a": [
                    [
                      1959000,
                      641152.4002999999
                    ],
                    [
                      1959000,
                      640999.9999951993
                    ],
                    0,
                    1
                  ]
                }
              ]
            ]
          }
        }
      ],
      "exceededTransferLimit": false
    }
  }
}

GPRasterDataLayer

Input

The input parameter value for a 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


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

JSON Response example


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


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


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

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:


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

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


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

JSON Response example


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