Feature Layer

URL:
https://<adminRoot>/<serviceName>/FeatureServer/<layerId>
Methods:
GET

Description

An individual layer resource represents a single feature layer or a non-spatial table in a feature service. A feature layer is a table or view with at least one spatial column.

For tables, it provides basic information about the table such as its ID, name, fields, types and templates.

For feature layers, in addition to the table information above, it provides information such as its geometry type, min and max scales, and spatial reference.

Each type includes information about the type such as the type ID, name, and definition expression. Sub-types also include a default symbol and a list of feature templates.

Each feature template includes a template name, description and a prototypical feature.

The property resultType in the layer metadata object will determine the max record count. The resultType can either be {none, standard, tile}.

  • The resultType parameter is only supported if the layer metadata returns supportQueryWithResultType is true in the advancedQueryCapabilitites metadata object.
  • The property maxRecordCount is used if the resultType value is none . This can be the default server assigned (1000, 2000) or a value that is overwritten by the service owner or admin.
  • The property standardMaxRecordCount is used if the resultType value is standard . Example: ("standardMaxRecordCount": 32000 )
  • The property tileMaxRecordCount is used if the resultType value is tile . Example: ("tileMaxRecordCount": 8000 ).
  • The layer metadata will also include the maxRecordCountFactor property and can be configured from the admin API. The server maxRecordCount for {standard, tile} will be the (base * maxRecordCountFactor ). All maxRecordCount will be adjusted with the maxRecordCountFactor .

The property capabilities returns Query, Create, Delete, Update, and Editing capabilities. The Editing capability will be included if Create, Delete or Update is enabled for a Feature Service.

Note, query and edit operations are not available on a layer in the administrative view.

Response caching for hosted feature service layers in ArcGIS Enterprise

In ArcGIS Enterprise 10.9, updateDefinition can be used to enable response caching for hosted feature service layers running on the relational data store. Enabling requires that the object store be configured in ArcGIS data store.

Response caching is a back-end server caching mechanism that significantly increases performance and scalability for data served from hosted feature services on a relational data store. Its ideal for read-only data, or data that changes infrequently. When response caching is enabled, the response from a layer query that uses resultType tile or has cacheHint set to true will be cached. When the exact same query is sent again to the service, the cache response is returned as long as the data has not been updated since the cache was created. If the data has been updated, a new cache is created from the updated response. For example, clients that consistently use the same tile requests to draw content will benefit from response caching.

The option can be turned on for specific service layers as needed. At 10.9, this option can be configured from the REST API and is considered a developer option.

Enabling response caching

Before response caching can be enabled, the object store must be configured in ArcGIS Data Store. The object store is required as its used to store the responses and maintain the last edit data metadata. For more information on how to configure the object store, see Use the configuredatastore utility to create a data store. Once the object store is configured, the server will need to be restarted to allow hosted feature services to access it. Once restarted, hosted feature services running on the relational data store will include the "editingInfo": ("lastEditDate": <dateValue>) property. For more information on this property, see the Feature Layer resource.

Once the object store has been configured, response caching can be enabled on individual hosted feature service layers using the updateDefinition operation, allowing you to control which layers will write response cache content to the object store. This also applies to hosted feature service layer views, where response caching can be enabled or disabled independently on view layers.

The following example input for updateDefinition enables response caching that will expire after one day:

Use dark colors for code blocksCopy
1
2
3
4
5
6
{
  "layerCache": {
    "enabled": true,
    "expiration": 1
  }
}

The expiration property defines the number of days a cache will be stored before it is removed. Once a cache is removed, a new response cache will be created the next time the service is queried. The updateDefinition operation can be used to change or remove the expiration. An expiration value of 0 means the cache will never expire. The value put for the expiration property must be an integer.

