- URL:
- https://<root>/<serviceName>/NetworkDiagramServer/diagrams/<diagramName>/queryDiagramElementsByObjectIDs
- Methods:
POST
- Version Introduced:
- 10.6
Description
The query
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
Parameter | Details |
---|---|
|
The name of the geodatabase version. Syntax: Example: |
|
The token (guid) used to lock the version. Syntax: Example: |
|
The session moment. Syntax: Example: |
| A boolean statement that determines whether to add the from and to junctions for the specified
Syntax: Example: |
| A boolean statement that determines whether to return the geometry for each queried diagram feature.
Syntax: Example: |
| List of junction ObjectIDs (long) that must be queried Syntax: Example: |
| List of container ObjectIDs (long) that must be queried Syntax: Example: |
| List of edge ObjectIDs (long) that must be queried Syntax: Example: |
|
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 |
|
The response format. The default response format is html. Values: |
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/ Network Diagram Server/diagrams/ Basic _RM T003/query Diagram Elements By Object I Ds -
Parameters
Use dark colors for code blocks Copy 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/ Network Diagram Server/diagrams/ Basic _RM T003/query Diagram Elements By Object I Ds?gdb Version=&session Id=&moment=&add Contents=true&add Connected=&return Geometry=&junction Object I Ds=&container Object I Ds=%5 B917%5 D&edge Object I Ds=&out S R=&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/ Network Diagram Server/diagrams/ Basic _RM T003/query Diagram Elements By Object I Ds -
Parameters
Use dark colors for code blocks Copy 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/ Network Diagram Server/diagrams/ Basic _RM T003/query Diagram Elements By Object I Ds?gdb Version=&session Id=&moment=&add Contents=&add Connected=true&return Geometry=&junction Object I Ds=&container Object I Ds=&edge Object I Ds=%5 B6563%5 D&out S R=&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 >]
}
With 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
"spatialReference": < spatialReference >
},
"rotation": < rotation > //int
}
-
<diagramEdge> JSON object syntax
Use dark colors for code blocks Copy { "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 blocks Copy { "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)
{
"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
{
"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": [
]
}