AWS IoT SiteWise

2021/04/28 - AWS IoT SiteWise - 1 new api methods

Changes  AWS IoT SiteWise interpolation API will get interpolated values for an asset property per specified time interval during a period of time.

GetInterpolatedAssetPropertyValues (new) Link ΒΆ

Get interpolated values for an asset property for a specified time interval, during a period of time. For example, you can use the this operation to return the interpolated temperature values for a wind turbine every 24 hours over a duration of 7 days.

To identify an asset property, you must specify one of the following:

  • The assetId and propertyId of an asset property.

  • A propertyAlias, which is a data stream alias (for example, /company/windfarm/3/turbine/7/temperature). To define an asset property's alias, see UpdateAssetProperty.

See also: AWS API Documentation

Request Syntax

client.get_interpolated_asset_property_values(
    assetId='string',
    propertyId='string',
    propertyAlias='string',
    startTimeInSeconds=123,
    startTimeOffsetInNanos=123,
    endTimeInSeconds=123,
    endTimeOffsetInNanos=123,
    quality='GOOD'|'BAD'|'UNCERTAIN',
    intervalInSeconds=123,
    nextToken='string',
    maxResults=123,
    type='string'
)
type assetId:

string

param assetId:

The ID of the asset.

type propertyId:

string

param propertyId:

The ID of the asset property.

type propertyAlias:

string

param propertyAlias:

The property alias that identifies the property, such as an OPC-UA server data stream path (for example, /company/windfarm/3/turbine/7/temperature). For more information, see Mapping industrial data streams to asset properties in the AWS IoT SiteWise User Guide.

type startTimeInSeconds:

integer

param startTimeInSeconds:

[REQUIRED]

The exclusive start of the range from which to interpolate data, expressed in seconds in Unix epoch time.

type startTimeOffsetInNanos:

integer

param startTimeOffsetInNanos:

The nanosecond offset converted from startTimeInSeconds.

type endTimeInSeconds:

integer

param endTimeInSeconds:

[REQUIRED]

The inclusive end of the range from which to interpolate data, expressed in seconds in Unix epoch time.

type endTimeOffsetInNanos:

integer

param endTimeOffsetInNanos:

The nanosecond offset converted from endTimeInSeconds.

type quality:

string

param quality:

[REQUIRED]

The quality of the asset property value. You can use this parameter as a filter to choose only the asset property values that have a specific quality.

type intervalInSeconds:

integer

param intervalInSeconds:

[REQUIRED]

The time interval in seconds over which to interpolate data. Each interval starts when the previous one ends.

type nextToken:

string

param nextToken:

The token to be used for the next set of paginated results.

type maxResults:

integer

param maxResults:

The maximum number of results to be returned per paginated request. If not specified, the default value is 10.

type type:

string

param type:

[REQUIRED]

The interpolation type.

Valid values: LINEAR_INTERPOLATION

rtype:

dict

returns:

Response Syntax

{
    'interpolatedAssetPropertyValues': [
        {
            'timestamp': {
                'timeInSeconds': 123,
                'offsetInNanos': 123
            },
            'value': {
                'stringValue': 'string',
                'integerValue': 123,
                'doubleValue': 123.0,
                'booleanValue': True|False
            }
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • interpolatedAssetPropertyValues (list) --

      The requested interpolated values.

      • (dict) --

        Contains information about an interpolated asset property value.

        • timestamp (dict) --

          Contains a timestamp with optional nanosecond granularity.

          • timeInSeconds (integer) --

            The timestamp date, in seconds, in the Unix epoch format. Fractional nanosecond data is provided by offsetInNanos.

          • offsetInNanos (integer) --

            The nanosecond offset from timeInSeconds.

        • value (dict) --

          Contains an asset property value (of a single type only).

          • stringValue (string) --

            Asset property data of type string (sequence of characters).

          • integerValue (integer) --

            Asset property data of type integer (whole number).

          • doubleValue (float) --

            Asset property data of type double (floating point number).

          • booleanValue (boolean) --

            Asset property data of type Boolean (true or false).

    • nextToken (string) --

      The token for the next set of results, or null if there are no additional results.