- URL:
- https://<root>/<serviceName>/NetworkDiagramServer/diagrams/<diagramName>/applyLayout
- Methods:
POST
- Version Introduced:
- 10.6
Description
The apply
operation applies a specific diagram algorithm to a diagram or parts of a diagram. It is performed on a Diagram resource. The result of this operation is a Diagram JSON Information object, and the moment (date) the operation happens for a stored 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 algorithm layout to apply (string). The parameter accepts the following values:
Example: |
| The algorithm layout parameters property set. There is a specific property set JSON object for each diagram layout parameters Syntax:
Example: Sample of parameter property set when layoutName = ForceDirectedDiagramLayout
|
| For the case you want the layout algorithm to apply to a diagram part, a list of junction ObjectIDs (long) that will be processed: Syntax: Example: |
| For the case you want the layout algorithm to apply to a diagram part, a list of container ObjectIDs (long) that will be processed: Syntax: Example: |
| For the case you want the layout algorithm to apply to a diagram part, a list of edge ObjectIDs (long) that will be processed: Syntax: Example: |
| A boolean statement that specifies whether the layout algorithm will run synchronously or asynchronously.
Syntax: Example: |
|
The response format. The default response format is html. Values: |
Example Usage
Applying the SmartTree layout algorithm with its default parameters on the entire DiagramTest2 diagram resource content; this diagram being stored in version ABV1; that is:
-
URL:
https
://myserver.esri.com/server/rest/services/ Naperville/ Network Diagram Server/diagrams/ Diagram Test2/apply Layout -
Parameters:
Use dark colors for code blocks Copy gdbVersion=ABV1 sessionId= layoutName=SmartTreeDiagramLayout layoutParams= junctionObjectIDs= containerObjectIDs= edgeObjectIDs= async= f=pjson
-
Sent URL (GET):
https
://myserver.esri.com/server/rest/services/ Naperville/ Network Diagram Server/diagrams/ Diagram Test2/apply Layout?gdb Version= AB V1&session Id=&layout Name= Smart Tree Diagram Layout&layout Params=&junction Object I Ds=&container Object I Ds=&edge Object I Ds=&async=&f=pjson
JSON Response Syntax
A JSON object composed of a Diagram JSON Information object and a moment: {"diagram
JSON Response Example
Sample response when synchronously applying a layout
{
"diagramInfo": {
"tag": "",
"isStored": true,
"canStore": false,
"canExtend": true,
"isSystem": false,
"creator": "acb7352",
"creationDate": 1505145950000,
"lastUpdateBy": "acb7352",
"lastUpdateDate": 1505215730000,
"containerMargin": 0.5,
"junctionCount": 10,
"edgeCount": 12,
"containerCount": 0,
"aggregationCount": 0,
"isHistorical": false,
"access": "esriDiagramPublicAccess",
"diagramExtent": {
"xmin": 6807604.6431991458,
"ymin": 1848131.8394459635,
"xmax": 6807794.5801552236,
"ymax": 1848226.8080880493,
"spatialReference": {
"wkid": 3498,
"latestWkid": 3498
}
},
"networkExtent": {
"xmin": 6807604.6431991458,
"ymin": 1847967.7367558032,
"xmax": 6808661.8976463079,
"ymax": 1848650.1848659664,
"spatialReference": {
"wkid": 3498,
"latestWkid": 3498
}
},
"name": "DiagramTest2",
"id": "{856490C7-ED84-44FE-8EC8-5DA4B39365C0}",
"template": "Basic"
},
"moment": 1505217369240
}
Sample response when asynchronously applying a layout; that is with async=true
{
"statusUrl": "https://myserver.esri.com/server/rest/services/Naperville/UtilityNetworkServer/jobs/j03f449a0ece143f1bfc6cc676e3c4cca"
}