ArcGIS REST API

Export Subnetwork

  • URL:https://<utilitynetworkservice-url>/exportSubnetwork(POST only)
  • Version Introduced:10.6

Description

The exportSubnetwork operation is used to export information about a subnetwork into a JSON file. That information can then be consumed by outside systems such as outage management and asset tracking. The exportSubnetwork operation allows you to delete corresponding rows in the Subnetwork Sources table as long as the IsDeleted attribute is set to True. This indicates a source feeding the subnetwork has been removed.

License:
The ArcGIS Utility Network Management extension is required to use these resources.

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>

moment

Description: Optional parameter representing the session moment (the default is the version current moment). This should only be specified by the client when they do not want to use the current moment.

domainNetworkName

Description: The name of the domain network that the subnetwork is a part of.

Syntax: domainNetworkName=<name>

tierName

Description: The name of the tier that the subnetwork is a part of.

Syntax: tierName=<name>

subnetworkName

Description: The name of the subnetwork to update.

Syntax: subnetworkName=<name>

exportAcknowledgement

Description: Optional parameter representing whether or not the export is acknowledged (default is false).

Values: "true" | "false"

traceConfiguration

Description: Optional parameter representing the collection of trace configuration parameters. See the traceConfiguration parameter in the Trace topic.

Syntax: traceConfiguration=<trace configuration>

resultTypes

Description: Optional parameter representing the types of results to return.

Syntax :

[
  { 
    "type" : "featureElements" | "connectivity" | "controllers"
    "includeGeometry" : "true" | "false"
    "networkAttributes" :["attribute1Name","attribute2Name",...]
    "fields":[{"layerId":<long>,"fieldname":<value>},...]
  },...
]

JSON Response Syntax

JSON response:

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

Export JSON file format for 2.3/10.7 and later:

  • If nothing is specified for the resultTypes parameter, the JSON export format for 2.2/10.6.1 and earlier versions is returned.
  • If at least one item is specified in the resultTypes parameter, controllers will automatically be included in the file by default.

{ 
  "controllers": [
    {
      "networkSourceId": <long>,
      "globalId": <guid>,
      "objectId": <long>,
      "terminalId": <long>,
      "assetGroupCode": <long>,
      "assetTypeCode": <long>,
      "geometry": <geometry>
    }
  ],
  "featureElements": [
    {
      "networkSourceId": <long>,
      "globalId": <guid>,
      "objectId": <long>,
      "assetGroupCode": <long>,
      "assetTypeCode": <long>,
      "positionFrom": <double>, // line features only
      "positionTo": <double>, // line features only
      "geometry": <geometry>,
      "networkAttributesValues" : [{"<attributeName>" : <value>, ... }, ... ]
      "fieldValues" : [
        {
          "fieldName" : <value>
          "fieldValue" : <value>
        }, ...]	  
    }
  ],
  "connectivity": [
    {
      "viaNetworkSourceId": <long>,
      "viaGlobalId": <guid>,
      "viaObjectId": <long>,
      "viaPositionFrom": <double>,
      "viaPositionTo": <double>,
      "viaGeometry": <geometry>,
      "fromNetworkSourceId": <long>,
      "fromGlobalId": <guid>,
      "fromObjectId": <long>,
      "fromTerminalId": <long>,
      "fromGeometry": <geometry>
      "toNetworkSourceId": <long>,
      "toGlobalId": <guid>,
      "toObjectId": <long>,
      "toTerminalId": <long>,
      "toGeometry": <geometry>
    },
  ],
  "sourceMapping":
  {
    "<sourceID>": "<sourceName>",
  },
  "resultTypes": [
    {
      "type": "featureElements" | "connectivity",
      "includeGeometry": "true" | "false",
	       "includePropagatedValues": "true" | "false",
      "networkAttributeNames": ["<networkAttributeName1>", ...],
      "diagramTemplateName": "",
      "resultTypeFields": [
        {
          "networkSourceId": <long>,
          "fieldName": "<name>"
        }
      ]
    }
  ],
  "spatialReference": <spatialReference>
}

Export JSON file format for 2.2/10.6.1 and earlier:

{ 
  "type" : "tabular",
  "sourceMapping" : { 
    "<sourceId1>" : <sourceName1>, 
    "<sourceId2>" : <sourceName2>, 
    . . .
  }
  "rows" : [
    {
      "viaSourceId" : <long>, 
      "viaGlobalId" : <guid>, 
      "viaSubtypeName" : <name>, 
      "viaGeometry" : <geometry>,
      "fromSourceId" : <long>, 
      "fromGlobalId" : <guid>, 
      "fromSubtypeName" : <name>, 
      "fromTerminalId" : <long>, 
      "fromGeometry" : <geometry>
      "toSourceId" : <long>, 
      "toGlobalId" : <guid>, 
      "toSubtypeName" : <name>, 
      "toTerminalId" : <long>, 
      "toGeometry" : <geometry>
    }
  ]
  "controllers: [
    {
      "networkSourceId" : <long>, 
      "globalId" : <guid>, 
      "terminalId" : <long>,
    }
  ]
}