Skip to content

Get Device Position History

locationservice_get_device_position_history R Documentation

Retrieves the device position history from a tracker resource within a specified range of time

Description

Retrieves the device position history from a tracker resource within a specified range of time.

Device positions are deleted after 30 days.

Usage

locationservice_get_device_position_history(TrackerName, DeviceId,
  NextToken, StartTimeInclusive, EndTimeExclusive, MaxResults)

Arguments

TrackerName

[required] The tracker resource receiving the request for the device position history.

DeviceId

[required] The device whose position history you want to retrieve.

NextToken

The pagination token specifying which page of results to return in the response. If no token is provided, the default page is the first page.

Default value: null

StartTimeInclusive

Specify the start time for the position history in ISO 8601 format: YYYY-MM-DDThh:mm:ss.sssZ. By default, the value will be 24 hours prior to the time that the request is made.

Requirement:

  • The time specified for StartTimeInclusive must be before EndTimeExclusive.

EndTimeExclusive

Specify the end time for the position history in ISO 8601 format: YYYY-MM-DDThh:mm:ss.sssZ. By default, the value will be the time that the request is made.

Requirement:

  • The time specified for EndTimeExclusive must be after the time for StartTimeInclusive.

MaxResults

An optional limit for the number of device positions returned in a single call.

Default value: 100

Value

A list with the following syntax:

list(
  DevicePositions = list(
    list(
      DeviceId = "string",
      SampleTime = as.POSIXct(
        "2015-01-01"
      ),
      ReceivedTime = as.POSIXct(
        "2015-01-01"
      ),
      Position = list(
        123.0
      ),
      Accuracy = list(
        Horizontal = 123.0
      ),
      PositionProperties = list(
        "string"
      )
    )
  ),
  NextToken = "string"
)

Request syntax

svc$get_device_position_history(
  TrackerName = "string",
  DeviceId = "string",
  NextToken = "string",
  StartTimeInclusive = as.POSIXct(
    "2015-01-01"
  ),
  EndTimeExclusive = as.POSIXct(
    "2015-01-01"
  ),
  MaxResults = 123
)