Generate Diagram

URL:
https://<root>/<serviceName>/MapServer/exts/SchematicServer/templates/<tempID>/generateDiagram
Methods:
POST
Version Introduced:
10.1

Description

The generateDiagram operation creates a new Schematic Diagram resource. It is performed on a Schematic Diagram Template resource. The result of this operation is a Schematic Diagram Information Object. It is used to generate a new diagram.

You can provide arguments to the generateDiagram operation as query parameters defined in the parameters table below.

Request parameters

ParameterDetails

f

Description: The response format. The default response format is html.

Values: html | json

name

Required

Description: The diagram name.

Syntax:name=<diagramName>

Example:name=MyTestDiagram

user

Required

Description: The diagram creator.

Syntax:user=<diagramCreator>

Example:user=NCA3885

folderID

Description: The ID of the folder in which the generated diagram will be stored.

This parameter is optional. If it is not specified, the generated diagram is stored at the schematic dataset root.

Syntax:folderID=<diagramFolderID>

Example:folderID=1

builderContext

Required

Description: The context for the builder which updates the diagram.

This parameter syntax depends on the diagram builder:

  • Diagrams based on the Standard builder that are generated from a set of GIS features/objects

    In that case, the operation expects the lists of the input GIS feature/object IDs per feature class/object table, and those features/objects version:

    Syntax:

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    builderContext={
      //The lists of the input GIS feature/object IDs per feature class/object table from which the diagram must be generated
      "initialObjects": [
        {
          "objectClassName" : "<objectClass1Name>",
          "objectIDs" : [ID11, ..., IDN]
        },
        ...,
        {
          "objectClassName" : "<objectClassNName>",
          "objectIDs" : [ID1, ..., IDM]
        }
      ],
      //The SDE database reference version for those input GIS features/objects
      "version": "<version>"
    }

    Example:

    builderContext={"initialObjects": [{"objectClassName": "PipelinesDatabase.SDE.pug_PUG_gas_plants", "objectIDs": [3]}], "version":"sde.DEFAULT"}

  • Diagrams based on the Standard builder that are entirely built from custom queries

    In that case, the operation expects an empty list of initial objects:

    Syntax:

    builderContext={"initialObjects": []}

    Example:

    builderContext={"initialObjects": []}

  • Diagrams based on the XML builder

    In that case, the operation expects the input XML data directly as a string.

    Syntax: builderContext=<XMLData>

    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
    builderContext=<Diagrams>
    	<Diagram DiagramTemplateName="SimpleXML">
    	<Features>
    	<NodeFeature>
    	<FeatureClassName>StationsFeeder1</FeatureClassName>
    	<ExternalUniqueID>NS1</ExternalUniqueID>
    	<InitialX>120067.5</InitialX>
    	<InitialY>4070755.8</InitialY>
    	</NodeFeature>
    	<NodeFeature>
    	<FeatureClassName>StationsFeeder1</FeatureClassName>
    	<ExternalUniqueID>NS2</ExternalUniqueID>
    	<InitialX>120090.5</InitialX>
    	<InitialY>4070788.8</InitialY>
    	</NodeFeature>
    	<LinkFeature>
    	<FeatureClassName>LV_Lines</FeatureClassName>
    	<ExternalUniqueID>LV1</ExternalUniqueID>
    	<FromNode>NS1</FromNode>
    	<ToNode>NS2</ToNode>
    	</LinkFeature>
    	</Features>
    	</Diagram>
    	</Diagrams>

JSON Response syntax

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
{
  "name": "<diagramName>",
  "id": "<diagramId>",
  "templateIdentifier": "<templateIdentifier>",
  "templateObjectID": <templateObjectID>,
  "schematicLayerIdentifier": <schematicLayerIdentifier>,
  "folderObjectID": <folderObjectID>,
  "folderIdentifier": "<folderIdentifier>",
  "objectID": <objectID>,
  "createdBy": "<diagramCreator>",
  "lastModificationBy": "<diagramLastEditor>",
  "lastUpdateBy": "<diagramLastUpdator>",
  "creationDate": "<diagramCreationDate>",
  "lastModificationDate": "<diagramModificationDate>",
  "lastUpdateDate": "<diagramLastUpdateDate>",
  "lockedBy": "<diagramLastLocker>",
  "version": "<version>",
  "extent": <envelope>,
  "rootNodes": [
    "<rootNode1>",
    ...,
    "<rootNodeN>"
  ],
  "endNodes": [
    "<endNode1>",
    ...,
    "<endNodeK>"
  ]
}

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
{
  "name": "DiagramFrom_pug_PUG_gas_plants_ID3",
   "id": "0-5",
   "templateIdentifier": "0",
   "templateObjectID": 892,
   "schematicLayerIdentifier": 0,
   "folderObjectID": -2,
   "folderIdentifier": "-2",
   "objectID": 5,
   "createdBy": "NCA3885",
   "lastModificationBy": "NCA3885",
   "lastUpdateBy": "",
   "creationDate": "05/13/11 14:13:57",
   "lastModificationDate": "05/13/11 14:13:57",
   "lastUpdateDate": "",
   "lockedBy": "",
   "version": "sde.DEFAULT",
   "extent": {
     "xmin": -37.342619999999989,
     "ymin": -11.398460000000886,
     "xmax": -37.342179999999097,
     "ymax": -11.398019999999997,
     "spatialReference": {
      "wkid": 4326,
      "latestWkid": 4326
     }
   }
}

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