Skip to content

Latest commit

 

History

History
303 lines (193 loc) · 26.1 KB

File metadata and controls

303 lines (193 loc) · 26.1 KB

StreamApi

Method HTTP request Description
getChannel GET /streams/{webId}/channel Opens a channel that will send messages about any value changes for the specified stream.
getEnd GET /streams/{webId}/end Returns the end-of-stream value of the stream.
getInterpolated GET /streams/{webId}/interpolated Retrieves interpolated values over the specified time range at the specified sampling interval.
getInterpolatedAtTimes GET /streams/{webId}/interpolatedattimes Retrieves interpolated values over the specified time range at the specified sampling interval.
getPlot GET /streams/{webId}/plot Retrieves values over the specified time range suitable for plotting over the number of intervals (typically represents pixels).
getRecorded GET /streams/{webId}/recorded Returns a list of compressed values for the requested time range from the source provider.
updateValues POST /streams/{webId}/recorded Updates multiple values for the specified stream.
getRecordedAtTime GET /streams/{webId}/recordedattime Returns a single recorded value based on the passed time and retrieval mode from the stream.
getRecordedAtTimes GET /streams/{webId}/recordedattimes Retrieves recorded values at the specified times.
getSummary GET /streams/{webId}/summary Returns a summary over the specified time range for the stream.
getValue GET /streams/{webId}/value Returns the value of the stream at the specified time. By default, this is usually the current value.
updateValue POST /streams/{webId}/value Updates a value for the specified stream.

getChannel

getChannel(String webId, Integer heartbeatRate, Boolean includeInitialValues, String webIdType)

Opens a channel that will send messages about any value changes for the specified stream.

Parameters

Name Type Description Notes
webId String The ID of the stream.. [required]
heartbeatRate Integer HeartbeatRate is an integer multiple of the Polling Interval. It specifies the rate at which a client will receive an empty message if there are no data updates. It can be used to check that the connection is still alive. Zero/negative values correspond to no heartbeat. By default, no empty messages will be sent to the user.. [optional]
includeInitialValues Boolean Specified if the channel should send a message with the current value of the stream after the connection is opened. The default is 'false'.. [optional]
webIdType String Optional parameter. Used to specify the type of WebID. Useful for URL brevity and other special cases. Default is the value of the configuration item "WebIDType".. [optional]

Return type

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

getEnd

getEnd(String webId, String desiredUnits, String selectedFields)

Returns the end-of-stream value of the stream.

Parameters

Name Type Description Notes
webId String The ID of the stream.. [required]
desiredUnits String The name or abbreviation of the desired units of measure for the returned value, as found in the UOM database associated with the attribute. If not specified for an attribute, the attribute's default unit of measure is used. If the underlying stream is a point, this value may not be specified, as points are not associated with a unit of measure.. [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]

Return type

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

getInterpolated

getInterpolated(String webId, String desiredUnits, String endTime, String filterExpression, Boolean includeFilteredValues, String interval, String selectedFields, String startTime, String syncTime, String syncTimeBoundaryType, String timeZone)

Retrieves interpolated values over the specified time range at the specified sampling interval.

Parameters

Name Type Description Notes
webId String The ID of the stream.. [required]
desiredUnits String The name or abbreviation of the desired units of measure for the returned value, as found in the UOM database associated with the attribute. If not specified for an attribute, the attribute's default unit of measure is used. If the underlying stream is a point, this value may not be specified, as points are not associated with a unit of measure.. [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]
filterExpression String An optional string containing a filter expression. Expression variables are relative to the data point. Use '.' to reference the containing attribute. If the attribute does not support filtering, the filter will be ignored. The default is no filtering.. [optional]
includeFilteredValues Boolean Specify 'true' to indicate that values which fail the filter criteria are present in the returned data at the times where they occurred with a value set to a 'Filtered' enumeration value with bad status. Repeated consecutive failures are omitted.. [optional]
interval String The sampling interval, in AFTimeSpan format.. [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]
syncTime String An optional start time anchor, in AFTime format. When specified, interpolated data retrieval will use the sync time as the origin for calculating the interval times.. [optional]
syncTimeBoundaryType String An optional string specifying the boundary type to use when applying a syncTime. The allowed values are 'Inside' and 'Outside'. The default is 'Inside'.. [optional]
timeZone String The time zone in which the time string will be interpreted. This parameter will be ignored if a time zone is specified in the time string. If no time zone is specified in either places, the PI Web API server time zone will be used.. [optional]

