API get positions

Garuti6 years ago

Hi,

when I call API Method /api/positions with no parameters it returns

NullPointerException (... < DateUtil:64 < PositionResource:67 < ...)

when I call API whith devideId parameter:

/api/positions?deviceId=10&from=2019-05-16T18:30:00Z&to=2019-05-17T18:30:00Z

it returns a list of positions for the device

I try also:

/api/positions?from=2019-05-16T18:30:00Z&to=2019-05-17T18:30:00Z

it returns a list empty.

what it may depend on?

Thank you in advance,

Alessandra

jeeva6 years ago

/api/positions with no parameters --- this returns latest position for the all the devices.

/api/positions?deviceId=10&from=2019-05-16T18:30:00Z&to=2019-05-17T18:30:00Z - returns list of positions for that particular device between the given time ,order by fixtime.

Garuti6 years ago

yes, it is clear, I do not understand why the call without parameters goes wrong:

NullPointerException (... < DateUtil:64 < PositionResource:67 < ...)

Thanks

jeeva6 years ago

i can fix the issue, it must be issue with location data you have in positions table for some device. i can do at nominal cost.

Garuti6 years ago

Thank you, I am currently using Traccar to evaluate it. I'll try to reinitialize the data to find the device that generates the problem.