Feature Service
- URL:https://<catalog-url>/<serviceName>/FeatureServer
- Operations:Append, Apply Edits, Create Replica, Extract Changes, Query, Query Domains, Relationships, Synchronize Replica, Unregister Replica
- Child Resources:Layer, Query Data Elements, Replicas
- Version Introduced:10.0
Description
A feature service can contain datasets (for example, tables and views) with or without a spatial column. Datasets with a spatial column are considered layers; those without a spatial column are considered tables. A feature service allows clients to query and edit feature geometry and attributes.
This resource provides basic information about the feature service, including the feature layers and tables that it contains, the service description, and so on.
The capabilities property returns Create, Delete, Extract, Query, Update, Sync, and Uploads capabilities. The Uploads capability is included if Create, Delete, or Update is enabled for a feature service. The Editing capability is included if Create, Delete, and Update is enabled and allowGeometryUpdates is true. The Sync capability allows editors to make local edits and periodically sync with the feature service. The Extract capability allows editors to create a local copy of data without the ability to sync with the feature service.
The maxRecordCount property returns the maximum number of records that will be returned at once for a query. The Feature Service resource has an input parameters option and outSR to support viewing of a feature service footprint.
The following properties describe features that have been added to Feature Service through the releases. If the property does not exist, it's equivalent to having a value of false or is not set:
- hasVersionedData will be true if the data is versioned.
- supportedQueryFormats returns the formats in which query results can be returned.
- allowGeometryUpdates returns true if the geometry of the features in the layer can be edited.
- zDefault and enableZDefaults are returned for a service configured with default z-values.
- supportsDisconnectedEditing will be true to indicate the support for disconnected editing.
- syncEnabled will be true to indicate the support for sync.
- supportsRegisterExistingData will be true if the service supports registration of existing data for createReplica. Only present if syncEnabled is true.
- supportsSyncDirectionControl will be true if the service will allow control of data sync direction. Only present if syncEnabled is true.
- supportsPerLayerSync will be true if the layers can be synchronized independently, and the service will accept a value of perLayer for the sync model during the createReplica operation. If supportsPerLayerSync is false, then the only sync model supported is perReplica. Only present if syncEnabled is true.
- supportsPerReplicaSync will be true if the layers can be synchronized together, and the service will accept a value of perReplica for the sync model during the createReplica operation. If supportsPerReplicaSync is false, then the only sync model supported is perLayer. Only present if syncEnabled is true.
- supportsSyncModelNone will be true if the service supports extracting data without the creation of a replica. If true, the service will accept setting syncModel=none for the sync model during the createReplica operation.
- supportsAttachmentsSyncDirection will be true if the service supports options to define how attachments will be synced. If true, the service will accept setting the attachmentsSyncDirection parameter during the createReplica operation.
- supportsRollbackOnFailure will be true if the rollbackOnFailure parameter can be set to true or false when running the synchronizeReplica operation. supportsRollbackOnFailure will be false if the synchronizeReplica operation does not support the parameter.
- supportsAsync will be true if the service can execute sync operations asynchronously. Only present if syncEnabled is true.
- supportsApplyEditsWithGlobalIds in the root resource will be true if all layers in the service have supportsApplyEditsWithGlobalIds as true. See Feature Service Layer Properties for more details.
- A feature service that supports the append API exposes the supportsAppend metadata property. When supportsAppend property is absent or is false, the owner of the feature service cannot use the Append API. Also the Append capability cannot be added to a feature service if the supportsAppend is true. See Append (Feature Service) or Append (Feature Service/Layer) for more details.
New at 10.9
- The feature service resource's syncCapabilities object now supports a supportsBiDirectionalSyncForServer property. Hosted feature services, feature services running on branch versioned data or a feature services running on non-versioned with archiving data can support bidirectional syncing. Currently bidirectional sync workflows require the target to be a hosted feature service running on either ArcGIS Online or ArcGIS Enterprise 10.9. Bidirectional syncing with another service requires replica tracking to be enabled on the data. For hosted feature services, replica tracking is automatically enabled when sync is enabled, starting at 10.9. For more information, see Share content with collaboration groups, createReplica, and synchronizeReplica.
- The extractChanges operation includes a new parameter that, when true, returns whether geometry updates have been made to a layer in the feature service. The new parameter is supported when the service's extractChangesCapabilities property includes supportsReturnHasGeometryUpdates as true.
- The createReplica operation's syncDataOptions parameter has been expanded to add full annotation and an option to include a subset of Utility Network system information when taking data offline. The services supportedSyncDataOptions property indicates which of the syncDataOptions are available for a service. See the createReplica operation for more information on these values.
New at 10.8.1
- Feature services now support topology layers. Topology layers are composite layers that reference subLayers and do not have any capabilities. The subLayer references describe the layer's error features and dirty areas. In clients like ArcGIS Pro 2.6, topology layers are used in conjunction with the validation service to support topology validation and error feature correction.
- When a topology layer is included, the controllerDatasetLayers array property adds a reference to it in the topologyLayerIds property. To see an example of topology layers being included in a feature service, see the topology example in the Example Usage section below.
- New advancedReplicaResourcesCapabilities properties in the syncCapabilities object are provided for sync enabled feature services published from ArcGIS Pro that reference enterprise geodatabase data. These describe new parameters that can be passed to the replicas resource. See Replicas for more details.
- Hosted and non-hosted feature services running on a federated server include a serviceItemId property at 10.8.1. This describes the ID of the associated feature layer item in the home app. Hosted feature services in ArcGIS Enterprise have supported this property since 10.7.
- If the connected user has the Version Management privilege assigned to them through either being assigned the default administrator or a custom role, they can perform additional operations on branch versioned data (isDataBranchVersioned as true). This includes editing protected and private branch versions owned by others, as long as the service allows editing. This also includes being able to access and unregister replicas owned by others for services based on branch versioned data. A user with the Version Management privilege can sync to a protected default version on an editable services based on branch versioned data.
New at 10.8
- The feature service resource now returns the supportsDatumTransformation property. This property is returned as true if the service supports the addition of datum transformations. If true, Create Replica, the layer-level Query, Query Related, and service and layer-level Apply Edits operations will allow datum transformations.
- The appropriate user type extension is required when editing feature services that contain Utility Network or Parcel Fabric layers. The user type extensions are not required to query Utility Network or Parcel Fabric layers through the feature service. The userTypeExtensions property of the Layer resource indicates if the layer is part of a parcelFabric or utilityNetwork.
- The supportsReturnServiceEditsInSourceSR property in advancedEditingCapabilities indicates whether the option to supportsReturnServiceEditsInSourceSR is available on the service's Apply Edits operation.
- The datumTransformations property indicates the default datum transformations applied with operations on the service.
- The referenceScale property represents the scale where a participating layer's symbol size and text are fixed at.
New at 10.7
- The supportsReturnDeleteResults property is true if the feature service layer deleteFeatures operation supports the returnDeleteResults parameter. See the deleteFeatures operation for more information.
- supportedSyncDataOptions is included with syncCapabilites. Its presence indicates that there are layers in the service that are not of "type": "feature layer" or "type": "table" and can be optionally taken offline with the createReplica operation. See the createReplica operation for more information.
- The validationSystemLayers property will appear if the datasets referenced by layers in the service have validation rules and/or batch calculation rules. See information on validation rules and batch calculation rules in enterprise geodatabases for more information. This property will reference layerIds that are accessible via the service and contain validation error features of various feature types.
- isLocationTrackingService is true if the hosted feature service was configured with the location tracking extension. This service is to be used specifically for location tracking and should not be used in any other context. It can also be referred to as the location tracking service as there is only ever one per ArcGIS Enterprise deployment.
- isLocationTrackingView is true if the hosted feature service view is created from the location tracking service (feature service with "isLocationTrackingService": true).
- The layers resource now includes an option to list the hidden layers along with regular layers in the resource. Layers of type "Utility Network Layer" have references to system maintained layers that have the isHidden=true property. By default, these do not appear in the layers resource. However, if you include the includeHiddenLayers=true parameter, these will be listed. For example, https://<featureservice-url>/layers?f=json&includeHiddenLayers=true.
- If "supportsRelationshipsResource": true, the service will support a relationships resource and list the relationships in a relationships array along with layers and tables in the service resource. See example below, or the relationships resource for more information.
New at 10.6.1
- New properties exposed on a feature service published to an ArcGIS Enterprise federated server with data stored in a registered enterprise geodatabase from ArcGIS Pro 2.2:
- extractChangesCapabilities contains supports properties that define which extract changes capabilities are available on the service.
- The advancedEditingCapabilities property indicates whether the apply edits supportsSplit operation is enabled on the service.
New at 10.6
- New layer types for Utility Networks and annotation layers can be publish from ArcGIS Pro starting at version 2.1.
- Feature services can be published from enterprise geodatabase data that has attribute rules.
- Feature services can be published from enterprise geodatabase data that has been configured to use branch versioning. If the service is published form a branch versioned workspace, the gdbVersion parameter on various operations can take the name of a branch version.
- Additional spatial reference properties describing the published maps VCS, tolerance, resolution properties and height model info are now provided. See JSON response example below.
When querying, z values are returned in the sourceSpatialReference vertical coordinate system regardless of what is specified as the output spatial reference. It is also expected that z values are provided in the sourceSpatialReference source vertical coordinate system when editing.
The features listed above are available for non-hosted services published from ArcGIS Pro or later but not necessarily for services published from ArcMap or other processes. Services published from ArcGIS Pro 2.1 have the following layer and service property: "cimVersion": "2.1.0"
New at 10.5
- The Layers resource now returns full information about each layer without having to go to the individual layer resources. For example, https://services.myserver.com/arcgis/rest/services/USA/FeatureServer/layers?f=pjson returns JSON for all of the layers in the feature service.
- If allowTrueCurvesUpdates is true and onlyAllowTrueCurveUpdatesByTrueCurveClients is true, features with true curves can by updated by true curve capable clients (e.g. ArcGIS Pro). When edits are applied, the true curve client must set the trueCurveClient parameter to true.
If allowTrueCurvesUpdates is true and onlyAllowTrueCurveUpdatesByTrueCurveClients is false, features with true curves can be updated by any client. This includes cases where the client provides a densified feature to update the true curve feature.
- If allowTrueCurvesUpdates is false, features with true curves cannot be updated.
- supportsTrueCurve will be true if the service supports the option to returnTrueCurves in the query response.
- supportsQueryDomains will be true if the service supports the queryDomains operation.
- allowUpdateWithoutMValues will be true to allow NaN to be inserted for m-values when m-values are not supplied with the geometry of m-aware data. If allowUpdateWithoutMValues is false m-values must be supplied in order to edit the geometry of m-aware data.
Request parameters
Parameter |
Details |
---|---|
option | This parameter was added at 10.1. If option is footprints, the footprint of the feature service is returned as a feature collection. This feature collection can be viewed in Map Viewer. This is only supported when f is json. Value: footprints |
outSR | This parameter was added at 10.1. The spatial reference of the geometry returned in footprints. This parameter is supported only when option=footprints is specified. The spatial reference should be specified as a well-known ID. If outSR is not specified, the geometry is returned in GCS_WGS_1984. |
useGlobalIds | Used to specify whether upsert needs to use GlobalId when matching features. The default value is false and ObjectId is used by default. |
f |
The response format. The default response format is html. Values: html | json | pjson |
Example usage
Below is a sample request URL for a feature service:
https://machine.domain.com/webadaptor/rest/services/USA/FeatureServer?f=pjson
JSON Response syntax
{
"currentVersion": <currentVersion>,
"serviceDescription": "<serviceDescription>",
"hasVersionedData": <true | false>,
"supportsDisconnectedEditing": <true | false>,
"supportsDatumTransformation": <true | false>, //Added at 10.8
"supportsReturnDeleteResults": <true | false>, //Added at 10.7
"hasStaticData" : <true | false>,
"maxRecordCount" : "<maxRecordCount>",
"supportedQueryFormats": "<supportedQueryFormats>",
"supportsRelationshipsResource": <true | false>, //Added at 10.7
"capabilities": "<capabilities>",
"description": "<description>",
"copyrightText": "<copyrightText>",
"userTypeExtensions": [<Extension Types>], //Added at 10.8
"advancedEditingCapabilities": {<advancedEditingCapabilities>},
"spatialReference": {<spatialReference>},
"initialExtent": {<envelope>},
"fullExtent": {<envelope>},
"allowGeometryUpdates": <true | false>,
"units": "<units>",
"syncEnabled" : <true | false>,
"returnServiceEditsHaveSR": <true | false>, //Added at 10.7.1
//Added at 10.7
"validationSystemLayers": {
"validationPointErrorlayerId": <validationPointErrorlayerId>,
"validationLineErrorlayerId": <validationLineErrorlayerId>,
"validationPolygonErrorlayerId": <validationPolygonErrorlayerId>,
"validationObjectErrortableId": <validationObjectErrortableId>
},
//Added at 10.6.1
"extractChangesCapabilities": {
"supportsReturnIdsOnly": <true | false>,
"supportsReturnExtentOnly": <true | false>,
"supportsReturnAttachments": <true | false>,
"supportsLayerQueries": <true | false>,
"supportsSpatialFilter": <true | false>,
"supportsReturnFeature": <true | false>,
"supportsReturnHasGeometryUpdates": <true | false> //Added at 10.9
},
"syncCapabilities": {
"supportsASync": <true | false>,
"supportsRegisteringExistingData": <true | false>,
"supportsSyncDirectionControl": <true | false>,
"supportsPerLayerSync": <true | false>,
"supportsPerReplicaSync": <true | false>,
"supportsRollbackOnFailure": <true | false>,
"supportedSyncDataOptions": <supportedSyncDataOptions>, //Added at 10.7
"supportsQueryWithDatumTransformatiom": <true | false>, //Added at 10.8
"supportsBiDirectionalSyncForServer": <true | false> //Added at 10.9
},
"editorTrackingInfo": {
"enableEditorTracking": <true | false>,
"enableOwnershipAccessControl": <true | false>,
"allowOthersToUpdate": <true | false>,
"allowOthersToDelete": <true | false>
},
"documentInfo": {
"<key1>": "<value1>",
"<key2>": "<value2>"
},
//the feature layers published by this service
"layers": [
{ "id": <layerId1>, "name": "<layerName1>" },
{ "id": <layerId2>, "name": "<layerName2>" }
],
//the non-spatial tables published by this service
"tables": [
{ "id": <tableId1>, "name": "<tableName1>" },
{ "id": <tableId2>, "name": "<tableName2>" }
],
"relationships": [
{ "id": <relationshipId1>, "name": "<relationshipName1>" },
{ "id": <relationshipId2>, "name": "<relationshipName2>" }
],
"datumTransformations": [<datumTransformations>] //Added at 10.7.1
"enableZDefaults": <true | false>,
"isLocationTrackingService": <true | false>, //Added at 10.7
"isLocationTrackingView": <true | false>, //Added at 10.7
"zDefault": <zDefaultValue>,
}
JSON Response example
Below is an example of a feature service resource's JSON response:
{
"currentVersion": 10.8.1,
"serviceDescription": "Birds",
"hasVersionedData": false,
"supportsDisconnectedEditing: false,
"supportsDatumTransformation": true,
"supportsReturnDeleteResults": true,
"supportsRelationshipsResource": true,
"syncEnabled": false,
"hasStaticData": false,
"maxRecordCount": 1000,
"supportedQueryFormats": "JSON",
"capabilities": "Query,Create,Delete,Update,Uploads,Editing",
"description": "",
"copyrightText": "",
"userTypeExtensions: [
"utilityNetwork"
],
"advancedEditingCapabilities": {
"supportsSplit": true,
"supportsReturnServiceEditsInSourceSR": true
},
"spatialReference": {
"wkid": 4326,
"latestWkid": 4326
},
"initialExtent": {
"xmin": -118.016756138237,
"ymin": 32.8933824408207,
"xmax": -116.532738278622,
"ymax": 34.3261469363675,
"spatialReference": {
"wkid": 4326,
"latestWkid": 4326
}
},
"fullExtent": {
"xmin": -117.855689264791,
"ymin": 32.5702577626442,
"xmax": -116.87086222794,
"ymax": 34.1460567673275,
"spatialReference": {
"wkid": 4326,
"latestWkid": 4326
}
},
"allowGeometryUpdates": true,
"units": "esriDecimalDegrees",
"syncEnabled": true,
"validationSystemLayers": {
"validationPointErrorlayerId": 1,
"validationLineErrorlayerId": 2,
"validationPolygonErrorlayerId": 3,
"validationObjectErrortableId": 5
},
"extractChangesCapabilities": {
"supportsReturnIdsOnly": true,
"supportsReturnExtentOnly": false,
"supportsReturnAttachments": false,
"supportsLayerQueries": false,
"supportsSpatialFilter": false,
"supportsReturnFeature": false,
"supportsReturnHasGeometryUpdates": true
},
"syncCapabilities": {
"supportsASync": true,
"supportsRegisteringExistingData": true,
"supportsSyncDirectionControl": true,
"supportsPerLayerSync": true,
"supportsPerReplicaSync": false,
"supportsRollbackOnFailure": false,
"supportedSyncDataOptions": 3
"supportsQueryWithDatumTransformation": true,
"supportsBiDirectionalSyncForServer": true
},
"editorTrackingInfo": {
"enableEditorTracking": false,
"enableOwnershipAccessControl": false,
"allowOthersToUpdate": true,
"allowOthersToDelete": false
},
"layers": [
{
"id": 0,
"name": "Sitings",
"parentLayerId": -1,
"defaultVisibility": true,
"subLayerIds": null,
"minScale": 0,
"maxScale": 0,
"geometryType": "esriGeometryPoint"
},
{
"id": 1,
"name": "NestingGrounds",
"parentLayerId": -1,
"defaultVisibility": true,
"subLayerIds": null,
"minScale": 0,
"maxScale": 0,
"geometryType": "esriGeometryPolygon"
},
{
"id": 2,
"name": "LandCover",
"parentLayerId": -1,
"defaultVisibility": true,
"subLayerIds": null,
"minScale": 0,
"maxScale": 0,
"geometryType": "esriGeometryPolygon"
}
],
"tables": [],
"relationships": [
{
"id": 0,
"name": "relationship_1"
}
],
"datumTransformations": [
{
"geoTransforms": [
{
"wkid": 15931,
"latestWkid": 15931,
"transformForward": false,
"name": NAD_1983_NSRS2007_To_WGS_1984_1"
}
]
},
{
"geoTransforms": [
{
"wkid": 15931,
"latestWkid": 15931,
"transformForward": true,
"name": NAD_1983_NSRS2007_to_WGS_1984_1"
}
]
}
],
"isLocationTrackingService": true,
"isLocationTrackingView": true
}
Below is a portion of a JSON response example for a spatial reference, VCS, tolerance, resolution properties, and high model info:
...
"spatialReference": {
"wkid": 102100,
"latestWkid": 3857,
"vcsWkid": 115700,
"latestVcsWkid": 115700,
"xyTolerance": 0.001,
"zTolerance": 0.001,
"mTolerance": 0.001,
"falseX": -20037700,
"falseY": -30241100,
"xyUnits": 1.4892314192838538E8,
"falseZ": -100000,
"zUnits": 10000,
"falseM": -100000,
"mUnits": 10000
},
"heightModelInfo": {
"heightModel": "ellipsoidal",
"vertCRS": "WGS_1984",
"heightUnit": "meter"
},
...
Below is an example of a feature service that includes topology layers:
{
...
"layers": [
{
"id": 0,
"name": "topo_1081.GDB.topo_2",
"parentLayerId": -1,
"defaultVisibility": true,
"subLayerIds": [
1,
2,
3,
4
],
"minScale": 0,
"maxScale": 0,
"type": "Topology Layer"
},
{
"id": 1,
"name": "Dirty Areas",
"parentLayerId": 0,
"defaultVisibility": false,
"subLayerIds": null,
"minScale": 0,
"maxScale": 0,
"type": "Feature Layer",
"geometryType": "esriGeometryPolygon"
},
{
"id": 2,
"name": "Point Errors",
"parentLayerId": 0,
"defaultVisibility": true,
"subLayerIds": null,
"minScale": 0,
"maxScale": 0,
"type": "Feature Layer",
"geometryType": "esriGeometryPoint"
},
{
"id": 3,
"name": "Line Errors",
"parentLayerId": 0,
"defaultVisibility": true,
"subLayerIds": null,
"minScale": 0,
"maxScale": 0,
"type": "Feature Layer",
"geometryType": "esriGeometryPolyline"
},
{
"id": 4,
"name": "Polygon Errors",
"parentLayerId": 0,
"defaultVisibility": true,
"subLayerIds": null,
"minScale": 0,
"maxScale": 0,
"type": "Feature Layer",
"geometryType": "esriGeometryPolygon"
},
{
"id": 5,
"name": "topo_1081.GDB.us_caps_test_2",
"parentLayerId": -1,
"defaultVisibility": true,
"subLayerIds": null,
"minScale": 0,
"maxScale": 0,
"type": "Feature Layer",
"geometryType": "esriGeometryPoint"
},
{
"id": 6,
"name": "topo_1081.GDB.us_caps_buff_2",
"parentLayerId": -1,
"defaultVisibility": true,
"subLayerIds": null,
"minScale": 0,
"maxScale": 0,
"type": "Feature Layer",
"geometryType": "esriGeometryPolyline"
},
{
"id": 7,
"name": "topo_1081.GDB.us_states_test_2",
"parentLayerId": -1,
"defaultVisibility": true,
"subLayerIds": null,
"minScale": 0,
"maxScale": 0,
"type": "Feature Layer",
"geometryType": "esriGeometryPolygon"
}
],
"tables": [],
"relationships": [],
"controllerDatasetLayers": {
"topologyLayerIds": [
0
]
},
"supportsDynamicLayers": true,
"enableZDefaults": false,
"allowUpdateWithoutMValues": false,
"supportsVCSProjection": true,
"referenceScale": 0,
"serviceItemId": "64bbff5e478f41cf8ddc6d7792b3d2eb"
},
...