Query Diagram Elements By ObjectIDs

URL:
https://<root>/<serviceName>/NetworkDiagramServer/diagrams/<diagramName>/queryDiagramElementsByObjectIDs
Methods:
POST
Version Introduced:
10.6

Description

The queryDiagramElementsByObjectIDs operation returns the set of diagram features represented in a diagram with the specified ObjectIDs. It 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, another for the resulting diagram edges, and the third one for the diagram containers.

It searches for the diagram junctions, diagram edges, or diagram containers in the diagram with the specified ObjectIDs. Then when specifying diagram edge ObjectIDs, optionally, extend the resulting set of diagram elements to the junctions they are connected to or when specifying diagram container ObjectIDs, optionally, extend the resulting set of diagram elements to the edge, junction, or container diagram elements they contain.

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

addConnected

A boolean statement that determines whether to add the from and to junctions for the specified edgeObjectIDs.

  • false—Doesn't enlarge the returned diagram junctions to those that are from or to junctions of the specified edgeObjectIDs (default)
  • true—Enlarges the returned diagram junctions to those that are from or to junctions of the specified edgeObjectIDs

Syntax: addConnected=<true | false>

Example: addConnected=true

returnGeometry

A boolean statement that determines whether to return the geometry for each queried diagram feature.

  • 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

List of junction ObjectIDs (long) that must be queried

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

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

containerObjectIDs

List of container ObjectIDs (long) that must be queried

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

Example: containerObjectIDs=[1]

edgeObjectIDs

List of edge ObjectIDs (long) that must be queried

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

Example: edgeObjectIDs=[1,2,3]

outSR

Description: The spatial reference of the returned geometry.

The spatial reference can be specified as either a well-known ID or as a spatial reference JSON object.

If outSR is not specified, the geometry is returned in the spatial reference of the map.

f

The response format. The default response format is html.

Values: <html | json>

Example usage

Query the container in which the diagram ObjectID is 917 in the Basic_RMT003 diagram and all its contents:

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

  • Parameters

    Use dark colors for code blocksCopy
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    gdbVersion=
    sessionId=
    moment=
    addContents=true
    addConnected=
    returnGeometry=
    junctionObjectIDs=
    containerObjectIDs=[917]
    edgeObjectIDs=
    outSR=
    f=pjson
  • Sent URL (GET): https://myserver.esri.com/server/rest/services/Naperville/NetworkDiagramServer/diagrams/Basic_RMT003/queryDiagramElementsByObjectIDs?gdbVersion=&sessionId=&moment=&addContents=true&addConnected=&returnGeometry=&junctionObjectIDs=&containerObjectIDs=%5B917%5D&edgeObjectIDs=&outSR=&f=pjson

Query the edge on which the diagram ObjectID is 6563 in the Basic_RMT003 diagram and the junctions it is connected to:

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

  • Parameters

    Use dark colors for code blocksCopy
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    gdbVersion=
    sessionId=
    moment=
    addContents=
    addConnected=true
    returnGeometry=
    junctionObjectIDs=
    containerObjectIDs=
    edgeObjectIDs=[6563]
    outSR=
    f=pjson
  • Sent URL (GET): https://myserver.esri.com/server/rest/services/Naperville/NetworkDiagramServer/diagrams/Basic_RMT003/queryDiagramElementsByObjectIDs?gdbVersion=&sessionId=&moment=&addContents=&addConnected=true&returnGeometry=&junctionObjectIDs=&containerObjectIDs=&edgeObjectIDs=%5B6563%5D&outSR=&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
Use dark colors for code blocksCopy
1
2
3
4
5
{
 "diagramJunctions": [< diagramJunction1 >, ..., < diagramJunctionK >],
 "diagramEdges": [< diagramEdge1 >, ..., < diagramEdgeM >],
 "diagramContainers": [< diagramContainer1 >, ..., < diagramContainerN >]
}

With the following JSON object syntaxes:

  • <diagramJunction> JSON object syntax
Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
{
 "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
   "spatialReference": < spatialReference >
 },
 "rotation": < rotation > //int
}
  • <diagramEdge> JSON object syntax

    Use dark colors for code blocksCopy
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    {
     "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 >]]],
       "spatialReference": < spatialReference >
     },
     "fromID": < FromID >, // long
     "toID": < ToID >, // long
    }
  • <diagramContainer> JSON object syntax

    Use dark colors for code blocksCopy
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    {
     "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 >]]],
       "spatialReference": < spatialReference >
      }
    }

JSON Response example

Sample response when returnGeometry is True (default)

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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
{
 "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,
    "spatialReference": {
     "wkid": 102671,
     "latestWkid": 3435,
     "vcsWkid": 105703,
     "latestVcsWkid": 6360
    }
   }
  },
  {
   "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,
    "spatialReference": {
     "wkid": 102671,
     "latestWkid": 3435,
     "vcsWkid": 105703,
     "latestVcsWkid": 6360
    }
   }
  }
 ],
 "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
      ]
     ]
    ],
    "spatialReference": {
     "wkid": 102671,
     "latestWkid": 3435,
     "vcsWkid": 105703,
     "latestVcsWkid": 6360
    }
   }
  }
 ],
 "diagramContainers": [

 ]
}

Sample response when returnGeometry is False

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
{
 "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": [

 ]
}

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