Feature Service

Description

A feature service can contain datasets (e.g. tables, views) with and without a spatial column. Datasets with a spatial column are considered layers and 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, etc.

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

The property maxRecordCount returns the maximum number of records that will be returned at once for a query.The Feature Service resource has input parameters option and outSR to support viewing of a feature service footprint in arcgis.com.

The following properties describe new features that have been added to the Feature Service through the releases. If the property does not exist it is equivalent to having a value false or not set.

Resource Hierarchy

Feature Server

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 an arcgis.com map. 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

Example 1: 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>",
  "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.11, 
  "serviceDescription" : "Birds", 
  "hasVersionedData" : false,
  "hasStaticData" : false, 
  "maxRecordCount" : 1000, 
  "supportedQueryFormats" : "JSON", 
  "capabilities" : "Create,Delete,Query,Update,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", 
  "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" : []
}