Return type

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

getInterpolatedAtTimes

getInterpolatedAtTimes(String webId, String desiredUnits, String filterExpression, Boolean includeFilteredValues, String selectedFields, String sortOrder, List time, String timeZone)

Retrieves interpolated values over the specified time range at the specified sampling interval.

Parameters

Name Type Description Notes
webId String The ID of the stream.. [required]
desiredUnits String The name or abbreviation of the desired units of measure for the returned value, as found in the UOM database associated with the attribute. If not specified for an attribute, the attribute's default unit of measure is used. If the underlying stream is a point, this value may not be specified, as points are not associated with a unit of measure.. [optional]
filterExpression String An optional string containing a filter expression. Expression variables are relative to the data point. Use '.' to reference the containing attribute. If the attribute does not support filtering, the filter will be ignored. The default is no filtering.. [optional]
includeFilteredValues Boolean Specify 'true' to indicate that values which fail the filter criteria are present in the returned data at the times where they occurred with a value set to a 'Filtered' enumeration value with bad status. Repeated consecutive failures are omitted.. [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 The timestamp at which to retrieve an interpolated value. Multiple timestamps may be specified with multiple instances of the parameter.. [optional]
timeZone String The time zone in which the time string will be interpreted. This parameter will be ignored if a time zone is specified in the time string. If no time zone is specified in either places, the PI Web API server time zone will be used.. [optional]

Return type

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

getPlot

getPlot(String webId, String desiredUnits, String endTime, Integer intervals, String selectedFields, String startTime, String timeZone)

Retrieves values over the specified time range suitable for plotting over the number of intervals (typically represents pixels).

Parameters

Name Type Description Notes
webId String The ID of the stream.. [required]
desiredUnits String The name or abbreviation of the desired units of measure for the returned value, as found in the UOM database associated with the attribute. If not specified for an attribute, the attribute's default unit of measure is used. If the underlying stream is a point, this value may not be specified, as points are not associated with a unit of measure.. [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]
intervals Integer The number of intervals to plot over. Typically, this would be the number of horizontal pixels in the trend. The default is '24'. For each interval, the data available is examined and significant values are returned. Each interval can produce up to 5 values if they are unique, the first value in the interval, the last value, the highest value, the lowest value and at most one exceptional point (bad status or digital state).. [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]
timeZone String The time zone in which the time string will be interpreted. This parameter will be ignored if a time zone is specified in the time string. If no time zone is specified in either places, the PI Web API server time zone will be used.. [optional]

Return type

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

getRecorded

getRecorded(String webId, String boundaryType, String desiredUnits, String endTime, String filterExpression, Boolean includeFilteredValues, Integer maxCount, String selectedFields, String startTime, String timeZone)

Returns a list of compressed values for the requested time range from the source provider.

Parameters

Name Type Description Notes
webId String The ID of the stream.. [required]
boundaryType String An optional value that determines how the times and values of the returned end points are determined. The default is 'Inside'.. [optional]
desiredUnits String The name or abbreviation of the desired units of measure for the returned value, as found in the UOM database associated with the attribute. If not specified for an attribute, the attribute's default unit of measure is used. If the underlying stream is a point, this value may not be specified, as points are not associated with a unit of measure.. [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]
filterExpression String An optional string containing a filter expression. Expression variables are relative to the data point. Use '.' to reference the containing attribute. The default is no filtering.. [optional]
includeFilteredValues Boolean Specify 'true' to indicate that values which fail the filter criteria are present in the returned data at the times where they occurred with a value set to a 'Filtered' enumeration value with bad status. Repeated consecutive failures are omitted.. [optional]
maxCount Integer The maximum number of values to be returned. The default is 1000.. [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]
timeZone String The time zone in which the time string will be interpreted. This parameter will be ignored if a time zone is specified in the time string. If no time zone is specified in either places, the PI Web API server time zone will be used.. [optional]

Return type

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

updateValues

updateValues(String webId, List values, String bufferOption, String updateOption)

Updates multiple values for the specified stream.

Parameters

Name Type Description Notes
webId String The ID of the stream.. [required]
values List The values to add or update.. [required]
bufferOption String The desired AFBufferOption. The default is 'BufferIfPossible'.. [optional]
updateOption String The desired AFUpdateOption. The default is 'Replace'.. [optional]

Return type

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

getRecordedAtTime

getRecordedAtTime(String webId, String time, String desiredUnits, String retrievalMode, String selectedFields, String timeZone)

Returns a single recorded value based on the passed time and retrieval mode from the stream.

Parameters

Name Type Description Notes
webId String The ID of the stream.. [required]
time String The timestamp at which the value is desired.. [required]
desiredUnits String The name or abbreviation of the desired units of measure for the returned value, as found in the UOM database associated with the attribute. If not specified for an attribute, the attribute's default unit of measure is used. If the underlying stream is a point, this value may not be specified, as points are not associated with a unit of measure.. [optional]
retrievalMode String An optional value that determines the value to return when a value doesn't exist at the exact time specified. The default is 'Auto'.. [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]
timeZone String The time zone in which the time string will be interpreted. This parameter will be ignored if a time zone is specified in the time string. If no time zone is specified in either places, the PI Web API server time zone will be used.. [optional]

Return type

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

getRecordedAtTimes

getRecordedAtTimes(String webId, String desiredUnits, String retrievalMode, String selectedFields, String sortOrder, List time, String timeZone)

Retrieves recorded values at the specified times.

Parameters

Name Type Description Notes
webId String The ID of the stream.. [required]
desiredUnits String The name or abbreviation of the desired units of measure for the returned value, as found in the UOM database associated with the attribute. If not specified for an attribute, the attribute's default unit of measure is used. If the underlying stream is a point, this value may not be specified, as points are not associated with a unit of measure.. [optional]
retrievalMode String An optional value that determines the value to return when a value doesn't exist at the exact time specified. The default is 'Auto'.. [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 The timestamp at which to retrieve a recorded value. Multiple timestamps may be specified with multiple instances of the parameter.. [optional]
timeZone String The time zone in which the time string will be interpreted. This parameter will be ignored if a time zone is specified in the time string. If no time zone is specified in either places, the PI Web API server time zone will be used.. [optional]

Return type

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

getSummary

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

Returns a summary over the specified time range for the stream.

Parameters

Name Type Description Notes
webId String The ID of the stream.. [required]
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]
filterExpression String A string containing a filter expression. Expression variables are relative to the attribute. Use '.' to reference the containing attribute.. [optional]
sampleInterval String When the sampleType is Interval, sampleInterval specifies how often the filter expression is evaluated when computing the summary for an interval.. [optional]
sampleType String Defines the evaluation of an expression over a 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. If specified in hours, minutes, seconds, or milliseconds, the summary durations will be evenly spaced UTC time intervals. Longer interval types are interpreted using wall clock rules and are time zone dependent.. [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]
timeZone String The time zone in which the time string will be interpreted. This parameter will be ignored if a time zone is specified in the time string. If no time zone is specified in either places, the PI Web API server time zone will be used.. [optional]

