Reports - Intergraph Smart Instrumentation - Version 2.3 - Training - Intergraph

Intergraph Smart Instrumentation Web API Tutorial

Language
English
Product
Intergraph Smart Instrumentation
Subproduct
Web API
Search by Category
Training
Smart Instrumentation Web Version
2.3

Requires access to Smart Instrumentation desktop.

Smart Instrumentation API reports for specific entity types are derived from the Entity Data Model (see request 01.03 Get EDM (Entity Data Model)) navigation properties where available. For example, a Panel entity type includes a navigation property to Reports.

Other entity types that provide reports are Loop, Instrument, Cable, and Terminal Strips.

Reports are generated to a shared folder and then copied to a secured file folder.

To view a report, a client application must send and download a GET request with the returned Url and then open the file using a respective application.

The following reports are available:

Entity Type

Report

Comment

Instrument

Specification

Process Data

Calculation

Enhanced Smart Loop

Tag Signal

Loop Signal

I/O Tag Assignment

Calibration Result

Calibration Point Summary

Enhanced Segment Wiring

Fieldbus/Profibus instruments assigned to Fieldbus segments

Loop

Enhanced Smart Loop

Panel

Connection Report

with Adjacent Connection — Consolidated report

Connection Report

Without Adjacent Connections (Style 1) – Consolidated report

  • Available for Smart Instrumentation version 2018 HF 28 and later

  • Available for Smart Instrumentation version 13.1 HF10 and later

Connection Report

Without Adjacent Connections (Style 2) – Consolidated report

  • Available for Smart Instrumentation version 2018 HF 28 and later

  • Available for Smart Instrumentation version 13.1 HF10 and later

I/O Map

Consolidated report

I/O Tag Assignment

Consolidated report

Terminal Strip*

Connection Report

With Adjacent Connections

Connection Report

Without Adjacent Connections (Style 1)

Connection Report

Without Adjacent Connections (Style 2)

* Available for Smart Instrumentation version 2018 HF36 and higher and for version 13.1 HF15 and higher.

Enhanced Connection report

Enhanced Panel-Strip Report for Terminal Strip

Cable

Cable Layout

Style 1

Cable Layout

Style 2

Cable Schedule

Get Report List for Device Panel

The following GET request provides the list of reports for a selected Device Panel. Make sure you always provide the Id of the specific item, for the requested report list.

It is good practice to include the project as well.

  • Select the 07.01 Get Report List for Device Panel request and click Send.

    {{baseUri}}api/si/{{versionNumber}}/Sites('{{SiteId}}')/PlantGroups('{{PlantGroupId}}')/Projects('0')/PanelProject('4156')/Reports

    Reports for panel 101-FT -100 appear in the response payload.

Get Specific Panel Report

The following GET request retrieves a specific report by including the report Id from the previous request.

  • Select the 07.02 Get Specific Panel Report request and click Send.

    {{baseUri}}api/si/{{versionNumber}}/Sites('{{SiteId}}')/PlantGroups('{{PlantGroupId}}')/Projects('0')/PanelProject('4156')/Reports('101-FT   -100|PSSTL1')

    The request lists only the selected report.

Execute Report — Device Panel w/Adjacent Connections.

The following POST request executes the report action.

You use the same request as in the previous request while adding "/Com.Ingr.Core.V1.ExecuteReport" at the end of it and change it to a POST type of request instead of GET.

  • All Web API actions require parameters in the body of the request. In the case of Execute report, just include curly {} brackets in the body.

  • The Execute report action request requires that the Header , Content-Type key have the vale application/json.

    SI_WEB_API application/json

  1. Select the 07.03 ExecuteReport action for Panel-Strip w/Adjacent Connection request and click Send.

    {{baseUri}}api/si/{{versionNumber}}/Sites('{{SiteId}}')/PlantGroups('{{PlantGroupId}}')/Projects('0')/PanelProject('4156')/Reports('101-FT   -100|PSSTL1')/Com.Ingr.Core.V1.ExecuteReport

    Payload response example:

    The last line includes a Url that points to a folder with the report file in a PDF format.

  2. Highlight and copy the Url.

  3. Select the ellipsis button next to request 07.02, in the pop up menu select Duplicate.

  4. Rename the copied request as "07.02a Send and Download report file".

  5. Paste the Url that was copied in step #2 into the request bar.

  6. Click the arrow on the Send button and select Send and Download.

  7. In the Select path to save file dialog that opens, select a folder to save the file and press Save.

  8. Using windows explorer navigate to the folder. Open the file using appropriate application.

Get Report List for DCS

The following GET request provides the list of reports for a selected DCS Panel.

  • Select the 07.04 Get Report List for DCS request and click Send.

    {{baseUri}}api/si/{{versionNumber}}/Sites('{{SiteId}}')/PlantGroups('{{PlantGroupId}}')/Projects('0')/PanelProject('4462')/Reports

    Reports for panel 101-DCS-001 appear in the response payload (the following is a partial list).

Execute Report – DCS I/O Assignment

This POST request executes the report action to create the I/O Assignment report.

  1. Select the 07.05 ExecuteReport action for DCS I/O Assignment request and click Send.

    {{baseUri}}api/si/{{versionNumber}}/Sites('{{SiteId}}')/PlantGroups('{{PlantGroupId}}')/Projects('0')/PanelProject('4462')/Reports('101-DCS-001|PSIOASS')/Com.Ingr.Core.V1.ExecuteReport

  2. Highlight and copy the Url.

  3. Paste the Url into the request box of request 07.02a.

  4. Click the arrow on the Send button and select Send and Download.

  5. In the Select path to save file dialog box that opens, select a folder to save the file and click Save.

  6. Using Windows Explorer navigate to the folder. Open the file using appropriate application.

