ArcGIS REST API

Evaluate

  • URL:https://<validationservice-url>/evaluate(POST only)
  • Version Introduced:10.7

Description

Using the specified version and session ID, evaluate the rules associated with the specified features (via a selection set, geographic extent, or those features modified in a version) and create persisted error features in the GDB_VALIDATION*ERROR tables. Evaluation can be of different types including attribute validation rules and batch calculation rules. The number of new errors identified along with the moment is returned.

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 token (guid) used to lock the 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>

evaluationArea

Description: Optional parameter representing the envelope of the area to validate. Note that this type of validation does not result in a change to the last evaluation moment in a version.

changesInVersion

Description: Optional parameter representing whether to perform the evaluation on the features that have changed in the version (default is false). Changes in version cannot be applied to validations of topology.

Values: "true" | "false"

selection

Description: Optional parameter representing a set of features to evaluate. This is an array of layers and the global IDs (or object IDs) of the features to evaluate. Selections cannot be applied to evaluations of topology rules.

Values:

[ 
  {
    "id" : <layerId1>,
    "globalIds" : [ <globalId> ],
    “objectIds” : [ <objectId> ]
  },
  {
    “id” : <layerId2>,
    “globalIds” : [ <globalId> ].
    “objectIds” : [ <objectId> ]
  }
]
evaluationType

Description: An array of evaluation types.

Values:

“validationRules” | “calculationRules”

Example:

evaluationType=["calculationRules"]

returnEdits

Description: Optional boolean parameter that returns features edited due to feature evaluation. 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 cache 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"

async

Description: Optional parameter, where if true, the request is processed as an asynchronous job, and a URL is returned that a client can visit to check the status of the job. See the topic on asynchronous usage for more information. The default is false.

Values: "true" | "false"

JSON Response Syntax

JSON response (when async = false):

{
  "moment" : <datetime>,
  "exceededTransferLimit : <true | false>,
  "serviceEdits" : [
    {
      "id" : <layerId>, 
      "editedFeatures" :
        {
          "adds" : [<currentFeature1>, <currentFeature2>],
          "updates" : [
            [<originalFeature3>, <currentFeature3>],
            [<originalFeature4>, <currentFeature4>]
          ],
          "deletes" : [<originalFeature5>, <originalFeature6>]
        }
    }
  ],
  "errorsIdentified" : <integer>,
  "success" : <true | false>,
  "error" : { // only if success is false
    "extendedCode" : <HRESULT>,
    "message" : <error message>,
    "details" : [ <detail> ]
}
}

JSON response (when async = true):

{
 "statusUrl" : <url>
}

JSON response to the statusURL (when pending or inprogress):

{
  "status" : "<Pending | InProgress>",  
  "submissionTime" : <datetime>,
  "lastUpdatedTime" : <datetime>
}

JSON response to the statusURL (when completed):

{
  "moment" : <datetime>,
  "exceededTransferLimit : <true | false>,
  "serviceEdits" : [
    {
      "id" : <layerId>, 
      "editedFeatures" :
        {
          "adds" : [<currentFeature1>, <currentFeature2>],
          "updates" : [
            [<originalFeature3>, <currentFeature3>],
            [<originalFeature4>, <currentFeature4>]
          ],
          "deletes" : [<originalFeature5>, <originalFeature6>]
        }
    }
  ],
  "errorsIdentified" : <integer>,
  "status" : "Completed",
  "submissionTime" : <datetime>,
  "lastUpdatedTime" : <datetime>,
  "success" : <true | false>,
  "error" : {                   // only if success is false
    "extendedCode" : <HRESULT>,
    "message" : <error message>,
    "details" : [ <detail> ]
  }
}