The Editing settings for a hosted feature layer (item) allows you to control if client applications can execute editing operations on a feature layer in a feature service. They also control the type of logging that occurs.
You use the editing settings to:
- Enable users or groups of users to create, update, and delete features in a service.
- Keep a log of changes made to the features in a service.
- Synchronize edits with offline workflows.
What are editing and sync settings?
The editing and sync settings allow you to enable editing, determine the type of editing allowed, and decide who can make the edits. You can only change these settings if your are the owner of the feature layer in a feature service or an administrator.
The table below describes the editing and synchrononization settings available.
Setting | Description |
---|---|
Enable editing | Controls whether the users who have access to the layer can Add, Delete, or Update features. To perform the editing operations, users must be members of a default or custom role that has the privilege to edit features. |
Keep track of changes to the data (add, update, delete features) | Monitors changes made to the spatial and nonspatial attributes of a service by recording the changes in a system change log. |
Keep track of who edited the data (editor name, date and time) | Adds additional fields that will be automatically populated with the user name of the editor and a date of when the feature was created or updated. |
Enable Sync (required for offline use and collaboration) | Allows other users to take the feature layer offline and work while disconnected from the network. |
Once editing has been enabled, additional types of edits that can be performed are provided. The table below describes each of the capabilities:
Setting | Description |
---|---|
Who can edit features? | Read-only text displaying the current sharing level and how to change the setting. |
What kind of editing is allowed? | Options that control what type of edits are enabled for users with editing privileges. Add : Allow editors to add new features. Delete: Allows editors to delete features. Update: Allows editors to update feature geometry and attributes or only update the attribute values. |
What features can editors see? | Options that control what features users with edit privileges can see: - (Default) Editors can edit all features. - Editors can only see features they've created (requires editor tracking to be enabled). - Editors can't see any features, even those they add. |
What feature can editors edit? | - (Default) Editors can edit all features. - Editors can only edit features that they create (requires editor tracking to be enabled) |
What access do anonymous editors (not signed in) have? | This setting is only applicable if the layer is shared with everyone (public). If the layer is not public, anonymous users cannot access it. - The same as signed in editors. - Only add new features, if allowed above (requires editor tracking). |
Who can manage edits? | Read-only text listing the current users and roles that can manage this layer's edit settings. |
How to manage editing settings
The steps to manage service editing settings are:
-
Sign into a data management tool with your ArcGIS account:
- Go to ArcGIS.com and sign in to your portal (ArcGIS Location Platform or ArcGIS Online)
- ArcGIS Enterprise portal (ArcGIS Enterprise)
- Find the item.
- Use the item page to change the editing settings.
Code examples
You can use data management tools to update the editing capabilities of a hosted feature layer (item) or you can use the ArcGIS REST APIs. The following examples illustrate how to programmatically get the properties and then modify the edit capabilities of a hosted feature layer (item).
Get service properties
The example below uses a Feature Service URL to get the current properties of a feature service layer.
Request
POST https://{host}/rest/services/{service_name}/FeatureServer HTTP/1.1
&f=json
&token={access_token}
Response
{
"currentVersion": 11.1,
"serviceItemId": "{serviceItemId}",
"hasChangeTrackingEnabledViews": true,
"serviceDescription": "",
"hasVersionedData": false,
"supportsDisconnectedEditing": false,
"hasStaticData": false,
"hasSharedDomains": false,
"maxRecordCount": 2000,
"supportedQueryFormats": "JSON",
"supportsVCSProjection": false,
"supportedExportFormats": "csv,shapefile,sqlite,geoPackage,filegdb,featureCollection,geojson,excel",
"capabilities": "Query,ChangeTracking",
"description": "",
"copyrightText": "",
"spatialReference": {
"wkid": 102100,
"latestWkid": 3857
},
"initialExtent": {
"xmin": -13240129.679701095,
"ymin": 3994281.9887753138,
"xmax": -13106722.92583799,
"ymax": 4101417.5063218847,
"spatialReference": {
"wkid": 102100,
"latestWkid": 3857
}
},
"fullExtent": {
"xmin": -13240129.679701095,
"ymin": 3994281.9887753138,
"xmax": -13106722.92583799,
"ymax": 4101417.5063218847,
"spatialReference": {
"wkid": 102100,
"latestWkid": 3857
}
},
"allowGeometryUpdates": true,
"units": "esriMeters",
"supportsAppend": true,
"supportsSharedDomains": true,
"supportsWebHooks": true,
"supportsTemporalLayers": true,
"layerOverridesEnabled": true,
"size": 319488,
"syncEnabled": false,
"extractChangesCapabilities": {
"supportsReturnIdsOnly": true,
"supportsReturnExtentOnly": true,
"supportsReturnAttachments": true,
"supportsLayerQueries": true,
"supportsGeometry": true,
"supportsFeatureReturn": true,
"supportsReturnHasGeometryUpdates": false,
"supportsReturnDeletedFeatures": true,
"supportsServerGens": true,
"supportsFieldsToCompare": true
},
"supportsApplyEditsWithGlobalIds": true,
"supportsReturnDeleteResults": true,
"supportsLayerOverrides": true,
"supportsTilesAndBasicQueriesMode": true,
"supportsQueryContingentValues": true,
"supportedContingentValuesFormats": "JSON, PBF",
"supportsContingentValuesJson": 2,
"advancedEditingCapabilities": {
"supportsSplit": false,
"supportsReturnServiceEditsInSourceSR": false,
"supportsAsyncApplyEdits": true,
"supportsReturnEditResults": true,
"supportsApplyEditsbyUploadID": true,
"supportedApplyEditsUploadIDFormats": "JSON"
},
"editorTrackingInfo": {
"enableEditorTracking": false,
"enableOwnershipAccessControl": false,
"allowOthersToQuery": true,
"allowOthersToUpdate": true,
"allowOthersToDelete": false,
"allowAnonymousToQuery": true,
"allowAnonymousToUpdate": true,
"allowAnonymousToDelete": true
},
"changeTrackingInfo": {
"lastSyncDate": 1603131158295,
"layerServerGens": [
{
"id": 0,
"minServerGen": 318897,
"serverGen": 649144
}
]
},
"xssPreventionInfo": {
"xssPreventionEnabled": true,
"xssPreventionRule": "InputOnly",
"xssInputRule": "rejectInvalid"
},
"layers": [{
"id": 0,
"name": "Trailheads",
"parentLayerId": -1,
"defaultVisibility": true,
"subLayerIds": null,
"minScale": 2311163,
"maxScale": 0,
"type": "Feature Layer",
"geometryType": "esriGeometryPoint"
}],
"tables": []
}
Set edit capabilities
The example below uses the updateDefinition admin operation to modify the current editing settings. You can pass in the types of editing you would like to enable using the capabilities
parameter.
Request
POST https://{host}/rest/admin/services/{service_name}/FeatureServer/updateDefinition HTTP/1.1
f=json
&token={access_token}
&updateDefinition = "{
"hasStaticData": false,
"capabilities": "Query,Editing,Create,Update,Delete",
"layerOverridesEnabled":true,
"editorTrackingInfo": {
"enableEditorTracking":false,
"enableOwnershipAccessControl": false,
"allowOthersToUpdate": true,
"allowOthersToQuery": true,
"allowAnonymousToQuery": true,
"allowAnaonymousToDelete": true
}
}"
Response (JSON)
{"success":true}
Tutorials
Import data to create a feature layer
Use data management tools to import files and create a feature layer in a feature service.
Define a new feature layer
Use data management tools to define and create a new empty feature layer in a feature service.
Manage a feature layer
Use a hosted feature layer item to set the properties and settings of a feature layer in a feature service.
Create a vector tile service
Use data management tools to create a new vector tile service from a feature service.
Create a map tile service
Use ArcGIS Online or scripting APIs to publish a map tile service.
Workflows
Create a feature service for an app
Learn how to import parcel data, create and style a feature layer, and then access the features in an app.
Create a feature layer view for an editor app
Learn how to import parcel data, create and style a feature layer view, and then access the features in an editing app.
Create a vector tile service for an app
Learn how to import parcel data, style a feature layer, and then create a vector tile service for an app.
Create a map tile service for an app
Learn how to import contour data, style a feature layer, and create a map tile service for an app.
Services
Feature service
Add, update, delete, and query feature data.
Vector tile service
Store and access vector tile data.
Map tile service
Store and access map tile data.
Image service
Store and access imagery and raster data.
API support
Use data management tools or Client APIs to create, manage, and access data services. The table below outlines the level of support for each API.
- 1. Use portal class and direct REST API requests
- 2. Access via ArcGIS REST JS
- 3. Requires manually setting styles for renderers