FeatureSet object

Overview

This topic discusses the JSON representation of feature sets. The featureSet object contains feature objects, including the values for the fields requested by the user. For layers, if you request geometry information, the geometry of each feature is also returned in the featureSet. For tables, the featureSet does not include geometries.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
{
  "objectIdFieldName": "<objectIdFieldName>", //optional
  "globalIdFieldName": "<globalIdFieldName>", //optional
  "displayFieldName": "<displayFieldName>", //optional
  "geometryType": "<esriGeometryPoint | esriGeometryMultipoint | esriGeometryPolyline | esriGeometryPolygon | esriGeometryEnvelope>",
  "spatialReference": <spatialReference>, //for feature layers only.
  "hasZ": <true|false>, //optional  Default is false.
  "hasM": <true|false>, //optional  Default is false.
  "fields": [
    {"name": "<fieldName1>", "type": "<fieldType1>", "alias": "<fieldAlias1>", "length": "<length1>"},
    {"name": "<fieldName2>", "type": "<fieldType2>", "alias": "<fieldAlias2>", "length": "<length2>"}
  ],
  "features": [ //features will include geometry for feature layers only
    <feature1>,
    <feature2>
  ]
}

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

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

Your ArcGIS portal

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

Your ArcGIS Location Platform dashboard

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

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

Close