Save Layout

URL:
https://<root>/<serviceName>/NetworkDiagramServer/diagrams/<diagramName>/saveLayout
Methods:
POST
Version Introduced:
10.6

Description

The saveLayout operation applies and saves new geometries that may have been computed for a set of diagram features represented in 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 saveLayout operation happens for a stored diagram.

Request Parameters

ParameterDetails

gdbVersion

The name of the geodatabase version.

Syntax: gdbVersion=<version>

Example: gdbVersion=ABV1

sessionId

The token (guid) used to lock the version.

Syntax: sessionId=<guid>

Example: sessionId=44G259DE-87B0-407D-8F2E-DCB7665DD0F0

junctions

An array of couples {"ID": <jctDEID>,"geometry": <geometry>} providing the new geometry for each edited junction, those diagram junctions being identified thanks to their Diagram Element ID.

Syntax: junctions=[{"ID": <jctDEID1>,"geometry": <geometry1>}, ..., {"ID": <jctDEIDN>,"geometry": <geometryN>}]

Example: junctions=[{"ID": 20,"geometry": { "x": 1034520.83268067986, "y": 1871861.38327369839, "m": null }}]

containers

An array of couples {"ID": <containerDEID>,"geometry": <geometry>} providing the new geometry for each edited container, those diagram containers being identified thanks to their Diagram Element ID.

Syntax: containers=[{"ID": <containerDEID1>,"geometry": <geometry1>}, ..., {"ID": <containerDEIDN>,"geometry": <geometryN>}]

Example: containers=[{"ID": 9,"geometry": { "rings": [ [ [ 1034515.52888551354, 1871859.37343519926 ], [ 1034515.52888551354, 1871863.10505503416 ], [ 1034521.71784951165, 1871863.10505503416 ], [ 1034521.71784951165, 1871859.37343519926 ], [ 1034515.52888551354, 1871859.37343519926 ] ] ] } }]

edges

An array of couples {"ID": <edgeDEID>,"geometry": <geometry>} providing the new geometry for each edited edge, those diagram edges being identified thanks to their Diagram Element ID.

Syntax: edges=[{"ID": <edgeDEID1>,"geometry": <geometry1>}, ..., {"ID": <edgeDEIDN>,"geometry": <geometryN>}]

Example: edges=[{"ID": 14,"geometry": { "hasM": true, "paths": [ [ [ 1034511.2372274287, 1871861.25893011689, null ], [ 1034511.31760784611, 1871808.48803827912, null ] ] ] } }]

f

The response format. The default response format is html.

Values: <html | json>

Example Usage

Applying and saving a new geometry for the container which diagram element ID is 11 in the diagram DiagramTest3 in version ABV1; that is:

  • URL: https://myserver.esri.com/server/rest/services/QuickStart/NetworkDiagramServer/diagrams/DiagramTest3/saveLayout

  • Parameters:

    1
    2
    3
    4
    5
    6
    gdbVersion=ABV1
    sessionId=
    junctions=
    containers=["ID"=11,"geometry"={"rings": [[[6808810.40423905849,1847930.7971971333],[6808810.40423905849,1847931.79719513655],[6808847.84379673,1847931.79719513655],[6808847.84379673,1847930.7971971333],[6808810.40423905849,1847930.7971971333]]]}}]
    edges=
    f=pjson
  • Sent URL (GET): https://myserver.esri.com/server/rest/services/QuickStart/NetworkDiagramServer/diagrams/DiagramTest3/saveLayout?gdbVersion=ABV1&sessionId=&junctions=&containers=%5B%22ID%22%3D11%2C%22geometry%22%3D%7B%22rings%22%3A+%5B%5B%5B6808810.40423905849%2C1847930.7971971333%5D%2C%5B6808810.40423905849%2C1847931.79719513655%5D%2C%5B6808847.84379673%2C1847931.79719513655%5D%2C%5B6808847.84379673%2C1847930.7971971333%5D%2C%5B6808810.40423905849%2C1847930.7971971333%5D%5D%5D%7D%7D%5D&edges=&f=pjson

:

JSON Response Syntax

A JSON object composed of a Diagram JSON Information object and a moment: {"diagramInfo": , "moment": <moment>}

JSON Response Example

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
{
 "diagramInfo": {
  "tag": "",
  "isStored": true,
  "canStore": false,
  "canExtend": true,
  "isSystem": false,
  "creator": "acb7352",
  "creationDate": 1505219137000,
  "lastUpdateBy": "acb7352",
  "lastUpdateDate": 1505219137000,
  "containerMargin": 0.5,
  "junctionCount": 11,
  "edgeCount": 10,
  "containerCount": 1,
  "aggregationCount": 0,
  "isHistorical": false,
  "access": "esriDiagramPublicAccess",
  "diagramExtent": {
   "xmin": 6807591.7656002343,
   "ymin": 1847967.7367558032,
   "xmax": 6808661.8976463079,
   "ymax": 1848650.1848659664,
   "spatialReference": {
    "wkid": 3498,
    "latestWkid": 3498
   }
  },
  "networkExtent": {
   "xmin": 6807591.7656002343,
   "ymin": 1847967.7367558032,
   "xmax": 6808661.8976463079,
   "ymax": 1848650.1848659664,
   "spatialReference": {
    "wkid": 3498,
    "latestWkid": 3498
   }
  },
  "name": "DiagramTest3",
  "id": "{033B675B-0DFF-4E82-85BC-85DD1235D42C}",
  "template": "Basic"
 },
 "moment": 1505221599567
}

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.

You can no longer sign into this site. Go to your ArcGIS portal or the ArcGIS Location Platform dashboard to perform management tasks.

Your ArcGIS portal

Create, manage, and access API keys and OAuth 2.0 developer credentials, hosted layers, and data services.

Your ArcGIS Location Platform dashboard

Manage billing, monitor service usage, and access additional resources.

Learn more about these changes in the What's new in Esri Developers June 2024 blog post.

Close