Evaluate

URL:
https://<root>/<serviceName>/ValidationServer/evaluate
Methods:
POST
Required Capability:
ArcGIS Advanced Editing user type extension license
Version Introduced:
10.7

Description

The evaluate operation allows you to evaluate the rules associated with the specified features (using a selection set, geographic extent, or those features modified in a version) and create persisted error features in error tables.

Evaluation can be performed on the following types of geodatabase rules (specified by the evaluationType parameter):

  • Topology rules
  • Validation and batch calculation attribute rules

Request parameters

ParameterDetails

f

Specifies the output format of the response. The default response format is html.

Values: html | json | pjson

gdbVersion (Optional)

Specifies the name of the geodatabase version (the default is DEFAULT).

Syntax: gdbVersion=<version>

sessionId (Optional)

Specifies the token (GUID) used to lock the version. If the calling client is editing a named version, the sessionId value must be provided. If the client is editing DEFAULT, the version may not be locked and the sessionId value should not be specified.

Syntax: sessionId=<guid>

evaluationArea (Optional)

Specifies the envelope of the area to validate. This type of validation does not result in a change to the last evaluation moment in a version.

Example:

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
{
  "xmin": -184.45407167254172,
  "ymin": -56.712479956871164,
  "xmax": 180.79547851540042,
  "ymax": 96.3386671168742,
  "spatialReference": {
    "wkid": 4326,
    "latestWkid": 4326
  }
}

changesInVersion (Optional)

Specifies whether the features that have changed in the version will be evaluated (the default is false ). This parameter does not apply to the DEFAULT version or when evaluationType is topologyRules.

When set to true , the evaluationDate property for the version is updated. This is listed as a property for a version and can be accessed using the version resource and the versionInfos operation.

Values: true | false

selection (Optional)

A set of features that will be evaluated. This is an array of layers (layerId) and features (globalIds or objectIds) to evaluate.

Selections are not applicable when evaluationType is topologyRules.

Values:

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
12
[
  {
    "id" : <layerId1>,
    "globalIds" : [ "<globalId>" ],
    "objectIds" : [ <objectId> ]
  },
  {
    "id" : <layerId2>,
    "globalIds" : [ "<globalId>" ],
    "objectIds" : [ <objectId> ]
  }
]

Example:

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
 [
    {
        "id": 3,
        "objectIds": [
            1,
            3,
            6,
            8,
            9,
            12,
            414,
            415,
            1215,
            1216,
            2415
        ]
    }
]

evaluationType (Required)

Specifies an array of evaluation types.

Values:

Use dark colors for code blocksCopy
1
"validationRules" | "calculationRules"| "topologyRules"

Example:

Use dark colors for code blocksCopy
1
evaluationType=["calculationRules"]

returnEdits (Optional)

Specifies whether features that were edited due to feature evaluation will be returned. Results are organized layer by layer. If true, each layer may have edited features returned in an editedFeatures object.

The editedFeatures object returns full features including the original features before deletion, the original and current features for updates, and the current rows for inserts that may contain implicit changes (for example, as a result of a calculation rule).

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

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

The default is false. It is always set to true when evaluating topology rules for a parcel fabric or topology.

Values: true | false

async (Optional)

Specifies whether the request will be processed as an asynchronous job. If true, a URL is returned that a client can visit to review the status of the job. The default is false.

Values: true | false

This parameter was introduced at ArcGIS Enterprise 11.2.

JSON Response syntax

JSON response (when async = false):

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
{
  "moment" : <datetime>,
  "exceededTransferLimit : <true | false>,
  "serviceEdits" : [
    {
      "id" : <layerId>,
      "editedFeatures" :
        {
          "adds" : [<currentFeature1>, <currentFeature2>],
          "updates" : [
            [<originalFeature3>, <currentFeature3>],
            [<originalFeature4>, <currentFeature4>]
          ],
          "deletes" : [<originalFeature5>, <originalFeature6>]
        }
    }
  ],
  "evaluationStatistics": {
    "rowsEvaluated": <integer>,
    "elapsedTimeInSec": <integer>
    "errorsIdentified": <integer>,
    "errorsCleaned": <integer>
  },
  "errorsIdentified" : <integer>,
  "validatedArea": { // only if evaluationType is topologyRules
    "xmin": <double>,
    "ymin": <double>,
    "xmax": <double>,
    "ymax": <double>
  },
  "success" : <true | false>,
  "error" : { // only if success is false
    "extendedCode" : <HRESULT>,
    "message" : <error message>,
    "details" : [ <detail> ]
}
}

