- URL:
- https://<root>/<serviceName>/NetworkDiagramServer/templates/<templateName>
- Methods:
POST
- Version Introduced:
- 10.6
Description
The Template resource represents a single diagram template under a Network Diagram service. It is returned as a JSON object that provides the list of the diagram layouts and their property sets, which are preset for the template.
The Template resource doesn't support any operation nor any child resource.
Request parameters
Parameter | Details |
---|---|
|
The name of the geodatabase version. Syntax: Example: |
|
The token (guid) used to lock the version. Syntax: Example: |
|
The response format. The default response format is html. Values: |
Example usage
Access the Basic template REST end point:
-
URL:
https:
//myserver.esri.com/server/rest/services/Naperville/Network Diagram Server/templates/Basic -
Parameters
Use dark colors for code blocks Copy gdbVersion= sessionId= f=pjson
-
Sent URL (GET):
https:
//myserver.esri.com/server/rest/services/Naperville/Network Diagram Server/templates/Basic?gdb Version=&session Id=&f=pjson
.
JSON Response syntax
{
"description": "< templateDescription >",
"enableDiagramStorage": < true | false >,
"enableDiagramExtend": < true | false >,
"creationDate": < templateCreationDate >,
"lastUpdateDate": < templateLastUpdateDate >,
"usedByATier": < true | false>,
"containerMargin": 0.5,
"layoutParams": {
"<algo1Name>:{
"type": "PropertySet",
"propertySetItems": [
"algo1ParamName1", < algo1ParamValue1 >,
…,
"algo1ParamNameN", < algo1ParamValueN >
]
},
…,
"<algoKName>:{
"type": "PropertySet",
"propertySetItems": [
"algoKParamName1", < algoKParamValue1 >,
…,
"algoKParamNameP", < algoKParamValueP >
]
}
}
}
JSON Response example
{
"description": "Add containers, connectivity associations, and structural attachments.",
"enableDiagramStorage": true,
"enableDiagramExtend": true,
"creationDate": -2209161600000,
"lastUpdateDate": 1523346184000,
"usedByATier": true,
"containerMargin": 0.5,
"layoutParams": {
"AngleDirectedDiagramLayout": {
"type": "PropertySet",
"propertySetItems": [
"are_containers_preserved",
false,
"is_active",
false,
"iterations_number",
1,
"number_of_directions",
8
]
},
"CompressionDiagramLayout": {
"type": "PropertySet",
"propertySetItems": [
"are_containers_preserved",
true,
"is_active",
false,
"grouping_distance",
20,
"vertices_removal_rule",
2
]
},
"ForceDirectedDiagramLayout": {
"type": "PropertySet",
"propertySetItems": [
"are_containers_preserved",
false,
"is_active",
false,
"iterations_number",
20,
"repel_factor",
1,
"degree_freedom",
1,
"edge_display_type",
0,
"breakpoint_position",
0.29999999999999999
]
},
"GeoPositionsDiagramLayout": {
"type": "PropertySet",
"propertySetItems": [
"is_active",
false,
"restore_edges_geo_positions",
true
]
},
"GridDiagramLayout": {
"type": "PropertySet",
"propertySetItems": [
"are_containers_preserved",
false,
"is_active",
false,
"cell_width",
2,
"cell_height",
2
]
},
"LinearDispatchDiagramLayout": {
"type": "PropertySet",
"propertySetItems": [
"is_unit_absolute",
false,
"is_active",
false,
"junction_placement_type",
1,
"maximum_shift",
2,
"minimum_shift",
2,
"iterations_number",
5,
"is_path_preserved",
true,
"are_leaves_moved",
false,
"are_leaves_expanded",
false,
"expand_shift",
2
]
},
"MainLineTreeDiagramLayout": {
"type": "PropertySet",
"propertySetItems": [
"are_containers_preserved",
false,
"is_active",
false,
"is_unit_absolute",
false,
"tree_direction",
2,
"branches_placement",
2,
"perpendicular",
2,
"along",
2,
"disjoined_graph",
4,
"are_edges_orthogonal",
false,
"breakpoint_position",
0.29999999999999999,
"edge_display_type",
0
]
},
"MainRingDiagramLayout": {
"type": "PropertySet",
"propertySetItems": [
"are_containers_preserved",
false,
"is_active",
false,
"is_unit_absolute",
false,
"ring_type",
1,
"tree_type",
4,
"edge_display_type",
0,
"ring_width",
50,
"ring_height",
20,
"perpendicular",
2,
"along",
2,
"breakpoint_position",
0.29999999999999999
]
},
"PartialOverlappingEdgesDiagramLayout": {
"type": "PropertySet",
"propertySetItems": [
"is_active",
false,
"buffer_width",
1,
"offset",
0.5,
"optimize_edges",
false
]
},
"RadialTreeDiagramLayout": {
"type": "PropertySet",
"propertySetItems": [
"are_containers_preserved",
false,
"is_active",
false,
"is_unit_absolute",
false,
"initial_radius",
5,
"disjoined_graph",
10,
"radius_factor",
1
]
},
"RelativeMainlineDiagramLayout": {
"type": "PropertySet",
"propertySetItems": [
"are_containers_preserved",
false,
"is_active",
false,
"is_unit_absolute",
true,
"perpendicular",
2,
"minimalDistance_absolute",
0,
"breakpoint_angle",
45,
"compression_ratio",
0,
"is_using_length_attribute",
false,
"is_compressing",
false,
"is_using_line_type_attribute",
false,
"is_using_priority_attribute",
false,
"line_attribute_name",
"",
"line_type_attribute_name",
"",
"main_line_value",
"",
"excluded_line_values",
"",
"priority_attribute_name",
"",
"priority_value",
"",
"length_attribute_name",
"",
"mainline_direction",
2
]
},
"ReshapeEdgesDiagramLayout": {
"type": "PropertySet",
"propertySetItems": [
"are_containers_preserved",
false,
"is_active",
false,
"reshape_type",
1,
"is_path_preserved",
true,
"angle_threshold",
0,
"shift_between_edge",
0.5,
"offset_between_segment",
5,
"breakpoint",
8.6600000000000001
]
},
"RotateTreeDiagramLayout": {
"type": "PropertySet",
"propertySetItems": [
"are_containers_preserved",
false,
"is_active",
false,
"rotation_angle",
45
]
},
"SeparateOverlappingEdgesDiagramLayout": {
"type": "PropertySet",
"propertySetItems": [
"are_containers_preserved",
false,
"is_active",
false,
"shift_between_edge",
0.5
]
},
"SmartTreeDiagramLayout": {
"type": "PropertySet",
"propertySetItems": [
"are_containers_preserved",
false,
"is_active",
false,
"is_unit_absolute",
false,
"tree_direction",
2,
"subtree",
2,
"perpendicular",
2,
"along",
2,
"disjoined_graph",
4,
"are_edges_orthogonal",
false,
"breakpoint_position",
0.29999999999999999,
"edge_display_type",
0
]
},
"SpatialDispatchDiagramLayout": {
"type": "PropertySet",
"propertySetItems": [
"are_containers_preserved",
false,
"is_active",
false,
"iterations_number",
5,
"maximum_shift_factor",
2
]
}
}
}