Query Associated Objects

URL:
https://<root>/<serviceName>/MapServer/exts/SchematicServer/templates/<tempID>/queryAssociatedObjects
Methods:
GET
Version Introduced:
10.1

Description

The queryAssociatedObjects operation returns the associations for a set of schematic features. It is performed on a Schematic Diagram Template resource. The result of this operation is an array of schematic primary and secondary associations.

It is used to retrieve the primary and secondary associations for a set of schematic features contained in a schematic diagram. The associations object returned by the REST API gives the associations per schematic feature class ID as follows:

  • featureClassID: The schematic feature class ID (Long)

  • primaryAssociations: An array of <Association> objects

  • secondaryAssociations: An array of <Association> objects

    Each primary or secondary < Association> object being returned as follows:

    • objectID : The schematic feature ObjectID (Long)
    • associatedClass : The name of the feature class of the associated object (String)
    • associatedID : The ObjectID of the associated object (Long)

You can provide arguments to the queryAssociatedObjects operation as query parameters defined in the parameters table below.

Request parameters

ParameterDetails

f

The response format. The default response format is html .

Values: html | json

name

(Required)

The diagram name.

Syntax: name=<diagramName>

Example: name=Diagram1

selection

The list of the schematic feature names per schematic feature class ID for which the operation has to retrieve the primary and secondary associations.

Each schematic feature name corresponds to a value of the SCHEMATICTID field in the schematic feature class.

Syntax:

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
selection=[
     {
       "featureClassID" : <schFeatureClassID1>,
       "objectNames" : ["<schFeatureClassID1_Name1>",..., "<schFeatureClassID1_NameN>"]
     },
     ...,
     {
       "featureClassID" : <schFeatureClassIDN>,
       "objectNames" : ["<schFeatureClassIDN_Name1>",..., "<schFeatureClassIDN_NameM>"]
     }
]

Example: selection=[{"featureClassID": 2888, "objectNames": ["149-1608-0", "149-1111-0", "149-1323-0"]}]

Example usage

Example 1: queryAssociatedObjects on the MPS_Goldmine diagram, based on the template which ID is 2 under the S1_Schematics Schematics sample service, with [{"featureClassID": 99, "objectNames": ["20-1554-0"]}] for the selection parameter, returns the primary and secondary associations for the PrimaryLine schematic feature which SCHEMATICTID is '20-1554-0'. This only schematic feature link is primarily associated with an edge, and secondarily with two other edges and two points, those elements being reduced in the MPS_Goldmine diagram.

Use dark colors for code blocksCopy
1
https://myserver.esri.com/arcgis/rest/services/S1_Schematics/MapServer/exts/SchematicsServer/templates/2/queryAssociatedObjects?name=MPS_Goldmine&selection=%5B%7B%22featureClassID%22%3A+99%2C+%22objectNames%22%3A+%5B%2220-1554-0%22%5D%7D%5D&f=pjson

Example 2: queryAssociatedObjects on the Substation 08 diagram, based on the template which ID is 1, under the S1_Schematics Schematics sample service, with [{"featureClassID": 116,"objectNames": ["114-Node-43"]}] for the selection parameter, returns the associations for the Inside_Switch schematic feature which SCHEMATICTID is '114-Node-43'. This schematic feature node has no primary associations, it has only secondary associations.

Use dark colors for code blocksCopy
1
https://myserver.esri.com/arcgis/rest/services/S1_Schematics/MapServer/exts/SchematicsServer/templates/1/queryAssociatedObjects?name=Substation+08&selection=%5B%7B%22featureClassID%22%3A+116%2C%22objectNames%22%3A+%5B%22114-Node-43%22%5D%7D%5D&f=pjson

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
{
  "associations" : [
    {
      "featureClassID" : <schfeatureClassID>,
      "primaryAssociations" : [
        {
          "objectID" : <schFeature1_ID>,
          "associatedClass" : "<schFeature1_AssociatedObjectClass>",
          "associatedID" : <schFeature1_AssociatedObjectID>
        },
        ...,
        {
          "objectID" : <schFeatureN_ID>,
          "associatedClass" : "<schFeatureN_AssociatedObjectClass>",
          "associatedID" : <schFeatureN_AAssociatedObjectID>
        }
      ],
      "secondaryAssociations" : [

      ]
    }
  ]
}

JSON Response example

The following is an example for a given diagram with selection = {"featureClassID": 885, "objectNames": ["859-3-0"]}

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
//For the sample schematic diagram, the operation returns two GIS features with primary associations with the 859-3-0 input schematic feature:
{
   "associations": [
    {
     "featureClassID": 885,
     "primaryAssociations": [
      {
       "objectID": 806,
       "associatedClass": "ElecDemo.SDE.pug_PUG_gas_plants",
       "associatedID": 3
      }
     ],
     "secondaryAssociations": [

     ]
    },
    {
     "featureClassID": 893,
     "primaryAssociations": [
      {
       "objectID": 802,
       "associatedClass": "ElecDemo.SDE.pug_PUG_electric",
       "associatedID": 23
      }
     ],
     "secondaryAssociations": [

     ]
    }
   ]
}

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