Query the value history for an asset property (Amazon CLI) - Amazon IoT SiteWise
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Query the value history for an asset property (Amazon CLI)

To query the value history for an asset property (Amazon CLI)
  1. Run the following command to get the value history for the asset property. This command queries the property's history over a specific 10 minute interval. Replace asset-id with the ID of the asset and property-id with the ID of the property. Replace the date parameters with the interval to query.

    aws iotsitewise get-asset-property-value-history \ --asset-id asset-id \ --property-id property-id \ --start-date 1575216000 \ --end-date 1575216600

    The operation returns a response that contains the historical TQVs of the property in the following format:

    { "assetPropertyValueHistory": [ { "value": { "booleanValue": Boolean, "doubleValue": Number, "integerValue": Number, "stringValue": "String" }, "timestamp": { "timeInSeconds": Number, "offsetInNanos": Number }, "quality": "String" } ], "nextToken": "String" }
  2. If more value entries exist, you can pass the pagination token from the nextToken field to a subsequent call to the GetAssetPropertyValueHistory operation.