:doc:`IoTTwinMaker <../../iottwinmaker>` / Client / get_property_value_history

**************************
get_property_value_history
**************************



.. py:method:: 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 <https://docs.aws.amazon.com/goto/WebAPI/iottwinmaker-2021-11-29/GetPropertyValueHistory>`_  


  **Request Syntax**
  ::

    response = client.get_property_value_history(
        workspaceId='string',
        entityId='string',
        componentName='string',
        componentPath='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'
    )
    
  :type workspaceId: string
  :param workspaceId: **[REQUIRED]** 

    The ID of the workspace.

    

  
  :type entityId: string
  :param entityId: 

    The ID of the entity.

    

  
  :type componentName: string
  :param componentName: 

    The name of the component.

    

  
  :type componentPath: string
  :param componentPath: 

    This string specifies the path to the composite component, starting from the top-level component.

    

  
  :type componentTypeId: string
  :param componentTypeId: 

    The ID of the component type.

    

  
  :type selectedProperties: list
  :param selectedProperties: **[REQUIRED]** 

    A list of properties whose value histories the request retrieves.

    

  
    - *(string) --* 

    

  :type propertyFilters: list
  :param propertyFilters: 

    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.

          

        
      
    

  :type startDateTime: datetime
  :param startDateTime: 

    The date and time of the earliest property value to return.

    

  
  :type endDateTime: datetime
  :param endDateTime: 

    The date and time of the latest property value to return.

    

  
  :type interpolation: dict
  :param interpolation: 

    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.

      

    
  
  :type nextToken: string
  :param nextToken: 

    The string that specifies the next page of results.

    

  
  :type maxResults: integer
  :param maxResults: 

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

     

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

    

  
  :type orderByTime: string
  :param orderByTime: 

    The time direction to use in the result order.

    

  
  :type startTime: string
  :param startTime: 

    The ISO8601 DateTime of the earliest property value to return.

     

    For more information about the ISO8601 DateTime format, see the data type `PropertyValue <https://docs.aws.amazon.com/iot-twinmaker/latest/apireference/API_PropertyValue.html>`__.

    

  
  :type endTime: string
  :param endTime: 

    The ISO8601 DateTime of the latest property value to return.

     

    For more information about the ISO8601 DateTime format, see the data type `PropertyValue <https://docs.aws.amazon.com/iot-twinmaker/latest/apireference/API_PropertyValue.html>`__.

    

  
  
  :rtype: dict
  :returns: 
    
    **Response Syntax**

    
    ::

      {
          'propertyValues': [
              {
                  'entityPropertyReference': {
                      'componentName': 'string',
                      'componentPath': '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.

              
            

            - **componentPath** *(string) --* 

              This string specifies the path to the composite component, starting from the top-level 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**
  
  *   :py:class:`IoTTwinMaker.Client.exceptions.InternalServerException`

  
  *   :py:class:`IoTTwinMaker.Client.exceptions.ConnectorFailureException`

  
  *   :py:class:`IoTTwinMaker.Client.exceptions.AccessDeniedException`

  
  *   :py:class:`IoTTwinMaker.Client.exceptions.ResourceNotFoundException`

  
  *   :py:class:`IoTTwinMaker.Client.exceptions.ThrottlingException`

  
  *   :py:class:`IoTTwinMaker.Client.exceptions.ValidationException`

  
  *   :py:class:`IoTTwinMaker.Client.exceptions.ConnectorTimeoutException`

  