HOW TO

Remove an editing template from a hosted feature service using the ArcGIS REST API

Last Published: January 20, 2025

Summary

Currently there are limited capabilities when editing feature editing templates in ArcGIS Online. It is possible to overwrite a feature layer from ArcGIS Pro with updated editing templates. It is also possible to delete editing templates using Map Viewer Classic.

However, there are scenarios in which these two approaches cannot be used. For example, in the following situations:

  • When the hosted feature layer was published using CIM symbology, which is the default setting. Upon modifying the editing templates in Map Viewer Classic, the symbology might get reset to basic grayscale symbology and the current symbology is lost.
  • Secondly, when overwriting a feature layer from ArcGIS Pro it is not possible to overwrite potential layer views that exist of this main layer. Updating editing templates of view layers is not possible via ArcGIS Pro.

Procedure

It is possible to delete existing editing templates from a hosted feature service (or view) using the ArcGIS REST API. With the Update Definition function, the corresponding entry can be removed.

  1. Access the feature layer via ArcGIS REST by clicking on URL - View on the bottom right of the items page in ArcGIS Online.
  2. In the ArcGIS REST Services Directory, click the Admin link on the top right, shown in the next image.
    Admin in ArcGIS REST Services Directory
  3. Click the desired layer listed in Layers.
    Layers list 
  4. Scroll down and find the editing templates of the layer listed under Types.
    Types list 
  5. We can modify this layer definition using the ArcGIS REST API. Scroll down further and click on the Update Definition operation.
    updating the layer definition
  6. In the field Updated Layer Definition find the parameter lastEditDate. Set this parameter to null (You can use Ctrl+F to search for the parameter)
    lastEditDate parameter 
  7. Find the parameter types. Here the editing templates are listed and separated by commas and curly brackets. Locate the template that you would like to delete. Make sure to also remove all associated brackets and curly brackets.
    delete type 
  8. If you are updating the schema of a view layer then you must remove the view filter beforehand. Otherwise, the layer definition update fails with the error Invalid definition fo 'DefinitionQuery'. You can reconfigure the view filter after updating the editing templates.
  9. Proceed to click Update Layer Definition to submit the change.
  10. If successful, note that the deleted type is not listed in the ArcGIS REST Service Directory anymore. Also, when accessing the feature layer in Map Viewer, the editing template is no longer included.

Article ID: 000033944

Software:
  • ArcGIS REST API
  • ArcGIS Online

Receive notifications and find solutions for new or common issues

Get summarized answers and video solutions from our new AI chatbot.

Download the Esri Support App

Related Information

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options