Query Diagram Elements By ObjectIDs (Network Diagrams)

  • URL:http://<diagram-url>/queryDiagramElementsByObjectIDs
  • Version Introduced: 10.6

Description

The queryDiagramElementsByObjectIDs operation is performed on a Diagram resource. The result of this operation is a JSON object composed of three arrays—one for the resulting diagram junctions, one other for the resulting diagram edges and the third one for the diagram containers.

It returns the set of diagram features—that is, diagram junctions, diagram edges and/or diagram containers—represented in the diagram resource with the specified ObjectIDs. Then when specifying diagram edge ObjectIDs, optionally extent the resulting set of diagram elements to the junctions they are connected to, or when specifying diagram container ObjectIDs, optionally extent the resulting set of diagram elements to the edge, junction and/or container diagram elements they contain.

License:
The ArcGIS Utility Network Management extension is required to use this operation.

Request Parameters

ParameterDetails
gdbVersion

Description: The name of the geodatabase version.

Syntax: gdbVersion=<version>

Example: gdbVersion=ABV1

sessionId

Description: The token (guid) used to lock the version.

Syntax: sessionId=<guid>

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

moment

Description: The session moment.

Syntax: moment=<moment>

Example: moment=1490867969324

addConnected

Description: Boolean.

  • False—Doesn't enlarge the returned diagram junctions to those which are "from" or "to" junctions of the specified edgeObjectIDs (default),
  • True—Enlarges the returned diagram junctions to those which are "from" or "to" junctions of the specified edgeObjectIDs.

Syntax: addConnected=<true | false>

Example: addConnected=true

returnGeometry

Description: Boolean.

  • True—to return each queried diagram feature with its geometry (default),
  • False—to return each queried diagram feature without its geometry.

Syntax: returnGeometry=<true | false>

Example: returnGeometry=true

junctionObjectIDs

Description: List of junction ObjectIDs (long) that must be queried.

Syntax: junctionObjectIDs=[<DiagJctOid1>, …, <DiagJctOidN]

Example: junctionObjectIDs=[1,2,3,4,5]

containerObjectIDs

Description: List of container ObjectIDs (long) that must be queried.

Syntax: containerObjectIDs=[<DiagConOid1>, …, <DiagConOidN]

Example: containerObjectIDs=[1]

edgeObjectIDs

Description: List of edge ObjectIDs (long) that must be queried.

Syntax: edgeObjectIDs=[<DiagEdgOid1>, …, <DiagEdgOidN]

Example: edgeObjectIDs=[1,2,3]

f

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

Values: <html | json>

Example Usage

Querying the container which diagram ObjectID is 917 in the Basic_RMT003 diagram and all its contents: http://batz.esri.com/server/rest/services/Naperville/NetworkDiagramServer/diagrams/Basic_RMT003/queryDiagramElementsByObjectIDs?gdbVersion=&sessionId=&moment=&addContents=true&addConnected=&returnGeometry=&junctionObjectIDs=&containerObjectIDs=%5B917%5D&edgeObjectIDs=&f=pjson

Querying the edge which diagram ObjectID is 6563 in the Basic_RMT003 diagram and the junctions it is connected to: http://batz.esri.com/server/rest/services/Naperville/NetworkDiagramServer/diagrams/Basic_RMT003/queryDiagramElementsByObjectIDs?gdbVersion=&sessionId=&moment=&addContents=&addConnected=true&returnGeometry=&junctionObjectIDs=&containerObjectIDs=&edgeObjectIDs=%5B6563%5D&f=pjson

JSON Response Syntax

A JSON object composed of three arrays:

  • An array of <diagramJunction> JSON objects,
  • An array of <diagramEdge> JSON objects,
  • An array of <diagramContainer> JSON objects.

{
 "diagramJunctions": [<diagramJunction1>, ..., < diagramJunctionK>],
 "diagramEdges": [<diagramEdge1>, ..., < diagramEdgeM>],
 "diagramContainers": [<diagramContainer1>, ..., <diagramContainerN>]
}

