Skip To Content
ArcGIS Developers
Dashboard

Validate Network Topology

Description

Validating the network topology for a utility network maintains consistency between feature editing space and network topology space. Validating a network topology may include all or a subset of the dirty areas present in the network. Validation of network topology is supported synchronously and asynchronously.

License:
The active portal account must be licensed with the ArcGIS Utility Network user type extension to use this operation.

Request parameters

ParameterDetails
f

Description: Optional parameter specifying 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. The default is DEFAULT.

Syntax: gdbVersion=<version>

sessionID

Description: Optional parameter specifying 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>

validationType

Description: Optional parameter that specifies the type of validation to perform. The default is normal. With the repair validationType, the specified portions of the network index are reconstructed from scratch.

Values: "normal" | "rebuild" | "forceRebuild"

validateArea

Required

Description: The envelope of the area to validate.

Syntax:

{
 "xmin": <minimum x-coordinate>,
 "ymin": <minimum y-coordinate>,
 "xmax": <maximum x-coordinate>,
 "ymax": <maximum y-coordinate>,
 "spatialReference": {
  "wkid": <spatial reference well-known identifier>,
  "latestWkid": <the current wkid value associated with the wkid>	
 }
}

validationSet

Description: Optional parameter that specifies the set of features and objects to validate.

This parameter was introduced at ArcGIS Enterprise 10.9.

Syntax:

[ 
 { 
  “sourceId” : <long>, 
  “globalIds” : [<guid>] 
 } 
]

returnEdits

