Skip To Content

Feature services and client applications

There are a variety of ArcGIS clients available that you can use to edit (or view) the features in your feature service. Clients can consume feature services using either a web client or ArcGIS Desktop.

Out-of-the-box ArcGIS web clients

The Map Viewer and templates in ArcGIS Online and Portal for ArcGIS provide basic out-of-the-box functionality for editing feature services. Without programming, you can quickly create a web editing application that allows users to add, update, and delete geographic features from a database.

For example, when using the out-of-the-box applications, you can do the following:

  • Edit selection-only layers.
  • Track edits. (This is available for enterprise geodatabases, not databases.)
  • Control access to features using ownership-based access control. (This is available for enterprise geodatabases, not databases.)
  • Prevent users from editing feature geometry.

You can add feature services to Map Viewer in ArcGIS Online or your portal's website using the service's ArcGIS Server Services Directory URL. Once you create a map containing your feature service, you can share it with others in your organization, embed it in a website, or paste a link (URL) to the application into an email, blog, or website. Maps you create can also be deployed on your organization's web server by downloading application templates from ArcGIS Online. These templates are fully customizable.

The following tutorials use a feature service in conjunction with ArcGIS.com map viewer to edit features:

You can also add feature services as items in your portal or ArcGIS Online and share them with other members of your organization.

See the Portal for ArcGIS help for more information on using Portal for ArcGIS.

ArcGIS API for JavaScript clients

The ArcGIS API for JavaScript offers the most advanced web editing capabilities and customization options. If you're comfortable programming using this API, you can create a sophisticated experience for your users on the web by tailoring your editing scenario to a specific purpose, goal, or organizational strategy. For example, with the ArcGIS API for JavaScript, you can do the following:

  • Edit selection-only layers
  • Track edits (This is available for enterprise geodatabases, not databases.)
  • Control access to features using ownership-based access control
  • Prevent users from editing feature geometry
  • Create, delete, and change geodatabase versions on the fly
  • Edit cartographic representations

Obtaining the REST endpoint of a feature service

You can obtain the REST endpoint, or URL, of a feature service by browsing to the service in the ArcGIS Server Services Directory. For example, the default URL to a feature service in the Services Directory is http://gisserver.domain.com:6080/arcgis/rest/services/folder/service/FeatureServer. A zero-based integer can be appended to the URL to reference a particular layer in the service. For example, ending a URL with /0 gives you the first layer in the service.

ArcGIS Desktop

ArcGIS Desktop allows you to edit the data in feature services. The workflow for editing in ArcGIS Desktop is fundamentally different than editing a feature service through a web application. To learn more, see About editing data from feature services.

Using sync with feature services

Feature services include operations that support disconnected editing workflows. In a disconnected environment, the client (for example, a runtime or mobile device) can make edits locally and synchronize the changes with the server when the client is reconnected to the feature service. This functionality, called sync, is available through the ArcGIS REST API.

For more information about using sync with feature services, see the sync section of the ArcGIS Server REST API Help.

Improving the display performance of feature services

When clients send requests to ArcGIS Server to query a feature service, the response from the server is typically cached by the browser and reused for a certain period of time. However, depending on how your feature service and its associated data are used in applications, you may consider adjusting the length of time the browser will use a response in its cache. This can be achieved by adding a property named cacheControlMaxAge to the JavaScript Object Notation (JSON) of the service.

How the cacheControlMaxAge property is used

ArcGIS Server feature service responses include an entity tag (ETag) and Cache-Control header. The ETag header value is a unique identifier of the response. The Cache-Control header has a max-age value that provides information to the browser regarding the maximum time period for which it can reuse a response from the browser's cache. This value is controlled by the cacheControlMaxAge property.