JSON response (when async = true):

Use dark colors for code blocksCopy
1
2
3
{
 "statusUrl" : <url>
}

JSON response to the statusURL (when pending or in progress):

Use dark colors for code blocksCopy
1
2
3
4
5
{
  "status" : "<Pending | InProgress>",
  "submissionTime" : <datetime>,
  "lastUpdatedTime" : <datetime>
}

JSON response to the statusURL (when completed):

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
{
  "moment" : <datetime>,
  "exceededTransferLimit : <true | false>,
  "serviceEdits" : [
    {
      "id" : <layerId>,
      "editedFeatures" :
        {
          "adds" : [<currentFeature1>, <currentFeature2>],
          "updates" : [
            [<originalFeature3>, <currentFeature3>],
            [<originalFeature4>, <currentFeature4>]
          ],
          "deletes" : [<originalFeature5>, <originalFeature6>]
        }
    }
  ],
   "evaluationStatistics": {
    "rowsEvaluated": <integer>,
    "elapsedTimeInSec": <integer>
    "errorsIdentified": <integer>,
    "errorsCleaned": <integer>
  },
  "errorsIdentified" : <integer>,
  "validatedArea": { // only if evaluationType is topologyRules
    "xmin": <double>,
    "ymin": <double>,
    "xmax": <double>,
    "ymax": <double>
  },
  "status" : "Completed",
  "submissionTime" : <datetime>,
  "lastUpdatedTime" : <datetime>,
  "success" : <true | false>,
  "error" : {                   // only if success is false
    "extendedCode" : <HRESULT>,
    "message" : <error message>,
    "details" : [ <detail> ]
  }
}

Example usage

Validation attribute rules

Evaluate the validation rules for the UNADMIN.CAROLINA version using the evaluate operation.

Request URL and parameters:

Use dark colors for code blocksCopy
1
https://myserver.esri.com/server/rest/services/LandUse/ValidationServer/evaluate
Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
f=json
gdbVersion=UNADMIN.CAROLINA
sessionID={E55FFA19-406E-46D6-847E-BD512A1F3756}
evaluationArea=
{
  "xmin": -184.45407167254172,
  "ymin": -56.712479956871164,
  "xmax": 180.79547851540042,
  "ymax": 96.3386671168742,
  "spatialReference": {
    "wkid": 4326,
    "latestWkid": 4326
  }
}
changesInVersion=false
evaluationType=["validationRules"]
async=false
returnEdits=true

JSON response (when async parameter is false)

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
{
 "moment": 1558369578880,
  "evaluationStatistics": {
   "rowsEvaluated": 209,
   "elapsedTimeInSeconds": 2
   "errorsIdentified": 199,
   "errorsCleared": 6,
  },
  "errorsIdentified" : 199,
  "success": true,
  "status": completed,
  "submissionTime": 1656544895000,
  "lastUpdatedTime": 1656544895000
}

Topology rules

Evaluate the topology rules for the ADMIN.CAROLINA version using the evaluate operation.

Request URL and parameters:

Use dark colors for code blocksCopy
1
https://myserver.esri.com/server/rest/services/LandUse/ValidationServer/evaluate
Use dark colors for code blocksCopy
1
2
3
4
5
6
f=json
gdbVersion=ADMIN.CAROLINA
sessionID={E55FFA19-406E-46D6-847E-BD512A1F3756}
evaluationType=["topologyRules"]
async=false
returnEdits=false

JSON response (when async parameter is false)

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
{
"moment": 1716902568693,
"errorsIdentified": 0,
"validatedArea": {
  "xmin": 2395498.2275726758,
  "ymin": 1434986.3027709424,
  "xmax": 2535087.3847455084,
  "ymax": 1652601.6014633551
},
"success": true
}

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.