Skip to content

Latest commit

 

History

History
104 lines (66 loc) · 9.92 KB

File metadata and controls

104 lines (66 loc) · 9.92 KB

CalculationApi

Method HTTP request Description
getAtIntervals GET /calculation/intervals Returns results of evaluating the expression over the time range from the start time to the end time at a defined interval.
getAtRecorded GET /calculation/recorded Returns the result of evaluating the expression at each point in time over the time range from the start time to the end time where a recorded value exists for a member of the expression.
getSummary GET /calculation/summary Returns the result of evaluating the expression over the time range from the start time to the end time. The time range is first divided into a number of summary intervals. Then the calculation is performed for the specified summaries over each interval.
getAtTimes GET /calculation/times Returns the result of evaluating the expression at the specified timestamps.

getAtIntervals

getAtIntervals(String endTime, String expression, String sampleInterval, String selectedFields, String startTime, String webId)

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

Parameters

Name Type Description Notes
endTime String 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.. [optional]
expression String 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.. [optional]
sampleInterval String A time span specifies how often the filter expression is evaluated when computing the summary for an interval.. [optional]
selectedFields String List of fields to be returned in the response, separated by semicolons (;). If this parameter is not specified, all available fields will be returned.. [optional]
startTime String 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.. [optional]
webId String 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.. [optional]

Return type

[Back to top] [Back to API list] [Back to Model list] [Back to DOCUMENTATION]

getAtRecorded

getAtRecorded(String endTime, String expression, String selectedFields, String startTime, String webId)

Returns the result of evaluating the expression at each point in time over the time range from the start time to the end time where a recorded value exists for a member of the expression.

Parameters

Name Type Description Notes
endTime String 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.. [optional]
expression String 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.. [optional]
selectedFields String List of fields to be returned in the response, separated by semicolons (;). If this parameter is not specified, all available fields will be returned.. [optional]
startTime String 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.. [optional]
webId String 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.. [optional]

Return type

[Back to top] [Back to API list] [Back to Model list] [Back to DOCUMENTATION]

getSummary

getSummary(String calculationBasis, String endTime, String expression, String sampleInterval, String sampleType, String selectedFields, String startTime, String summaryDuration, List summaryType, String timeType, String webId)

Returns the result of evaluating the expression over the time range from the start time to the end time. The time range is first divided into a number of summary intervals. Then the calculation is performed for the specified summaries over each interval.

Parameters

Name Type Description Notes
calculationBasis String Specifies the method of evaluating the data over the time range. The default is 'TimeWeighted'.. [optional]
endTime String 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.. [optional]
expression String 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.. [optional]
sampleInterval String A time span specifies how often the filter expression is evaluated when computing the summary for an interval, if the sampleType is 'Interval'.. [optional]
sampleType String A flag which specifies one or more summaries to compute for each interval over the time range. The default is 'ExpressionRecordedValues'.. [optional]
selectedFields String List of fields to be returned in the response, separated by semicolons (;). If this parameter is not specified, all available fields will be returned.. [optional]
startTime String 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.. [optional]
summaryDuration String The duration of each summary interval.. [optional]
summaryType List Specifies the kinds of summaries to produce over the range. The default is 'Total'. Multiple summary types may be specified by using multiple instances of summaryType.. [optional]
timeType String Specifies how to calculate the timestamp for each interval. The default is 'Auto'.. [optional]
webId String 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.. [optional]

Return type

[Back to top] [Back to API list] [Back to Model list] [Back to DOCUMENTATION]

getAtTimes

getAtTimes(String expression, String selectedFields, String sortOrder, List time, String webId)

Returns the result of evaluating the expression at the specified timestamps.

Parameters

Name Type Description Notes
expression String 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.. [optional]
selectedFields String List of fields to be returned in the response, separated by semicolons (;). If this parameter is not specified, all available fields will be returned.. [optional]
sortOrder String The order that the returned collection is sorted. The default is 'Ascending'.. [optional]
time List A list of timestamps at which to calculate the expression.. [optional]
webId String 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.. [optional]

Return type

[Back to top] [Back to API list] [Back to Model list] [Back to DOCUMENTATION]