GET Requests to expose Sites, Plants, and Engineering Projects - Intergraph Smart Electrical - 2.0 - Help - Intergraph

Intergraph Smart Electrical Web API Help

Language
English
Product
Intergraph Smart Electrical
Subproduct
Web API
Search by Category
Help
Smart Electrical Web Version
2.0

The following requests retrieve information about the hierarchy of Smart Electrical's Sites, Plants, and Engineering Projects.

Reserved words are defined in Smart Electrical Web API for certain entities such as hierarchy items (site, plant, project) and item types such as motor and cable. When creating a custom hierarchy in Smart Engineering Manager, plant group names using these reserved words are allowed. Smart Electrical Web API handles custom hierarchies as follows:

  • The plant group at the root level of a plant structure is always named 'Plant'.

  • Plant groups that use reserved words are assigned the suffix 'PlantGroup'; for example, 'Plant' is renamed as 'PlantPlantGroup', 'Instrument' is renamed as 'InstrumentPlantGroup', and so forth.

  • The DisplayName property in the Annotations of an entity using a reserved word as the name has the same name (without the 'PlantGroup' suffix) as the original name entered in Smart Engineering Manager.

The following request example includes the use of reserved words 'Project', 'Instrument', 'Motor' and 'Cable' for plant group names:

SEM PBS hierarchy - SPID plant

{{baseUri}}/SEL/V2/Sites('Site')/Plants('Plant')/Com.Ingr.SEL.V2.Site.Plant.Plant/
ProjectPlantGroups('Project')/Projectss('Projects')/InstrumentPlantGroups('Instrument')/
MotorPlantGroups('Motor')/Motorss('Motors')/CablePlantGroups('Cable')/Cabless('Cables')/
Areas('Area')/Business Sectors('Business Sector')/Plant Systems('Plant System')/Units('Unit')

Root - a request for exposing the WebApi root

This request queries the root level based on Smart Electrical's schema, with "/V2" at the end of the syntax, representing the release version of the Web API.

  • Select the request 02.05 Root and click Send.

    https://apiservername.domain.com/WebApi/SEL/V2

    The response retrieves a single EntitySet called: "Sites", which includes a navigation property of "Sites":

Sites

By looking at the previous response, you can navigate to the sites. The next pre-configured request is built on the previous request, requesting to retrieve a collection of Sites.

  • Select the request 02.06 Sites and click Send.

    https://apiservername.domain.com/WebApi/SEL/V2/Sites

    The response in our example shows a single site with its ID and name: "WEBAPISITE001".

Specific site

Based on the above request, you can now retrieve a specific site.

  • Select the request 02.07 Specific site and click Send.

    https://apiservername.domain.com/WebApi/SEL/V2/Sites('WEBAPISITE001')

    The response shows the site ID and name:

Plants

To retrieve the plants under the site, do the following:

  • Select the request 02.08 Plants and click Send.

    https://apiservername.domain.com/WebApi/SEL/V2/Sites('WEBAPISITE001')/Plants

    The response shows the IDs and names of all the plants in the site:

Specific plant

  • Select the request 02.09 Specific plant and click Send.

    https://apiservername.domain.com/WebApi/SEL/V2/Sites('WEBAPISITE001')/Plants('PLANT001')

    The response shows the specific plant ID and name:

Engineering projects

This request reveals the list of engineering projects under a specific plant. The engineering projects are partitioned to reflect each project. Each plant is an entity container at the root level. The items under the root need to contain the root node in their path, which is represented as a navigation property. Using an XML editor, you can search the string EntityType Name="Plant" in the response for request 02.02 Common metadata to find all the navigation properties of the plant.

  • Select the request 02.10 Engineering Projects and click Send.

    https://apiservername.domain.com/WebApi/SEL/V2/Sites('WEBAPISITE001')/Plants('PLANT001')/Projects

Specific engineering project

This request reveals a specific engineering project, 'As-Built'.

  • Select the request 02.11 Specific engineering project and click Send.

    https://apiservername.domain.com/WebApi/SEL/V2/Sites('WEBAPISITE001')/Plants('PLANT001')/Projects('As-Built')

    The response returns the 'As-Built' project's Id and Name.