list(…)
Get a list of track descriptions for the specified tracker and time period.
parameters:
name | description | type |
---|---|---|
tracker_id | Id of the tracker (aka “object_id”). Tracker must belong to authorized user and must not be blocked. | int |
from | A string containing date/time in “yyyy-MM-dd HH:mm:ss” format (in user’s timezone) | String |
to | A string containing date/time in “yyyy-MM-dd HH:mm:ss” format (in user’s timezone). Specified date must be after “from” date | String |
filter | (optional, default=true) If true, tracks which are too short (in terms of length and number of points) will be omitted from resulting list. | boolean |
split | (optional, default=true) If false, all tracks will be merged into single one. | boolean |
return:
[php]
{
"success": true,
"list": [ <track_info>, … ] //list of zero or more JSON objects
}
[/php]
where <track_info> is either <regular>, <single_report> or <merged>:
[php]
<regular> =
{
"id": <track id>, //int
"start_date": <track start date, in users timezone i.e."2011-06-18 03:39:44">, //string
s timezone i.e."2011-06-18 05:18:36">, //string
"start_address": <track start address>, //string
"max_speed": <maximum speed in km/h, i.e. 96>, //int
"end_date": <track end date, in user
"end_address": <track end address>, //string
"length": <track length in kilometers, i.e. 85.5>, //float
"points": <total number of points in track, i.e. 724>, //int
"avg_speed": <average speed in km/h, i.e. 70>, //int
"type": "regular" //used to distinguish this track type from the others
}
<single_report> = //returned if device was creating reports in "interval" mode (i.e. M7 tracker in interval mode)
{
"id": <track id>, //int
"type": "single_report", //used to distinguish this track type from the others
"start_date": <point creation date in user`s timezone i.e. "2011-06-16 15:35:01">,
"start_address": <point address>, //string
"avg_speed": <point speed in km/h, i.e. 34> //int
}
<merged> = //only returned if "split" is set to "false"
{
"start_date": <track start date, in user`s timezone i.e."2011-06-18 03:39:44">, //string
"start_address": <track start address>, //string
"max_speed": <maximum speed in km/h, i.e. 96>, //int
"end_date": <track end date, in user`s timezone i.e."2011-06-18 05:18:36">, //string
"end_address": <track end address>, //string
"length": <track length in kilometers, i.e. 85.5>, //float
"points": <total number of points in track, i.e. 724>, //int
"avg_speed": <average speed in km/h, i.e. 70>, //int
"type": "merged" //used to distinguish this track type from the others
}
[/php]
errors:
- 204 – Entity not found (if there is no tracker with such id belonging to authorized user)
- 208 – Device blocked (if tracker exists but was blocked due to tariff restrictions or some other reason)
- 211 – Requested time span is too big (if interval between “from” and “to” is too big (maximum value is specified in API config)