Return type

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

getValue

getValue(String webId, String desiredUnits, String selectedFields, String time, String timeZone)

Returns the value of the stream at the specified time. By default, this is usually the current value.

Parameters

Name Type Description Notes
webId String The ID of the stream.. [required]
desiredUnits String The name or abbreviation of the desired units of measure for the returned value, as found in the UOM database associated with the attribute. If not specified for an attribute, the attribute's default unit of measure is used. If the underlying stream is a point, this value may not be specified, as points are not associated with a unit of measure.. [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]
time String An optional time. The default time context is determined from the owning object - for example, the time range of the event frame or transfer which holds this attribute. Otherwise, the implementation of the Data Reference determines the meaning of no context. For Points or simply configured PI Point Data References, this means the snapshot value of the PI Point on the Data Server.. [optional]
timeZone String The time zone in which the time string will be interpreted. This parameter will be ignored if a time zone is specified in the time string. If no time zone is specified in either places, the PI Web API server time zone will be used.. [optional]

Return type

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

updateValue

updateValue(String webId, PITimedValue value, String bufferOption, String updateOption, String webIdType)

Updates a value for the specified stream.

Parameters

Name Type Description Notes
webId String The ID of the stream.. [required]
value PITimedValue The value to add or update.. [required]
bufferOption String The desired AFBufferOption. The default is 'BufferIfPossible'.. [optional]
updateOption String The desired AFUpdateOption. The default is 'Replace'. This parameter is ignored if the attribute is a configuration item.. [optional]
webIdType String Optional parameter. Used to specify the type of WebID. Useful for URL brevity and other special cases. Default is the value of the configuration item "WebIDType".. [optional]

Return type

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