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 |
||
Alarm/Trip Points 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
|
|
Connection Report |
Without Adjacent Connections (Style 2) – Consolidated report
|
|
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.
-
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.
-
Highlight and copy the Url.
-
Select the ellipsis button next to request 07.02, in the pop up menu select Duplicate.
-
Rename the copied request as "07.02a Send and Download report file".
-
Paste the Url that was copied in step #2 into the request bar.
-
Click the arrow on the Send button and select Send and Download.
-
In the Select path to save file dialog that opens, select a folder to save the file and press Save.
-
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.
-
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
-
Highlight and copy the Url.
-
Paste the Url into the request box of request 07.02a.
-
Click the arrow on the Send button and select Send and Download.
-
In the Select path to save file dialog box that opens, select a folder to save the file and click Save.
-
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.
-
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.
-
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.
-
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
-
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.
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
-
Highlight and copy the Url.
-
Paste the Url into the request box of request 07.02a.
-
Click the arrow on the Send button and select Send and Download.
-
In the Select path to save file dialog box that opens, select a folder to save the file and press Save.
-
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.
For none Enhanced reports it will return payload with an empty value:
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.