Results returned from feature service edit operations

Overview

This topic discusses the edit results returned by the REST API for Feature Service edit operations.

Edit results contain feedback information about edits that have been submitted to a Feature Service using one of the edit operations (including Apply Edits, Update Features, Add Attachment, and Synchronize Replica).

In the response, edit results are grouped by the type edit. They are grouped into either addResults, updateResults, deleteResults, addAttachmentResults, updateAttachmentResults, or DeleteAttachmentResults. Edit Results contain arrays of edit result objects. Each edit result identifies a single feature and indicates if the edit was successful or not. If the edit is not successful, the edit result also includes an error code and an error description.

There are three basic categories of errors that can be reported:

The first two types of errors (violations of either JSON syntax or properties of the feature service) will be filtered out prior to sending the edit request to the server.

JSON Syntax

"addResults" : [ <editResult1>, <editResult2> ],
  "updateResults" : [ <editResult1>, <editResult2> ],
  "deleteResults" : [ <editResult1>, <editResult2> ]

JSON Example

{
 "addResults": [
  {
   "objectId": 618,
   "success": true
  },
  {
   "success": false,
   "error": {
    "code": -2147217395,
    "description": "Setting of Value for depth failed."
   }
  }
 ],
 "updateResults": [
  {
   "objectId": 50,
   "success": true
  }
 ],
 "deleteResults": [
  {
   "objectId": 25,
   "success": true
  },
  {
   "objectId": 26,
   "success": true
  }
 ]
}

10/6/2017