- URL:https://<utilitynetworkservice-url>/trace
- Version Introduced:10.6
Description
A trace refers to a preconfigured algorithm that systematically travels a network to return results. Generalized traces allow you to trace across multiple types of domain networks. For example, you can run a connected trace from your electric network through to your gas network. Multiple parameters and properties are provided with the trace operation that support various analytic workflows. All traces use the network topology to read cached information about network features. This can improve performance of complex traces on large networks. Trace results are not guaranteed to accurately represent a utility network when dirty areas are present. The network topology must be validated to ensure that it reflects the most recent edits or updates made to the network. The trace operation is supported both synchronously and asynchronously.
Request parameters
Parameter | Details |
---|---|
f | Description: Optional parameter specifying the output format of the response. The default response format is html. Values: html | json | pbf |
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 has previously started a service session (editing) and holds an exclusive lock on the specified version, the request will fail if the sessionId is not provided. If the specified version is currently locked by any other session, the request will fail if the sessionId is not provided or does not match the sessionId that holds the exclusive lock. Syntax: sessionId=<guid> |
moment | Description: Optional parameter specifying 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. Syntax: moment=<Epoch time in milliseconds> |
traceType | Description: The trace type. This required parameter specifies the core algorithm that will be run to analyze the network. Trace types can be configured using the traceConfiguration parameter. Values: connected | subnetwork | subnetworkController | upstream | downstream | loops | shortestPath | isolation Syntax: traceType=<traceType> Example: traceType=subnetwork |
traceLocations | Description: The locations for starting points and barriers. An empty array must be used when performing a subnetwork trace if a subnetworkName is provided as part of the traceConfiguration—for example, traceLocations=[]. The trace location is ignored by the trace if the following required properties are not defined:
Syntax:
|
traceConfiguration | Description: Optional parameter specifying the collection of trace configuration properties. Depending on the trace type, some of the trace configuration properties are required. To reference the collection of trace configuration properties, see the traceConfiguration properties section below. Syntax: traceConfiguration=<traceConfiguration> Más información sobre el uso de varias expresiones condicionales |
traceConfigurationGlobalId | Description: Optional parameter. The global ID of a named trace configuration. When specified, this configuration is used instead of the traceConfiguration parameter. Additionally, named trace configurations are persisted with their own trace type so the trace type parameter is ignored. This parameter was introduced at ArcGIS Enterprise 10.9. Syntax: traceConfigurationglobalId=<guid> |
resultType | This parameter was deprecated at 10.8. |
resultTypes | Description: Optional parameter specifying the types of results to return. Nota:ArcGIS Enterprise 10.9.1 or later is required when using the connectivity type. Syntax : |
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. The default is false. Values: true | false This parameter was introduced at ArcGIS Enterprise 10.9.1. |
outSR | Description: Optional parameter specifying the output spatial reference. Syntax: outSR={wkid=<wkid>} This parameter was introduced at ArcGIS Enterprise 11.1. |
traceConfiguration properties
The traceConfiguration parameter is a collection of trace configuration properties that include basic properties for a trace and control trace settings for traversability, functions, filters, outputs, and propagators.
Property | Details |
---|---|
includeContainers | Description: Optional property specifying whether to include containers in the trace result. The default is false. Values: <true | false> |
includeContent | Description: Optional property specifying whether to include content in the trace result. The default is false. Values: <true | false> |
includeStructures | Description: Optional property specifying whether to include structures in the trace result. The default is false. Values: <true | false> |
includeBarriers | Description: Optional property specifying whether to include barrier features that stop a trace in the trace result. The default is true. Values: <true | false> |
validateConsistency | Description: Optional property specifying whether to validate the consistency of the trace results. The default is true. Values: <true | false> |
validateLocatability | Description: Optional property specifying whether to validate whether traversed junction or edge objects have the necessary containment, attachment, or connectivity association in their association hierarchy. The default is false. Values: <true | false> |
includeIsolated | Description: Optional property specifying whether to include isolated features for an isolation trace. The default is false. Values: <true | false> |
ignoreBarriersAtStartingPoints | Description: Optional property specifying whether dynamic barriers in the trace configuration are ignored for starting points. This can be useful when performing an upstream protective device trace using the discovered protective devices (barriers) as starting points to find subsequent upstream protective devices. The default is false. Values: <true | false> |
includeUpToFirstSpatialContainer | Description: Optional property specifying whether to limit the containers returned in the trace result. This property depends on the includeContainers property and no-ops if includeContainers is false. If includeContainers is true and this property is true, containment associations up to and including the first spatial container are returned; otherwise, all containment associations are returned. The default is false. Values: <true | false> |
allowIndeterminateFlow | Description: Optional property specifying whether network features with indeterminate flow stop traversability or are included in the trace results. This property is only honored when running an upstream, downstream, or isolation trace. Values: <true | false> |
domainNetworkName | Description: Specifies the name of the domain network where the trace is starting. This is required for subnetwork-based traces. Syntax: domainNetworkName=<string> |
tierName | Description: Specifies the name of the tier where the trace is starting. This is required for subnetwork-based traces. Syntax: tierName=<string> |
targetTierName | Description: Optional property that specifies the name of the tier where an upstream or downstream trace ends. Syntax: targetTierName=<string> |
subnetworkName | Description: Optional property that specifies the name of the subnetwork that will be traced. The starting points of the trace are the controllers of this subnetwork. Syntax: subnetworkName=<string> |
shortestPathNetworkAttributeName | Description: Required property for a shortest path trace; otherwise, it's optional. It specifies the network attribute name used for determining cost when calculating the shortest path. Syntax: shortestPathNetworkAttributeName=<string> |
filterBitsetNetworkAttributeName | Description: Optional property used during a loops trace to only return loops with the same bit set all around the loop. This is used during upstream and downstream traces to ensure that trace results include any bit that is set in the starting points for the network attribute. Syntax: filterBitsetNetworkAttributeName=<string> |
traversabilityScope | Description: Optional property specifying the network element types to which the condition, category, or function barriers apply. The default is junctionsAndEdges. values : "junctions" | "edges" | "junctionsAndEdges" |
filterScope | Description: Optional property specifying the network element types to which the filter barriers or filter function barriers apply. The default is junctionsAndEdges. values : "junctions" | "edges" | "junctionsAndEdges" |
conditionBarriers | Description: Optional property containing an array of objects (representing network attribute or category conditions) that serve as barriers (the default is null). If isSpecificValue is true, the network attribute is compared to a specific value; otherwise, the network attribute is compared to another network attribute. Syntax:
Más información sobre el uso de varias expresiones condicionales |
functionBarriers | Description: Optional property. This is an array of objects representing function barriers. Syntax:
|
filterBarriers | Description: Optional property containing an array of objects (representing network
attribute or category conditions) that serve as barriers (the default is null). If
isSpecificValue is true, the network attribute is compared to a
specific value; otherwise, the network attribute is compared to
another network attribute. Más información sobre el uso de varias expresiones condicionales |
filterFunctionBarriers | Description: Optional property. This is an array of objects representing filter function barriers.
|
functions | Description: Optional property. This is an array of objects representing functions. Each function can have an optional array of network attribute conditions. Syntax:
Más información sobre el uso de varias expresiones condicionales |
nearestNeighbor | Description: Optional property that specifies the parameters needed for calculating nearest neighbors. The default is null. |
outputFilters | Description: Optional property specifying the output filter: an array of objects. The default is null.
|
outputConditions | Description: Optional property specifying the type of features returned based on a network attribute or category.
Example: Más información sobre el uso de varias expresiones condicionales |
propagators | Description: Required property. This is an array of objects. The default is null.
|
JSON Response syntax
JSON response (when async = false):
{
"traceResults" : {
"elements" : [
{
"networkSourceId" : <long>,
"globalId" : <guid>,
"objectId" : <long>
"terminalId" : <long>,
"networkAttributes" : [
"<networkAttribute1>" : <long>,
"<networkAttribute2>" : <long>
],
"assetGroup" : <long>,
"assetType" : <long>,
"positionFrom" : <double>,
"positionTo" : <double>
}
],
"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>
},
"aggregatedGeometry" : {
"point" : <aggregated point geometry>,
"line" : <aggregated line geometry>,
"polygon" : <aggregated polygon geometry>
},
"featureElements": [
{
"networkSourceId": <long>,
"globalId": <guid>,
"objectId": <long>,
"terminalId": <long>,
"assetGroupCode": <long>,
"assetTypeCode": <long>,
"positionFrom": <double>,
"positionTo": <double>,
"geometry": <geometry>,
"networkAttributesValues" : [
{
"<attributeName>" : <value>, ...
}
],
"fieldValues" : [
{
"fieldName" : <value>,
"value" : <value>,
"description" : <string>
}
],
"networkAttributeValues" : [],
"networkAttributeDescriptions" : [
],
"associations": [
{
"associationType": <long>,
"fromNetworkSourceId": <long>,
"fromGlobalId": <guid>,
"fromTerminalId": <long>,
"toNetworkSourceId": <long>,
"toGlobalId": <guid>,
"toTerminalId": <long>
}
]
],
"globalFunctionResults" : [
{
"functionType" : "add" | "average" | "count" | "max" | "min" |
"subtract",
"networkAttributeName" : <string>,
"result" : <double>,
"conditions": [
{
"name" : <string>,
"type" : "networkAttribute" | "category",
"operator" : "equal" | "notEqual"
| "greaterThan"
| "greaterThanEqual |
| "lessThan"
| "lessThanEqual"
| "includesTheValues"
| "doesNotIncludeTheValues"
| "includesAny"
| "doesNotIncludeAny",
"value" : <string>,
"combineUsingOr" : <true | false>,
"isSpecificValue" : <true | false>
}
],
"summaryAttributeName": <string>
}
],
"isConsistent" : <true | false>,
"kFeaturesForKNNFound" : <true | false>,
"startingPointsIgnored" : <true | false>,
"warnings" : [ <string> ]
}
"sourceMapping":
{
"networkSourceId": "string",
...
},
"resultTypes": [
{
"type": "features" | "connectivity" | "controllers" | "associations",
"includeGeometry": true | false,
"includePropagatedValues": true | false,
"networkAttributeNames": ["<networkAttributeName1>", ...],
"diagramTemplateName": "",
"resultTypeFields": [
{
"networkSourceId": <long>,
"fieldName": "<string>"
}
]
},
"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>
}
Example usage
Perform a subnetwork trace for the ElectricDistribution domain network Medium Voltage Radial tier. The trace operation request includes the traceConfiguration parameter.
Request URL and parameters:
https://myserver.esri.com/server/rest/services/LandUse/UtilityNetworkServer/traceJSON response:f=json
gdbVersion=SDE.DEFAULT
sessionID={55DCF5E1-4DB9-478A-8B0C-65E5F37F5D16}
moment=1554214441244
traceType=subnetwork
traceLocations=[]
traceConfiguration=
{
"includeContainers": true,
"includeContent": true,
"includeStructures": true,
"includeBarriers": true,
"validateConsistency": true,
"validateLocatability": false,
"includeIsolated": false,
"ignoreBarriersAtStartingPoints": false,
"includeUpToFirstSpatialContainer":false,
"allowIndeterminateFlow":true,
"domainNetworkName": "ElectricDistribution",
"tierName": "Medium Voltage",
"targetTierName": "",
"subnetworkName": "oakview_01",
"diagramTemplateName": "",
"shortestPathNetworkAttributeName": "",
"filterBitsetNetworkAttributeName": "",
"traversabilityScope": "junctionsAndEdges",
"conditionBarriers": [
{
"name": "Device Status",
"type": "networkAttribute",
"operator": "equal",
"value": 1,
"combineUsingOr": false,
"isSpecificValue": true
}
],
"functionBarriers": [],
"arcadeExpressionBarrier": "",
"filterBarriers": [],
"filterFunctionBarriers": [],
"filterScope": "junctionsAndEdges",
"functions": [],
"nearestNeighbor": {
"count": -1,
"costNetworkAttributeName": "",
"nearestCategories": [],
"nearestAssets": []
},
"outputFilters": [],
"outputConditions": [],
"propagators": [
{
"networkAttributeName":"Phases Current",
"substitutionAttributeName":"phasessub",
"propagatorFunctionType":"bitwiseAnd",
"operator":"includesAny",
"value":15,
"propagatedAttributeName":""
}
]
},
resultTypes= [
{
"type":"features",
"includeGeometry":true,
"includePropagatedValues":false,
"includeDomainDescriptions":false,
"networkAttributeNames":["Is subnetwork controller"],
"diagramTemplateName":"",
"resultTypeFields":[{"networkSourceId":9,"fieldName":"phasescurrent"}]
},
{
"type":"connectivity",
"includeGeometry":false,
"includePropagatedValues":false,
"includeDomainDescriptions":false,
"networkAttributeNames":[],
"diagramTemplateName":"",
"resultTypeFields":[]
}
]
async=false
{
"traceResults": {
"featureElements": [
{
"networkSourceId": 12,
"globalId": "{CE537B94-E634-4F7E-9DA2-A3F219EA8D8A}",
"objectId": 21,
"terminalId": 1,
"assetGroupCode": 5,
"assetTypeCode": 1,
"geometry": {
"x": 6807667.161118746,
"y": 1846163.1724515558,
"z": 0,
"m": null
}
},
{
"networkSourceId": 12,
"globalId": "{1E737D64-32D3-4F9C-97E5-6CAAA163B497}",
"objectId": 18,
"terminalId": 1,
"assetGroupCode": 1,
"assetTypeCode": 1,
"geometry": {
"x": 6807667.716891915,
"y": 1846152.3732605577,
"z": 0,
"m": null
}
},
{
"networkSourceId": 12,
"globalId": "{245E6D0A-0BDC-4DF8-B9ED-3A613991A6A2}",
"objectId": 20,
"terminalId": 1,
"assetGroupCode": 1,
"assetTypeCode": 1,
"geometry": {
"x": 6807735.146219,
"y": 1846163.219695568,
"z": 0,
"m": null
}
},
{
"networkSourceId": 12,
"globalId": "{923E8163-2BFA-430D-987A-21A4E37C879D}",
"objectId": 19,
"terminalId": 1,
"assetGroupCode": 1,
"assetTypeCode": 1,
"geometry": {
"x": 6807705.951395497,
"y": 1846162.8719272316,
"z": 0,
"m": null
}
},
{
"networkSourceId": 12,
"globalId": "{046362B3-E6A2-4C52-BC3E-C7BF641E8914}",
"objectId": 9,
"terminalId": 1,
"assetGroupCode": 5,
"assetTypeCode": 1,
"geometry": {
"x": 6807851.27131483,
"y": 1846266.5347776414,
"z": 0,
"m": null
}
},
{
"networkSourceId": 12,
"globalId": "{A43506DE-91DB-44A0-9A4C-FD6D8DCD1C55}",
"objectId": 7,
"terminalId": 1,
"assetGroupCode": 1,
"assetTypeCode": 1,
"geometry": {
"x": 6807863.391041249,
"y": 1846185.0434708149,
"z": 0,
"m": null
}
},
{
"networkSourceId": 10,
"globalId": "{DF8BF4A1-4681-47CF-BE4A-96CF0D6C6458}",
"objectId": 2247,
"assetGroupCode": 4,
"assetTypeCode": 3,
"positionFrom": 0,
"positionTo": 1,
"geometry": {
"hasZ": true,
"hasM": true,
"paths": [
[
[
6807862.803443998,
1846266.5859586448,
0,
null
],
[
6807963.476470992,
1846261.9025690556,
0,
null
]
]
]
}
}
],
"connectivity": [
{
"viaNetworkSourceId": 10,
"viaGlobalId": "{0EE946B2-78D0-4BAC-8B74-D025CBA2EDC3}",
"viaObjectId": 16,
"viaPositionFrom": 0.771530936343911,
"viaPositionTo": 1,
"viaGeometry": {},
"fromNetworkSourceId": 12,
"fromGlobalId": "{CE537B94-E634-4F7E-9DA2-A3F219EA8D8A}",
"fromObjectId": 21,
"fromTerminalId": 1,
"fromGeometry": {},
"toNetworkSourceId": 12,
"toGlobalId": "{1E737D64-32D3-4F9C-97E5-6CAAA163B497}",
"toObjectId": 18,
"toTerminalId": 1,
"toGeometry": {}
},
{
"viaNetworkSourceId": 10,
"viaGlobalId": "{74CDDEB8-25E5-40CA-80A6-5EE0FA47C3C8}",
"viaObjectId": 5,
"viaPositionFrom": 0,
"viaPositionTo": 1,
"viaGeometry": {},
"fromNetworkSourceId": 12,
"fromGlobalId": "{65991DC0-C048-4180-BE3F-D95FAE816A72}",
"fromObjectId": 4,
"fromTerminalId": 1,
"fromGeometry": {},
"toNetworkSourceId": 9,
"toGlobalId": "{58A65781-93D2-4EBE-8CFB-E4AF4C4ED6AE}",
"toObjectId": 5,
"toTerminalId": 1,
"toGeometry": {}
},
{
"viaNetworkSourceId": 10,
"viaGlobalId": "{669946F4-B6E3-4CEA-9D5A-34521B9BF330}",
"viaObjectId": 461,
"viaPositionFrom": 0.07442874427180345,
"viaPositionTo": 0.670766639232807,
"viaGeometry": {},
"fromNetworkSourceId": 12,
"fromGlobalId": "{C0896252-1AF0-46CF-AF86-139F215870DA}",
"fromObjectId": 337,
"fromTerminalId": 1,
"fromGeometry": {},
"toNetworkSourceId": 12,
"toGlobalId": "{1D3999D1-28C6-4463-A28E-96B36C591AAC}",
"toObjectId": 413,
"toTerminalId": 1,
"toGeometry": {}
},
{
"viaNetworkSourceId": 10,
"viaGlobalId": "{669946F4-B6E3-4CEA-9D5A-34521B9BF330}",
"viaObjectId": 461,
"viaPositionFrom": 0.670766639232807,
"viaPositionTo": 0.7871749615820911,
"viaGeometry": {},
"fromNetworkSourceId": 12,
"fromGlobalId": "{1D3999D1-28C6-4463-A28E-96B36C591AAC}",
"fromObjectId": 413,
"fromTerminalId": 1,
"fromGeometry": {},
"toNetworkSourceId": 12,
"toGlobalId": "{4BE88B18-DC04-4179-BB60-5A3E5D2637C3}",
"toObjectId": 414,
"toTerminalId": 1,
"toGeometry": {}
},
{
"viaNetworkSourceId": 10,
"viaGlobalId": "{669946F4-B6E3-4CEA-9D5A-34521B9BF330}",
"viaObjectId": 461,
"viaPositionFrom": 0.7871749615820911,
"viaPositionTo": 1,
"viaGeometry": {},
"fromNetworkSourceId": 12,
"fromGlobalId": "{4BE88B18-DC04-4179-BB60-5A3E5D2637C3}",
"fromObjectId": 414,
"fromTerminalId": 1,
"fromGeometry": {},
"toNetworkSourceId": 2,
"toGlobalId": "{2F90F7D3-3401-4893-AEAC-A191CD4F0BBD}",
"toObjectId": 2619,
"toTerminalId": 0,
"toGeometry": {}
},
{
"viaNetworkSourceId": 10,
"viaGlobalId": "{DD1644D9-8921-4C85-9A44-1674FDF9D4FF}",
"viaObjectId": 1,
"viaPositionFrom": 0,
"viaPositionTo": 0.46821569031543666,
"viaGeometry": {},
"fromNetworkSourceId": 2,
"fromGlobalId": "{DFE16D5E-1D98-43AF-9F13-860EC6E1D78E}",
"fromObjectId": 2715,
"fromTerminalId": 0,
"fromGeometry": {},
"toNetworkSourceId": 12,
"toGlobalId": "{B00A4B9A-B38F-4167-AD85-1BF33DF30047}",
"toObjectId": 331,
"toTerminalId": 1,
"toGeometry": {}
},
{
"viaNetworkSourceId": 10,
"viaGlobalId": "{DD1644D9-8921-4C85-9A44-1674FDF9D4FF}",
"viaObjectId": 1,
"viaPositionFrom": 0.46821569031543666,
"viaPositionTo": 0.5298812758175973,
"viaGeometry": {},
"fromNetworkSourceId": 12,
"fromGlobalId": "{B00A4B9A-B38F-4167-AD85-1BF33DF30047}",
"fromObjectId": 331,
"fromTerminalId": 1,
"fromGeometry": {},
"toNetworkSourceId": 12,
"toGlobalId": "{340219C0-41DB-4C65-B5BC-4E25868472D0}",
"toObjectId": 332,
"toTerminalId": 1,
"toGeometry": {}
}
],
"elements": [],
"diagramName": "<placeholder>",
"globalFunctionResults": [],
"kFeaturesForKNNFound": false,
"startingPointsIgnored": false,
"warnings": [],
"sourceMapping": {
"1": "UN_6_Associations",
"2": "UN_6_SystemJunctions",
"4": "StructureJunction",
"6": "StructureBoundary",
"7": "StructureJunctionObject",
"5": "StructureLine",
"8": "StructureEdgeObject",
"9": "ElectricDistributionDevice",
"11": "ElectricDistributionAssembly",
"12": "ElectricDistributionJunction",
"14": "ElectricDistributionJunctionObject",
"10": "ElectricDistributionLine",
"13": "ElectricDistributionSubnetLine",
"15": "ElectricDistributionEdgeObject"
},
"resultTypes": [
{
"type": "features",
"includeGeometry": true,
"includePropagatedValues": false,
"includeDomainDescriptions": false,
"networkAttributeNames": [
"Is subnetwork controller"
],
"diagramTemplateName": "",
"resultTypeFields": [
{
"networkSourceId": 9,
"fieldName": "phasescurrent"
}
]
},
{
"type": "connectivity",
"includeGeometry": false,
"includePropagatedValues": false,
"includeDomainDescriptions": false,
"networkAttributeNames": [],
"diagramTemplateName": "",
"resultTypeFields": []
}
]
},
"success": true
}