Exercise 2: PI Web API

Document created by Milanez on May 29, 2020Last modified by Milanez on May 29, 2020
Version 2Show Document
  • View in full screen mode

Use the PI Web API Help Files for the next set of exercises

 

1. From the PI Web API landing page, open the help files for your local installation of the PI Web API

 

2. Open the PI Web API Help files hosted on the Tech Support WebPage

 

3. Using the help files, navigate to the "\\PIAF\Nugreen\Nugreen\Wichita\Cracking Process\Equipment\P-723" element without first getting the WebId of the Asset Database or Asset Server
        Hint: Look for the GetByPath action on the Elements Controller

 

A: https://localhost/piwebapi/elements/?path=\\SERVER\Nugreen\Nugreen\Wichita\Cracking%20Process\Equipment\P-723

 

4. Retrieve the attributes on this element with the value type of double

 

A: https://localhost/piwebapi/elements/{WebId value}/attributes?valueType=double

 

5. Without searching through the point list for the Data Archive, navigate to the "CDT158" point

 

A: https://localhost/piwebapi/points?path=\\SERVER\CDT158

 

(Working with URL Parameters) See: PI Web API Core Filtering Examples.pdf

 

6. Get the archived data for the past 180 days for this PI Point.

 

A: https://localhost/piwebapi/streams/{WebId value}/recorded?startTime=*-180d&endTime=*

 

7. Get the Archive Data only when the value is over 105 for the past month

 

A: https://localhost/piwebapi/streams/{WebId value}/recorded?filterExpression='.'>105&startTime=1&endTime=*

 

8. Get the interpolated data for the point every minute for the past two hours

 

A: https://localhost/piwebapi/streams/{WebId value}/interpolated?startTime=*-2h&endTime=*&interval=1m

Attachments

    Outcomes