Wth the following JSON object syntaxes:

  • <diagramJunction> JSON object syntax:
    {
     "id": <ID>, //int
     "containerID": <containerID>, //int
     "featureOID": <jctOID>, //int
     "globalID": <diagFeatureGUID>, // string
     "assocSourceID": <assUNSourceID>, //int
     "assocGlobalID": "<assUNfeatureGUID>", // string
     "geometry": {
       "x": <x>, //double
       "y": <y>, //double
       "z": <z>, //double
       "m": <m> //double
     },
     "rotation": <rotation> //int
    }
  • <diagramEdge> JSON object syntax:
    {
     "id": <ID>, // long
     "containerID": <containerID>, // long
     "featureOID": <edgeOID>, // long
     "globalID": <diagFeatureGUID>, // string
     "assocSourceID": <assUNSourceID>, // long
     "assocGlobalID": "<assUNfeatureGUID>", // string
     "geometry": {
      "hasM" : < true | false >,
      "paths" : [[[<x11>, <y11>, <z11>, <m11>],…,[<x1N>, <y1N>, <z1N>, <m1N>]],
                 ,…,[[<xk1>, <yk1>, <zk1>, <mk1>],…,[<xkM>, <ykM>, <zkM>, <mkM>]]]},
     "fromID": <FromID>, // long
     "toID": <ToID>, // long
    }
  • <diagramContainer> JSON object syntax:
    {
     "id": <ID>, //int
     "containerID": <containerID>, // long
     "featureOID": <containerOID>, // long
     "globalID": <diagFeatureGUID>, // string
     "assocSourceID": <assUNSourceID>, // long
     "assocGlobalID": "<assUNfeatureGUID>", // string
     "geometry": {
       "hasZ" : true | false,
       "hasM" : true | false,
       "rings" : [[[<x11>, <y11>, <z11>, <m11>],...,[<x1N>, <y1N>, <z1N>, <m1N>]],
                 ,...,[[<xk1>, <yk1>, <zk1>, <mk1>],...,[<xkM>, <ykM>, <zkM>, <mkM>]]],
      }
    }

JSON Response Example

Sample response when returnGeometry is True (default)

{
 "diagramJunctions": [
  {
   "id": 34,
   "containerID": 33,
   "featureOID": 5730,
   "globalID": "{1D295458-E0C9-4DA9-BC48-C816D1919FCC}",
   "assocSourceID": 6,
   "assocGlobalID": "{16F7006D-A5C2-4224-BD48-82729CB9D2A4}",
   "rotation": 0,
   "geometry": {
    "x": 1027036.95854084566,
    "y": 1864282.70584578067,
    "m": null
   }
  },
  {
   "id": 35,
   "containerID": 33,
   "featureOID": 5731,
   "globalID": "{32830EEF-492E-4E21-9493-B619E234841C}",
   "assocSourceID": 6,
   "assocGlobalID": "{2C80026C-3D06-478C-91C5-B7966EAE23C3}",
   "rotation": 0,
   "geometry": {
    "x": 1027036.81319992989,
    "y": 1864282.90827319771,
    "m": null
   }
  }
 ],
 "diagramEdges": [
  {
   "id": 4568,
   "containerID": 0,
   "featureOID": 6563,
   "globalID": "{5C98D3A4-0E43-4324-8B87-A17DB78290FC}",
   "assocSourceID": 1,
   "assocGlobalID": "{FCC2BE31-C3DE-4C5D-9E48-1CA36EBA3961}",
   "fromID": 35,
   "toID": 34,
   "geometry": {
    "hasM": true,
    "paths": [
     [
      [
       1027036.81319992989,
       1864282.90827319771,
       null
      ],
      [
       1027036.95854084566,
       1864282.70584578067,
       null
      ]
     ]
    ]
   }
  }
 ],
 "diagramContainers": [
  
 ]
}

Sample response when returnGeometry is False

{
 "diagramJunctions": [
  {
   "id": 34,
   "containerID": 33,
   "featureOID": 5730,
   "globalID": "{1D295458-E0C9-4DA9-BC48-C816D1919FCC}",
   "assocSourceID": 6,
   "assocGlobalID": "{16F7006D-A5C2-4224-BD48-82729CB9D2A4}",
   "rotation": 0
  },
  {
   "id": 35,
   "containerID": 33,
   "featureOID": 5731,
   "globalID": "{32830EEF-492E-4E21-9493-B619E234841C}",
   "assocSourceID": 6,
   "assocGlobalID": "{2C80026C-3D06-478C-91C5-B7966EAE23C3}",
   "rotation": 0
  }
 ],
 "diagramEdges": [
  {
   "id": 4568,
   "containerID": 0,
   "featureOID": 6563,
   "globalID": "{5C98D3A4-0E43-4324-8B87-A17DB78290FC}",
   "assocSourceID": 1,
   "assocGlobalID": "{FCC2BE31-C3DE-4C5D-9E48-1CA36EBA3961}",
   "fromID": 35,
   "toID": 34
  }
 ],
 "diagramContainers": [
  
 ]
}