- URL:
- https://<root>/<serviceName>/NetworkDiagramServer/diagrams/<diagramName>/applyTemplateLayouts
- Methods:
- POST
- Version Introduced:
- 10.6
Description
The apply operation re-applies the list of the layout algorithms configured on the template the diagram is based on. It is performed on a Diagram resource. The result of this operation is a Diagram JSON Information object, and the moment 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:  | 
| 
 | For the case you want the template layout algorithms to apply to a diagram part, list of junction ObjectIDs (long) that will be processed: Syntax:  Example:  | 
| 
 | For the case you want the template layout algorithms to apply to a diagram part, a list of container ObjectIDs (long) that will be processed: Syntax:  Example:  | 
| 
 | For the case you want the template layout algorithms to apply to a diagram part, a list of edge ObjectIDs (long) that will be processed: Syntax:  Example:  | 
| 
 | The response format. The default response format is html. Values:  | 
Example Usage
Re-applying the set of diagram layout configured on the template on the DiagramTest1 diagram in ABV1 version; that is:
- 
URL: https://myserver.esri.com/server/rest/services/Naperville/Network Diagram Server/diagrams/Diagram Test1/apply Template Layouts 
- 
Parameters: Use dark colors for code blocks Copy gdbVersion=ABV1 sessionId= junctionObjectIDs= containerObjectIDs= edgeObjectIDs= f=pjson
- 
Sent URL (GET): https://myserver.esri.com/server/rest/services/Naperville/Network Diagram Server/diagrams/Diagram Test1/apply Template Layouts?gdb Version=ABV1&session Id=&junction Object IDs=&container Object IDs=&edge Object IDs=&f=pjson 
JSON Response Syntax
A JSON object composed of a Diagram JSON Information object and the moment (date) the applyTemplateLayouts operation happens for a stored diagram: {"diagram
JSON Response Example
{
 "diagramInfo": {
  "tag": "",
  "isStored": true,
  "isSystem": false,
  "creator": "acb7352",
  "creationDate": 1480322602000,
  "lastUpdateBy": "acb7352",
  "lastUpdateDate": 1480510663000,
  "containerMargin": 0.5,
  "junctionCount": 12,
  "edgeCount": 10,
  "containerCount": 2,
  "aggregationCount": 0,
  "access": "esriDiagramPublicAccess",
  "diagramExtent": {
   "xmin": 1034510.9868998453,
   "ymin": 1871808.4880382791,
   "xmax": 1034521.2178505138,
   "ymax": 1871862.6050560325,
   "spatialReference": {
    "wkid": 102671,
    "latestWkid": 3435
   }
  },
  "networkExtent": {
   "xmin": 1034510.9868998453,
   "ymin": 1871808.4880382791,
   "xmax": 1034521.2178505138,
   "ymax": 1871862.6050560325,
   "spatialReference": {
    "wkid": 102671,
    "latestWkid": 3435
   }
  },
  "name": "DiagramTest1",
  "id": "{5330ED92-B6CE-4EF7-9A10-E4D5BF77582B}",
  "template": "ExpandContainers"
 },
 "moment": 1490869536422
}