Feature Service
- URL:http://<catalog-url>/<serviceName>/FeatureServer
- Operations:Apply Edits,Create Replica,Query,Synchronize Replica,Unregister Replica
- Child Resources:Layer,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, 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 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 in arcgis.com.
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 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.
- 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.
Resource hierarchy
Request parameters
Parameter |
Details |
---|---|
f |
Description: The response format. The default response format is html. Values: html | json |
option | This parameter was added at 10.1. Description: If option is footprints, the footprint of the feature service is returned as a feature collection. This feature collection can be viewed in the ArcGIS.com map viewer. This is supported when f=json only. Value: footprints |
outSR | This parameter was added at 10.1. Description: 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. |
Example usage
URL for the USA feature service.
http://services.myserver.com/ERmEceOGq5cHrItq/ArcGIS/rest/services/USA/FeatureServer?f=pjson
JSON response syntax
{
"currentVersion": <currentVersion>,
"serviceDescription": "<serviceDescription>",
"hasVersionedData": <true | false>,
"supportsDisconnectedEditing": <true | false>,
"hasStaticData" : <true | false>,
"maxRecordCount" : "<maxRecordCount>", ,
"supportedQueryFormats": "<supportedQueryFormats>",
"capabilities": "<capabilities>",
"description": "<description>",
"copyrightText": "<copyrightText>",
"spatialReference": {<spatialReference>},
"initialExtent": {<envelope>},
"fullExtent": {<envelope>},
"allowGeometryUpdates": <true | false>,
"units": "<units>",
"syncEnabled" : <true | false>,
"syncCapabilities" : {
"supportsASync" : <true | false>,
"supportsRegisteringExistingData" : <true | false>,
"supportsSyncDirectionControl" : <true | false>,
"supportsPerLayerSync" : <true | false>,
"supportsPerReplicaSync" : <true | false>,
"supportsRollbackOnFailure" : <true | false>
},
"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>" }
]
"enableZDefaults": <true | false>,
"zDefault": <zDefaultValue>,
}
JSON response example
{
"currentVersion" : 10.21,
"serviceDescription" : "Birds",
"hasVersionedData" : false,
"supportsDisconnectedEditing" : false,
"syncEnabled" : false,
"hasStaticData" : false,
"maxRecordCount" : 1000,
"supportedQueryFormats" : "JSON",
"capabilities" : "Query,Create,Delete,Update,Uploads,Editing",
"description" : "",
"copyrightText" : "",
"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,
"syncCapabilities" : {
"supportsASync" : true,
"supportsRegisteringExistingData" : true,
"supportsSyncDirectionControl" : true,
"supportsPerLayerSync" : true,
"supportsPerReplicaSync" : false,
"supportsRollbackOnFailure" : false
},
"editorTrackingInfo" : {
"enableEditorTracking" : false,
"enableOwnershipAccessControl" : false,
"allowOthersToUpdate" : true,
"allowOthersToDelete" : false
},
"layers" : [
{
"id" : 0,
"name" : "Sitings",
"parentLayerId" : -1,
"defaultVisibility" : true,
"subLayerIds" : null,
"minScale" : 0,
"maxScale" : 0
},
{
"id" : 1,
"name" : "NestingGrounds",
"parentLayerId" : -1,
"defaultVisibility" : true,
"subLayerIds" : null,
"minScale" : 0,
"maxScale" : 0
},
{
"id" : 2,
"name" : "LandCover",
"parentLayerId" : -1,
"defaultVisibility" : true,
"subLayerIds" : null,
"minScale" : 0,
"maxScale" : 0
}
],
"tables" : []
}