- URL:
- https://<root>/<serviceName>/MapServer/exts/SchematicServer/templates/<tempID>/queryAssociatedObjects
- Methods:
- GET
- Version Introduced:
- 10.1
Description
The query 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:
- 
feature: The schematic feature class ID (Long)Class ID 
- 
primary: An array of <Association> objectsAssociations 
- 
secondary: An array of <Association> objectsAssociations Each primary or secondary < Association> object being returned as follows: - object: The schematic feature ObjectID (Long)- ID 
- associated: The name of the feature class of the associated object (String)- Class 
- associated: The ObjectID of the associated object (Long)- ID 
 
You can provide arguments to the query operation as query parameters defined in the parameters table below.
Request parameters
| Parameter | Details | 
|---|---|
| 
 | The response format. The default response format is  Values:  | 
| 
 (Required) | The diagram name. Syntax:  Example:  | 
| 
 | 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: Example:  | 
Example usage
Example 1: query on the MPS_Goldmine diagram, based on the template which ID is 2 under the S1_Schematics Schematics sample service, with [{"feature  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.
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=pjsonExample 2: query on the Substation 08 diagram, based on the template which ID is 1, under the S1_Schematics Schematics sample service, with [{"feature  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.
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=pjsonJSON Response syntax
{
  "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 = {"feature
//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": [
     ]
    }
   ]
}