GET Requests to Smart Electrical Metadata - Intergraph Smart Electrical - 2.1 - Help - Intergraph

Intergraph Smart Electrical Smart API Help

Language
English (United States)
Product
Intergraph Smart Electrical
Search by Category
Help
Smart Electrical Web Version
2.1

Before running the queries, make sure the variables in the URI are populated with your values. For example: {{baseUri}} should already include your value of apiservername.domain.com set in your selected environment.

Common metadata

This request exposes the Smart Electrical EDM (Entity Data Model). The response is in XML format.

  • Select the request 02.02 Common metadata and click Send.

    The URL is:

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

  1. Collapse the rows for a minimized version. Alternatively, you can copy and paste this response into any XML editor to view and manipulate the information.

    Part of the returned response looks like this:

  2. Copy and paste the link in row #2: Oasis Consortium (http://docs.oasis-open.org/odata/ns/edmx) into a browser address bar to open the Oasis Consortium Website for more information about the XML schema definition.


    The Annotations reference defines the metadata of the exposed model and is common to all Smart Electrical sites.

    <edmx:Reference Uri="https://apiservername.domain.com/WebApi/SEL/V2/Annotations/$metadata">

    The Annotations maps the property name in the metadata with a meaningful display name, which is used in the desktop software.

    The next set of references ends with the names of the plants under the site, with the URI for each plant's metadata. In this example: /Sites('WEBAPISITE001')/Plants('PLANT001').

    The Vocabularies reference enables extension and customization of the model. It must be included as part of the EDM compliance.

    <edmx:Reference Uri="https://apiservername.domain.com/WebApi/SEL/V2/Vocabularies/Core/$metadata">

    The last group is Edmx:DataServices, which represent the ComplexTypes, EntityTypes, Functions, and Actions.

  3. Expand the row above (marked with a black arrow) to reveal all the entity types that are discoverable.

    The entity types are the discoverable item types in Smart Electrical. When you expand each entity type, the property SP_ID is revealed, followed by the navigation properties. The navigation properties reveal the relations between the entity and other entity types.

    For example, under the 'Motor' entity type, the following relations appear:

Plant metadata

The plant metadata exposes the properties for each Smart Electrical item type.

  1. Select the request 02.03 Plant metadata and click Send.

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

  2. In the top right corner of the payload section, click to open a search box and type Motor:

    The 'Motor' entity type's properties are displayed in the payload:

Plant annotations

The API for Smart Electrical uses annotations to define additional information. These annotations describe the metadata that is common for all Smart Electrical sites.

  1. Select the request 02.04 Plant annotations and click Send.

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

  2. In the top right corner of the payload section, click to open a search box and type outsidediameter.

    There are 6 results of this property for the different entity types for which this property applies.

  3. Click the down arrow to go to each occurrence of the search results.

    The example below shows two of the results for entity type 'Cable':

    The DisplayName annotation shows the text string for the display name that appears in the desktop application.

    There is also a Description annotation whose value is identical to DisplayName.