This document discusses the JSON feature service object used when creating a feature service and returned from a feature service resource.
A feature service has the following properties: adminServiceInfo,
currentVersion, serviceDescription,
supportsRollbackOnFailure,
supportsDisconnectedEditing,
maxRecordCount,
supportedQueryFormats,
description, capabilities, copyrightText,
spatialReference,
initialExtent, fullExtent,
units, and layers.
The contents of each property are presented below.
adminServiceInfo
:
Contains service level details such as name, status, capabilities and connection
information. Required.
"adminServiceInfo": { "name": "<serviceName>", "type": "FeatureServer", "status": "<status>" "database": { "datasource": { "name": "<datasourceName>", "userName": "<userName>", "password": "<password>" }, "connectionAttributes": { "serverName": "<serverName>", "databaseName": "<databaseName>", "userName": "<userName>", "password": "<password>" } }
Properties | Details |
---|---|
name |
Description: Name of the feature service |
type |
Description: Type of service Values: FeatureServer |
status |
Description: State of the service Values: Started | Stopped |
database |
Description: Contains an existing datasource ("datasource") or
new connection attributes ("connectionAttributes") used by all feature
layers and tables in the feature service.
"database" : { "datasource" : { "name" : "<datasourceName>", // name of a datasource available in the current SDS instance "userName" : "<userName>", // optional "password" : "<password>" // optional } } Example: "database" : { "datasource" : { "name" : "Sedona Production Query Only", "userName" : "dbuser", "password" : "db.pwd" } } "database": { "connectionAttributes": { "serverName": "<serverName>", // server name and relational database instance "databaseName": "<databaseName>", // if supported by the relational database type (e.g SQL Server), specify the database name within the instance "userName": "<userName>", "password": "<password>", } } Example: "database": { "connectionAttributes": { "serverName": "sedona\\sqlexpress2008", "databaseName": "Demo", "userName": "dbuser", "password": "db.pwd" } } |
"adminServiceInfo" : { "name" : "USA", "type" : "FeatureServer", "status" : "Started", "database" : { "datasource" : { "name" : "Sedona Production" } } }
currentVersion:
Returns the version of the server.
Optional.
"currentVersion" : "<currentVersion>"
"currentVersion" : 10.1
serviceDescription
:
Description of service contents. Optional.
"serviceDescription" : "<serviceDescription>"
"serviceDescription" : "This service represents public requests that may result in a work order."
supportsRollbackOnFailure
: Indicates if this service
supports transactional edits. Optional.
"supportsRollbackOnFailure" : "<true | false>"
"supportsRollbackOnFailure
" : true
supportsDisconnectedEditing
: Indicates if this service
supports disconnected editing. Optional.
"supportsDisconnectedEditing" : "<true | false>"
"supportsDisconnectedEditing
" : false
maxRecordCount
: Returns the maximum number of records
that will be returned at once for a query. Optional.
"maxRecordCount" : "<maxRecordCount>"
"maxRecordCount" : 1000
supportedQueryFormats
: Returns the formats in which query
results can be returned. Optional.
"supportedQueryFormats" : "<supportedQueryFormats>"
"supportedQueryFormats
" : "JSON"
description
: Description
of contents within the service. Optional.
"capabilities" : "<capabilities>"
"capabilities" : "Create,Delete,Query,Update,Editing"
capabilities
: Shows capabilities supported at the service
level. Optional.
"capabilities" : "<capabilities>"
"capabilities" : "Create,Delete,Query,Update,Editing"
copyrightText
: Attribution text for the service and it's
contents. Optional.
"copyrightText": "<copyrightText>",
"copyrightText": "Esri",
spatialReference
: Default spatial reference for layers in
the feature service. Optional.
"spatialReference": {<spatialReference>}
"spatialReference": { "wkid": 4326 },
initialExtent
: Initial
extent for the feature service. Optional.
"initialExtent": {<envelope>}
"initialExtent": { "xmin": -120, "ymin": 29, "xmax": -85, "ymax": 45, "spatialReference": { "wkid": 4326 } }
fullExtent
: Full extent of the layers in the feature
service. Optional.
"fullExtent": {<envelope>}
"fullExtent": { "xmin": -130, "ymin": 24, "xmax": -65, "ymax": 50, "spatialReference": { "wkid": 4326 } }
units
: Default map units for the
feature service. Optional.
"units" : "<mapUnits>"
"units" : "esriDecimalDegrees"
layers
:
Contains an array of layers. Each layer includes a set of
properties to define table name, spatial column and type, layer id, fields, drawing
info, extent, types, templates and capabilities. Required.
"layers": [ { "adminLayerInfo": { "tableName": "<tableName>", "geometryField": { "name": "<geometryFieldName>" }, "tableExtent" : { "xmin" : <xmin>, "ymin" : <ymin>, "xmax" : <xmax>, "ymax" : <ymax>, "spatialReference" : { "wkid" : <wkid>, "wkt" : "<wkt>", "sdesrid" : <dbsrid> } } }, "id": <id>, "name": "<layerName>", "type": "< Feature Layer | Table >", "description": "<description>", "copyrightText": "<copyrightText>", "geometryType": "<geometryType>", "extent": { "xmin": <xmin>, "ymin": <ymin>, "xmax": <xmax>, "ymax": <ymax>, "spatialReference": { "wkid": <wkid>, "wkt": "<wkt>" }, }, "drawingInfo": { "renderer": <renderer>, "transparency": <transparency>, "labelingInfo": <labelingInfo> }, "timeInfo" : { "startTimeField" : "<startTimeFieldName>", "endTimeField" : "<endTimeFieldName>", "trackIdField" : "<trackIdFieldName>", "timeExtent" : [<startTime>, <endTime>], "timeReference" : { "timeZone" : "<timeZone>", "respectsDaylightSaving" : <true | false> }, "timeInterval" : <timeInterval>, "timeIntervalUnits" : "<timeIntervalUnits>" }, "hasAttachments": <true|false>, "htmlPopupType": "<esriServerHTMLPopupTypeNone | esriServerHTMLPopupTypeAsURL | esriServerHTMLPopupTypeAsHTMLText>", "objectIdField": "<objectIdFieldName>", "globalIdField": "<globalIdFieldName>", "displayField": "<displayField>", "typeIdField": "<typeIFieldName>", "fields": [ { "name": "<fieldName>""alias": "<fieldAlias>" }, ... ], "types": [ ], "templates": [ ], "capabilities": "<capabilities>" }, ...
Properties | Details |
---|---|
adminLayerInfo |
Description: If name property of the layer
is the not the name of the table in the database, the tableName property is used
to define the fully qualified table name in the database.
If a spatial column is present in the table, meaning a column that contains data in native spatial format (e.g. Geometry or Geography in SQL Server), in the geometryField collection set the name property to the fully qualified name of the column. If not specified and no spatial column is present, layer is a plain table. If not specified and one spatial column is present, that spatial column is used. If not specified and multiple spatial columns are present, an error is returned. If specified and the field is not a spatial column or not a field, an error is returned. The tableExtent property is used to define a mapping between a database specific spatial reference and one recognized by the SDS. In most cases, the WKID and SDESRID (database specific spatial reference id) will be the same. This information is not explicitly available to the user. Example: "adminLayerInfo" : { "tableName" : "demo.dbo.WorldCities", "geometryField" : {"name" : "Shape"}, "tableExtent" : { "xmin" : -179.270004272, "ymin" : -79.150001526, "xmax" : 177.130187988, "ymax" : 78.199996948, "spatialReference" : { "wkid" : 4326, "wkt" : "GEOGCS[\"GCS_WGS_1984\",DATUM[\"D_WGS_1984\",SPHEROID[\"WGS_1984\",6378137.0,298.257223563]], PRIMEM[\"Greenwich\",0.0],UNIT[\"Degree\",0.0174532925199433]]", "sdesrid" : 4326 } } } |
id | Description: Unique id of the layer. |
name | Description: Name of the layer, visible to the user. |
type |
Description: If dataset has a spatial column, it can be of type "Feature
Layer". If no spatial column is present, it will be of type "Table". Values: Feature Layer | Table |
displayField | Description: Name of the field that contains information designed to be displayed with data in the dataset. |
description | Description: Description of the service contents. |
copyrightText |
Description: Copyright details for the service contents. Available
for attribution in client applications.
|
isDataVersioned | Description: Indicates if the layer versioned. Only supported for layers hosted in a geodatabase (GDB). |
supportsRollbackOnFailure | Description: Indicates if the layer supports transactional editing. |
supportsAdvancedQueries | Description: Indicates if the layer supports orderByFields during a query. |
geometryType |
Description: The type of geometry in the spatial column this layer will
represent. Note that data in a spatial column can be of different types.
Values: esriGeometryPoint | esriGeometryPolyline | esriGeometryPolygon | esriGeometryMultipoint |
minScale | Description: Minimum scale at which this feature layer should be displayed. Note that scale must be calculated on the client, and the client must determine whether the feature layer should be queried. |
maxScale | Description: Maximum scale at which this feature layer should be displayed. Note that scale must be calculated on the client, and the client must determine whether the feature layer should be queried. |
extent |
Description: Defines the current extent and spatial reference of the layer.
The spatial reference of the extent should match the spatial reference of the geometry
in the spatial column this layer will use.
Example: "extent" : { "xmin" : -165.270004272, "ymin" : -53.150001526, "xmax" : 177.130187988, "ymax" : 78.199996948, "spatialReference" : { "wkid" : 4326 } |
drawingInfo |
Description: A collection of properties that define how the features in
the layer should be rendered. Three properties are included:
renderer, transparency, and
labelingInfo.
The renderer object consists of one or more symbol objects. The transparency
property is a value between 0 (completely opaque) and 100 (completely transparent)
which should be applied by clients to the entire layer.
Example: "drawingInfo" : { "renderer" : { "type" : "simple", "symbol" : { "type" : "esriSFS", "style" : "esriSFSSolid", "color" : [ 197, 252, 226, 255 ], "outline" : { "type" : "esriSLS", "style" : "esriSLSSolid", "color" : [ 110, 110, 110, 255 ], "width" : 0.4 } }, "label" : "", "description" : "" }, "transparency" : 0, "labelingInfo" : null } |
timeInfo | Description: If the dataset contains data fields which can be used to establish time-awareness, the timeInfo section provides a set of properties to define start, end, zone and unique tracking id, if necessary. |
hasAttachments |
Description: If a layer has attachments, hasAttachments is true.
Default is false. Values: true | false |
htmlPopupType |
Description: Indicates if a layer has HTML popups configured.
Default is esriServerHTMLPopupTypeNone. Values: esriServerHTMLPopupTypeNone | esriServerHTMLPopupTypeAsURL | esriServerHTMLPopupTypeAsHTMLText |
objectIdField |
Description: Name of the field that contains the primary key. Required
for editing capabilities to be enabled. |
globalIdField | Description: Name of the field that contains the global id for a feature. Only applicable to layers within a geodatabase. |
typeIdField | Description: Name of the field that contains type information used to define types which contain templates used when creating new features. |
fields | Description: List of fields and properties to be made available for query and editing. If no fields are listed, all fields are exposed. |
types | Description: Defines an array of types, each with one or more templates used to define default attribute values when creating a new feature. |
templates | Description: Defines the default attribute values for a new feature not associated with a type. |
supportedQueryFormats | Description: Returns the formats in which query results can be returned. |
maxRecordCount | Description: Maximum number of records returned in a single query operation. |
capabilities |
Description: Exposes query and/or editing operations on the dataset.
The user stored as part of the connection details (defined as a datasource specified
in adminServiceInfo above) must have complimentary permissions on the dataset to
permit query (read) or editing (write). The Editing capability includes access
to Create, Update, and Delete operations. Values: Query | Create | Update | Delete | Editing |
{ "adminServiceInfo": { "name": "WorldDataService", "type": "FeatureServer", "status": "Started", "maxRecordCount": 1000, "database": { "datasource": { "name": "Production Sedona" } } }, "layers": [ { "adminLayerInfo": { "tableName": "Demo.dbo.WorldCities_Geographic", "geometryField": { "name": "Shape" } }, "name": "WorldCitiesGeographic", "type": "Feature Layer", "geometryType": "esriGeometryPoint", "extent": { "xmin": -180, "ymin": -90, "xmax": 180, "ymax": 90, "spatialReference": { "wkid": 4326 } }, "capabilities": "Query,Editing" } ] }
{ "serviceDescription": "US States and related demographic information", "adminServiceInfo": { "name": "US States and Related Data", "type": "FeatureServer", "status": "Started", "maxRecordCount": 1000, "capabilities": "Query", "database": { "datasource": { "name": "Sedona Production" } } }, "layers": [ { "adminLayerInfo": { "tableName": "Demo.dbo.USSTATESRELATESOURCE", "geometryField": { "name": "Shape" }, "tableExtent": { "xmin": -178.215026855, "ymin": 18.9247817990001, "xmax": -66.969848633, "ymax": 71.406646729, "spatialReference": { "wkid": 4326, "wkt": "GEOGCS[\"GCS_WGS_1984\",DATUM[\"D_WGS_1984\",SPHEROID[\"WGS_1984\",6378137.0,298.257223563]],PRIMEM[\"Greenwich\",0.0],UNIT[\"Degree\",0.0174532925199433]]", "sdesrid": 4326 } } }, "id": 0, "name": "US States", "type": "Feature Layer", "displayField": "STATE_NAME", "description": "", "copyrightText": "", "geometryType": "esriGeometryPolygon", "minScale": 0, "maxScale": 0, "extent": { "xmin": -178.215026855, "ymin": 18.9247817990001, "xmax": -66.969848633, "ymax": 71.406646729, "spatialReference": { "wkid": 4326 } }, "drawingInfo": { "renderer": { "type": "uniqueValue", "field1": "SUB_REGION", "field2": "", "field3": "", "fieldDelimiter": ",", "defaultSymbol": { "type": "esriSFS", "style": "esriSFSSolid", "color": [ 224, 247, 195, 255 ], "outline": { "type": "esriSLS", "style": "esriSLSSolid", "color": [ 110, 110, 110, 255 ], "width": 0.4 } }, "defaultLabel": "\u003call other values\u003e", "uniqueValueInfos": [ { "value": "E N Cen", "label": "E N Cen", "description": "", "symbol": { "type": "esriSFS", "style": "esriSFSSolid", "color": [ 0, 97, 0, 255 ], "outline": { "type": "esriSLS", "style": "esriSLSSolid", "color": [ 110, 110, 110, 255 ], "width": 0.4 } } }, { "value": "E S Cen", "label": "E S Cen", "description": "", "symbol": { "type": "esriSFS", "style": "esriSFSSolid", "color": [ 63, 130, 0, 255 ], "outline": { "type": "esriSLS", "style": "esriSLSSolid", "color": [ 110, 110, 110, 255 ], "width": 0.4 } } }, { "value": "Mid Atl", "label": "Mid Atl", "description": "", "symbol": { "type": "esriSFS", "style": "esriSFSSolid", "color": [ 122, 171, 0, 255 ], "outline": { "type": "esriSLS", "style": "esriSLSSolid", "color": [ 110, 110, 110, 255 ], "width": 0.4 } } }, { "value": "Mtn", "label": "Mtn", "description": "", "symbol": { "type": "esriSFS", "style": "esriSFSSolid", "color": [ 183, 212, 0, 255 ], "outline": { "type": "esriSLS", "style": "esriSLSSolid", "color": [ 110, 110, 110, 255 ], "width": 0.4 } } }, { "value": "N Eng", "label": "N Eng", "description": "", "symbol": { "type": "esriSFS", "style": "esriSFSSolid", "color": [ 255, 255, 0, 255 ], "outline": { "type": "esriSLS", "style": "esriSLSSolid", "color": [ 110, 110, 110, 255 ], "width": 0.4 } } }, { "value": "Pacific", "label": "Pacific", "description": "", "symbol": { "type": "esriSFS", "style": "esriSFSSolid", "color": [ 255, 204, 0, 255 ], "outline": { "type": "esriSLS", "style": "esriSLSSolid", "color": [ 110, 110, 110, 255 ], "width": 0.4 } } }, { "value": "S Atl", "label": "S Atl", "description": "", "symbol": { "type": "esriSFS", "style": "esriSFSSolid", "color": [ 255, 153, 0, 255 ], "outline": { "type": "esriSLS", "style": "esriSLSSolid", "color": [ 110, 110, 110, 255 ], "width": 0.4 } } }, { "value": "W N Cen", "label": "W N Cen", "description": "", "symbol": { "type": "esriSFS", "style": "esriSFSSolid", "color": [ 255, 102, 0, 255 ], "outline": { "type": "esriSLS", "style": "esriSLSSolid", "color": [ 110, 110, 110, 255 ], "width": 0.4 } } }, { "value": "W S Cen", "label": "W S Cen", "description": "", "symbol": { "type": "esriSFS", "style": "esriSFSSolid", "color": [ 255, 34, 0, 255 ], "outline": { "type": "esriSLS", "style": "esriSLSSolid", "color": [ 110, 110, 110, 255 ], "width": 0.4 } } } ] }, "transparency": 0, "labelingInfo": null }, "hasAttachments": false, "htmlPopupType": "esriServerHTMLPopupTypeAsHTMLText", "objectIdField": "OBJECTID", "globalIdField": "", "typeIdField": "SUB_REGION", "fields": [ { "name": "OBJECTID", "type": "esriFieldTypeInteger", "alias": "OBJECTID", "sqlType": "sqlTypeInteger", "nullable": false, "editable": false, "domain": null }, { "name": "STATE_NAME", "type": "esriFieldTypeString", "alias": "Name", "sqlType": "sqlTypeVarchar", "length": 25, "nullable": true, "editable": true, "domain": null }, { "name": "SUB_REGION", "type": "esriFieldTypeString", "alias": "Region", "sqlType": "sqlTypeVarchar", "length": 7, "nullable": true, "editable": true, "domain": null }, { "name": "POP1997", "type": "esriFieldTypeDouble", "alias": "Population", "sqlType": "sqlTypeDecimal", "nullable": true, "editable": true, "domain": null }, { "name": "POP90_SQMI", "type": "esriFieldTypeInteger", "alias": "Pop Density", "sqlType": "sqlTypeInteger", "nullable": true, "editable": true, "domain": null }, { "name": "RECNO", "type": "esriFieldTypeDouble", "alias": "RECNOSOURCE", "sqlType": "sqlTypeDecimal", "nullable": true, "editable": true, "domain": null } ], "types": [ { "id": "Mid Atl", "name": "Mid Atl", "domains": { }, "templates": [ { "name": "Mid Atl", "description": "", "drawingTool": "esriFeatureEditToolPolygon", "prototype": { "attributes": { "RECNO": null, "STATE_NAME": null, "SUB_REGION": "Mid Atl", "POP1997": null, "POP90_SQMI": null } } } ] }, { "id": "E S Cen", "name": "E S Cen", "domains": { }, "templates": [ { "name": "E S Cen", "description": "", "drawingTool": "esriFeatureEditToolPolygon", "prototype": { "attributes": { "RECNO": null, "STATE_NAME": null, "SUB_REGION": "E S Cen", "POP1997": null, "POP90_SQMI": null } } } ] }, { "id": "Pacific", "name": "Pacific", "domains": { }, "templates": [ { "name": "Pacific", "description": "", "drawingTool": "esriFeatureEditToolPolygon", "prototype": { "attributes": { "RECNO": null, "STATE_NAME": null, "SUB_REGION": "Pacific", "POP1997": null, "POP90_SQMI": null } } } ] }, { "id": "W N Cen", "name": "W N Cen", "domains": { }, "templates": [ { "name": "W N Cen", "description": "", "drawingTool": "esriFeatureEditToolPolygon", "prototype": { "attributes": { "RECNO": null, "STATE_NAME": null, "SUB_REGION": "W N Cen", "POP1997": null, "POP90_SQMI": null } } } ] }, { "id": "N Eng", "name": "N Eng", "domains": { }, "templates": [ { "name": "N Eng", "description": "", "drawingTool": "esriFeatureEditToolPolygon", "prototype": { "attributes": { "RECNO": null, "STATE_NAME": null, "SUB_REGION": "N Eng", "POP1997": null, "POP90_SQMI": null } } } ] }, { "id": "Mtn", "name": "Mtn", "domains": { }, "templates": [ { "name": "Mtn", "description": "", "drawingTool": "esriFeatureEditToolPolygon", "prototype": { "attributes": { "RECNO": null, "STATE_NAME": null, "SUB_REGION": "Mtn", "POP1997": null, "POP90_SQMI": null } } } ] }, { "id": "S Atl", "name": "S Atl", "domains": { }, "templates": [ { "name": "S Atl", "description": "", "drawingTool": "esriFeatureEditToolPolygon", "prototype": { "attributes": { "RECNO": null, "STATE_NAME": null, "SUB_REGION": "S Atl", "POP1997": null, "POP90_SQMI": null } } } ] }, { "id": "W S Cen", "name": "W S Cen", "domains": { }, "templates": [ { "name": "W S Cen", "description": "", "drawingTool": "esriFeatureEditToolPolygon", "prototype": { "attributes": { "RECNO": null, "STATE_NAME": null, "SUB_REGION": "W S Cen", "POP1997": null, "POP90_SQMI": null } } } ] }, { "id": "E N Cen", "name": "E N Cen", "domains": { }, "templates": [ { "name": "E N Cen", "description": "", "drawingTool": "esriFeatureEditToolPolygon", "prototype": { "attributes": { "RECNO": null, "STATE_NAME": null, "SUB_REGION": "E N Cen", "POP1997": null, "POP90_SQMI": null } } } ] } ], "templates": [ ], "capabilities": "Query" }, { "adminLayerInfo": { "tableName": "Demo.dbo.USSTATESRELATEDDATA", "geometryField": null }, "id": 1, "name": "Related Demographic Data", "type": "Table", "displayField": "RECNOTARGET", "description": "", "copyrightText": "", "hasAttachments": false, "htmlPopupType": "esriServerHTMLPopupTypeNone", "objectIdField": "OBJECTID", "globalIdField": "", "typeIdField": "", "fields": [ { "name": "OBJECTID", "type": "esriFieldTypeInteger", "alias": "OBJECTID", "sqlType": "sqlTypeInteger", "nullable": false, "editable": false, "domain": null }, { "name": "RECNUM", "type": "esriFieldTypeDouble", "alias": "RECNOTARGET", "sqlType": "sqlTypeDecimal", "nullable": true, "editable": true, "domain": null }, { "name": "OWNERSHIPPCT", "type": "esriFieldTypeDouble", "alias": "Home Ownership Percentage", "sqlType": "sqlTypeDecimal", "nullable": true, "editable": true, "domain": null } ], "types": [ ], "templates": [ { "name": "Demo.dbo.USSTATESRELATEDDATA", "description": "", "drawingTool": "esriFeatureEditToolNone", "prototype": { "attributes": { "OWNERSHIPPCT": null, "RECNUM": null } } } ], "capabilities": "Create,Delete,Query,Update,Editing" } ]