Skip To Content

Delete Forward Edits

  • URL: https://<version-url>/deleteForwardEdits(POST only)
  • Version Introduced:10.6

Description

The deleteForwardEdits operation deletes all forward edits in a specified edit session.

When a client application manages an edit session made of multiple operations and intends to support an undo/redo stack, the time stamps for each edit operation must be carefully managed.

This operation requires the same session ID and organization member that was used for the startEditing operation.

Note:

Review the read and edit session requirements for version resource operations.

Request parameters

ParameterDetails
f

Description: The response format. The default response format is html.

Values: html | json

sessionId

Description: The client-generated session ID (GUID). This parameter is required.

Syntax: sessionId = <guid>

Example: sessionId = {3F2504E0-4F89-41D3-9A0C-0305E82C3301}

moment

Description: A specific applyEdits operation moment after which all subsequent (forward) edits will be deleted. This parameter is required.

Note:

The value must be an applyEdits operation editMoment value that is equal to or greater than the modifiedDate property for the version resource.

Syntax: moment = <dateTime>

Example: moment = 1603109596000

JSON Response syntax

{
  "success" : <true | false>,
  "error" : { // only if success is false
    "extendedCode" : <HRESULT>,
    "message" : <error message>,
    "details" : [ <detail> ]
  }
}

Example usage

During an edit session, the deleteForwardEdits operation is called before the stopEditing operation to delete edits from the moment specified forward.

Request URL and parameters:

https://myserver.esri.com/server/rest/services/LandUse/VersionManagementServer/versions/24417758-0DBD-4EC3-95B0-467CAA47FC43/deleteForwardEdits

f=json
sessionId={638ed440-b81f-406c-bd5d-757c91dbfd70}
moment=1691093291637

JSON response:

{
 "success": true
}