get the last position known from a given datetime

Damien 8 years ago

Hi, for my project i need to get the last position known from a given date time
There is no possibility with the API right now, maybe someone here already encounter this need?

parameters: deviceIdArray (one on more), maxDate (datetime)
response: array of deviceId,fixtime, latitude, longitude

maxDate is a past date (need this for security purpose)

Thanks, regards

Anton Tananaev 8 years ago

You can get positions by time period and select closest to the end time.

Andrea 6 years ago

Anton, would you mind spending a couple of words more to enlighten how this could be achieved?

Anton Tananaev 6 years ago

Which part is not clear?

Andrea 6 years ago

Well, I've seen that with this request

https://xxxxxxx/api/positions?from=xxxxxxxxxx&to=xxxxxxxxxxxxx

I can get the position of all the devices in a specified moment, but I don-t get how I can get the LAST known position.
Thanks!

Anton Tananaev 6 years ago

To get last known locations for all devices you just call:

https://xxxxxxx/api/positions

That's not what this topic is about though, unless I misunderstand something.

Andrea 6 years ago
That's not what this topic is about though, unless I misunderstand something.

You're right, I got it wrong. I arrived here looking for the last known location and...

https://xxxxxxx/api/positions

Thanks!