Feature services provide a way to share your data over the web and allow users to edit this data when they connect to the feature service. If the data in your feature service has editor tracking enabled, ArcGIS Server records who adds or edits the data through the feature service and when the edit is made. This information is stored in fields the data owner defines when he or she enables editor tracking on the source data.
Editor tracking is enabled on a per-feature class or table basis. You can enable editor tracking for some or all of the layers in your feature service using one of the following methods:
- Use the Enable Editor Tracking geoprocessing tool from ArcGIS Desktop or call the tool from a Python script.
- Connect to the geodatabase feature class or table in the Catalog pane in ArcGIS Pro and enable editor tracking from the Manage context menu.
- Connect to the geodatabase feature class or table in the Catalog tree in ArcMap and enable editor tracking from the context menu or Properties dialog box.
Note:
- You can only enable editor tracking on data in enterprise and workgroup geodatabases, not databases.
- Only the owner of the feature class or table can enable editor tracking.
- If you enable editor tracking on the source feature class and tables after publishing the feature service, be sure to restart the feature service.
If an authenticated user edits a feature service that contains layers with editor tracking enabled, the user who is logged in to the ArcGIS Server site is recorded in the creator and editor fields, and the date and time the feature was added or edit was made is recorded in the creation and editing date fields, respectively.
If a nonauthenticated user edits a feature service with editor tracking enabled, ESRI_Anonymous is recorded in the creator and editor fields, and the corresponding date of creation or edit is set in the geodatabase; however, if you view these fields from the feature service, they appear empty. Note that if you add an unsecured feature service to ArcGIS Online or an ArcGIS Enterprise portal (in other words, no ArcGIS Server credential is provided for the service), edits are considered to be from a nonauthenticated user and ESRI_Anonymous is recorded in the creator and editor fields.
Dive-in:
To track who created or edited the data, your application needs to ask for ArcGIS Server credentials so you can get a token with this information. This token is appended to requests to the feature service to communicate who is making requests.
Why use editor tracking?
Following are examples of why you'd use editor tracking.
Accountability and quality control
Tracking who made edits and when the edits were applied can help you enforce accountability and quality control of the features you add to your geodatabase. You can track who creates features, the last editor, and, optionally, the last edit date to see who is responsible for specific edits to existing features. If you turn on archiving, you can get the full history of the edits, including deletions and the original creator of the feature.
Track changes through time
To learn the volume of edits over time, you can track the last edit date and the creation date. This can help you identify trends and make correlations with the date. If you turn on archiving, you may not need to also track edits to meet these requirements.
Apply ownership-based access control
You can limit access such that only the user who created a feature can access it. To do this, you need to configure the service to enforce access based on who created the feature. This is discussed in more detail in Ownership-based access control for feature services.
Editing feature services in ArcMap
When you edit feature services in ArcMap, a replicated copy of the data (child replica) from the server is created on the machine where ArcMap is installed. Edits are made to the local copy and synchronized back to the server. The editor, editor dates, creator, and creator dates that are written to the server are based on the user who is logged in to the ArcGIS Server site to perform the synchronization and the date on which the edit is performed, respectively.
Editor tracking and time zones
When working with the feature service through REST, all dates are recorded and returned in UTC. When you enable editor tracking on a feature class, Esri recommends that you configure the date fields used to record edits to use UTC.
If you cannot use the date fields that track edits—for example, the fields are used by other applications that prevent you from using UTC—specify the time zone used in the database when you publish a feature service.
Realms and editor tracking
A realm is a string you define to help uniquely identify a user and how they edited the data (for example, @server). There are two places where you can define a realm: on the geodatabase that contains the data and on each feature service. For information on setting a realm on the geodatabase to identify database-authenticated users who edit through desktop clients, see About tracking an editor's changes to data in the ArcMap help. You can define a realm that will be appended to the name recorded for the user who makes an edit.
You can also append a realm to edits made through a feature service. When you access a secured feature service that contains data that has editor tracking enabled, ArcGIS Server applies your user name to any edits you make. ArcGIS Server also appends any realm you've configured on the feature service.
For example, consider the case that user Mary logs in to ArcGIS Server and adds a feature. The creator is set in the geodatabase as Mary. If you configure the feature service to use the realm @server, subsequent edits appear in the database under the name Mary@server.
To help you keep track of edits made through the feature service, follow the ArcGIS Server Manager steps or ArcMap steps below to set a realm on a feature service:
Set a feature service realm in ArcGIS Server Manager
- Open ArcGIS Server Manager and log in. If you need help with this step, see Log in to Manager.
- Click Services > Manage Services.
- In the Services module, click the name of your feature service. If you don't see your service in the list, it may be located in a folder in the Site (root) directory.
- Click Capabilities in the Edit module.
- Click Feature Access (be careful not to clear the check box).
- In the Properties section, click Advanced Options.
- Select Qualify username with realm when applying edits.
- Choose whether to use the default realm or apply your own.
- Click OK.
Set a feature service realm in ArcMap
- In the Catalog tree, expand the GIS Servers node.
- Double-click an administrative connection to your ArcGIS Server site. If you need to create an administrative connection, see Make an administrative connection to ArcGIS Server in ArcMap for instructions.
- Right-click the feature service's associated map service and choose Service Properties.
- Click the Feature Access tab on the Service Editor dialog box.
- Click Advanced Options.
- In the Feature Service Advanced Options window, select Add realm to user name when applying edits.
- Choose whether to use the default realm or apply your own.
- Click OK.
If the server detects that the logged-in user name already includes a realm, the server does not append its own realm.
Use an integrated security model
It's possible to map users between the database and server domains. You may want to do this if users need to make edits directly to the geodatabase in ArcGIS Desktop and also over the web through a feature service. You would want both environments to log the same user. The workflow to accomplish this is as follows:
- Set up accounts with matching logins in both the geodatabase and ArcGIS Server.
- Set the database and server to use the same realm or not use a realm at all.