getPropertyValueHistory method
- required List<
String> selectedProperties, - required String workspaceId,
- String? componentName,
- String? componentPath,
- String? componentTypeId,
- DateTime? endDateTime,
- String? endTime,
- String? entityId,
- InterpolationParameters? interpolation,
- int? maxResults,
- String? nextToken,
- OrderByTime? orderByTime,
- List<
PropertyFilter> ? propertyFilters, - DateTime? startDateTime,
- String? startTime,
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.
May throw AccessDeniedException.
May throw ConnectorFailureException.
May throw ConnectorTimeoutException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter selectedProperties :
A list of properties whose value histories the request retrieves.
Parameter workspaceId :
The ID of the workspace.
Parameter componentName :
The name of the component.
Parameter componentPath :
This string specifies the path to the composite component, starting from
the top-level component.
Parameter componentTypeId :
The ID of the component type.
Parameter endDateTime :
The date and time of the latest property value to return.
Parameter endTime :
The ISO8601 DateTime of the latest property value to return.
For more information about the ISO8601 DateTime format, see the data type PropertyValue.
Parameter entityId :
The ID of the entity.
Parameter interpolation :
An object that specifies the interpolation type and the interval over
which to interpolate data.
Parameter 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.
Parameter nextToken :
The string that specifies the next page of results.
Parameter orderByTime :
The time direction to use in the result order.
Parameter propertyFilters :
A list of objects that filter the property value history request.
Parameter startDateTime :
The date and time of the earliest property value to return.
Parameter startTime :
The ISO8601 DateTime of the earliest property value to return.
For more information about the ISO8601 DateTime format, see the data type PropertyValue.
Implementation
Future<GetPropertyValueHistoryResponse> getPropertyValueHistory({
required List<String> selectedProperties,
required String workspaceId,
String? componentName,
String? componentPath,
String? componentTypeId,
DateTime? endDateTime,
String? endTime,
String? entityId,
InterpolationParameters? interpolation,
int? maxResults,
String? nextToken,
OrderByTime? orderByTime,
List<PropertyFilter>? propertyFilters,
DateTime? startDateTime,
String? startTime,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
0,
200,
);
final $payload = <String, dynamic>{
'selectedProperties': selectedProperties,
if (componentName != null) 'componentName': componentName,
if (componentPath != null) 'componentPath': componentPath,
if (componentTypeId != null) 'componentTypeId': componentTypeId,
if (endDateTime != null) 'endDateTime': unixTimestampToJson(endDateTime),
if (endTime != null) 'endTime': endTime,
if (entityId != null) 'entityId': entityId,
if (interpolation != null) 'interpolation': interpolation,
if (maxResults != null) 'maxResults': maxResults,
if (nextToken != null) 'nextToken': nextToken,
if (orderByTime != null) 'orderByTime': orderByTime.value,
if (propertyFilters != null) 'propertyFilters': propertyFilters,
if (startDateTime != null)
'startDateTime': unixTimestampToJson(startDateTime),
if (startTime != null) 'startTime': startTime,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri:
'/workspaces/${Uri.encodeComponent(workspaceId)}/entity-properties/history',
hostPrefix: 'data.',
exceptionFnMap: _exceptionFns,
);
return GetPropertyValueHistoryResponse.fromJson(response);
}