Once updateDefintion has been used to enable response caching, the layers admin resource (https://myenterprise.esri.com/server/rest/admin/services/Hosted/counties/FeatureServer/0?f=pjson ) will list the current response caching settings:

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
"adminLayerInfo": {
  "layerCache": {
    "expiration": 1,
    "enabled": true
  },
  ...
}

Disabling response caching

Response caching can also be disabled on hosted feature layers and hosted feature layers and hosted feature layer views using updateDefinition . Disabling response caching will remove all of the layer's cached content from the object store.

The following example input for updateDefinition disables response caching:

Use dark colors for code blocksCopy
1
2
3
4
5
{
  "layerCache": {
    "enabled": false
  }
}

Once disabled, the layer resource will include "supportsQueryWithCacheHint": false .

New at 11.1

A layer's administrative resource now returns a list of supported options for layer admin operations (layerAdminOperationsOptions property).

Request parameters

ParameterDetails

f

The response format. The default response format is html .

Values: html | json

Example usage

Get information about layer 0 in the "WorldService" Feature Service

Use dark colors for code blocksCopy
1
https://services.myserver.com/OrgID/arcgis/rest/admin/services/WorldService/FeatureServer/0

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
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
{
  "id": <layerId>,
  "name": "<layerName>",
  "type": "<layerType>",
  "description": "<description>",
  "copyrightText": "<copyrightText>",
  "supportsRollbackOnFailures": <true | false>,
  "geometryType": "<geometryType>",
  "minScale": <minScale>,
  "maxScale": <maxScale>,
  "extent": <envelope>,
  "drawingInfo": {
    "renderer": <renderer>,
    "transparency": <transparency>,
    "labelingInfo": <labelingInfo>
  },
  },
  "hasAttachments": <true|false>
  "htmlPopupType": "<esriServerHTMLPopupTypeNone | esriServerHTMLPopupTypeAsURL | esriServerHTMLPopupTypeAsHTMLText>",
  "objectIdField": "<objectIdFieldName>",
  "globalIdField": "<globalIdFieldName>",
  "displayField": "<displayField>",
  "typeIdField": "<typeIFieldName>",
  "fields": [
    {
      "name": "<fieldName1>",
      "type": "<fieldType1>",
      "alias": "<fieldAlias1>",
      "length": "<length1>",
      "editable": "<true | false>",
      "nullable": "<true | false>",
      "domain": <domain1>
    },
    {
      "name": "<fieldName2>",
      "type": "<fieldType2>",
      "alias": "<fieldAlias1>",
      "length": "<length2>",
      "editable": "<true | false>",
      "nullable": "<true | false>",
      "domain": <domain2>
    }
  ],
  "types": [
    {
      "id": <typeId1>,
      "name": "<typeName1>",
      "domains": {
        "<domainField11>": <domain11>,
        "<domainField12>": <domain12>
      },
      "templates": [
        {
          "name": "<templateName11>",
          "description": "<templateDescription11>",
          "prototype": <prototypicalFeature11>
        },
        {
          "name": "<templateName12>",
          "description": "<templateDescription12>",
          "prototype": <prototypicalFeature12>
        }
      ]
    },
    {
      "id": <typeId2>,
      "name": "<typeName2>",
      "domains": {
        "<domainField11>": <domain21>,
        "<domainField12>": <domain22>
      },
      "templates": [
        {
          "name": "<templateName21>",
          "description": "<templateDescription21>",
          "prototype": <prototypicalFeature21>,
          "drawingTool": "esriFeatureEditToolNone | esriFeatureEditToolPoint | esriFeatureEditToolLine | esriFeatureEditToolPolygon | esriFeatureEditToolAutoCompletePolygon |
	esriFeatureEditToolCircle | esriFeatureEditToolEllipse | esriFeatureEditToolRectangle | esriFeatureEditToolFreehand"
        },
        {
          "name": "<templateName22>",
          "description": "<templateDescription22>",
          "prototype": <prototypicalFeature22>,
          "drawingTool": "esriFeatureEditToolNone | esriFeatureEditToolPoint | esriFeatureEditToolLine | esriFeatureEditToolPolygon | esriFeatureEditToolAutoCompletePolygon |
	esriFeatureEditToolCircle | esriFeatureEditToolEllipse | esriFeatureEditToolRectangle | esriFeatureEditToolFreehand"
        }
      ]
    }
  ],
  "templates": [
    {
      "name": "<templateName1>",
      "description": "<templateDescription1>",
      "prototype": <prototypicalFeature1>
    },
    {
      "name": "<templateName2>",
      "description": "<templateDescription2>",
      "prototype": "<prototypicalFeature2>"
    }
  ],
  "supportedQueryFormats": "<supportedQueryFormats>",
  "maxRecordCount": "<maxRecordCount>",
  "standardMaxRecordCount": "<standardMaxRecordCount>",
  "tileMaxRecordCount": "<tileMaxRecordCount>",
  "maxRecordCountFactor": "<maxRecordCountFactor>",
  "capabilities": "<capabilities>",
  "supportedFieldTypes": [<fieldytpe1>,<fieldtype2]
}

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
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
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
{
  "currentVersion": 10.1,
  "id": 0,
  "name": "Demo.dbo.WORLDCITIES",
  "type": "Feature Layer",
  "displayField": "CITY_NAME",
  "description": "",
  "copyrightText": "",
  "supportsRollbackOnFailure": true,
  "geometryType": "esriGeometryPoint",
  "minScale": 0,
  "maxScale": 0,
  "extent": {
    "xmin": -176.151563636,
    "ymin": -54.792,
    "xmax": 179.221887694,
    "ymax": 78.200001124,
    "spatialReference": {
      "wkid": 4326
    }
  },
  "drawingInfo": {
    "renderer": {
      "type": "simple",
      "symbol": {
        "type": "esriSMS",
        "style": "esriSMSCircle",
        "color": [
          0,
          166,
          116,
          255
        ],
        "size": 4,
        "angle": 0,
        "xoffset": 0,
        "yoffset": 0,
        "outline": {
          "color": [
            0,
            0,
            0,
            255
          ],
          "width": 1
        }
      },
      "label": "",
      "description": ""
    },
    "transparency": 0,
    "labelingInfo": null
  },
  },
  "hasAttachments": false,
  "htmlPopupType": "esriServerHTMLPopupTypeAsHTMLText",
  "objectIdField": "OBJECTID",
  "globalIdField": "",
  "typeIdField": "",
  "fields": [
    {
      "name": "OBJECTID",
      "type": "esriFieldTypeInteger",
      "alias": "OBJECTID",
      "sqlType": "sqlTypeInteger",
      "nullable": false,
      "editable": false,
      "domain": null
    },
    {
      "name": "CITY_NAME",
      "type": "esriFieldTypeString",
      "alias": "CITY_NAME",
      "sqlType": "sqlTypeNVarchar", "length": 30,
      "nullable": true,
      "editable": true,
      "domain": null
    },
    {
      "name": "GMI_ADMIN",
      "type": "esriFieldTypeString",
      "alias": "GMI_ADMIN",
      "sqlType": "sqlTypeNVarchar", "length": 7,
      "nullable": true,
      "editable": true,
      "domain": null
    },
    {
      "name": "ADMIN_NAME",
      "type": "esriFieldTypeString",
      "alias": "ADMIN_NAME",
      "sqlType": "sqlTypeNVarchar", "length": 42,
      "nullable": true,
      "editable": true,
      "domain": null
    },
    {
      "name": "FIPS_CNTRY",
      "type": "esriFieldTypeString",
      "alias": "FIPS_CNTRY",
      "sqlType": "sqlTypeNVarchar", "length": 2,
      "nullable": true,
      "editable": true,
      "domain": null
    },
    {
      "name": "CNTRY_NAME",
      "type": "esriFieldTypeString",
      "alias": "CNTRY_NAME",
      "sqlType": "sqlTypeNVarchar", "length": 30,
      "nullable": true,
      "editable": true,
      "domain": null
    },
    {
      "name": "STATUS",
      "type": "esriFieldTypeString",
      "alias": "STATUS",
      "sqlType": "sqlTypeNVarchar", "length": 50,
      "nullable": true,
      "editable": true,
      "domain": null
    },
    {
      "name": "POP_RANK",
      "type": "esriFieldTypeInteger",
      "alias": "POP_RANK",
      "sqlType": "sqlTypeInteger",
      "nullable": true,
      "editable": true,
      "domain": null
    },
    {
      "name": "POP_CLASS",
      "type": "esriFieldTypeString",
      "alias": "POP_CLASS",
      "sqlType": "sqlTypeNVarchar", "length": 22,
      "nullable": true,
      "editable": true,
      "domain": null
    },
    {
      "name": "PORT_ID",
      "type": "esriFieldTypeInteger",
      "alias": "PORT_ID",
      "sqlType": "sqlTypeInteger",
      "nullable": true,
      "editable": true,
      "domain": null
    },
    {
      "name": "LABEL_FLAG",
      "type": "esriFieldTypeInteger",
      "alias": "LABEL_FLAG",
      "sqlType": "sqlTypeInteger",
      "nullable": true,
      "editable": true,
      "domain": null
    }
  ],
  "types": [],
  "templates": [
    {
      "name": "Demo.dbo.WORLDCITIES",
      "description": "",
      "drawingTool": "esriFeatureEditToolPoint",
      "prototype": {
        "attributes": {
          "LABEL_FLAG": null,
          "CITY_NAME": null,
          "GMI_ADMIN": null,
          "ADMIN_NAME": null,
          "FIPS_CNTRY": null,
          "CNTRY_NAME": null,
          "STATUS": null,
          "POP_RANK": null,
          "POP_CLASS": null,
          "PORT_ID": null
        }
      }
    }
  ],
  "supportedQueryFormats": "JSON",
  "maxRecordCount": 1000,
  "standardMaxRecordCount": 4000,
  "tileMaxRecordCount": 4000,
  "maxRecordCountFactor": 1,
  "capabilities": "Create,Delete,Query,Update,Editing"
}

