- URL:
- https://<root>/<serviceName>/NetworkDiagramServer/diagrams/<diagramName>/queryAttributesBySource
- Methods:
POST
- Version Introduced:
- 10.9.1
Description
The query
operation retrieves the value of the attributes you want on the specified network source class or object table for each network element represented in the diagram. It is performed on a diagram resource.
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 name or alias name of the network source class or table with the attributes to query. Syntax: Example: |
| Required An array of attribute names or attribute alias names to query. Syntax: Example: |
| A boolean statement that determines wheter 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: |
|
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
Retrieve the values of the attributes named "assetid", "assetgroup", "assettype", "issubnetworkcontroller", "subnetworkcontrollername", and "currentdevicestatus" on the "electricdevice" features represented in the "Electric Distribution Switching_RMT001" diagram resource:
-
URL:
https
://myserver.esri.com/server/rest/services/ Naperville Electric/ Naperville _Electric _PG _29104/ Network Diagram Server/diagrams/ Electric%20 Distribution%20 Switching _RM T001/query Attributes By Source -
Parameters:
Use dark colors for code blocks Copy gdbVersion= sessionId= moment= networkSourceName=electricdevice attributes=["assetid", "issubnetworkcontroller", "subnetworkcontrollername", "phasecurrent"] useValueNames= outSR= f=pjson
JSON Response syntax
A JSON object composed of "junctions" and "containers" arrays or "edges" array of JSON objects depending on the geometry of the corresponding diagram features w ith the following JSON object syntaxes:
[
{
"id": <id1>,
"attributes": {
"<attributeName1>": "<attributeName1Value>",
...,
"<attributeNameN>": "<attributeNameNValue>"
}
},
...
,
{
"id": <idN>,
"attributes": {
"<attributeName1>": "<attributeName1Value>",
...,
"<attributeNameN>": "<attributeNameNValue>"
}
}
]
JSON Response example
Sample response when the network features or objects in the specified source class or table are represented as junctions in the diagram:
{
"junctions": [
{
"id": 1,
"attributes": {
"assetid": "1",
"issubnetworkcontroller": "True",
"subnetworkcontrollername": "CB:Line Side/RMT001"
}
},
{
"id": 12,
"attributes": {
"assetid": "13",
"issubnetworkcontroller": "False",
"subnetworkcontrollername": "Unknown"
}
},
{
"id": 16,
"attributes": {
"assetid": "15",
"issubnetworkcontroller": "False",
"subnetworkcontrollername": "Unknown"
}
},
{
"id": 89,
"attributes": {
"assetid": null,
"issubnetworkcontroller": "False",
"subnetworkcontrollername": "Unknown"
}
}
],
"containers": [
]
}
Sample response when the network features or objects in the specified source class or table are represented as junctions or containers in the diagram:
{
"junctions": [
{
"id": 1,
"attributes": {
"assetid": "46",
"assetgroup": "Electric Substation Boundary",
"assettype": "Distribution Substation",
"associationstatus": "Container"
}
},
{
"id": 2,
"attributes": {
"assetid": "172",
"assetgroup": "Electric Substation Boundary",
"assettype": "Distribution Substation",
"associationstatus": "Container"
}
},
{
"id": 3,
"attributes": {
"assetid": "118",
"assetgroup": "Electric Substation Boundary",
"assettype": "Transmission Substation",
"associationstatus": "Container"
}
}
],
"containers": [
{
"id": 5,
"attributes": {
"assetid": "1",
"assetgroup": "Electric Vault Boundary",
"assettype": "Vault Boundary",
"associationstatus": "Container"
}
},
{
"id": 19,
"attributes": {
"assetid": "131",
"assetgroup": "Electric Centralized Generation",
"assettype": "Coal",
"associationstatus": "Container"
}
}
]
}
Sample response when the network features or objects in the specified source class or table are represented as edges in the diagram:
{
"edges": [
{
"id": 86,
"attributes": {
"assetid": "1100",
"measuredlength": 24715.174330099999
}
},
{
"id": 87,
"attributes": {
"assetid": "1100",
"measuredlength": 24715.174330099999
}
},
{
"id": 88,
"attributes": {
"assetid": "1100",
"measuredlength": 24715.174330099999
}
}
]
}