Query Feature Attributes (Network Diagrams)

URL:
https://<root>/<serviceName>/NetworkDiagramServer/diagrams/<diagramName>/queryFeatureAttributes
Methods:
POST
Version Introduced:
11.3

Description

The queryFeatureAttributes 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

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

diagramElementFilter


(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:

  • filterBySelection—To get attributes for a given set of diagram junctions, diagram edges or diagram containers that you identified thanks to their diagram ObjectIDs.
  • filterByElementType—To get attributes for all diagram elements depending on their diagram feature type; that is, query attributes related to all diagram junctions, all diagram edges or all diagram containers.

Syntax:

  • filterBySelection type syntax:
Use dark colors for code blocksCopy
1
diagramElementFilter={type="filterBySelection", "junctionObjectIDs": [<DiagJctOid1>, …, <DiagJctOidN>], "edgeObjectIDs": [<DiagEdgOid1>, …, <DiagEdgOidN], "containersObjectIDs": [<DiagCtnrOid1>, …, <DiagCtnrOidN]}
  • filterByElementType type syntax:
Use dark colors for code blocksCopy
1
diagramElementFilter={type="filterByElementType", "browseJunctions":<true|false>, "browseEdges":<true|false>, "browseContainers":<true|false>}

Example:

  • filterBySelection example:
Use dark colors for code blocksCopy
1
{"type": "filterBySelection", "junctionObjectIDs":[8756,8757], "edgeObjectIDs":[], "containerObjectIDs":[]}
  • filterByElementType example:
Use dark colors for code blocksCopy
1
{"type": "filterByElementType", "browseJunctions":true, "browseEdges":true, "browseContainers":true}

attributes


(Required)

An array of attribute names or attribute alias names to query.

includeAggregations

A boolean statement that determines whether to include the aggregations.

  • true—The operation returns the attributes related to the network elements associated with the diagram features whether these network elements are reduced or collapsed in the diagram.
  • false—The operation only returns the attribute related to the network elements associated with the diagram features that are visibly represented in the diagrams. This is the default.

Syntax: includeAggregations=<true | false>

Example: includeAggregations=true

useValueNames

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:

  • true—Coded domain and subtype values will be exported using their string descriptions rather than raw values.
  • false—False-Coded domain and subtype values will be exported as raw values. This is the default

Syntax: useValueNames = < true | false >

Example: useValueNames = true

f

The response format. The default response format is html.

Values: <html | json>

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/NapervilleElectric/Naperville_Electric_SQL_50898/NetworkDiagramServer/diagrams/TestDiagram1/queryFeatureAttributes

  • Parameters:

    Use dark colors for code blocksCopy
    1
    2
    3
    4
    5
    6
    7
    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/NapervilleElectric/Naperville_Electric_SQL_50898/NetworkDiagramServer/diagrams/TestDiagram1/queryFeatureAttributes?gdbVersion=&sessionId=&moment=&diagramElementFilter=%7B%22type%22%3A+%22filterBySelection%22%2C+%22junctionObjectIDs%22%3A%5B%5D%2C+%22edgeObjectIDs%22%3A%5B8764%5D%2C+%22containerObjectIDs%22%3A%5B%5D%7D&attributes=%5B%22Asset+Group%22%2C+%22Phases+Normal%22%2C+%22Measured+Length%22%5D&includeAggregations=True&useValueNames=True&f=pjson

JSON Response syntax

A JSON object composed of three arrays of values:

  • diagramElementIDs—An array of Diagram Element IDs.
  • aggregationFlags—An array of aggregation flags; 1 or 0 that tells whether each diagram element is aggregated.
  • attributeValues—An array of attribute values corresponding to the requested attributes for each diagram element.
Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
{
 "diagramElementIDs": [
  <DEID_1>,
  ...,
  <DEID_N>
 ],
 "aggregationFlags": [
  <0 | 1>,
  ...,
  <0 | 1>
 ],
 "attributeValues": [
  <Value1_1,..., Value1_M,
  ...,
  <ValueN_1,..., ValueN_M
 ]
}

JSON Response example

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
{
 "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
 ]
}

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