Query the value history for an asset property (Amazon CLI)
To query the value history for an asset property (Amazon CLI)
-
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 andproperty-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-idproperty-id
\ --start-date1575216000
\ --end-date1575216600
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
" } -
If more value entries exist, you can pass the pagination token from the
nextToken
field to a subsequent call to the GetAssetPropertyValueHistory operation.