- URL:
- https://<root>/<serviceName>/NetworkDiagramServer/diagrams/<diagramName>/queryFeatureAttributes
- Methods:
POST
- Version Introduced:
- 11.3
Description
The query
operation retrieves the attribute values you want for the network features or objects represented in your diagram whether they are aggregated. It is performed on a diagram resource. The result of this operation is a JSON object composed of three arrays—one listing the queried diagram element IDs, another precising whether each is aggregated, and the third one for their set of queried attribute values.
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: |
(Required) | The way the diagram elements for which you want to query attributes will be filtered out. The filtering can be processed in two different ways:
Syntax:
Example:
|
(Required) | An array of attribute names or attribute alias names to query. |
| A boolean statement that determines whether to include the aggregations.
Syntax: Example: |
| A boolean statement that determines whether to export coded domain and subtype values using their string descriptions rather than raw values. The method to use to export coded domain and subtype values:
Syntax: Example: |
|
The response format. The default response format is html. Values: |
Example usage
Query attributes on network elements aggregated under a the reduced edge which objectID is 8764 in the diagram TestDiagram1:
-
URL:
https:
//myserver.esri.com/server/rest/services/Naperville Electric/Naperville_ Electric_ SQL_50898/Network Diagram Server/diagrams/Test Diagram1/query Feature Attributes -
Parameters:
Use dark colors for code blocks Copy gdbVersion= sessionId= moment= diagramElementFilter={"type": "filterBySelection", "junctionObjectIDs":[], "edgeObjectIDs":[8764], "containerObjectIDs":[]} attributes=["Asset Group", "Phases Normal", "Measured Length"] includeAggregations=True useValueNames=True
-
Sent URL (GET):
https:
//myserver.esri.com/server/rest/services/Naperville Electric/Naperville_ Electric_ SQL_50898/Network Diagram Server/diagrams/Test Diagram1/query Feature Attributes?gdb Version=&session Id=&moment=&diagram Element Filter=%7B%22type%22%3A+%22filter By Selection%22%2C+%22junction Object IDs%22%3A%5B%5D%2C+%22edge Object IDs%22%3A%5B8764%5D%2C+%22container Object IDs%22%3A%5B%5D%7D&attributes=%5B%22Asset+Group%22%2C+%22Phases+Normal%22%2C+%22Measured+Length%22%5D&include Aggregations=True&use Value Names=True&f=pjson
JSON Response syntax
A JSON object composed of three arrays of values:
diagram
—An array of Diagram Element IDs.Element IDs aggregation
—An array of aggregation flags; 1 or 0 that tells whether each diagram element is aggregated.Flags attribute
—An array of attribute values corresponding to the requested attributes for each diagram element.Values
{
"diagramElementIDs": [
<DEID_1>,
...,
<DEID_N>
],
"aggregationFlags": [
<0 | 1>,
...,
<0 | 1>
],
"attributeValues": [
<Value1_1,..., Value1_M,
...,
<ValueN_1,..., ValueN_M
]
}
JSON Response example
{
"diagramElementIDs": [
6,
6,
6
],
"aggregationFlags": [
1,
1,
1
],
"attributeValues": [
"Low Voltage Lighting",
"C",
null,
"Low Voltage Conductor",
"C",
102.19814047,
"Low Voltage Conductor",
"C",
92.122638280000004
]
}