Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

PI Web API Reference

Calculation GetAtIntervals

Calculation GetAtIntervals

Returns results of evaluating the expression over the time range from the start time to the end time at a defined interval.

Request

GET calculation/intervals

URL Parameters

  • webId

    The ID of the target object of the expression. A target object can be a Data Server, a database, an element, an event frame or an attribute. References to attributes or points are based on the target. If this parameter is not provided, the target object is set to null. See WebID for more information.

  • expression

    A string containing the expression to be evaluated. The syntax for the expression generally follows the Performance Equation syntax as described in the PI Server documentation, with the exception that expressions which target AF objects use attribute names in place of tag names in the equation. See Performance Equations for more information.

  • startTime

    An optional start time. The default is '*-1d' for element attributes and points. For event frame attributes, the default is the event frame's start time, or '*-1d' if that is not set. See Time Strings for more information.

  • endTime

    An optional end time. The default is '*' for element attributes and points. For event frame attributes, the default is the event frame's end time, or '*' if that is not set. Note that if endTime is earlier than startTime, the resulting values will be in time-descending order. See Time Strings for more information.

  • sampleInterval

    A time span specifies how often the filter expression is evaluated when computing the summary for an interval.

  • selectedFields

    List of fields to be returned in the response, separated by semicolons (;). If this parameter is not specified, all available fields will be returned. See Selected Fields for more information.

Status Codes

200: The calculated values.

409: The targeted object does not support the calculation.

Sample Response Body

{
  "Items": [
    {
      "Timestamp": "2014-07-22T14:00:00Z",
      "UnitsAbbreviation": "m",
      "Good": true,
      "Questionable": false,
      "Substituted": false,
      "Annotated": false,
      "Value": 12.3
    },
    {
      "Timestamp": "2014-07-22T14:00:00Z",
      "UnitsAbbreviation": "m",
      "Good": true,
      "Questionable": false,
      "Substituted": false,
      "Annotated": false,
      "Value": 12.3
    }
  ],
  "Links": {}
}
In This Topic
TitleResults for “How to create a CRG?”Also Available in