batchGetAssetPropertyValueHistory method
Gets the historical values for one or more asset properties. For more information, see Querying historical values in the IoT SiteWise User Guide.
May throw InternalFailureException.
May throw InvalidRequestException.
May throw ServiceUnavailableException.
May throw ThrottlingException.
Parameter entries :
The list of asset property historical value entries for the batch get
request. You can specify up to 16 entries per request.
Parameter maxResults :
The maximum number of results to return for each paginated request. A
result set is returned in the two cases, whichever occurs first.
- The size of the result set is equal to 4 MB.
-
The number of data points in the result set is equal to the value of
maxResults. The maximum value ofmaxResultsis 20000.
Parameter nextToken :
The token to be used for the next set of paginated results.
Implementation
Future<BatchGetAssetPropertyValueHistoryResponse>
batchGetAssetPropertyValueHistory({
required List<BatchGetAssetPropertyValueHistoryEntry> entries,
int? maxResults,
String? nextToken,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
1152921504606846976,
);
final $payload = <String, dynamic>{
'entries': entries,
if (maxResults != null) 'maxResults': maxResults,
if (nextToken != null) 'nextToken': nextToken,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/properties/batch/history',
exceptionFnMap: _exceptionFns,
);
return BatchGetAssetPropertyValueHistoryResponse.fromJson(response);
}