Get_last

Description

Get info about the last Track registered by a user or dumb device.

URL

/VERSION/tracks/get_last.FORMAT

Available Format

KML,JSON

HTTP Method

GET

Accepted Version

1

Requires

Authorization.

Headers

Parameters

  • access_token: (Required) access_token to user resources. You must use the track owner user token or admin token for others users tracks request.
  • usr: (Optional) user id whom you are requesting the last track.
  • device: (Optional) device let’s recall the last track, is required if the application can use the physical devices of a user, the default option is disabled.
  • total: (Optional)if you specify a value N, N positions get the latest Track.
  • layer: (Optional) requested KML layers, separated by commas.
    • default: (default) placeholders
    • bearing: direction arrows
    • trackline:track line

Example

https://api.topoos.com/1/tracks/get_last.json?access_token=62f5280d-c954-4ee7-a0a8-68ff9c2810d8&total=3

Reply
JSON example reply

{
    id: 12736,
    name: "Track init",
    device: 4767,
    positions: [{
        id: 577541,
        device: 4767,
        timestamp: "2012-12-05T13:11:13.198+00:00",
        registerTime: "2012-12-12T10:06:50.290+00:00",
        latitude: 40.953107,
        longitude: -4.123233,
        elevation: 0,
        position_type: {
            id: 1,
            description: "TRACK_INIT"
        },
        accuracy: 0,
        vaccuracy: 0,
        bearing: 0,
        velocity: 0,
        track_id: 12736
    }, {
        id: 577542,
        device: 4767,
        timestamp: "2012-12-05T13:11:13.198+00:00",
        registerTime: "2012-12-12T10:06:50.697+00:00",
        latitude: 40.953107,
        longitude: -4.123233,
        elevation: 0,
        position_type: {
            id: 3,
            description: "POS"
        },
        accuracy: 0,
        vaccuracy: 0,
        bearing: 0,
        velocity: 0,
        track_id: 12736
    }]
}