Schematic Search Diagrams

URL:
https://<schematicsserver-url>/searchDiagrams
Methods:
GET
Version Introduced:
10.1

Description

The searchDiagrams operation allows to search for schematic diagrams related to the schematic service. It is performed on the Schematic Service resource. The result of this operation is an array of Schematic Diagram Information Object.

It is used to search diagrams in the schematic service by criteria; that is, diagrams filtered out via a where clause on any schematic diagram class table field, diagrams that contain schematic features associated with a specific set of GIS features/objects, or diagrams that contain schematic features associated with the same GIS features/objects related to another set of schematic features.

You can provide arguments to the Schematic Search Diagrams operation as query parameters defined in the parameters table below.

New in 10.2

where parameter value must conform to the standardized queries. Learn more about standardized queries.

Request Parameters

ParameterDetails

f

The response format. The default response format is html .

Values: html | json

where

A where clause for the query filter. Any legal SQL where clause operating on the fields in the schematic diagram class table is allowed. See the Schematic diagram class table fields section below to know the exact list of field names that can be used in this where clause.

Sample One: Syntax and example for seaching diagrams updated by a given user

Syntax: UPDATEDBY = '<updatedBy>'

Example: UPDATEDBY = 'ABL4732'

Sample Two: Syntax and example for searching diagrams stored in a given schematic folder and created by a given user

Syntax: FOLDERID = <folderObjectID> AND CREATOR = '<createdBy>'

Example: FOLDERID = 1 AND CREATOR = 'NCA3885'

relatedObjects

An array containing the list of the GIS features/objects IDs per feature class/table name that are in relation with schematic features in the resulting queried diagrams. Each GIS feature/object ID corresponds to a value of the OBJECTID field in the GIS feature class/table.

Syntax:

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
[
  {
    "objectClassName" : "<objectClassName1>",
    "objectIDs" : [ID1_1, ..., ID1_N]
  },
  {
    "objectClassName" : "<objectClassName2>",
    "objectIDs" : [ID2_1, ..., ID2_M]
  }
]

Example:

Use dark colors for code blocksCopy
1
[{"objectClassName": "PipelinesDatabase.SDE.pug_PUG_gas_plants", "objectIDs": [6]},{"objectClassName": "PipelinesDatabase.SDE.joined_pipe", "objectIDs" : [691, 675]}]

relatedSchematicObjects

An array containing the list of the schematic feature names per schematic feature class ID that have the same associated GIS features/objects with schematic features in the resulting queried diagrams. 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
12
13
[
  {
    "featureClassID" : <schFeatureClass1ID>,
    "objectNames" : ["<schFeatureName1>", ...,"<schFeatureNameN>"]
  },
  {
    ...
  },
  {
    "featureClassID" : <schFeatureClass2ID>,
    "objectNames" : ["<schFeatureName1>", ...,"<schFeatureNameM>"]
  }
]

Example:

Use dark colors for code blocksCopy
1
[{"featureClassID": 885,"objectNames": ["859-6-0"]},{"featureClassID": 884, "objectNames": ["858-691-0","858-675-0"]}]

Schematic diagram class fields

Field Name to use in the WHERE clauseData TypeRelated item in the JSON

ID

Long Integer

objectID

NAME

Text

name

FOLDERID

Long Integer

folderObjectID

DIAGRAMCLASSID

Long Integer

templateObjectID

LASTUPDATE

Date

lastUpdateDate

VERSION

Text

version

CREATIONDATE

Date

creationDate

CREATOR

Text

createdBy

UPDATEDBY

Text

lastUpdateBy

LOCKSTATUS

Long Integer

  • 0: unlocked diagram
  • 1: diagram in edition
  • 2: locked diagram

Not directly returned by the JSON Schematic Diagram Information Object. However, there is a link between LOCKSTATUS and the lockedBy item returned by the JSON Schematic Diagram Information Object. When LOCKSTATUS=0, lockedBy is empty. While when LOCKSTATUS=1 or 2, lockedBy is not empty.

MODIFIEDBY

Text

lastModificationBy

Example usage

Example 1: searchDiagrams with a where clause based on the FOLDERID field returns all the schematic diagrams stored in the specified schematic folder

Use dark colors for code blocksCopy
1
https://myserver.esri.com/arcgis/rest/services/S1_Schematics/MapServer/exts/SchematicsServer/searchDiagrams?where=FOLDERID%3D3&relatedObjects=&relatedSchematicObjects=&f=pjson

Example 2: searchDiagrams with relatedObjects = [{"objectClassName": "Substation", "objectIDs": [1]}] returns all the schematic diagrams which contain schematic features associated with the Substation 1 GIS feature

