- URL:
- https://<root>/<serviceName>/ValidationServer/writeErrors
- Methods:
POST
- Version Introduced:
- 11.3
Description
The write
operation writes an error result or a missing feature result to the GDB_Validation*Errors tables using the specified version and session ID. The supported category parameter values are feature
or missing
. The function will return the number of new errors written, along with the moment. Any other parameter values will result in a not supported operation and generate a JSON error response.
Learn more about enabling visual review for branch versions
Request parameters
Parameter | Details |
---|---|
| The response format. The default format is Values: |
| The Values: |
| This parameter specifies the geodatabase version to apply edits and only applies them if the
|
| This parameter represents the token (guid) used to lock the version. If the calling client edits a named version, the
|
| This parameter represents a The following is a list of acceptable values:
Syntax:
|
| This Boolean property specifies whether to return modified features. Returned results are organized in a layer-by-layer fashion. If The If the count of edited features to return is more than the Edited features are returned in the spatial reference of the feature service as defined by the services The default value for this parameter is Values: |
Example usage
Example one: featureErrors
The following is an example of the feature
operation. This example demonstrates writing ArcGIS Data Reviewer visual review errors into an error store on a feature service with the sample input.
category = featureErrors
gdbVersion = GISADMIN.name
sessionId = {6F545D22-8689-4836-B22F-4DF867019DEE}
errors=
[
{
"id":1,
"errorFeatures":[
{
"errorType": "addFeature",
"objectIds":[1,2],
"errorMessage":"Add Feature",
"severity":4
},
{
"errorType": "deleteFeature",
"objectIds":[3,4],
"errorMessage":"Custom error message here",
}
]
}
{
"id":2,
"errorFeatures":[
{
"errorType": "moveFeature",
"objectIds":[15,16],
"errorMessage":"Move Feature",
"severity":2
}
]
}
]
returnEdits = false
f = html
JSON examples
Example one: featureErrors
The following is a sample POST request for the write
operation when the category is set to feature
.
[
{
"id": 0,
"errorFeatures":[
{
"errorType": "addFeature",
"objectIds": [1, 2],
"errorMessage": "Add Feature",
"severity": 3
},
{
"errorType": "deleteFeature",
"objectIds": [3,4,5],
"errorMessage": "Delete Feature",
"severity": 2
},
{
"errorType": "moveFeature",
"objectIds": [6,7],
"errorMessage": "Move Feature",
"severity": 3
},
{
"errorType": "reshapeLine",
"objectIds": [8],
"errorMessage": "Reshape Line",
"severity": 5
},
{
"errorType": "reshapeArea",
"objectIds": [9,10],
"errorMessage": "Reshape Area",
"severity": 5
},
{
"errorType": "changeSubtype",
"objectIds": [11,12,13],
"errorMessage": "Change Subtype",
"severity": 3
},
},
{
"id": 1,
"errorFeatures":[
{
"errorType": "addFeature",
"objectIds": [40, 41],
"errorMessage": "Add Feature",
"severity": 3
}
]
}
]
Example two: missingFeatureErrors
The following is a sample POST request for the write
operation when the category is set to missing
.
[
{
"id":0,
"errorFeatures":[
{
"errorType":"missingFeature",
"geometries":[{"x":-143.501, "y":57.043}, {"x":-72.865, "y":-37.486}],
"errorMessage":"Missing Feature",
"severity":1
}
]
},
{
"id":1,
"errorFeatures":[
{
"errorType":"missingFeature",
"geometries" : [{"x":-118.152, "y":33.801}],
"errorMessage" : "Custom Error Message",
"severity" : 5
}
]
}
]
JSON Response Examples
Example one:
The following is a sample response returned when return
is set as false
(default).
{
"moment": 1708549937244,
"writeErrorResults": [
{
"id": 1,
"errorLayerId": 3
"errors": [
{
"objectId": 168009,
"globalId": "{7D9E9972-8E60-4523-A73E-3F3587166C10}",
"errorType": "reshapeArea",
"success": true
},
{
"objectId": 168010,
"globalId": "{486FFE9D-CFE8-432B-9D7D-1E7AF03E1BAE}",
"errorType": "reshapeLine",
"success": true
}
]
}
],
"success": true
}
Example two:
The following is a sample response returned when return
is set as true
. The service
section provides details for the new errors created in the Error Layer table and documents the changes made to the fields in the applicable feature class.
{
"moment": 1708550294735,
"writeErrorResults": [
{
"id": 1,
"errorLayerId": 3
"errors": [
{
"objectId": 168011,
"globalId": "{0AB76E9A-9402-498C-8B3B-4DC6F2E1199D}",
"errorType": "reshapeArea",
"success": true
}
]
}
],
"exceededTransferLimit": false,
"serviceEdits": [
{
"id": 3,
"editedFeatures": {
"spatialReference": 4326 {
...
"mUnits": 10000
},
"adds": [
{
"attributes": {
"objectid": 168011,
"featureclassid": 244,
...
"verificationdate": null
},
"geometry": {
"x": -4465179.96812821738,
"y": 3428970.41422226233,
"z": 0,
"m": null
}
}
]
}
},
{
"id": 1,
"editedFeatures": {
"spatialReference": 4326 {
...
"mUnits": 10000
},
"updates": [
[
{
"attributes": {
"objectid": 61,
...
"last_edited_user": null,
"last_edited_date": null,
"validationstatus": 2
},
"geometry": {
"x": -4465180.71599999815,
"y": 3428971.19269999862
}
},
{
"attributes": {
"objectid": 61,
...
"last_edited_user": "admin",
"last_edited_date": 1708550294000,
"validationstatus": 3
},
"geometry": {
"x": -4465180.71599999815,
"y": 3428971.19269999862
}
}
]
]
}
}
],
"success": true
}