vitalidze / traccar-web

Traccar Web UI mod
http://traccar.litvak.su/
151 stars 145 forks source link

Error Get Reports/summary API #1167

Closed fxteguhab closed 7 years ago

fxteguhab commented 7 years ago

Hello, I use Traccar 3.9 + mod Web UI

I'm trying to pull a report summary using the API with the following : http://localhost:8082/api/reports/summary?to=2017-08-31T09%3A00%3A00Z&from=2017-01-01T01%3A00%3A00Z&deviceId=33

I got Raw data error : Column "FIXTIME" not found; SQL statement: SELECT FROM positions WHERE deviceId = ? AND fixTime BETWEEN ? AND ? ORDER BY fixTime [42122-193] - JdbcSQLException (... < QueryBuilder:62 < :132 < DataManager:276 < Summary:44 < ...)

Am I missed something ? Thanks Teguh

vitalidze commented 7 years ago

You are trying to use API from original traccar. It is not supported when you install the Traccar Web UI Mod.

fxteguhab commented 7 years ago

is there any way to have the same result (I tried to get distance summary from specific time period) with Traccar Web UI Mod ?

Thanks a lot Teguh

vitalidze commented 7 years ago

Currently there is no way to get this data for the period as a single query. As an option you can load all positions within some period and them sum up all 'distance' values one by one. For additional information on using REST API of Traccar Web UI Mod please refer to this page: http://traccar.litvak.su/features/rest-api.html

fxteguhab commented 7 years ago

Thanks for the advice, but I got ' HTTP Error 400: Unknown Version ' with this request : request = urllib2.Request(baseUrl + '/traccar/rest/getPositions?payload=[{"id":1},"2017-08-01 01:00:00","2017-08-31 01:00:00",false]')

Am I missed something again? Thanks Teguh

vitalidze commented 7 years ago

Looks like your request is incorrect and server cannot parse it. It makes sense to check server logs for error messages.