Diagram

Description

The Diagram resource represents a diagram under a Network Diagram service. It is returned as a JSON Diagram Information object.

It supports three child resources:

  • Diagram Map—Mimics a map service resource for the network diagram.
  • Dynamic Layers—Describes the sublayers under the diagram layer.
  • Layer Definitions—Details the layer and labeling properties that define each sublayer under the diagram layer.

It also supports a large set of operations:

  • overwriteFromFeatures—Overwrites the diagram content from a set of network element Global IDs.
  • appendFeatures—Appends a set of network elements to the diagram.
  • update—Updates the diagram content; that is, it reflects any changes that may have impacted the network elements that have been used to build the diagram.
  • extend—Extends the diagram content one feature level by connectivity, traversability, containment, or attachment.
  • store—Stores the temporary network diagram resource in the database.
  • findNetworkFeatures—Searches for the network elements associated with the set of diagram features referenced in the diagram.
  • findDiagramFeatures—Searches for the diagram features referenced in the diagram that are associated with a set of network elements or a set of diagram features represented in another diagram.
  • getAggregations—Returns the list of the diagram aggregations represented in the diagram.
  • saveLayout—Saves new geometries that may have been computed for a set of diagram features represented in the diagram.
  • applyLayout—Applies a diagram layout algorithm to the diagram.
  • applyTemplateLayouts—Applies the list of the layout algorithms configured on the template.
  • manageFlag—Adds or removes a flag on a particular diagram feature.
  • clearFlags—Clears all the flags in the diagram.
  • getFlags—Retrieves all the flags in the diagram.
  • queryAttributesBySource—Retrieves the value of the attributes you want from the specified network source class or network source table for each network feature or network object represented in the diagram.
  • queryDiagramContent—Returns the diagram content in a simple format that reflects basic connectivity. It can also return extra information such as diagram feature geometry, utility network elements attributes, aggregated elements, and diagram properties.
  • queryDiagramElementsByExtent—Retrieves the set of diagram features represented in the diagram that intersect a specified envelope.
  • queryDiagramElementsByObjectIDs—Retrieves the set of diagram features represented in the diagram with the specified ObjectIDs.
  • queryFeatureAttributes—Retrieves the attribute values you want for the network features or network objects represented in the diagram whether they are aggregated.
  • setDiagramElementInfo——Sets Info field values for the specified diagram features represented in the diagram.
  • getDiagramElementInfo——Returns the Info field values for the specified diagram elements in the diagram.
  • clearDiagramElementInfo—Clears the Info field values for all diagram elements in the diagram.
Diagram REST endpoint

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

moment

The session moment.

Syntax: moment=<moment>

Example: moment=1490867969324

f

The response format. The default response format is html.

Values: <html | json>

Example usage

Accessing the DiagramTest1 REST endpoint in Default:

  • URL: https://myserver.esri.com/server/rest/services/Naperville/NetworkDiagramServer/diagrams/DiagramTest1
  • Parameters: f=pjson
  • Sent URL (GET): https://myserver.esri.com/server/rest/services/Naperville/NetworkDiagramServer/diagrams/DiagramTest1?f=pjson

Accessing the DiagramTest1 REST endpoint in a specific version named 'ABV1':

  • URL: https://myserver.esri.com/server/rest/services/Naperville/NetworkDiagramServer/diagrams/DiagramTest1

  • Parameters:

    Use dark colors for code blocksCopy
    1
    2
    gdbversion=ABV1
    f=pjson
  • Sent URL (GET): https://myserver.esri.com/server/rest/services/Naperville/NetworkDiagramServer/diagrams/DiagramTest1?gdbversion=ABV1&f=pjson

JSON Response syntax

A JSON Diagram Information object.

JSON Response example

Use dark colors for code blocksCopy
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
{
 "tag": "#ElectricDistribution#RMT001#Medium Voltage Radial",
 "isStored": true,
 "isSystem": true,
 "creator": "acb7352",
 "creationDate": 1503062040000,
 "lastUpdateBy": "acb7352",
 "lastUpdateDate": 1503062040000,
 "containerMargin": 0.5,
 "junctionCount": 5701,
 "edgeCount": 6264,
 "containerCount": 668,
 "aggregationCount": 0,
 "access": "esriDiagramPublicAccess",
 "diagramExtent": {
  "xmin": 1027304.9786740914,
  "ymin": 1862504.1933266893,
  "xmax": 1036507.4494423419,
  "ymax": 1869488.4421534389,
  "spatialReference": {
   "wkid": 102671,
   "latestWkid": 3435
  }
 },
 "networkExtent": {
  "xmin": 1027304.9786740914,
  "ymin": 1862504.1933266893,
  "xmax": 1036507.4494423419,
  "ymax": 1869488.4421534389,
  "spatialReference": {
   "wkid": 102671,
   "latestWkid": 3435
  }
 },
 "name": "DiagramTest1",
 "id": "{6F1E9192-A2C4-401D-B044-C02BBC99BE3A}",
 "template": "Basic"
}

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