get_property_value_history

IoTTwinMaker.Client.get_property_value_history(**kwargs)

Retrieves information about the history of a time series property value for a component, component type, entity, or workspace.

You must specify a value for workspaceId . For entity-specific queries, specify values for componentName and entityId . For cross-entity quries, specify a value for componentTypeId .

See also: AWS API Documentation

Request Syntax

response = client.get_property_value_history(
    workspaceId='string',
    entityId='string',
    componentName='string',
    componentTypeId='string',
    selectedProperties=[
        'string',
    ],
    propertyFilters=[
        {
            'propertyName': 'string',
            'operator': 'string',
            'value': {
                'booleanValue': True|False,
                'doubleValue': 123.0,
                'integerValue': 123,
                'longValue': 123,
                'stringValue': 'string',
                'listValue': [
                    {'... recursive ...'},
                ],
                'mapValue': {
                    'string': {'... recursive ...'}
                },
                'relationshipValue': {
                    'targetEntityId': 'string',
                    'targetComponentName': 'string'
                },
                'expression': 'string'
            }
        },
    ],
    startDateTime=datetime(2015, 1, 1),
    endDateTime=datetime(2015, 1, 1),
    interpolation={
        'interpolationType': 'LINEAR',
        'intervalInSeconds': 123
    },
    nextToken='string',
    maxResults=123,
    orderByTime='ASCENDING'|'DESCENDING',
    startTime='string',
    endTime='string'
)
Parameters
  • workspaceId (string) --

    [REQUIRED]

    The ID of the workspace.

  • entityId (string) -- The ID of the entity.
  • componentName (string) -- The name of the component.
  • componentTypeId (string) -- The ID of the component type.
  • selectedProperties (list) --

    [REQUIRED]

    A list of properties whose value histories the request retrieves.

    • (string) --
  • propertyFilters (list) --

    A list of objects that filter the property value history request.

    • (dict) --

      An object that filters items returned by a property request.

      • propertyName (string) --

        The property name associated with this property filter.

      • operator (string) --

        The operator associated with this property filter.

      • value (dict) --

        The value associated with this property filter.

        • booleanValue (boolean) --

          A Boolean value.

        • doubleValue (float) --

          A double value.

        • integerValue (integer) --

          An integer value.

        • longValue (integer) --

          A long value.

        • stringValue (string) --

          A string value.

        • listValue (list) --

          A list of multiple values.

          • (dict) --

            An object that specifies a value for a property.

        • mapValue (dict) --

          An object that maps strings to multiple DataValue objects.

          • (string) --
            • (dict) --

              An object that specifies a value for a property.

        • relationshipValue (dict) --

          A value that relates a component to another component.

          • targetEntityId (string) --

            The ID of the target entity associated with this relationship value.

          • targetComponentName (string) --

            The name of the target component associated with the relationship value.

        • expression (string) --

          An expression that produces the value.

  • startDateTime (datetime) -- The date and time of the earliest property value to return.
  • endDateTime (datetime) -- The date and time of the latest property value to return.
  • interpolation (dict) --

    An object that specifies the interpolation type and the interval over which to interpolate data.

    • interpolationType (string) --

      The interpolation type.

    • intervalInSeconds (integer) --

      The interpolation time interval in seconds.

  • nextToken (string) -- The string that specifies the next page of results.
  • maxResults (integer) --

    The maximum number of results to return at one time. The default is 25.

    Valid Range: Minimum value of 1. Maximum value of 250.

  • orderByTime (string) -- The time direction to use in the result order.
  • startTime (string) --

    The ISO8601 DateTime of the earliest property value to return.

    For more information about the ISO8601 DateTime format, see the data type PropertyValue.

  • endTime (string) --

    The ISO8601 DateTime of the latest property value to return.

    For more information about the ISO8601 DateTime format, see the data type PropertyValue.

Return type

dict

Returns

Response Syntax

{
    'propertyValues': [
        {
            'entityPropertyReference': {
                'componentName': 'string',
                'externalIdProperty': {
                    'string': 'string'
                },
                'entityId': 'string',
                'propertyName': 'string'
            },
            'values': [
                {
                    'timestamp': datetime(2015, 1, 1),
                    'value': {
                        'booleanValue': True|False,
                        'doubleValue': 123.0,
                        'integerValue': 123,
                        'longValue': 123,
                        'stringValue': 'string',
                        'listValue': [
                            {'... recursive ...'},
                        ],
                        'mapValue': {
                            'string': {'... recursive ...'}
                        },
                        'relationshipValue': {
                            'targetEntityId': 'string',
                            'targetComponentName': 'string'
                        },
                        'expression': 'string'
                    },
                    'time': 'string'
                },
            ]
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • propertyValues (list) --

      An object that maps strings to the property definitions in the component type. Each string in the mapping must be unique to this object.

      • (dict) --

        The history of values for a time series property.

        • entityPropertyReference (dict) --

          An object that uniquely identifies an entity property.

          • componentName (string) --

            The name of the component.

          • externalIdProperty (dict) --

            A mapping of external IDs to property names. External IDs uniquely identify properties from external data stores.

            • (string) --
              • (string) --
          • entityId (string) --

            The ID of the entity.

          • propertyName (string) --

            The name of the property.

        • values (list) --

          A list of objects that contain information about the values in the history of a time series property.

          • (dict) --

            An object that contains information about a value for a time series property.

            • timestamp (datetime) --

              The timestamp of a value for a time series property.

            • value (dict) --

              An object that specifies a value for a time series property.

              • booleanValue (boolean) --

                A Boolean value.

              • doubleValue (float) --

                A double value.

              • integerValue (integer) --

                An integer value.

              • longValue (integer) --

                A long value.

              • stringValue (string) --

                A string value.

              • listValue (list) --

                A list of multiple values.

                • (dict) --

                  An object that specifies a value for a property.

              • mapValue (dict) --

                An object that maps strings to multiple DataValue objects.

                • (string) --

                  • (dict) --

                    An object that specifies a value for a property.

              • relationshipValue (dict) --

                A value that relates a component to another component.

                • targetEntityId (string) --

                  The ID of the target entity associated with this relationship value.

                • targetComponentName (string) --

                  The name of the target component associated with the relationship value.

              • expression (string) --

                An expression that produces the value.

            • time (string) --

              ISO8601 DateTime of a value for a time series property.

              The time for when the property value was recorded in ISO 8601 format: YYYY-MM-DDThh:mm:ss[.SSSSSSSSS][Z/±HH:mm] .

              • [YYYY] : year
              • [MM] : month
              • [DD] : day
              • [hh] : hour
              • [mm] : minute
              • [ss] : seconds
              • [.SSSSSSSSS] : additional precision, where precedence is maintained. For example: [.573123] is equal to 573123000 nanoseconds.
              • Z : default timezone UTC
              • ± HH:mm : time zone offset in Hours and Minutes.

              Required sub-fields : YYYY-MM-DDThh:mm:ss and [Z/±HH:mm]

    • nextToken (string) --

      The string that specifies the next page of results.

Exceptions

  • IoTTwinMaker.Client.exceptions.InternalServerException
  • IoTTwinMaker.Client.exceptions.ConnectorFailureException
  • IoTTwinMaker.Client.exceptions.AccessDeniedException
  • IoTTwinMaker.Client.exceptions.ResourceNotFoundException
  • IoTTwinMaker.Client.exceptions.ThrottlingException
  • IoTTwinMaker.Client.exceptions.ValidationException
  • IoTTwinMaker.Client.exceptions.ConnectorTimeoutException