When a prior request is repeated and the maximum age of the cache has not expired, the browser will use the cached response without sending the request to the server. If the maximum age has expired, the browser must send the request to the server and set an IF-NONE-MATCH header with an associated ETag value corresponding to the response in its cache. ArcGIS Server evaluates the request and uses the ETag value to determine if the response has changed. If the response from the server is different from the copy on the browser, the server will send a completely new response to the browser. If the response is identical to the copy on the browser, the server alerts the browser to continue to use the response in its cache.

Defining the value of the cacheControlMaxAge property

To specify how long a browser is allowed to use a cached response, define the cacheControlMaxAge property. This property can be set for individual service caches. By mitigating the need for ArcGIS Server to send a full response, you allow your browser caches to be more efficient, help optimize your applications, and save network bandwidth.

For feature services, the default is zero seconds. This means the browser will always resend a request and ArcGIS Server will process the request and send a full response to the browser if the content has changed. This value works well for most applications.

For feature services where the data does not change frequently, it is recommended to increase the default to 30 days (2,592,000 seconds) or longer to minimize network traffic.

To add the cacheControlMaxAge property to your service and specify its default value, do the following:

  1. In a web browser, open the ArcGIS Server Administrator Directory and log in with a user that has administrator privileges. The URL is formatted http://gisserver.domain.com:6080/arcgis/admin.
  2. Click services and select the feature service you want to modify from the Services list. If you don't see your service listed, it may be in a directory under the Root folder.
  3. On the target feature service's page, scroll to the bottom and click edit.
  4. The Service Properties dialog page opens. Navigate to the location in the JSON file where the cacheControlMaxAge property will be inserted. This depends on where your feature service is published:
    • If your feature service is published to a federated or standalone ArcGIS Server, locate the "extensions" section of the JSON. Navigate to the subsection with "typeName": "FeatureServer". The cacheControlMaxAge property goes into the properties parameter of this subsection.
    • If your feature service is published to an ArcGIS Enterprise portal, locate the "jsonProperties" section of the Service Properties JSON. Add the cacheControlMaxAge property to this section.
  5. Add the cacheControlMaxAge property to the proper section and specify the value (in seconds) for the property. For example, to set the max-age property to 30 days, insert "properties": { "cacheControlMaxAge": "2592000", }.

    If your feature service is published to a federated or standalone ArcGIS Server:

    {
       "typeName": "FeatureServer",
       "capabilities": "Query,Create,Update,Delete,Uploads,Editing",
       "enabled": "true",
       "maxUploadFileSize": 0,
       "allowedUploadFileTypes": "",
       "properties": {
        "cacheControlMaxAge": "2592000",}
    }

    If your feature service is published to an ArcGIS Enterprise portal:

    "jsonProperties": {**
      "currentVersion": 10.6,
      "serviceDescription": "",
      "maxRecordCount": 2000,
      "cacheControlMaxAge": "2592000",
    }
  6. Click Save Edits.
  7. On the feature service's page, verify that the cacheControlMaxAge property and the value you specified for it appear in the Properties section.

Entering HTML into text fields

When editing a feature service in a client application, you can enter HTML into text fields. For example, when editing a feature in a web client, you can enter styled HTML into a comments field. By default, only the HTML entities and attributes listed in the table below can be entered into feature service text fields. If you attempt to add an unsupported entity or attribute, an error is returned.

If your feature service workflow requires unsupported HTML entities and attributes, you'll need to disable the Filter web content property. This property can be accessed through the feature service Advanced Options dialog box in ArcGIS Desktop or ArcGIS Server Manager. For more information, see the following:

HTML entityHTML attribute (if applicable)

<a>

href, target, style

<b>

<br>

<div>

style, align

<em>

<font>

size, color, style, face

http, https protocol

src, href

<i>

<img>

src, width, height, alt, border, style

<li>

mailto: protocol

src, href

<ol>

<span>

style

<strong>

<table>

width, height, cellpadding, cellspacing, border, style

<tbody>

<td>

height, width, valign, align, colspan, rowspan, nowrap, style

<tr>

height, valign, align, style

<u>

<ul>