@ -28,6 +28,8 @@ The open source iOS [GPS Logger](https://github.com/esripdx/GPS-Logger-iOS) will
To read a database, make a GET request as follows:
To read a database, make a GET request as follows:
#### Get all data for a calendar day
`GET /api/query`
`GET /api/query`
* token - (required) the read token for the database
* token - (required) the read token for the database
@ -37,12 +39,16 @@ To read a database, make a GET request as follows:
* linestring - combine all the returned results into a GeoJSON linestring
* linestring - combine all the returned results into a GeoJSON linestring
* date - specify a date to return all data on that day (YYYY-mm-dd format)
* date - specify a date to return all data on that day (YYYY-mm-dd format)
#### Get the last location before a given timestamp
`GET /api/last`
`GET /api/last`
* token - (required) the read token for the database
* token - (required) the read token for the database
* tz - (optional, default UTC) timezone string (e.g. America/Los_Angeles) which will be used to determine the absolute start/end times for the day
* tz - (optional, default UTC) timezone string (e.g. America/Los_Angeles) which will be used to determine the absolute start/end times for the day
* before - (optional, default to now) specify a full timestamp to return a single record before this date (the point returned will be no more than 24 hours before the given date)
* before - (optional, default to now) specify a full timestamp to return a single record before this date (the point returned will be no more than 24 hours before the given date)
* geocode - (optional) if "true", then the location found will be reverse geocoded using [Atlas](https://atlas.p3k.io) to find the city and timezone at the location
* geocode - (optional) if "true", then the location found will be reverse geocoded using [Atlas](https://atlas.p3k.io) to find the city and timezone at the location
#### Find the last location matching a clock time
`GET /api/find-from-localtime`
`GET /api/find-from-localtime`
This API method can help you answer the question "Where was I when my watch read 9:30am on July 15th?".
This API method can help you answer the question "Where was I when my watch read 9:30am on July 15th?".