Skip To Content
ArcGIS Developer
Dashboard

Query Attributes By Source

  • URL:https://<diagram-url >/queryAttributesBySource
  • Version Introduced:10.9.1

Description

The queryAttributesBySource operation is performed on a diagram resource. It retrieves the value of the attributes you want from the specified network source class or network source table for each network feature or network object represented in the diagram.

License:
The active portal account must be licensed with the ArcGIS Advanced Editing user type extension to use this operation.

Request parameters

ParameterDetails
gdbVersion

Description: The name of the geodatabase version.

Syntax: gdbVersion=<version>

Example: gdbVersion=ABV1

sessionId

Description: The token (guid) used to lock the version.

Syntax: sessionId=<guid>

Example: sessionId=44G259DE-87B0-407D-8F2E-DCB7665DD0F0

moment

Description: The session moment.

Syntax: moment=<moment>

Example: moment=1490867969324

networkSourceName

Required

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

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

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

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

useValueNames

Description: Boolean

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

Description: 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:
    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 with 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
   }
  }
 ]
}