Solution: PI Web API Help Files

Document created by jkim Employee on Jun 24, 2019Last modified by jkim Employee on Jun 24, 2019
Version 2Show Document
  • View in full screen mode
  • From the PI Web API landing page, open the help files for your local installation of the PI Web API
    1. From the main landing page, select the “PI Web API Help” URL in the upper right corner
  • Open the PI Web API Help files hosted on the Tech Support WebPage
    1. Navigate to “https://techsupport.osisoft.com/Documentation/PI-Web-API/help.html
  • 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
    1. From the main landing page, select the “PI Web API Help” URL in the upper right corner
    2. Click the “+” sign next to Controllers to list the Controller Actions
    3. Select the “Element” Controller
    4. Select the “GetByPath” Action
    5. Review the documentation for the GetByPath action on the Elements Controller
    6. Build out the following URL as governed by the “Path Syntax” section
  • Without searching through the point list for the Data Archive, navigate to the "CDT158" point
    1. From the main landing page, select the “PI Web API Help” URL in the upper right corner
    2. Click the “+” sign next to Controllers to list the Controller Actions
    3. Select the “Points” Controller
    4. Select the “GetByPath” Action
    5. Review the documentation for the GetByPath action on the Point Controller
    6. Build out the following URL as governed by the “Path Syntax” section
  • Get the Archive Data only when the value is over 105 for the past month
    1. From the Point’s URL (https://HostName/piwebapi/points?path=\\DataArchiveName\CDT158) select the “RecordedData” URL
    2. From the upper right corner select the “GetRecorded” Link to view the GetRecorded Action on the streams controller
    3. Review the documentation for the GetRecorded action on the Streams Controller
      • Note the URL parameter “filterExpression” which allows a URL to specify a filter for returned data
    4. Edit the URL in the browser to include the URL parameter to select for the value of data being returned
  • Get the interpolated data for the point every minute for the past two hours
    1. From the Point’s URL (https://HostName/piwebapi/points?path=\\DataArchiveName\CDT158) select the “InterpolatedData” URL
    2. From the upper right corner select the “GetInterpolated” Link to view the GetInterpolated Action on the streams controller
    3. Review the documentation for the GetInterpolated action on the Streams Controller
      • Note the URL parameters “startTime” and “endtime” which allows a URL to specify the range of time to query for data
      • Note the URL parameter “interval” whjich allows a URL to specify the sampling interval for data
    4. Edit the URL in the browser to include the URL parameter to select for the time range

Attachments

    Outcomes