batchDeleteDevicePositionHistory method

Future<BatchDeleteDevicePositionHistoryResponse> batchDeleteDevicePositionHistory({
  1. required List<String> deviceIds,
  2. required String trackerName,
})

Deletes the position history of one or more devices from a tracker resource.

May throw AccessDeniedException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw ValidationException.

Parameter deviceIds : Devices whose position history you want to delete.

  • For example, for two devices: “DeviceIds” : \[DeviceId1,DeviceId2\]

Parameter trackerName : The name of the tracker resource to delete the device position history from.

Implementation

Future<BatchDeleteDevicePositionHistoryResponse>
    batchDeleteDevicePositionHistory({
  required List<String> deviceIds,
  required String trackerName,
}) async {
  final $payload = <String, dynamic>{
    'DeviceIds': deviceIds,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri:
        '/tracking/v0/trackers/${Uri.encodeComponent(trackerName)}/delete-positions',
    exceptionFnMap: _exceptionFns,
  );
  return BatchDeleteDevicePositionHistoryResponse.fromJson(response);
}