Description: Optional Boolean parameter that returns edited features. Returned results 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 (for example, 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 service's spatialReferenceobject or by the spatialReference of the layer's extent object.

The default for this parameter is false.

Values: "true" | "false"

async

Description: 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>,
  "fullUpdate" : <true | false>,
  "validateErrorsCreated" : <true | false>, 
  "dirtyAreaCount" : <long>,
  “exceededTransferLimit : <true | false>,  // only if returnEdits is true 
  “serviceEdits” : [                        // only if returnEdits is true 
    { 
      “id” : <layerId>,  
      “editedFeatures” : 
        { 
          "adds" : [<currentFeature1>, <currentFeature2>], 
          "updates" : [ 
            [<originalFeature3>, <currentFeature3>], 
            [<originalFeature4>, <currentFeature4>] 
          ], 
          "deletes" : [<originalFeature5>, <originalFeature6>] 
        } 
    } 
  ], 
  "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 status URL (when pending or in progress):

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

JSON response to the status URL (when completed):

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

Example usage

Validate the full extent for a utility network using the validateNetworkTopology operation.

Request URL and parameters:

https://myserver.esri.com/server/rest/services/LandUse/UtilityNetworkServer/validateNetworkTopology

f=json
gdbVersion=sde.default
validateArea=
{	
 "xmin": 1034659.2752358826,	
 "ymin": 1871561.7755379943,	
 "xmax": 1034730.4307899779,	
 "ymax": 1871623.0833411064,	
 "spatialReference": {
  "wkid": 102671,
  "latestWkid": 3435	
 }
}
returnEdits=true
async=false

JSON response (async=false):

{
 "exceededTransferLimit": false,
 "serviceEdits": [
  {
   "id": 17,
   "editedFeatures": {
    "spatialReference": {
     "wkid": 3498,
     "latestWkid": 3498,
     "xyTolerance": 0.0032808333333333331,
     "zTolerance": 0.001,
     "mTolerance": 0.001,
     "falseX": -117608900,
     "falseY": -91881400,
     "xyUnits": 3048.00609601219276,
     "falseZ": -100000,
     "zUnits": 10000,
     "falseM": -100000,
     "mUnits": 10000
    },
    "deletes": [
     {
      "attributes": {
       "objectid": 4426,
       "isretired": 1,
       "status": null,
       "sourceid": 7,
       "guid": "{693652D5-A21B-47D1-B416-9452F60EC399}",
       "updatetype": 1,
       "creationdate": 1565614408000,
       "creator": "mjarman_gdbteam",
       "lastupdate": 1565614408000,
       "updatedby": "mjarman_gdbteam",
       "globalid": "{FFF05EA7-7A11-484C-A6F5-5103E8AE99F0}",
       "Shape__Area": 4883.66339633075313,
       "Shape__Length": 434.559498333333238
      },
      "geometry": {
       "hasZ": true,
       "hasM": true,
       "rings": [
        [
         [
          6810561.460448131,
          1846168.57139080763,
          0,
          null
         ],
         [
          6810561.460448131,
          1846360.39154522121,
          0,
          null
         ],
         [
          6810586.92004288733,
          1846360.39154522121,
          0,
          null
         ],
         [
          6810586.92004288733,
          1846168.57139080763,
          0,
          null
         ],
         [
          6810561.460448131,
          1846168.57139080763,
          0,
          null
         ]
        ]
       ]
      }
     },
     {
      "attributes": {
       "objectid": 4427,
       "isretired": 1,
       "status": null,
       "sourceid": 7,
       "guid": "{693652D5-A21B-47D1-B416-9452F60EC399}",
       "updatetype": 1,
       "creationdate": 1565614408000,
       "creator": "mjarman_gdbteam",
       "lastupdate": 1565614408000,
       "updatedby": "mjarman_gdbteam",
       "globalid": "{217AFE10-4E41-4E7B-8BF7-E05602CDEF1F}",
       "Shape__Area": 277.6728423858433,
       "Shape__Length": 330.236872333333281
      },
      "geometry": {
       "hasZ": true,
       "hasM": true,
       "rings": [
        [
         [
          6810561.460448131,
          1846196.97225263715,
          0,
          null
         ],
         [
          6810561.460448131,
          1846360.39154522121,
          0,
          null
         ],
         [
          6810563.15959171951,
          1846360.39154522121,
          0,
          null
         ],
         [
          6810563.15959171951,
          1846196.97225263715,
          0,
          null
         ],
         [
          6810561.460448131,
          1846196.97225263715,
          0,
          null
         ]
        ]
       ]
      }
     },
     {
      "attributes": {
       "objectid": 4428,
       "isretired": 1,
       "status": null,
       "sourceid": 9,
       "guid": "{BC20AD29-19DD-4D4B-A535-3D726E264BC9}",
       "updatetype": 1,
       "creationdate": 1565614408000,
       "creator": "mjarman_gdbteam",
       "lastupdate": 1565614408000,
       "updatedby": "mjarman_gdbteam",
       "globalid": "{4C8B4579-EE04-42CC-AA94-57D0A3143959}",
       "Shape__Area": 1.13553461781511045,
       "Shape__Length": 4.26245866666666551
      },
      "geometry": {
       "hasZ": true,
       "hasM": true,
       "rings": [
        [
         [
          6810577.9554938823,
          1846158.81091164052,
          0,
          null
         ],
         [
          6810577.9554938823,
          1846159.876526311,
          0,
          null
         ],
         [
          6810579.02110855281,
          1846159.876526311,
          0,
          null
         ],
         [
          6810579.02110855281,
          1846158.81091164052,
          0,
          null
         ],
         [
          6810577.9554938823,
          1846158.81091164052,
          0,
          null
         ]
        ]
       ]
      }
     },
     {
      "attributes": {
       "objectid": 4429,
       "isretired": 1,
       "status": null,
       "sourceid": 9,
       "guid": "{BC20AD29-19DD-4D4B-A535-3D726E264BC9}",
       "updatetype": 1,
       "creationdate": 1565614408000,
       "creator": "mjarman_gdbteam",
       "lastupdate": 1565614408000,
       "updatedby": "mjarman_gdbteam",
       "globalid": "{E91C3BF8-EEF6-4E3C-A314-4DF3D6D57F72}",
       "Shape__Area": 1.13553461781511045,
       "Shape__Length": 4.26245866666666551
      },
      "geometry": {
       "hasZ": true,
       "hasM": true,
       "rings": [
        [
         [
          6810561.777048558,
          1846196.47225365043,
          0,
          null
         ],
         [
          6810561.777048558,
          1846197.537868306,
          0,
          null
         ],
         [
          6810562.84266321361,
          1846197.537868306,
          0,
          null
         ],
         [
          6810562.84266321361,
          1846196.47225365043,
          0,
          null
         ],
         [
          6810561.777048558,
          1846196.47225365043,
          0,
          null
         ]
        ]
       ]
      }
     }
    ]
   }
  }
 ],
 "moment": 1565614427020,
 "validateErrorsCreated": false,
 "dirtyAreaCount": 0,
 "fullUpdate": false,
 "success": true
}