Calculation GetAtTimes
- Last UpdatedJun 15, 2023
- 1 minute read
- PI System
- PI Web API Reference
- Developer
Calculation GetAtTimes
Returns the result of evaluating the expression at the specified timestamps.
Request
GET calculation/times
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.
-
time A list of timestamps at which to calculate the expression. See Time Strings for more information.
-
sortOrder The order that the returned collection is sorted. The default is 'Ascending'. See Sort Order for more information.
-
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": {}
}