Error: Unable to update feature service layer definition. Invalid definition for 'lastEditDate'

Error Message

In ArcGIS Online, users can modify the schema of a layer inside of a hosted feature service by updating the service definition. The Update Definition operation is accessed through the Admin view of the REST endpoint of the feature service. Such updates include updating maximum record count and modifying the coded value domains for the hosted feature service.

In some instances, when attempting to alter the JSON and Update Layer Definition of a feature service, the operation fails and the following error message is returned:

Invalid definition for 'LastEditDate'.
Invalid definition for ESRI.ArcGIS.SDS.Metadata.EditingInfo 


This error message is returned because the numeric value exists inside the lastEditDate property. This property displays an epoch value used internally by the Open Data initiative and cannot be set to a numeric value when updating the schema. An example of this is below:

    A numeric value presents inside the lastEditDate key

Solution or Workaround

Set the value of lastEditDate to anything but a number. Follow the steps below to solve this issue.

  1. Log in to www.arcgis.com with administrator credentials.
  2. Click My Content, and navigate to the intended feature service. Open the feature service.
  3. In the Item Details page of the feature service, click Service URL under Layers. The ArcGIS REST Services Directory page opens.
  4. Modify the URL using the example below, appending '/admin' between 'rest' and '/services':
  1. Press Enter to access the ArcGIS REST Administrator Directory.
  2. Scroll to the bottom of the page to view the Supported Operations list, and click Update Definition.
  3. Make the intended changes to the JSON of the feature service.
  4. Change the lastEditDate key value by replacing the string of numbers, which indicates the last edit date, to double quotation marks with no content quoted between them (“ “).
          Replace the lastEditDate key value
  1. Click Update Layer Definition to save the changes.

Related Information