Use dark colors for code blocksCopy
1
https://myserver.esri.com/arcgis/rest/services/S1_Schematics/MapServer/exts/SchematicsServer/searchDiagrams?where=&relatedObjects=%5B%7B%22objectClassName%22%3A+%22Substation%22%2C+%22objectIDs%22%3A+%5B1%5D%7D%5D&relatedSchematicObjects=&f=pjson

Example 3: searchDiagrams with relatedSchematicObjects = [{"featureClassID": 100,"objectNames": ["37-1-0"]}] returns all the schematic diagrams which contain schematic features that have the same associated GIS features/objects with the 37-1-0 Substation schematic feature

Use dark colors for code blocksCopy
1
https://myserver.esri.com/arcgis/rest/services/S1_Schematics/MapServer/exts/SchematicsServer/searchDiagrams?where=&relatedObjects=&relatedSchematicObjects=%5B%7B%22featureClassID%22%3A+100%2C%22objectNames%22%3A+%5B%2237-1-0%22%5D%7D%5D&f=pjson

JSON Response syntax

Use dark colors for code blocksCopy
1
2
3
4
5
"diagrams" : [
   <diagramInfo1—See [Schematic Diagram Information Object - JSON Syntax](/schematic-diagram-information-object)>,
   ...
   <diagramInfoN—See [Schematic Diagram Information Object - JSON Syntax](/schematic-diagram-information-object)
]

Learn about Schematic Diagram Information Object—JSON Syntax

JSON Response example

Response when where = CREATOR='NCA3885'

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
32
33
//For the sample schematic service, the only diagram created by the NCA3885 user is returned
"diagrams" : [
  {
    "name" : "ESTANCIA",
    "id" : "0-334",
    "templateIdentifier" : "0",
    "templateObjectID" : 3204,
    "schematicLayerIdentifier" : 0,
    "folderObjectID" : 1,
    "folderIdentifier" : "1",
    "objectID" : 334,
    "createdBy" : "NCA3885",
    "lastModificationBy" : "ABL4732",
    "lastUpdateBy" : "",
    "creationDate" : "01/21/2011 16:07:46",
    "lastModificationDate" : "02/14/2011 18:34:46",
    "lastUpdateDate" : "",
    "lockedBy" : "",
    "version" : "",
    "extent" : {
      "xmin" : 6.0370819091796868,
      "ymin" : -8.059234619140625,
      "xmax" : 29.909512329101563,
      "ymax" : 11.059844970703125,
      "spatialReference" : {
        "wkid" : null
      }
    },
    "rootNodes" : [
      "115"
    ]
  }
]

JSON Response example

Response when relatedObjects = [{"objectClassName" : "Feeder", "objectIDs" : [2]}]

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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
//For the sample schematic service, two diagrams containing schematic features associated with the Feeder 2 GIS feature are found and returned
"diagrams" : [
  {
    "name": "Main_GoldmineAll",
    "id": "0-3",
    "templateIdentifier": "0",
    "templateObjectID": 5443,
    "schematicLayerIdentifier": 0,
    "folderObjectID": 4,
    "folderIdentifier": "4",
    "objectID": 3,
    "createdBy": "ABL4732",
    "lastModificationBy": "ABL4732",
    "lastUpdateBy": "",
    "creationDate": "02/10/11 12:35:09",
    "lastModificationDate": "02/11/11 10:35:08",
    "lastUpdateDate": "",
    "lockedBy": "",
    "version": "SDE.DEFAULT",
    "extent": {
      "xmin": 378116.2965000011,
      "ymin": 1545363.3225000005,
      "xmax": 402460.91349999979,
      "ymax": 1571390.8075000022,
      "spatialReference": {
        "wkid": null
       }
    }
  },
  {
    "name": "Main_CentralArea",
    "id": "0-1",
    "templateIdentifier": "0",
    "templateObjectID": 5443,
    "schematicLayerIdentifier": 0,
    "folderObjectID": 4,
    "folderIdentifier": "4",
    "objectID": 1,
    "createdBy": "ABL4732",
    "lastModificationBy": "ABL4732",
    "lastUpdateBy": "NCA3885",
    "creationDate": "02/10/11 11:31:03",
    "lastModificationDate": "03/29/11 15:48:29",
    "lastUpdateDate": "03/29/11 15:48:30",
    "lockedBy": "",
    "version": "SDE.DEFAULT",
    "extent": {
    "xmin": 371978.9869999974,
    "ymin": 1540107.6944999993,
    "xmax": 383462.8330000015,
    "ymax": 1552900.375500004,
    "spatialReference": {
      "wkid": 3519,
      "latestWkid": 3519
       }
    }
  }
]

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