- URL:
- https://<root>/<serviceName>/NetworkDiagramServer/createDiagramFromTraceLocations
- Methods:
POST
- Version Introduced:
- 11.5
Description
The create
operation creates a new diagram resource starting from trace locations provided as inputs. It is performed on a Network Diagram Service resource. The result of this operation is a Diagram Information JSON object. The newly created diagram is a temporary diagram.
Request Parameters
Parameter | Details |
---|---|
|
The name of the geodatabase version. Syntax: Example: |
|
The token (guid) used to lock the version. Syntax: Example: |
(Required) | The name of the diagram template the new network diagram will be based on. Syntax:
Example:
|
(Required) | An array of trace locations from which the new diagram is going to be built. Syntax:
Example:
|
|
The response format. The default response format is html. Values: |
Example Usage
The following is a sample request URL for the create
operation that demonstrates creating a new temporary network diagram based on the Switching
template from terminal ID 41 existing on two subnetwork controllers (whose Global IDs are DEA
and 2
):
-
URL:
Use dark colors for code blocks Copy https://myserver.esri.com/server/rest/services/Naperville/NetworkDiagramServer/createDiagramFromTraceLocations
-
Parameters:
Use dark colors for code blocks Copy gdbVersion= sessionId= template=SwitchingFromDistributionSubnetworkCtrl traceLocations=[{"traceLocationType":"startingPoint","globalId":"{DEAD44B0-73F8-4C7E-B40F-F12B196544F1}","terminalId":41,"percentAlong":-1,"isFilterBarrier":false,"firstUnit":1,"numUnits":1},{"traceLocationType":"startingPoint","globalId":"{2F82291C-ED2E-40F5-AB36-FEB0C50E3353}","terminalId":41,"percentAlong":-1,"isFilterBarrier":false,"firstUnit":1,"numUnits":1}] f=pjson
-
Sent URL (GET):
Use dark colors for code blocks Copy https://myserver.esri.com/server/rest/services/UtilityNetwork/ElecFoundation_V7_SQL/NetworkDiagramServer/createDiagramFromTraceLocations?gdbVersion=&sessionId=&moment=&template=SwitchingFromDistributionSubnetworkCtrl&traceLocations=%5B%7B%22traceLocationType%22%3A%22startingPoint%22%2C%22globalId%22%3A%22%7BDEAD44B0-73F8-4C7E-B40F-F12B196544F1%7D%22%2C%22terminalId%22%3A41%2C%22percentAlong%22%3A-1%2C%22isFilterBarrier%22%3Afalse%2C%22firstUnit%22%3A1%2C%22numUnits%22%3A1%7D%2C%7B%22traceLocationType%22%3A%22startingPoint%22%2C%22globalId%22%3A%22%7B2F82291C-ED2E-40F5-AB36-FEB0C50E3353%7D%22%2C%22terminalId%22%3A41%2C%22percentAlong%22%3A-1%2C%22isFilterBarrier%22%3Afalse%2C%22firstUnit%22%3A1%2C%22numUnits%22%3A1%7D%5D&f=pjson`
JSON Response Syntax
A Diagram JSON Information object.
JSON Response Example
{
"diagramInfo": {
"tag": "",
"isStored": false,
"canStore": true,
"canExtend": false,
"isSystem": false,
"creator": "ndadmin",
"creationDate": 1738344870000,
"lastUpdateBy": "acb7352",
"lastUpdateDate": 1738344870000,
"containerMargin": 75,
"junctionCount": 46,
"edgeCount": 51,
"containerCount": 14,
"aggregationCount": 9476,
"isHistorical": false,
"reflexiveEdgeRadius": 1,
"access": "esriDiagramPublicAccess",
"diagramExtent": {
"xmin": 1027104.3120806776,
"ymin": 1863281.7399999425,
"xmax": 1035054.3122567609,
"ymax": 1871981.7399883568,
"spatialReference": {
"wkid": 102671,
"latestWkid": 3435,
"vcsWkid": 105703,
"latestVcsWkid": 6360
}
},
"networkExtent": {
"xmin": 1026640.5931918435,
"ymin": 1862504.1933266893,
"xmax": 1036507.4494423419,
"ymax": 1872012.4922234416,
"zmin": 0,
"zmax": 0,
"mmin": 0,
"mmax": 0,
"spatialReference": {
"wkid": 102671,
"latestWkid": 3435,
"vcsWkid": 105703,
"latestVcsWkid": 6360
}
},
"name": "7F4CB100857B41D5B4D60AC364E6A607",
"id": "{E85D5E82-5318-4F80-B6F9-FF16D20C1677}",
"template": "SwitchingFromDistributionSubnetworkCtrl"
}
}