Query

URL:
https://<root>/<serviceName>/UtilityNetworkServer/associations/query
Methods:
GETPOST
Version Introduced:
10.9

Description

The query operation allows you to query the associations table and return association information for features in a utility network.

Request parameters

ParameterDetails

f

The response format. The default response format is html.

Values: html | json | pjson

gdbVersion

(Optional)

Specifies the name of the geodatabase version. The default is sde.DEFAULT.

Syntax: gdbVersion=<version>

moment

(Optional)

Specifies the session moment. The default is the version's current moment. This should only be specified when you do not want to use the current moment.

Syntax: moment=<Epoch time in milliseconds>

types

(Optional)

Specifies an array of association types to be queried; this is provided as an array of strings. The default is all association types.

Values: attachment | containment | junctionJunctionConnectivity | junctionEdgeFromConnectivity | junctionMidspanConnectivity | junctionEdgeToConnectivity

Example: types=["attachment", "containment"]

elements

(Required)

The feature or object elements for which the association is queried.

Syntax:

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
[
  {
    “networkSourceId” : <long>,
    “globalId” : <guid>,
    “terminalId” : <long>   // optional
  }
]

returnDeletes

(Optional)

Boolean parameter specifying whether to return logically deleted associations. The default is false.

Values: true | false

JSON Response syntax

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
{
  “associations” : [
    {
      “globalId” : <guid>,
      “fromNetworkSourceId” : <long>,
      “fromGlobalId” : <guid>,
      “fromTerminalId” : <long>,
      “toNetworkSourceId” : <long>,
      “toGlobalId” : <guid>,
      “toTerminalId”: <long>,
      “percentAlong”: <double>,
      “associationType” : “attachment” | “containment” | “junctionJunctionConnectivity” |“junctionEdgeFromConnectivity” |“junctionMidspanConnectivity” | “junctionEdgeToConnectivity”,
      “status” : <long>,
      “errorCode” : <long>,
      “errorMessage” : <string>,
      “isContentVisible” : <boolean>
    }
  ],
  “success” : <boolean>,
  “error” : {                   // only if success is false
    “extendedCode” : <HRESULT>,
    “message” : <string>,
    “details” : [ <string> ]
}
}

Example usage

Request URL and parameters:

https://myserver.esri.com/server/rest/services/LandUse/UtilityNetworkServer/associations/query

Use dark colors for code blocksCopy
1
2
types=["containment"]
elements=[{"networkSourceId":19,"globalId":"{AE323515-8E6F-4CC2-B9A8-1DB963E769AB}"}]
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
{
   "associations":[
      {
         "globalId":"{ABD4CB00-2D54-4DAD-B70D-F8A2EDBB7302}",
         "fromNetworkSourceId":19,
         "fromGlobalId":"{AE323515-8E6F-4CC2-B9A8-1DB963E769AB}",
         "fromTerminalId":-1,
         "toNetworkSourceId":21,
         "toGlobalId":"{24FAB600-E235-4A63-A4EC-037A9493D7F2}",
         "toTerminalId":-1,
         "associationType":"containment",
         "status":0,
         "errorCode":0,
         "errorMessage":"",
         "isContentVisible":true
      },
      {
         "globalId":"{00E51A4E-9AD3-45B4-86DF-DAFF0E8CCB96}",
         "fromNetworkSourceId":4,
         "fromGlobalId":"{B7E78E04-0E67-4287-88AE-08A4D135FA67}",
         "fromTerminalId":-1,
         "toNetworkSourceId":19,
         "toGlobalId":"{AE323515-8E6F-4CC2-B9A8-1DB963E769AB}",
         "toTerminalId":-1,
         "associationType":"containment",
         "status":0,
         "errorCode":0,
         "errorMessage":"",
         "isContentVisible":true
      }
   ],
   "success":true
}

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