Skip To Content
ArcGIS Developers
Dashboard

Update Errors

Description

Using the specified version and session id, update an error feature's attributes, which are stored in the GDB_Validation*Errors tables. This is a generalized API that supports extensions to the core validation framework (for example, the ArcGIS Data Reviewer extension that contains additional metadata on each persisted error feature).

Request Parameters

ParameterDetails
f

Description: Optional parameter representing the output format of the response. The default response format is html.

Values: html | json

gdbVersion

Description: Optional parameter specifying the name of the geodatabase version (default is DEFAULT).

Syntax: gdbVersion=<version>

sessionId

Description: Optional parameter representing the sessionId (guid) used to lock the version. A client can use the sessionId to enable long transaction (undo/redo) in a version.

If the calling client is editing a named version, the sessionId must be provided; if the client is editing DEFAULT, the version may not be locked and the sessionId should not be specified.

Syntax: sessionId=<guid>

errorFeatures

Description: The error features to be updated. The structure of each feature in the array is the similar to the structure of the json feature object returned by the ArcGIS REST API. The default for the ruleType property is validationRules.

The ruleType property is introduced at ArcGIS Enterprise 10.9 to support update errors for topology.

Syntax:

[
  {
    "ruleType": "validationRules" | "topologyRules",
    "errorType" : "object" | "point" | "line" |
                 "polygon",
    "features" : [
      {
        "globalId" : <guid>,
        "fields" : {
          "name1" : <value1>,
          "name2" : <value2> 
        }
      }
    ]
  }  
]

returnEdits

Description: Optional boolean parameter that returns features edited due to errors update . Results returned are organized in a layer by layer fashion. If returnEdits is set to true , each layer may have edited features returned in an  editedFeatures   object .

The editedFeatures   object returns full features including the original features prior to delete, the original and current features for updates and the current rows for inserts which may contain implicit changes (e.g. as a result of a calculation rule ).

The response includes no  editedFeatures  and  exceededTransferLimit = true  if the count of edited features to return is more than the  maxRecordCount . If clients are using this parameter to maintain a cache, they should invalidate the cash when   exceededTransferLimit = true   is returned . If the server encounters an error when generating the list of edits is the response ,  exceededTransferLimit = true   is also returned .

Edited features are returned in the spatial reference of the feature service as defined by the services  spatialReferenceobject or by the  spatialReference  of the layers   extent   object .

The default for this parameter is   false .

Values:   "true" | "false"

JSON Response Syntax

JSON response:

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

Example usage

Update error features using the updateErrors operation.

Request URL and parameters:

https://myserver.esri.com/server/rest/services/LandUse/ValidationServer/updateErrors
f=json
gdbVersion=UNADMIN.CAROLINA
sessionId={6F545D22-8689-4836-B22F-4DF867019DEE}
errorFeatures=
[  
   {  
      "errorType":"polygon",
      "features":[  
         {  
            "globalId":"{E1E44DA0-562A-4AE9-BC07-AC105A4A0C2A}",
            "fields":{  
               "ISEXCEPTION":1
            }
         },
         {  
            "globalId":"{D9DF7E5C-6B10-4517-84FC-10A971DC6899}",
            "fields":{  
               "ISEXCEPTION":1
            }
         },
         {  
            "globalId":"{498733A2-9561-4BE3-A25F-B356040CB481}",
            "fields":{  
               "ISEXCEPTION":0
            }
         }
      ]
   }
]

JSON response:

{
 "moment": 1555011525855,
 "success": true
}