Appendix - Working with the Feature Server

When working with the utility network through the REST API, it is also important to consider that key capabilities are also exposed through the feature server; namely:

1. The ability to add, update, delete, and query associations,

2. The ability to query subnetworks, and

3. The ability to query rules.

These three tables are exposed through the feature server as system layers. The layer ids associated with these three tables can be identified either through the utility network layer definition or via the associated portal item. In the JSON layer definition, they are grouped under the collection of the six system layers - dirty areas, error lines, error points, associations table, subnetworks table, and rules table. For example (using the "layer name" : layer id syntax):

"systemLayers": {
  "dirtyAreasLayerId": 12,
  "lineErrorsLayerId": 10,
  "pointErrorsLayerId": 9,
  “polygonErrorsLayerId”: 11,
  "associationsTableId": 500001,
  "subnetworksTableId": 500002,
  "rulesTableId": 500003,
  "diagramEdgeLayerId": 500005,
  "diagramJunctionLayerId": 500006,
  "diagramContainerLayerId": 500007,
  "temporaryDiagramEdgeLayerId": 500008,
  "temporaryDiagramJunctionLayerId": 500009,
  "temporaryDiagramContainerLayerId": 500010

The layer ids that are associated with each of these six layers can be used to access that table through the various Feature Server operations (for example, query and applyEdits).

In order to add or update an association, the following fields must be specified in the call to applyEdits:

Fields for applyEdits call.

"ASSOCIATIONTYPE" : <1|2|3>, // connectivity, containment, attachment
"ISCONTENTVISIBLE" : <0|1>,  // optional: false, true
"FROMNETWORKSOURCEID" : <networkSourceId>,
"FROMGLOBALID" : <guid>,
"FROMTERMINALID" : <long>,   // optional
"TONETWORKSOURCEID" : <networkSourceId>,
"TOGLOBALID" : <guid>,
"TOTERMINALID" : <long>      // optional

In this topic