Your Amazon Location tracker resource maintains the location history of all your tracked devices for a period of 30 days. You can retrieve device location history, including all associated metadata, from your tracker resource. The following examples use the AWS CLI, or the Amazon Location APIs.
To get the device location history from a tracker using the Amazon Location APIs
Use the GetDevicePositionHistory
operation from the
Amazon Location Trackers APIs.
The following example uses an API URI request to get the device
location history of ExampleDevice
from a
tracker called ExampleTracker
starting from
19:05:07
(inclusive) and ends at 19:20:07
(exclusive) on 2020–10–02
.
POST /tracking/v0/trackers/
ExampleTracker
/devices/ExampleDevice
/list-positions Content-type: application/json { "StartTimeInclusive": "2020-10-02T19:05:07.327Z", "EndTimeExclusive": "2020-10-02T19:20:07.327Z" }