Get Report List for Instrument

The following GET request provides the list of reports for a selected instrument.

  1. Select the 07.06 Get Report List for Instrument request and click Send.

    {{baseUri}}api/si/{{versionNumber}}/Sites('{{SiteId}}')/PlantGroups('{{PlantGroupId}}')/Projects('0')/InstrumentProject('4153')\Reports

    The list includes several report types for instrument 101-FT -100.

    In some cases where the report name or the item name include a forward slash ("/"), it is being replace with a double escape code "%252f" since the OData will not accept this character in the request. You use the Id as it is to execute the report.

    GET Reports (9)

  2. Review the rest of the reports in the list.

Execute Report - Loop report for Instrument 101-FT -100

This POST request execute the report action to create the enhanced loop report.

  1. Select the 07.07 ExecuteReport action for Instrument's Enhanced Loop request and click Send.

    {{baseUri}}api/si/{{versionNumber}}/Sites('{{SiteId}}')/PlantGroups('{{PlantGroupId}}')/Projects('0')/InstrumentProject('4153')\Reports('101-F -100|RADSLOOP')/Com.Ingr.Core.V1.ExecuteReport

    Payload response example

    GET Reports

  2. The next request, 07.08 explains how to download the result of this request..

Download PDF Report

To download a report, you must first generate the report as a .pdf file. In this example you will download the report that was executed in the previous request (07.07).
The GET request ends as follows: …\Reports('<Report Id'>/Instances('<File name>')/$value

Select the 07.08 Download PDF Report and click the arrow on the Send button and select Send and Download.

{{baseUri}}api/si/{{versionNumber}}/Sites('{{SiteId}}')/PlantGroups('{{PlantGroupId}}')/Projects('0')/InstrumentProject('4153')\Reports('101-F -100|RADSLOOP')/Instances('101-F -100.pdf')/$value

Depending on the client and operating system, you may be prompted to save the file.

Get Report List for Panel Strip

The following GET request provides a list of reports for a terminal strip TS-1 of junction box 101-JB-DCS-001.

Select the 07.09 Get Report List for Terminal Strip request and click Send.

{{baseUri}}api/si/{{versionNumber}}/Sites('{{SiteId}}')/PlantGroups('{{PlantGroupId}}')/Projects('0')/PanelProject('4573')/TerminalStripPanel('4573_13862')/Reports

Prior to this request it is required to find the relevant IDs of the panel and terminal strip.

Get Report List for Panel Strip

Execute Report – Panel-Strip Enhanced report for terminal strip TS-1

This POST request executes the report action to create the enhanced panel-strip report.

Select the 07.10 Execute Report – Panel-Strip Enhanced report for terminal strip TS-1 request and click Send.

{{baseUri}}api/si/{{versionNumber}}/Sites('{{SiteId}}')/PlantGroups('{{PlantGroupId}}')/Projects('0')/PanelProject('4573')/TerminalStripPanel('4573_13862')/Reports('101-JB-DCS-001|TS-1|RADSTRIP')/Com.Ingr.Core.V1.ExecuteReport

Payload response example

Execte Report PS Enhanced Report for TS-1

  1. Highlight and copy the Url.

  2. Paste the Url into the request box of request 07.02a.

  3. Click the arrow on the Send button and select Send and Download.

  4. In the Select path to save file dialog box that opens, select a folder to save the file and press Save.

  5. Using Windows Explorer navigate to the folder. Open the file using appropriate application.

Report Parameters

When sending a POST request to ExceuteReport for an Enhanced report via SI Web API we usually require getting the file in a pdf format so it can be viewed in any web browser. To get this, we set the INtools preference under "SmartPlant Instrumentation Server" -> "Enhanced Report format" to "PDF".

Report parameters is a navigation property available for a specific report.

The Next GET request asks for the report parameters of report generated in request 07.10

Select the 07.11 Get Report Parameters for ESR Terminal Strip report and click Send.

{{baseUri}}api/si/{{versionNumber}}/Sites('{{SiteId}}')/PlantGroups('{{PlantGroupId}}')/Projects('0')/PanelProject('4573')/TerminalStripPanel('4573_13862')/Reports('101-JB-DCS-001|TS-1|RADSTRIP')/Parameters

The payload will include a detailed value which indicates ability to determine which file extension is returned in the payload.

Report 07_11

For none Enhanced reports it will return payload with an empty value:

Report_07_11_02

Such payload indicates that the reports URL will be returned as a pdf file extension by default.

Execute Report – ExecuteReport Panel-Strip for SMA format

Following the previous request, the ExceuteReport action has an optional "parameters" variable that can be sent in the body of the POST request which can set the required file format (SMA or PDF) that will be created and returned in the response.

All previous ExceuteReport requests in the Reports chapter included in the body curly parenthesis {} which created the Enhanced report file according to the default INtools preferences and returned in the URL.

In order to override the Enhanced report file format set in the preference, a client can send the following in the body:

  • To get SMA file send body:

{"parameters": "SMA"}

  • To get PDF file send body:

{"parameters": "PDF"}

These parameters are only relevant for Enhanced reports. Smart Instrumentation native reports will ignore these parameters.

This POST request executes the report action to create the enhanced panel-strip report and return SMA file URL in the response.

Select the 07.12 Execute Report – Panel-Strip for SMA format request and click Send.

this request is like request 07.10 with a slight change in the body.

Example of a response:

As an exercise, you can modify the body of this request to get a pdf file instead of a sma.