- URL:
- https://<root>/<serviceName>/UtilityNetworkServer/associations/query
- Methods:
GET
POST
- 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
Parameter | Details |
---|---|
| The response format. The default response format is
|
(Optional) | Specifies the name of the geodatabase version. The default is Syntax: |
(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: |
(Optional) | Specifies an array of association types to be queried; this is provided as an array of strings. The default is all association types.
Example: |
(Required) | The feature or object elements for which the association is queried. Syntax:
|
(Optional) | Boolean parameter specifying whether to return logically deleted associations. The default is
|
JSON Response syntax
{
“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
types=["containment"]
elements=[{"networkSourceId":19,"globalId":"{AE323515-8E6F-4CC2-B9A8-1DB963E769AB}"}]
{
"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
}
enterprise11-4