- URL:https://<diagram-url>/findDiagramFeatures
 - Version Introduced: 10.6
 
Description
The findDiagramFeatures operation is performed on a Diagram resource. It returns an array of diagram feature JSON objects for the input fromDiagram.
This is the operation to use to search for the utility network features associated with a set of diagram features that are referenced in the diagram resource.
License:
The active portal account must be licensed with the ArcGIS Advanced Editing user type extension to use this operation.Request parameters
| Parameter | Details | 
|---|---|
| gdbVersion | Description: The name of the geodatabase version. Syntax: gdbVersion=<version> Example: gdbVersion=ABV1  | 
| sessionId | Description: The token (guid) used to lock the version. Syntax: sessionId=<guid> Example: sessionId=44G259DE-87B0-407D-8F2E-DCB7665DD0F0  | 
| moment | Description: The session moment. Syntax: moment=<moment> Example: moment=1490867969324  | 
| fromFeatures | Required Description: Depending on whether you want to retrieve diagram features associated with utility network features (case#1) or with diagram features that are represented in another diagram (case#2), an array of utility network feature Global IDs (case#1), or an array of network diagram feature Global IDs (case#2). Syntax: fromFeatures = ["<globalID1>", ...,"<globalIDN>"] Example: Case#1—Retrieving the diagram feature Global IDs associated with the specified utility network globalIDs {E6260A67-94F6-4640-B717-4D3A9E5A0F17} in the diagram resource:fromFeatures = ["{E6260A67-94F6-4640-B717-4D3A9E5A0F17}"] Case#2—Retrieving the diagram feature Global IDs in the diagram resource that are associated with the specified diagram feature globalIDs {FDE3A114-D367-4FA9-BAAC-C4B9B9F57B87}, those features being represented in the specified "testStore" diagram; that is, with fromDiagram=testStore: fromFeatures = ["{FDE3A114-D367-4FA9-BAAC-C4B9B9F57B87}"]  | 
| fromDiagram | Description: The name of the diagram the feature Global IDs specified for the fromFeatures parameter belong to, or null when the fromFeatures parameter references utility network features. Syntax: fromDiagram=<diagramName> Example: fromDiagram=testStore  | 
| includeAggregations | Required Description: Boolean. Case#1—When the fromFeatures reference utility network feature Global IDs 
 Case#2—When the fromFeatures reference diagram feature Global IDs represented in another diagram 
 Syntax: includeAggregations=<true | false> Example: includeAggregations=true  | 
| addConnectivityAssociations | Required Description: Boolean. When the fromFeatures reference utility network feature Global IDs 
 Syntax: addConnectivityAssociations=<true | false> Example: addConnectivityAssociations=true  | 
| addStructuralAttachments | Required Description: Boolean. When the fromFeatures reference utility network feature Global IDs 
 Syntax: addStructuralAttachments=<true | false> Example: addStructuralAttachments=true  | 
| f | Description: The response format. The default response format is html. Values: <html | json>  | 
Example usage
Example#1—Retrieving the diagram feature Global IDs associated with the utility network feature which Global ID is {AF41424F-1073-4640-A596-220AC3A33DA6} in the "DiagramTest1" diagram resource; that is:
- URL: https://myserver.esri.com/server/rest/services/Naperville/NetworkDiagramServer/diagrams/DiagramTest1/findDiagramFeatures
 - Parameters: 
gdbVersion= sessionId= moment= fromFeatures=["{AF41424F-1073-4640-A596-220AC3A33DA6}"] fromDiagram= includeAggregations=true addConnectivityAssociations=false addStructuralAttachments=false f=pjson - Sent URL (GET): https://myserver.esri.com/server/rest/services/Naperville/NetworkDiagramServer/diagrams/DiagramTest1/findDiagramFeatures?gdbVersion=&sessionId=&moment=&fromFeatures=%5B%22%7BAF41424F-1073-4640-A596-220AC3A33DA6%7D%22%5D&fromDiagram=&includeAggregations=true&addConnectivityAssociations=false&addStructuralAttachments=false&f=pjson
 
Example#2—Retrieving in the "Basic_RMT003" diagram resource the diagram feature Global IDs which are associated with the same utility network feature or features as the diagram feature with Global ID {1EE98487-730C-4193-8510-8BF975332237}, which is in the the "DiagramTest1" diagram; that is:
- URL: https://myserver.esri.com/server/rest/services/Naperville/NetworkDiagramServer/diagrams/Basic_RMT003/findDiagramFeatures?
 - Parameters: 
gdbVersion= sessionId= moment= fromFeatures=["1EE98487-730C-4193-8510-8BF975332237"] fromDiagram=DiagramTest1 includeAggregations=true addConnectivityAssociations=false addStructuralAttachments=false f=pjson - Sent URL (GET): https://myserver.esri.com/server/rest/services/Naperville/NetworkDiagramServer/diagrams/Basic_RMT003/findDiagramFeatures?gdbVersion=&sessionId=&moment=&fromFeatures=%5B%22%7B1EE98487-730C-4193-8510-8BF975332237%7D%22%5D&fromDiagram=DiagramTest1&includeAggregations=true&addConnectivityAssociations=false&addStructuralAttachments=false&f=pjson
 
Example#3—Retrieving the diagram feature Global IDs associated with the utility network points which Global ID are {AF41424F-1073-4640-A596-220AC3A33DA6}, {0B93680B-4B8A-4453-BC28-6763BC0A2184} and {9F09AC2C-E2C4-4B8A-BAE9-1D2405D79389} in the "DiagramTest1" diagram resource, then add the connectivity associations and structural attachment diagram edges that may connect the returned junctions; that is:
- URL: https://myserver.esri.com/server/rest/services/Naperville/NetworkDiagramServer/diagrams/DiagramTest1/findDiagramFeatures
 - Parameters: 
gdbVersion= sessionId= moment= fromFeatures=["{AF41424F-1073-4640-A596-220AC3A33DA6}","{0B93680B-4B8A-4453-BC28-6763BC0A2184}","{9F09AC2C-E2C4-4B8A-BAE9-1D2405D79389}"] fromDiagram= includeAggregations=false addConnectivityAssociations=true addStructuralAttachments=true f=pjson - Sent URL (GET): https://myserver.esri.com/server/rest/services/Naperville/NetworkDiagramServer/diagrams/DiagramTest1/findDiagramFeatures?gdbVersion=&sessionId=&moment=&fromFeatures=%5B%22%7BAF41424F-1073-4640-A596-220AC3A33DA6%7D%22%2C%22%7B0B93680B-4B8A-4453-BC28-6763BC0A2184%7D%22%2C%22%7B9F09AC2C-E2C4-4B8A-BAE9-1D2405D79389%7D%22%5D&fromDiagram=&includeAggregations=false&addConnectivityAssociations=true&addStructuralAttachments=true&f=pjson
 
JSON Response syntax
 An array of diagram features JSON object:
{
 "features": [
  {
   "globalID": "< DiagFeatGlobalID1 >", //string
   "featureOID": < DiagFeatOID1 >, // int
   "geometryType": < 1 | 2 | 3 >,
   "networkSourceID": < assUNSourceID1 >, //int
  },
  ...
  {
   "globalID": "< DiagFeatGlobalIDN >", //string
   "featureOID": < DiagFeatOIDN >, // int
   "geometryType": < 1 | 2 | 3 >,
   "networkSourceID": < assUNSourceIDN >, //int
  },
 ]
}
JSON Response example
 JSON Response Example{
 "features": [
  {
   "globalID": "{1EE98487-730C-4193-8510-8BF975332237}",
   "featureOID": 10470,
   "geometryType": 1,
   "networkSourceID": 6
  },
  {
   "globalID": "{2FE3062B-BC03-45B6-9B45-ECE680470C92}",
   "featureOID": 10471,
   "geometryType": 1,
   "networkSourceID": 6
  },
  {
   "globalID": "{1D7A1416-EA05-42F4-B8C1-D992F10086EA}",
   "featureOID": 10472,
   "geometryType": 1,
   "networkSourceID": 6
  },
  {
   "globalID": "{43CF9E6F-7F14-4C49-A233-B4CCF884DD38}",
   "featureOID": 11249,
   "geometryType": 3,
   "networkSourceID": 1
  },
  {
   "globalID": "{72745B4E-D05B-48C7-A21F-A68B7DA14954}",
   "featureOID": 11254,
   "geometryType": 3,
   "networkSourceID": 1
  }
 ]
}