Query Attributes By Source

URL:
https://<root>/<serviceName>/NetworkDiagramServer/diagrams/<diagramName>/queryAttributesBySource
Methods:
POST
Version Introduced:
10.9.1

Description

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

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

networkSourceName

Required

The name or alias name of the network source class or table with the attributes to query.

Syntax: networkSourceName = <networkSourceName>

Example: networkSourceName = electricdevice

attributes

Required

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

Syntax: attributes = ["<attributeName1>", ..., "<attributeNameN>"]

Example: attributes = ["assetid", "phasecurrent", " ]

useValueNames

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:

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

Syntax: useValueNames = < true | false >

Example: useValueNames = true

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

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/NapervilleElectric/Naperville_Electric_PG_29104/NetworkDiagramServer/diagrams/Electric%20Distribution%20Switching_RMT001/queryAttributesBySource

  • Parameters:

    Use dark colors for code blocksCopy
    1
    2
    3
    4
    5
    6
    7
    8
    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:

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

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

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

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

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