Below is a sample JSON response that demonstrates the layerAdminOperationOptions property returned for a hosted feature service layer at ArcGIS Enterprise 11.1. This property lists the admin operations available for a given hosted feature layer. For example, the response below shows fields listed under addToDefinition . This means that the operation can be used to add fields to a layer.

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
"layerAdminOperationsOptions": {
  "deleteFromDefinition": [
    "xssTrustedFields",
    "fields",
    "indexes",
    "relationships",
    "lodInfoIndexes"
  ],
  "addToDefiniton": [
    "fields",
    "indexes"
  ],
  "updateDefinition": [
    "name",
    "displayField",
    "description",
    "copyrightText",
    "editFieldsInfo",
    "minScale",
    "maxScale",
    "fields",
    "maxRecordCount",
    "drawingInfo",
    "types",
    "templates",
    "indexes",
    "defaultVisibility",
    "hasAttachments",
    "typeIdField",
    "timeInfo",
    "xssTrustedFields",
    "allowUpdateWithoutMValues",
    "maxResultWindow",
    "maxRecordCountFactor",
    "tableMetadata",
    "propagateVisibleFields",
    "hasGeometryProperties",
    "layerCache",
    "attachmentProperties",
    "lodInfos",
    "lastEditDate",
    "capabilities",
    "allowGeometryUpdates",
    "ownershipBasedAccessControlForFeatures",
    "definitionQuery"
  ]
},

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